[BZ #5465]
[glibc.git] / nptl / ChangeLog
blob5cb4fee88c8ad189fcea2ee5730a94a5ea522bb9
1 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
3         [BZ #5465]
4         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
5         (__pthread_cond_timedwait): Don't use VDSO.
7 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
9         [BZ #5455]
10         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
11         Allow label before pthread_cleanup_pop.
12         (pthread_cleanup_pop_restore_np): Likewise.
14 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
16         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
17         Store 2 before returning ETIMEDOUT.
19 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
21         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
22         Store 2 before returning ETIMEDOUT.
23         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
24         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
25         (__lll_lock_wait_private): Optimize.
26         (__lll_lock_wait): Likewise.
28 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
30         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
31         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
32         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
34 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
36         [BZ #5240]
37         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
38         If we time out, try one last time to lock the futex to avoid
39         losing a wakeup signal.
40         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
41         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
43         [BZ #5245]
44         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
45         if necessary.
47 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
49         [BZ #5245]
50         * allocatestack.c (allocate_stack): Change ENOMEM error in case
51         mmap failed to EAGAIN.
52         * Makefile (tests): Add tst-basic7.
53         * tst-basic7.c: New file.
55 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
57         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
58         Use __linkin_atfork.
60 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
62         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
63         missing line continuations.
64         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
65         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
67 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
69         [BZ #5220]
70         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
71         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
72         (struct timer): Add next element.
73         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
74         enqueue timer structure into __active_timer_sigev_thread list.
75         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
76         remove timer struct from __active_timer_sigev_thread.
77         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
78         Before using timer structure make sure it is still on the
79         __active_timer_sigev_thread list.  Keep lock until done.
80         Define __active_timer_sigev_thread and
81         __active_timer_sigev_thread_lock.
83 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
85         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
86         Redefine thread_atfork for use of ATFORK_MEM.
87         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
88         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
89         function.
90         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
91         Use atomic operation when removing first element of list.
93 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
95         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
96         routine instead of an alias to __new_sem_post.
98 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
100         * init.c (__pthread_initialize_minimal): Initialize word to appease
101         valgrind.
103 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
105         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
106         libc.so just clear NAME.
107         (__libc_rwlock_fini): Nop inside of libc.so.
108         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
109         all zeros.
111 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
113         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
114         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
115         unlocking failed.
116         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
118 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
120         [BZ #4938]
121         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
122         reclaimed stack if necessary.
123         * Makefile (tests): Add tst-tsd6.
124         * tst-tsd6.c: New file.
126 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
128         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
129         Add private argument.
131 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
133         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
134         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
136 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
138         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
139         (__lll_robust_timedlock): Pass private as last argument to
140         __lll_robust_timedlock_wait.
141         (__lll_unlock): Fix a pasto.
143 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
145         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
146         sparc_old_sem): New structs.
147         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
148         (__sem_wait_cleanup): New function.
149         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
150         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
151         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
152         lll_futex_wait.
153         (__old_sem_wait): New function.
154         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
155         nptl/sysdeps/unix/sysv/linux/sparc version.
156         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
157         Likewise.
158         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
159         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
160         (__new_sem_trywait): Use sparc_old_sem structure.
161         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
162         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
163         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
164         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
165         lll_futex_timed_wait.
166         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
167         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
168         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
169         lll_futex_wake.
170         (__old_sem_post): New function.
171         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
172         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
173         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
174         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
175         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
176         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
178 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
180         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
181         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
182         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
183         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
184         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
185         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
186         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
187         Use FUTEX_WAKE_OP.
188         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
189         kernel-features.h and tcb-offsets.h.
190         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
191         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
192         process private.
193         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
194         tcb-offsets.h.
195         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
196         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
197         process private.
198         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
199         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
201         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
202         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
203         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
204         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
206 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
208         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
209         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
210         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
211         lll_futex_timed_wait.
213         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
214         __lll_robust_unlock): Rewrite as macros instead of inline functions.
215         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
216         __lll_robust_unlock, __lll_wait_tid): Likewise.
218 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
220         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
221         Fix a pasto.
222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
223         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
224         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
225         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
227         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
228         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
230         kernel-features.h.
231         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
232         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
233         process private.  Switch DW_CFA_advance_loc1 and some
234         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
236         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
237         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
238         process private.  Switch DW_CFA_advance_loc{1,2} and some
239         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
240         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
241         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
243         Likewise.
244         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
245         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
246         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
247         Likewise.
248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
249         (__pthread_cond_broadcast): Compare %r8 instead of
250         dep_mutex-cond_*(%rdi) with $-1.
251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
252         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
253         of oring.
255 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
257         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
259 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
261         * allocatestack.c: Include kernel-features.h.
262         * pthread_create.c: Likewise.
263         * pthread_mutex_init.c: Likewise.
264         * init.c: Likewise.
265         * pthread_cond_timedwait.c: Likewise.
266         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
267         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
269         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
270         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
272         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
273         Likewise.
274         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
275         Likewise.
276         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
277         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
278         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
279         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
281 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
283         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
284         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
285         byte elements.  One of them is the new __shared element.
286         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
287         adjust names of other padding elements.
288         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
289         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
290         byte elements.  One of them is the new __shared element.
291         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
292         adjust names of other padding elements.
293         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
294         Renamed __pad1 element to __shared, adjust names of other padding
295         elements.
296         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
297         (pthread_rwlock_t): Likewise.
298         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
299         typo.
301 2007-08-09  Anton Blanchard  <anton@samba.org>
303         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
305 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
308         <kernel-features.h>.
309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
311 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
313         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
314         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
315         dealing with robust mutexes.
316         * pthread_mutex_timedlock.c: Likewise.
317         * pthread_mutex_trylock.c: Likewise.
318         * pthread_mutex_unlock.c: Likewise.
319         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
321 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
323         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
324         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
325         (PTHREAD_MUTEX_PSHARED): Define.
326         * pthread_mutex_init.c (__pthread_mutex_init): Set
327         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
328         mutexes.
329         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
330         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
331         as second argument to lll_lock.
332         (LLL_MUTEX_TRYLOCK): Take mutex as argument
333         instead of its __data.__lock field.
334         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
335         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
336         to lll_robust_lock.
337         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
338         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
339         instead of mutex->__data.__kind directly, pass
340         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
341         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
342         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
343         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
344         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
345         to lll_timedlock, lll_robust_timedlock, lll_unlock and
346         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
347         of mutex->__data.__kind directly.
348         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
349         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
350         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
351         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
352         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
353         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
354         and lll_futex_wake.
355         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
356         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
357         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
358         directly.
359         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
360         Take mutex as argument instead of its __data.__lock field, pass
361         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
362         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
363         __data.__lock field.
364         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
365         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
366         to lll_robust_cond_lock.
367         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
368         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
369         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
370         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
371         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
372         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
373         lll_futex_wait.
374         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
375         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
376         lll_futex_wake.
377         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
378         pshared variable, pass it to lll_lock, lll_unlock,
379         lll_futex_timedwait and lll_futex_wake.
380         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
381         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
382         and lll_futex_wake.
383         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
384         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
385         macro.
386         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
387         lll_futex_wake_unlock): Likewise.
388         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
389         Likewise.
390         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
391         lll_futex_wake_unlock): Likewise.
392         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
393         Likewise.
394         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
395         lll_futex_wake_unlock): Likewise.
396         (lll_futex_wake): Fix a typo.
397         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
399         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
400         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
401         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
403         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
404         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
406         (__pthread_cond_timedwait): Likewise.
407         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
408         (__condvar_cleanup, __pthread_cond_wait): Likewise.
410 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
412         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
413         Don't use CGOTSETUP and CGOTRESTORE macros.
414         (CGOTSETUP, CGOTRESTORE): Remove.
415         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
416         @local symbol.
418 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
420         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
421         definitions for private futexes.
422         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
423         kernel-features.h and lowlevellock.h.  Use private futexes if
424         they are available.
425         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
426         (__lll_mutex_lock_wait): Rename to
427         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
428         (__lll_mutex_timedlock_wait): Rename to ...
429         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
430         Don't compile in for libc.so.
431         (__lll_mutex_unlock_wake): Rename to ...
432         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
433         (__lll_timedwait_tid): Use __NR_gettimeofday.
434         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
435         the header from assembler.  Renamed all lll_mutex_* resp.
436         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
437         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
438         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
439         Define.
440         (__lll_lock_wait_private): Add prototype.
441         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
442         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
443         __lll_unlock_wake): Likewise.
444         (lll_lock): Add private argument.  Call __lll_lock_wait_private
445         if private is constant LLL_PRIVATE.
446         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
447         lll_timedlock, lll_robust_timedlock): Add private argument.
448         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
449         if private is constant LLL_PRIVATE.
450         (lll_robust_unlock, lll_robust_dead): Add private argument.
451         (lll_lock_t): Remove.
452         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
453         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
454         lll_cond_wake, lll_cond_broadcast): Remove.
455         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
456         kernel-features.h and lowlevellock.h.
457         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
458         (LOAD_FUTEX_WAIT): Define.
459         (__lll_robust_mutex_lock_wait): Rename to ...
460         (__lll_robust_lock_wait): ... this.  Add private argument.
461         Use LOAD_FUTEX_WAIT macro.
462         (__lll_robust_mutex_timedlock_wait): Rename to ...
463         (__lll_robust_timedlock_wait): ... this.    Add private argument.
464         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
465         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
466         lowlevellock.h.
467         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
468         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
469         __lll_mutex_{lock,unlock}_*.
470         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
471         lowlevellock.h and pthread-errnos.h.
472         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
473         FUTEX_CMP_REQUEUE, EINVAL): Remove.
474         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
475         __lll_mutex_{lock,unlock}_*.
476         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
477         lowlevellock.h and pthread-errnos.h.
478         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
479         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
480         __lll_mutex_{lock,unlock}_*.
481         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
482         lowlevellock.h.
483         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
484         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
485         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
486         (__condvar_tw_cleanup): Likewise.
487         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
488         lowlevellock.h.
489         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
490         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
491         __lll_mutex_{lock,unlock}_*.
492         ( __condvar_w_cleanup): Likewise.
493         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
494         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
495         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
496         lowlevellock.h.
497         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
498         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
499         __lll_mutex_{lock,unlock}_*.
500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
501         lowlevellock.h.
502         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
503         FUTEX_PRIVATE_FLAG): Remove.
504         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
505         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
506         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
507         lowlevellock.h.
508         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
509         FUTEX_PRIVATE_FLAG): Remove.
510         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
511         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
512         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
513         lowlevellock.h.
514         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
515         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
516         __lll_mutex_{lock,unlock}_*.
517         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
518         lowlevellock.h.
519         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
520         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
521         __lll_mutex_{lock,unlock}_*.
522         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
523         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
524         (__new_sem_post): Use standard initial exec code sequences.
525         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
526         lowlevellock.h.
527         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
528         FUTEX_PRIVATE_FLAG): Remove.
529         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
530         exec code sequences.
531         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
532         (__new_sem_trywait): Use standard initial exec code sequences.
533         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
534         (__new_sem_wait): Use standard initial exec code sequences.
536 2007-07-31  Anton Blanchard  <anton@samba.org>
538         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
539         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
540         atomic_full_barrier.
542 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
544         * allocatestack.c (stack_cache_lock): Change type to int.
545         (get_cached_stack, allocate_stack, __deallocate_stack,
546         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
547         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
548         as second argument to lll_lock and lll_unlock macros on
549         stack_cache_lock.
550         * pthread_create.c (__find_in_stack_list): Likewise.
551         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
552         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
553         as second argument.
554         * descr.h (struct pthread): Change lock and setxid_futex field
555         type to int.
556         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
557         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
558         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
559         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
560         Likewise.
561         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
562         * pthread_cond_init.c (__pthread_cond_init): Likewise.
563         * pthreadP.h (__attr_list_lock): Change type to int.
564         * pthread_attr_init.c (__attr_list_lock): Likewise.
565         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
566         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
567         lll_{,un}lock.
568         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
569         also for lll_futex_{wake,wait}.
570         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
571         a pointer to const.
572         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
573         LLL_SHARED as second argument to lll_{,un}lock.
574         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
575         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
576         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
577         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
578         Likewise.
579         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
580         as second argument to lll_{,un}lock macros on pd->lock.
581         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
582         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
583         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
584         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
585         Likewise.
586         * sysdeps/pthread/createthread.c (do_clone, create_thread):
587         Likewise.
588         * pthread_once.c (once_lock): Change type to int.
589         (__pthread_once): Pass LLL_PRIVATE as second argument to
590         lll_{,un}lock macros on once_lock.
591         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
592         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
593         rwlock->__data.__shared as second argument to them and similarly
594         for lll_futex_w*.
595         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
596         Likewise.
597         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
598         Likewise.
599         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
600         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
601         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
602         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
603         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
604         to lll_{,un}lock macros on __sem_mappings_lock.
605         * sem_open.c (check_add_mapping): Likewise.
606         (__sem_mappings_lock): Change type to int.
607         * semaphoreP.h (__sem_mappings_lock): Likewise.
608         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
609         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
610         instead of lll_*mutex_*, pass LLL_SHARED as last
611         argument.
612         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
613         pass LLL_SHARED as last argument.
614         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
615         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
616         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
617         pass LLL_SHARED as last argument.
618         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
619         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
620         LLL_SHARED as last argument.
621         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
622         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
623         Similarly.
624         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
625         __libc_lock_lock_recursive, __libc_lock_unlock,
626         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
627         argument to lll_{,un}lock.
628         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
629         _IO_lock_unlock): Likewise.
630         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
631         compound literal.
632         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
633         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
634         __fork_lock.
635         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
636         free_mem): Likewise.
637         (__fork_lock): Change type to int.
638         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
639         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
640         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
641         lll_futex_wake.
642         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
643         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
644         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
645         New function.
646         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
647         pass it through to lll_futex_*wait, only compile in when
648         IS_IN_libpthread.
649         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
650         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
651         argument and pass it through to lll_futex_*wait.
652         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
653         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
654         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
655         inline functions to __lll_* resp. __lll_robust_*.
656         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
657         (lll_mutex_dead): Add private argument.
658         (__lll_lock_wait_private): New prototype.
659         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
660         __lll_robust_lock_timedwait): Add private argument to prototypes.
661         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
662         call __lll_lock_wait_private, otherwise pass private to
663         __lll_lock_wait.
664         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
665         __lll_robust_timedlock): Add private argument, pass it to
666         __lll_*wait functions.
667         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
668         call __lll_unlock_wake_private, otherwise pass private to
669         __lll_unlock_wake.
670         (__lll_robust_unlock): Add private argument, pass it to
671         __lll_robust_unlock_wake.
672         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
673         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
674         argument, pass it through to __lll_* inline function.
675         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
676         (lll_lock_t): Remove.
677         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
678         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
679         lll_cond_wake, lll_cond_broadcast): Remove.
680         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
681         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
682         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
683         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
685         the header from assembler.  Renamed all lll_mutex_* resp.
686         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
687         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
688         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
689         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
690         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
691         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
692         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
693         Remove prototype.
694         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
695         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
696         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
697         (lll_trylock): Likewise, use __lll_trylock_asm, pass
698         MULTIPLE_THREADS_OFFSET as another asm operand.
699         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
700         MULTIPLE_THREADS_OFFSET as last asm operand, call
701         __lll_lock_wait_private if private is constant LLL_PRIVATE,
702         otherwise pass private as another argument to __lll_lock_wait.
703         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
704         lll_timedlock, lll_robust_timedlock): Add private argument, pass
705         private as another argument to __lll_*lock_wait call.
706         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
707         MULTIPLE_THREADS_OFFSET as another asm operand, call
708         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
709         otherwise pass private as another argument to __lll_unlock_wake.
710         (lll_robust_unlock): Add private argument, pass private as another
711         argument to __lll_unlock_wake.
712         (lll_robust_dead): Add private argument, use __lll_private_flag
713         macro.
714         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
715         LLL_MUTEX_LOCK_INITIALIZER.
716         (lll_lock_t): Remove.
717         (LLL_LOCK_INITIALIZER_WAITERS): Define.
718         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
719         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
720         lll_cond_wake, lll_cond_broadcast): Remove.
721         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
722         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
723         2007-05-2{3,9} changes.
724         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
725         kernel-features.h and lowlevellock.h.
726         (LOAD_PRIVATE_FUTEX_WAIT): Define.
727         (LOAD_FUTEX_WAIT): Rewritten.
728         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
729         define.
730         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
731         (__lll_mutex_lock_wait): Rename to ...
732         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
733         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
734         (__lll_mutex_timedlock_wait): Rename to ...
735         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
736         contains private argument.  Don't compile in for libc.so.
737         (__lll_mutex_unlock_wake): Rename to ...
738         (__lll_unlock_wake): ... this.  %ecx contains private argument.
739         Don't compile in for libc.so.
740         (__lll_timedwait_tid): Use __NR_gettimeofday.
741         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
742         kernel-features.h and lowlevellock.h.
743         (LOAD_FUTEX_WAIT): Define.
744         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
745         define.
746         (__lll_robust_mutex_lock_wait): Rename to ...
747         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
748         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
749         macro.
750         (__lll_robust_mutex_timedlock_wait): Rename to ...
751         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
752         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
753         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
754         lowlevellock.h.
755         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
756         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
757         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
758         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
759         to __lll_lock_wait in %edx.
760         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
761         Include lowlevellock.h and pthread-errnos.h.
762         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
763         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
764         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
765         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
766         pass LLL_SHARED in %ecx to both __lll_lock_wait and
767         __lll_unlock_wake.
768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
769         Include lowlevellock.h and pthread-errnos.h.
770         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
771         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
772         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
773         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
774         pass LLL_SHARED in %ecx to both __lll_lock_wait and
775         __lll_unlock_wake.
776         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
777         Include lowlevellock.h.
778         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
779         Don't define.
780         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
781         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
782         pass LLL_SHARED in %ecx to both __lll_lock_wait and
783         __lll_unlock_wake.  Use __NR_gettimeofday.
784         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
785         Include lowlevellock.h.
786         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
787         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
788         to __lll_*, pass cond_lock address in %edx rather than %ecx to
789         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
790         and __lll_unlock_wake.
791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
792         Include lowlevellock.h.
793         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
794         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
795         MUTEX(%ebx) address in %edx rather than %ecx to
796         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
797         and __lll_unlock_wake.  Move return value from %ecx to %edx
798         register.
799         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
800         Include lowlevellock.h.
801         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
802         Don't define.
803         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
804         MUTEX(%ebp) address in %edx rather than %ecx to
805         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
806         and __lll_unlock_wake.  Move return value from %ecx to %edx
807         register.  Use __NR_gettimeofday.
808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
809         Include lowlevellock.h.
810         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
811         Don't define.
812         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
813         MUTEX(%ebp) address in %edx rather than %ecx to
814         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
815         and __lll_unlock_wake.  Move return value from %ecx to %edx
816         register.  Use __NR_gettimeofday.
817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
818         Include lowlevellock.h.
819         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
820         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
821         MUTEX(%edi) address in %edx rather than %ecx to
822         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
823         and __lll_unlock_wake.
824         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
825         Include lowlevellock.h.
826         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
827         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
828         MUTEX(%ebx) address in %edx rather than %ecx to
829         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
830         and __lll_unlock_wake.  Move return value from %ecx to %edx
831         register.
832         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
833         lowlevellock.h.
834         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
835         define.
836         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
837         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
838         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
839         lowlevellock.h.
840         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
841         (sem_timedwait): Use __NR_gettimeofday.
842         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
843         lowlevellock.h.
844         (LOCK): Don't define.
845         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
846         lowlevellock.h.
847         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
848         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
849         are waiters.
850         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
851         2007-05-2{3,9} changes.
852         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
853         kernel-features.h and lowlevellock.h.
854         (LOAD_PRIVATE_FUTEX_WAIT): Define.
855         (LOAD_FUTEX_WAIT): Rewritten.
856         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
857         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
858         (__lll_mutex_lock_wait): Rename to ...
859         (__lll_lock_wait): ... this.  %esi is now private argument.
860         Don't compile in for libc.so.
861         (__lll_mutex_timedlock_wait): Rename to ...
862         (__lll_timedlock_wait): ... this.  %esi contains private argument.
863         Don't compile in for libc.so.
864         (__lll_mutex_unlock_wake): Rename to ...
865         (__lll_unlock_wake): ... this.  %esi contains private argument.
866         Don't compile in for libc.so.
867         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
868         kernel-features.h and lowlevellock.h.
869         (LOAD_FUTEX_WAIT): Define.
870         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
871         (__lll_robust_mutex_lock_wait): Rename to ...
872         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
873         Use LOAD_FUTEX_WAIT macro.
874         (__lll_robust_mutex_timedlock_wait): Rename to ...
875         (__lll_robust_timedlock_wait): ... this. %esi argument contains
876         private, use LOAD_FUTEX_WAIT macro.
877         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
878         lowlevellock.h.
879         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
880         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
881         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
882         __lll_lock_wait and __lll_unlock_wake.
883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
884         Include lowlevellock.h and pthread-errnos.h.
885         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
886         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
887         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
888         pass LLL_SHARED in %esi to both __lll_lock_wait and
889         __lll_unlock_wake.
890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
891         Include lowlevellock.h and pthread-errnos.h.
892         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
893         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
894         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
895         pass LLL_SHARED in %esi to both __lll_lock_wait and
896         __lll_unlock_wake.
897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
898         Include lowlevellock.h.
899         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
900         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
901         pass LLL_SHARED in %esi to both __lll_lock_wait and
902         __lll_unlock_wake.
903         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
904         Include lowlevellock.h.
905         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
906         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
907         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
908         and __lll_unlock_wake.
909         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
910         Include lowlevellock.h.
911         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
912         Don't define.
913         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
914         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
915         and __lll_unlock_wake.
916         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
917         Include lowlevellock.h.
918         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
919         Don't define.
920         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
921         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
922         and __lll_unlock_wake.
923         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
924         Include lowlevellock.h.
925         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
926         Don't define.
927         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
928         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
929         and __lll_unlock_wake.
930         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
931         Include lowlevellock.h.
932         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
933         Don't define.
934         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
935         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
936         and __lll_unlock_wake.
937         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
938         Include lowlevellock.h.
939         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
940         Don't define.
941         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
942         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
943         and __lll_unlock_wake.
944         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
945         lowlevellock.h.
946         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
947         define.
948         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
949         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
950         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
951         lowlevellock.h.
952         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
953         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
954         lowlevellock.h.
955         (LOCK): Don't define.
956         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
957         lowlevellock.h.
958         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
959         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
960         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
961         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
962         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
963         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
964         (__lll_lock_wait_private): New function.
965         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
966         it to lll_futex_*wait.  Don't compile in for libc.so.
967         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
968         Remove.
969         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
970         (struct sparc_pthread_barrier): Remove.
971         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
972         struct sparc_pthread_barrier.  Pass
973         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
974         and lll_futex_wait macros.
975         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
976         Remove.
977         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
978         Include sparc pthread_barrier_wait.c instead of generic one.
980 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
982         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
984         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
985         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
986         %ecx.
987         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
988         (pthread_rwlock_timedwrlock): Likewise.
989         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
990         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
992 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
994         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
996 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
998         * tst-locale2.c (useless): Add return statement.
1000 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1002         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1003         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1004         * pthread_create.c (start_thread): Likewise.
1005         * init.c (sighandler_setxid): Likewise.
1006         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1007         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1008         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1009         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1010         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1011         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1012         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1013         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1014         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1015         Likewise.
1016         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1017         Likewise.
1018         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1019         Likewise.
1020         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1021         __rtld_notify): Likewise.
1022         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1023         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1024         __pthread_once): Likewise.
1025         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1026         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1027         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1028         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1029         (lll_futex_wait): Add private argument, define as wrapper around
1030         lll_futex_timed_wait.
1031         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1032         use __lll_private_flag macro.
1033         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1034         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1035         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1036         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1037         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1038         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1039         (lll_futex_wait): Add private argument, define as wrapper around
1040         lll_futex_timed_wait.
1041         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1042         use __lll_private_flag macro.
1043         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1044         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1045         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1046         Define.
1047         (lll_futex_timed_wait, lll_futex_wake): Use it.
1048         (lll_private_futex_wait, lll_private_futex_timed_wait,
1049         lll_private_futex_wake): Removed.
1050         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1051         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1052         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1053         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1054         (lll_futex_wait): Add private argument, define as wrapper around
1055         lll_futex_timed_wait.
1056         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1057         use __lll_private_flag macro.
1058         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1059         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1060         to lll_futex_*.
1061         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1062         (lll_private_futex_wait, lll_private_futex_timed_wait,
1063         lll_private_futex_wake): Removed.
1064         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1065         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1066         (lll_private_futex_wait, lll_private_futex_timed_wait,
1067         lll_private_futex_wake): Removed.
1068         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1069         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1070         * sysdeps/unix/sysv/linux/sparc/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/sh/lowlevellock.h (__lll_private_flag):
1080         Define.
1081         (lll_futex_timed_wait, lll_futex_wake): Use it.
1082         (lll_private_futex_wait, lll_private_futex_timed_wait,
1083         lll_private_futex_wake): Removed.
1085 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1087         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1088         of the structure for sparc32.
1090 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1092         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1094 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1096         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1097         code used when private futexes are assumed.
1098         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1099         Likewise.
1101 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1103         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1104         (__lll_private_flag): Define.
1105         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1106         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1107         __lll_private_flag.
1108         (lll_private_futex_wait, lll_private_futex_timedwait,
1109         lll_private_futex_wake): Define as wrapper around non-_private
1110         macros.
1111         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1112         (__lll_private_flag): Define.
1113         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1114         (lll_private_futex_wait, lll_private_futex_timedwait,
1115         lll_private_futex_wake): Define as wrapper around non-_private
1116         macros.
1118 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1120         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1121         parameter to lll_futex_wait call.
1122         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1124         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1125         Replace lll_futex_wait with lll_private_futex_wait.
1126         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1127         Add LLL_SHARED parameter to lll_futex_wake().
1129         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1130         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1131         lll_private_futex_wake.
1132         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1133         bit from private parm before syscall.
1134         (lll_futex_timed_wait): Likewise.
1135         (lll_futex_wake): Likewise.
1136         (lll_futex_wake_unlock): Likewise.
1137         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1138         (lll_robust_mutex_unlock): Likewise.
1139         (lll_mutex_unlock_force): Likewise.
1140         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1142 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1144         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1145         compilation when unconditionally using private futexes.
1146         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1147         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1148         Likewise.
1149         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1150         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1152 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1154         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1155         Define.
1157 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1159         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1160         kernel-features.h.
1162 2007-05-16  Roland McGrath  <roland@redhat.com>
1164         * init.c (__nptl_initial_report_events): New variable.
1165         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1166         to that.
1168 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1170         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1171         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1173 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1175         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1176         implementation.
1178 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1180         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1181         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1182         * pthread_mutex_timedlock.c: Likewise.
1183         * pthread_mutex_trylock.c: Likewise.
1184         * pthread_mutex_unlock.c: Likewise.
1186 2007-06-17  Andreas Schwab  <schwab@suse.de>
1188         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1189         sections.
1191 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1193         * allocatestack.c (allocate_stack): Make code compile if
1194         __ASSUME_PRIVATE_FUTEX is set.
1196 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1199         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1201         (__pthread_rwlock_wrlock): Likewise.
1202         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1203         (pthread_rwlock_timedrdlock): Likewise.
1204         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1205         (pthread_rwlock_timedwrlock): Likewise.
1206         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1207         (__pthread_rwlock_unlock): Likewise.
1209 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1211         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1212         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1213         Split __flags into __flags, __shared, __pad1 and __pad2.
1214         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1215         futexes if they are available.
1216         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1217         in libc-lowlevellock.S allow using private futexes.
1218         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1219         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1220         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1221         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1222         lll_private_futex_timed_wait and lll_private_futex_wake.
1223         (lll_robust_mutex_unlock): Fix typo.
1224         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1225         field in futex command setup.
1226         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1227         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1228         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1229         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1230         if they are available.  Remove clear_once_control.
1231         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1232         futexes if they are available.
1233         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1234         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1235         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1236         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1237         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1238         Wake only when there are waiters.
1239         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1240         support.  Indicate that there are waiters.  Remove unnecessary
1241         extra cancellation test.
1242         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1243         left-over duplication of __sem_wait_cleanup.
1245 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1247         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1248         parameter to lll_futex_wait, lll_futex_timed_wait, and
1249         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1250         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1251         lll_private_futex_wake.
1252         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1253         * allocatestack.c: Adjust use of lll_futex_* macros.
1254         * init.c: Likewise.
1255         * lowlevellock.h: Likewise.
1256         * pthread_barrier_wait.c: Likewise.
1257         * pthread_cond_broadcast.c: Likewise.
1258         * pthread_cond_destroy.c: Likewise.
1259         * pthread_cond_signal.c: Likewise.
1260         * pthread_cond_timedwait.c: Likewise.
1261         * pthread_cond_wait.c: Likewise.
1262         * pthread_create.c: Likewise.
1263         * pthread_mutex_lock.c: Likewise.
1264         * pthread_mutex_setprioceiling.c: Likewise.
1265         * pthread_mutex_timedlock.c: Likewise.
1266         * pthread_mutex_unlock.c: Likewise.
1267         * pthread_rwlock_timedrdlock.c: Likewise.
1268         * pthread_rwlock_timedwrlock.c: Likewise.
1269         * pthread_rwlock_unlock.c: Likewise.
1270         * sysdeps/alpha/tls.h: Likewise.
1271         * sysdeps/i386/tls.h: Likewise.
1272         * sysdeps/ia64/tls.h: Likewise.
1273         * sysdeps/powerpc/tls.h: Likewise.
1274         * sysdeps/pthread/aio_misc.h: Likewise.
1275         * sysdeps/pthread/gai_misc.h: Likewise.
1276         * sysdeps/s390/tls.h: Likewise.
1277         * sysdeps/sh/tls.h: Likewise.
1278         * sysdeps/sparc/tls.h: Likewise.
1279         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1280         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1281         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1282         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1283         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1284         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1285         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1286         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1287         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1288         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1289         Likewise.
1290         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1291         * sysdeps/x86_64/tls.h: Likewise.
1293 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1295         * pthread_getattr_np.c: No need to install a cancellation handler,
1296         this is no cancellation point.
1297         * pthread_getschedparam.c: Likewise.
1298         * pthread_setschedparam.c: Likewise.
1299         * pthread_setschedprio.c: Likewise.
1300         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1301         lll_unlock_wake_cb.
1302         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1303         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1304         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1305         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1306         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1307         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1308         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1309         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1310         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1311         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1312         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1313         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1315         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1316         whether there are more than one thread makes no sense here since
1317         we only call the slow path if the locks are taken.
1318         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1320         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1321         COND_NWAITERS_SHIFT.
1322         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1323         COND_CLOCK_BITS.
1324         * pthread_cond_init.c: Likewise.
1325         * pthread_cond_timedwait.c: Likewise.
1326         * pthread_cond_wait.c: Likewise.
1327         * pthread_condattr_getclock.c: Likewise.
1328         * pthread_condattr_setclock.c: Likewise.
1329         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1332         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1333         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1335 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1337         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1338         unistd.h.
1340         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1341         insn suffix.
1342         (THREAD_GSCOPE_GET_FLAG): Remove.
1343         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1344         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1345         changes.
1346         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1347         (THREAD_GSCOPE_GET_FLAG): Remove.
1348         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1349         instead of THREAD_GSCOPE_GET_FLAG.
1350         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1351         it.
1352         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1353         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1354         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1355         THREAD_GSCOPE_WAIT): Define.
1356         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1357         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1358         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1359         THREAD_GSCOPE_WAIT): Define.
1360         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1361         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1362         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1363         THREAD_GSCOPE_WAIT): Define.
1364         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1365         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1366         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1367         THREAD_GSCOPE_WAIT): Define.
1369 2007-05-24  Richard Henderson  <rth@redhat.com>
1371         * descr.h (struct pthread): Add header.gscope_flag.
1372         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1373         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1374         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1375         THREAD_GSCOPE_WAIT): Define.
1377 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1379         * init.c: Make it compile with older kernel headers.
1381         * tst-initializers1.c: Show through exit code which test failed.
1383         * pthread_rwlock_init.c: Also initialize __shared field.
1384         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1385         element in rwlock structure into four byte elements.  One of them is
1386         the new __shared element.
1387         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1388         Likewise.
1389         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1390         __shared, adjust names of other padding elements.
1391         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1392         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1393         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1394         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1395         FUTEX_PRIVATE_FLAG.
1396         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1397         futex to use private operations if possible.
1398         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1399         Likewise.
1400         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1401         Likewise.
1402         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1403         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1404         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1406         Likewise.
1407         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1408         Likewise.
1409         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1410         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1412 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1414         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1415         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1416         * pthread_rwlock_timedrdlock.c: Likewise.
1417         * pthread_rwlock_tryrdlock.c: Likewise.
1419         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1420         optimization.
1422         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1423         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1424         duplication of __sem_wait_cleanup.
1426         * allocatestack.c: Revert last change.
1427         * init.c: Likewise.
1428         * sysdeps/i386/tls.h: Likewise.
1429         * sysdeps/x86_64/tls.h: Likewise.
1430         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1431         header structure.
1432         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1434         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1435         Add private field.
1436         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1437         * pthread_barrier_init.c: Set private flag if pshared and private
1438         futexes are supported.
1439         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1440         private field in futex command setup.
1441         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1443 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1445         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1446         support.
1447         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1448         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1449         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1450         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1451         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1453         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1454         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1455         fields in the structure.
1456         (__old_sem_init): New function.
1457         * sem_open.c: Initialize all fields of the structure.
1458         * sem_getvalue.c: Adjust for renamed element.
1459         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1460         (gen-as-const-headers): Add structsem.sym.
1461         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1462         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1463         struct new_sem.  Add struct old_sem.
1464         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1465         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1466         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1467         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1468         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1469         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1470         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1471         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1472         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1473         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1474         * tst-sem10.c: New file.
1475         * tst-sem11.c: New file.
1476         * tst-sem12.c: New file.
1477         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1478         of struct sem.
1480 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1481             Jakub Jelinek  <jakub@redhat.com>
1483         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1484         Move __pthread_enable_asynccancel right before futex syscall.
1485         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1486         Likewise.
1488 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1490         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1491         THREAD_COPY_PRIVATE_FUTEX): Define.
1492         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1493         THREAD_COPY_PRIVATE_FUTEX): Define.
1494         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1495         * init.c (__pthread_initialize_minimal_internal): Use
1496         THREAD_SET_PRIVATE_FUTEX.
1498         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1499         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1500         THREAD_GSCOPE_FLAG_WAIT): Define.
1501         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1502         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1503         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1504         PTR_DEMANGLE.
1505         (THREAD_GSCOPE_GET_FLAG): Define.
1506         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1507         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1508         instead of ->header.gscope_flag directly.
1510 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1512         * init.c (__pthread_initialize_minimal_internal): Check whether
1513         private futexes are available.
1514         * allocatestack.c (allocate_stack): Copy private_futex field from
1515         current thread into the new stack.
1516         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1517         futexes if they are available.
1518         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1519         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1520         in libc-lowlevellock.S allow using private futexes.
1521         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1522         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1523         FUTEX_PRIVATE_FLAG.
1524         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1525         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1526         if they are available.
1527         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1528         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1529         * sysdeps/i386/tcb-offsets.sym: Likewise.
1530         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1531         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1533 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1535         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1536         Remove ptr_wait_lookup_done again.
1537         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1538         (__pthread_initialize_minimal_internal): Initialize
1539         _dl_wait_lookup_done pointer in _rtld_global directly.
1540         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1541         Remove code to code _dl_wait_lookup_done.
1542         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1543         encrypted for now.
1545 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1547         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1548         pthread_mutex_init failed with ENOTSUP.
1550 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1552         * allocatestack.c (__wait_lookup_done): New function.
1553         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1554         Add ptr_wait_lookup_done.
1555         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1556         * pthreadP.h: Declare __wait_lookup_done.
1557         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1558         Define macros to implement reference handling of global scope.
1559         * sysdeps/x86_64/tls.h: Likewise.
1560         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1561         Initialize GL(dl_wait_lookup_done).
1563 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1565         [BZ #4512]
1566         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1567         is detected.
1568         * pthread_mutex_timedlock.c: Likewise.
1569         * pthread_mutex_trylock.c: Likewise.
1570         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1572         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1573         * tst-robust9.c: New file.
1574         * tst-robustpi9.c: New file.
1576         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1577         unnecessary extra cancellation test.
1579 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1581         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1582         extra cancellation test.
1583         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1585 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1587         * descr.h (struct pthread): Rearrange members to fill hole in
1588         64-bit layout.
1590         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1591         (__pthread_setaffinity_new): If syscall was successful and
1592         RESET_VGETCPU_CACHE is defined, use it before returning.
1593         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1595 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1597         [BZ #4455]
1598         * tst-align2.c: Include stackinfo.h.
1599         * tst-getpid1.c: Likewise.
1601 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1603         [BZ #4455]
1604         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1605         * tst-getpid1.c (do_test): Likewise.
1607         [BZ #4456]
1608         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1609         (allocate_stack): Likewise.
1611 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1613         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1614         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1615         (__lll_robust_timedlock_wait): Likewise.
1616         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1618 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1620         [BZ #4465]
1621         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1622         * tst-cancel4.c (tf_fdatasync): New test.
1624 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1626         [BZ #4392]
1627         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1628         check mutexes like normal mutexes.
1630         [BZ #4306]
1631         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1632         Initialize the whole sigevent structure to appease valgrind.
1634 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1636         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1637         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1639 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1641         * tst-locale1.c: Avoid warnings.
1642         * tst-locale2.c: Likewise.
1644 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1646         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1647         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1649 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1651         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1652         __extern_always_inline where appropriate.
1653         * sysdeps/pthread/pthread.h: Likewise.
1655 2007-03-13  Richard Henderson  <rth@redhat.com>
1657         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1658         separate cfi regions for the two subsections.
1660 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1662         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1663         new thread, don't just decrement it.
1664         Patch by Suzuki K P <suzuki@in.ibm.com>.
1666 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1668         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1669         PTHFCT_CALL definition.
1671 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1673         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1674         available, don't use it.
1676 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1678         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1679         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1680         call into the kernel to delay.
1682 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1684         * tst-initializers1.c: We want to test the initializers as seen
1685         outside of libc, so undefined _LIBC.
1687         * pthread_join.c (cleanup): Avoid warning.
1689 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1691         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1692         (__lll_timedwait_tid): Add unwind info.
1694         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1695         function table, mangle the pointers.
1696         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1697         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1698         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1699         demangle pointers before use.
1700         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1701         demangle pointer.
1702         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1703         * sysdeps/pthread/setxid.h: Likewise.
1705 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1707         * tst-rwlock7.c: Show some more information in case of correct
1708         behavior.
1710 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1712         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1713         (lll_futex_timed_wait): Undo part of last change, don't negate
1714         return value.
1716 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1718         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1719         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1721 2006-12-28  David S. Miller  <davem@davemloft.net>
1723         * shlib-versions: Fix sparc64 linux target specification.
1725 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1727         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1728         Adjust include path for pthread_barrier_wait.c move.
1730 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1732         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1733         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1735 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1737         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1738         6 argument cancellable syscalls.
1739         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1740         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1741         6 argument cancellable syscalls.
1742         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1744 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1746         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1747         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1749 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1751         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1752         __sync_lock_release instead of __sync_lock_release_si.
1754 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1756         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1757         Define.
1758         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1759         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1760         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1761         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1762         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1763         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1764         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1765         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1766         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1767         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1768         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1770 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1772         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1773         * pthread_barrier_wait.c: ...here.
1774         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1775         * pthread_cond_broadcast.c: ...here.
1776         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1777         * pthread_cond_signal.c: ...here.
1778         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1779         * pthread_cond_timedwait.c: ...here.
1780         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1781         * pthread_cond_wait.c: ...here.
1782         * sysdeps/pthread/pthread_once.c: Move to...
1783         * pthread_once.c: ...here.
1784         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1785         * pthread_rwlock_rdlock.c: ...here.
1786         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1787         * pthread_rwlock_timedrdlock.c: ...here.
1788         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1789         * pthread_rwlock_timedwrlock.c: ...here.
1790         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1791         * pthread_rwlock_unlock.c: ...here.
1792         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1793         * pthread_rwlock_wrlock.c: ...here.
1794         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1795         * pthread_spin_destroy.c: ...here.
1796         * sysdeps/pthread/pthread_spin_init.c: Move to...
1797         * pthread_spin_init.c: ...here.
1798         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1799         * pthread_spin_unlock.c: ...here.
1800         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1801         * pthread_getcpuclockid.c: ...here.
1803         * init.c: USE_TLS support is now always enabled.
1804         * tst-tls5.h: Likewise.
1805         * sysdeps/alpha/tls.h: Likewise.
1806         * sysdeps/i386/tls.h: Likewise.
1807         * sysdeps/ia64/tls.h: Likewise.
1808         * sysdeps/powerpc/tls.h: Likewise.
1809         * sysdeps/s390/tls.h: Likewise.
1810         * sysdeps/sh/tls.h: Likewise.
1811         * sysdeps/sparc/tls.h: Likewise.
1812         * sysdeps/x86_64/tls.h: Likewise.
1814 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1816         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1817         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1818         failed.
1820         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1821         Define to THREAD_SELF->header.multiple_threads.
1822         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1823         Likewise.
1824         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1825         Likewise.
1826         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1827         (SINGLE_THREAD_P): Likewise.
1828         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1829         (SINGLE_THREAD_P): Likewise.
1830         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1831         (SINGLE_THREAD_P): Likewise.
1832         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1833         (SINGLE_THREAD_P): Likewise.
1834         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1835         Likewise.
1836         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1837         (SINGLE_THREAD_P): Likewise.
1838         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1839         (SINGLE_THREAD_P): Likewise.
1840         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1841         Likewise.
1843 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1845         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1846         by default rather than 2_3_3.
1848 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1850         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1851         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1852         atomic_* instead of catomic_* macros.
1854 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1856         [BZ #3285]
1857         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1858         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1859         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1860         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1861         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1862         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1863         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1864         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1865         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1866         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1867         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1868         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1869         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1871 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1873         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1874         cancelable syscalls with six parameters.
1876         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1877         operations instead of atomic_*.
1879 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1881         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1883 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1885         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1886         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1887         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1888         New file.
1889         * pthread_attr_setstack.c: Allow overwriting the version number of the
1890         new symbol.
1891         * pthread_attr_setstacksize.c: Likewise.
1892         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1893         it.
1894         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1895         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1897 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1899         [BZ #3251]
1900         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1901         Patch by Petr Baudis.
1903 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1905         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1907         * tst-cancel2.c (tf): Loop as long as something was written.
1909 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1911         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1912         mutexes wake all mutexes.
1913         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1914         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1915         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1917 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1919         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1920         to guarantee the thread is always canceled.
1922 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1924         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1925         Include stdlib.h.
1926         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1927         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1929         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1932 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1934         [BZ #3123]
1935         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1936         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1937         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1938         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1940         * Makefile (tests): Add tst-cond22.
1941         * tst-cond22.c: New file.
1943 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1945         [BZ #3124]
1946         * descr.h (struct pthread): Add parent_cancelhandling.
1947         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1948         cancelhandling value to child.
1949         * pthread_create.c (start_thread): If parent thread was canceled
1950         reset the SIGCANCEL mask.
1951         * Makefile (tests): Add tst-cancel25.
1952         * tst-cancel25.c: New file.
1954 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1955             Ulrich Drepper  <drepper@redhat.com>
1957         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1958         counterp if it is already zero.
1959         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1961 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1962             Roland McGrath  <roland@redhat.com>
1964         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1965         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1966         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1967         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1968         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1969         lll_robust_mutex_timedlock, lll_mutex_unlock,
1970         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1971         Add _L_*_ symbols around the subsection.
1972         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1973         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1975 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1976             Roland McGrath  <roland@redhat.com>
1978         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1979         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1980         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1981         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1982         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1983         lll_robust_mutex_timedlock, lll_mutex_unlock,
1984         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1985         Add _L_*_ symbols around the subsection.
1986         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1987         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1989 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1991         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1992         change because it can disturb too much existing code.  If real hard
1993         reader preference is needed we'll introduce another type.
1994         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1995         (pthread_rwlock_timedwrlock): Likewise.
1996         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1997         Likewise.
1999 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2001         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2002         reader preference.
2003         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2004         (pthread_rwlock_timedwrlock): Likewise.
2005         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2006         Likewise.
2008 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2010         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2011         Only define ifdef SHARED.
2013 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2015         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2016         (free_stacks): ...here.
2017         (__free_stack_cache): New function.
2018         * pthreadP.h: Declare __free_stack_cache.
2019         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2020         ptr_freeres.
2021         * init.c (pthread_functions): Initialize ptr_freeres.
2022         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2023         New freeres function.
2025 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2027         [BZ #3018]
2028         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2030 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2032         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2033         _XOPEN_REALTIME_THREADS.
2035 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2037         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2038         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2039         HAVE_CLOCK_GETTIME_VSYSCALL.
2040         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2042 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2044         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2045         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2046         * descr.h (struct priority_protection_data): New type.
2047         (struct pthread): Add tpp field.
2048         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2049         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2050         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2051         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2052         TPP mutexes.
2053         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2054         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2055         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2056         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2057         * tpp.c: New file.
2058         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2059         boosted by TPP.
2060         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2061         * pthread_mutexattr_getprioceiling.c
2062         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2063         in the SCHED_FIFO priority range.
2064         * pthread_mutexattr_setprioceiling.c
2065         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2066         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2067         if mutex is not TPP.  Ceiling is now in __data.__lock.
2068         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2069         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2070         is now in __data.__lock.  Add locking.
2071         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2072         * Makefile (libpthread-routines): Add tpp.
2073         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2074         * tst-tpp.h: New file.
2075         * tst-mutexpp1.c: New file.
2076         * tst-mutexpp6.c: New file.
2077         * tst-mutexpp10.c: New file.
2078         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2079         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2081 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2083         [BZ #2843]
2084         * pthread_join.c (pthread_join): Account for self being canceled
2085         when checking for deadlocks.
2086         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2087         (tf1): Don't print anything after pthread_join returns, this would be
2088         another cancellation point.
2089         (tf2): Likewise.
2090         * tst-join6.c: New file.
2091         * Makefile (tests): Add tst-join6.
2093 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2095         [BZ #2892]
2096         * pthread_setspecific.c (__pthread_setspecific): Check
2097         out-of-range index before checking for unused key.
2099         * sysdeps/pthread/gai_misc.h: New file.
2101 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2103         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2104         file.  Don't use sysctl.
2105         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2106         overwrite the file if this is likely not true.
2108 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2110         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2111         * Makefile (tests): Add tst-getpid3.
2112         * tst-getpid3.c: New file.
2114 2006-07-30  Roland McGrath  <roland@redhat.com>
2116         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2118         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2119         (pause_not_cancel): New macro.
2120         (nanosleep_not_cancel): New macro.
2121         (sigsuspend_not_cancel): New macro.
2122         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2123         nanosleep_not_cancel macro from <not-cancel.h>.
2124         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2125         macro from <not-cancel.h>.
2127 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2128             Jakub Jelinek  <jakub@redhat.com>
2130         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2131         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2132         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2133         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2134         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2135         * pthread_mutex_lock.c: Likewise.
2136         * pthread_mutex_timedlock.c: Likewise.
2137         * pthread_mutex_trylock.c: Likewise.
2138         * pthread_mutex_unlock.c: Likewise.
2139         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2140         all mutexes.
2141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2142         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2143         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2144         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2145         pthread-pi-defines.sym.
2146         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2147         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2148         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2149         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2150         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2151         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2152         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2153         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2154         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2155         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2156         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2157         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2158         * tst-mutex2.c: Likewise.
2159         * tst-mutex3.c: Likewise.
2160         * tst-mutex4.c: Likewise.
2161         * tst-mutex5.c: Likewise.
2162         * tst-mutex6.c: Likewise.
2163         * tst-mutex7.c: Likewise.
2164         * tst-mutex7a.c: Likewise.
2165         * tst-mutex8.c: Likewise.
2166         * tst-mutex9.c: Likewise.
2167         * tst-robust1.c: Likewise.
2168         * tst-robust7.c: Likewise.
2169         * tst-robust8.c: Likewise.
2170         * tst-mutexpi1.c: New file.
2171         * tst-mutexpi2.c: New file.
2172         * tst-mutexpi3.c: New file.
2173         * tst-mutexpi4.c: New file.
2174         * tst-mutexpi5.c: New file.
2175         * tst-mutexpi6.c: New file.
2176         * tst-mutexpi7.c: New file.
2177         * tst-mutexpi7a.c: New file.
2178         * tst-mutexpi8.c: New file.
2179         * tst-mutexpi9.c: New file.
2180         * tst-robust1.c: New file.
2181         * tst-robust2.c: New file.
2182         * tst-robust3.c: New file.
2183         * tst-robust4.c: New file.
2184         * tst-robust5.c: New file.
2185         * tst-robust6.c: New file.
2186         * tst-robust7.c: New file.
2187         * tst-robust8.c: New file.
2188         * Makefile (tests): Add the new tests.
2190         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2191         * pthread_mutex_destroy.c: Remove unneeded label.
2193 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2195         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2196         computations to compile time.
2198 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2200         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2202 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2204         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2206 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2208         * pthread_key_create.c (__pthread_key_create): Do away with
2209         __pthread_keys_lock.
2211         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2212         (__kernel_cpumask_size): Mark as hidden.
2213         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2215         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2216         * semaphoreP.h (__sem_mappings_lock): Likewise.
2218 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2220         * pthread_atfork.c: Mark __dso_handle as hidden.
2222 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2224         [BZ #2644]
2225         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2226         the reload problem.  Change the one path in pthread_cancel_init
2227         which causes the problem.  Force gcc to reload.  Simplify callers.
2228         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2229         (_Unwind_GetBSP): Undo last patch.
2231 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2233         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2234         function pointer is reloaded after pthread_cancel_init calls.
2236         [BZ #2644]
2237         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2238         pointers are reloaded after pthread_cancel_init calls.
2240 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2242         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2243         __always_inline.
2245 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2247         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2248         Allocate new object which is passed to timer_sigev_thread so that
2249         the timer can be deleted before the new thread is scheduled.
2251 2006-04-26  Roland McGrath  <roland@redhat.com>
2253         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2255 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2257         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2258         suffix for conditional jumps.
2259         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2260         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2261         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2262         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2263         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2264         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2266         * init.c (sigcancel_handler): Compare with correct PID even if the
2267         thread is in the middle of a fork call.
2268         (sighandler_setxid): Likewise.
2269         Reported by Suzuki K P <suzuki@in.ibm.com> .
2271 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2273         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2275 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2277         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2278         fails [Coverity CID 105].
2280 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2282         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2284 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2286         [BZ #2505]
2287         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2288         Define __lll_rel_instr using lwsync.
2290 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2292         * allocatestack.c (allocate_stack): Always initialize robust_head.
2293         * descr.h: Define struct robust_list_head.
2294         (struct pthread): Use robust_list_head in robust mutex list definition.
2295         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2296         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2297         (__pthread_initialize_minimal_internal): Register robust_list with
2298         the kernel.
2299         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2300         Declare __set_robust_list_avail.
2301         * pthread_create.c (start_thread): Register robust_list of new thread.
2302         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2303         waiters.
2304         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2305         number of users, it's unreliable.
2306         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2307         set_robust_list syscall is available.
2308         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2309         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2310         Set robust_head.list_op_pending before trying to lock a robust mutex.
2311         * pthread_mutex_timedlock.c: Likewise.
2312         * pthread_mutex_trylock.c: Likewise.
2313         * pthread_mutex_unlock.c: Likewise for unlocking.
2314         * Makefile (tests): Add tst-robust8.
2315         * tst-robust8.c: New file.
2317 2006-03-08  Andreas Schwab  <schwab@suse.de>
2319         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2320         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2322 2006-03-05  Roland McGrath  <roland@redhat.com>
2324         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2325         and $config_os doesn't match *linux*.
2327 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2329         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2330         Use __syscall_error.
2331         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2332         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2333         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2334         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2335         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2336         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2338 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2340         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2342 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2344         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2345         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2346         mutex.
2347         (__lll_robust_timedlock_wait): Likewise.
2348         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2349         (__lll_robust_lock_wait): Likewise.
2350         (__lll_robust_timedlock_wait): Likewise.
2351         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2352         (__lll_robust_lock_wait): Likewise.
2353         (__lll_robust_timedlock_wait): Likewise.
2355 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2357         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2358         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2359         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2360         lll_robust_mutex_unlock): Define.
2361         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2363 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2365         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2366         instead of <clone.S>.
2368 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2370         * Makefile (libpthread-routines): Add
2371         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2372         and pthread_mutex_[sg]etprioceiling.
2373         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2374         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2375         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2376         pthread_mutex_setprioceiling.
2377         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2378         PTHREAD_PRIO_PROTECT): New enum values.
2379         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2380         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2381         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2382         prototypes.
2383         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2384         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2385         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2386         Define.
2387         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2388         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2389         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2390         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2391         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2392         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2393         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2394         protocol mutexes.
2395         * pthread_mutex_getprioceiling.c: New file.
2396         * pthread_mutex_setprioceiling.c: New file.
2397         * pthread_mutexattr_getprioceiling.c: New file.
2398         * pthread_mutexattr_setprioceiling.c: New file.
2399         * pthread_mutexattr_getprotocol.c: New file.
2400         * pthread_mutexattr_setprotocol.c: New file.
2402 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2404         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2406 2006-02-27  Roland McGrath  <roland@redhat.com>
2408         * sysdeps/pthread/Subdirs: List nptl here too.
2409         * configure (libc_add_on_canonical): New variable.
2411         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2413         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2414         self to get main source tree's file.
2415         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2416         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2417         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2418         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2419         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2420         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2421         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2422         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2423         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2424         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2425         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2426         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2427         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2429         * Makefile: Use $(sysdirs) in vpath directive.
2431         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2432         (CPPFLAGS-timer_routines.c): Likewise.
2434         * Makeconfig (includes): Variable removed.
2436 2006-02-26  Roland McGrath  <roland@redhat.com>
2438         * sysdeps/generic/pt-raise.c: Moved to ...
2439         * pt-raise.c: ... here.
2440         * sysdeps/generic/lowlevellock.h: Moved to ...
2441         * lowlevellock.h: ... here.
2443 2006-02-23  Roland McGrath  <roland@redhat.com>
2445         * descr.h (struct pthread): Add final member `end_padding'.
2446         (PTHREAD_STRUCT_END_PADDING): Use it.
2448 2006-02-20  Roland McGrath  <roland@redhat.com>
2450         * sysdeps/mips: Directory removed, saved in ports repository.
2451         * sysdeps/unix/sysv/linux/mips: Likewise.
2453 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2455         * tst-robust1.c: Add second mutex to check that the mutex list is
2456         handled correctly.
2458 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2460         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2461         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2462         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2463         lll_robust_mutex_unlock): New macros.
2464         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2465         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2466         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2467         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2468         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2470 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2472         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2473         definitions.
2474         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2476 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2478         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2479         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2480         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2481         (lll_robust_mutex_unlock): Likewise.
2483 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2485         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2486         Set robust_list.__next rather than robust_list.
2487         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2488         (__pthread_list_t): New typedef.
2489         (pthread_mutex_t): Replace __next and __prev fields with __list.
2490         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2491         (__pthread_list_t): New typedef.
2492         (pthread_mutex_t): Replace __next and __prev fields with __list.
2493         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2494         (__pthread_list_t, __pthread_slist_t): New typedefs.
2495         (pthread_mutex_t): Replace __next and __prev fields with __list.
2496         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2497         (__pthread_list_t, __pthread_slist_t): New typedefs.
2498         (pthread_mutex_t): Replace __next and __prev fields with __list.
2499         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2500         (__pthread_list_t, __pthread_slist_t): New typedefs.
2501         (pthread_mutex_t): Replace __next and __prev fields with __list.
2502         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2503         (__pthread_slist_t): New typedef.
2504         (pthread_mutex_t): Replace __next field with __list.
2506 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2508         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2509         PTHREAD_MUTEX_OWNERDEAD.
2510         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2511         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2512         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2513         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2514         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2515         to PTHREAD_MUTEX_INCONSISTENT.
2516         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2517         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2518         * pthread_mutex_trylock.c: Likewise.
2519         * pthread_mutex_timedlock.c: Likewise.
2520         * pthread_mutex_unlock.c: Likewise.
2521         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2522         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2523         lowlevelrobustlock.sym.
2524         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2525         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2526         definitions.
2527         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2528         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2529         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2530         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2531         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2533 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2535         * allocatestack.c (allocate_stack): Initialize robust_list.
2536         * init.c (__pthread_initialize_minimal_internal): Likewise.
2537         * descr.h (struct xid_command): Pretty printing.
2538         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2539         robust_list.  Adjust macros.
2540         * pthread_create.c (start_thread): Adjust robust_list handling.
2541         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2542         but the owner for all robust mutex types.
2543         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2544         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2545         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2546         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2548         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2549         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2551 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2553         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2554         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2556 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2558         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2559         Return status.
2560         (lll_futex_timed_wait): Define.
2562 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2564         * tst-cancel4.c: Test ppoll.
2566 2006-01-18  Andreas Jaeger  <aj@suse.de>
2568         [BZ #2167]
2569         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2570         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2571         by Jim Gifford <patches@jg555.com>.
2573 2006-01-13  Richard Henderson  <rth@redhat.com>
2575         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2577 2006-01-10  Roland McGrath  <roland@redhat.com>
2579         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2580         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2581         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2582         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2583         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2584         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2585         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2586         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2587         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2588         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2590 2006-01-09  Roland McGrath  <roland@redhat.com>
2592         * tst-initializers1-c89.c: New file.
2593         * tst-initializers1-c99.c: New file.
2594         * tst-initializers1-gnu89.c: New file.
2595         * tst-initializers1-gnu99.c: New file.
2596         * Makefile (tests): Add them.
2597         (CFLAGS-tst-initializers1-c89.c): New variable.
2598         (CFLAGS-tst-initializers1-c99.c): New variable.
2599         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2600         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2602         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2603         Use __extension__ on anonymous union definition.
2604         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2605         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2606         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2607         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2608         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2610 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2612         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2613         Don't give the union a name because it changes the mangled name.
2614         Instead name the struct for __data.
2615         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2616         Likewise.
2617         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2618         Likewise.
2620 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2622         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2623         stack bias to mc_ftp field.
2625 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2627         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2628         being too clever and reloading the futex value where it shouldn't.
2630 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2632         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2633         correct type.
2635 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2637         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2638         Add cfi directives.
2640 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2642         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2643         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2644         rename in tcbhead_t.
2646         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2647         Don't give the union a name because it changes the mangled name.
2648         Instead name the struct for __data.
2649         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2650         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2651         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2652         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2653         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2654         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2656 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2658         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2659         Return status.
2660         (lll_futex_timed_wait): Define.
2661         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2662         * sysdeps/pthread/aio_misc.h: New file.
2664 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2666         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2668 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2670         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2671         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2672         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2674 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2676         * tst-cancel24.cc: Use C headers instead of C++ headers.
2678 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2680         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2681         sparc-linux configured glibc.
2682         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2683         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2684         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2685         atomic_compare_and_exchange_val_24_acq instead of
2686         atomic_compare_and_exchange_val_acq.
2687         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2688         instead of atomic_exchange_rel.
2689         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2690         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2691         file.
2692         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2693         file.
2694         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2695         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2696         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2697         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2698         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2699         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2700         New file.
2701         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2702         New file.
2703         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2704         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2705         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2706         file.
2707         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2708         file.
2709         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2711 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2713         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2714         mutex initializers.
2716 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2718         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2719         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2720         THREAD_COPY_POINTER_GUARD): Define.
2721         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2722         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2724 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2726         * version.c: Update copyright year.
2728 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2730         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2731         .eh_frame section, use cfi_* directives.
2732         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2734 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2736         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2737         now.
2739 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2741         * sysdeps/pthread/sigaction.c: Removed.
2742         * sigaction.c: New file.
2743         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2745 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2747         * Makefile (tests): Add tst-signal7.
2748         * tst-signal7.c: New file.
2750 2005-12-27  Roland McGrath  <roland@redhat.com>
2752         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2753         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2754         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2755         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2756         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2757         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2758         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2759         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2760         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2761         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2762         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2764 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2766         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2767         and __prev field to pthread_mutex_t.
2768         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2769         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2770         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2771         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2772         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2773         to pthread_mutex_t.
2775 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2777         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2778         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2779         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2780         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2781         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2782         and PTHREAD_MUTEXATTR_FLAG_BITS.
2783         * descr.h (struct pthread): Add robust_list field and define
2784         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2785         * pthread_mutexattr_getrobust.c: New file.
2786         * pthread_mutexattr_setrobust.c: New file.
2787         * pthread_mutex_consistent.c: New file.
2788         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2789         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2790         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2791         Adjust pthread_mutex_t initializers.
2792         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2793         field to pthread_mutex_t.
2794         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2795         and __prev field to pthread_mutex_t.
2796         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2797         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2798         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2799         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2800         * pthread_mutexattr_gettype.c: Likewise.
2801         * pthread_mutexattr_setpshared.c: Likewise.
2802         * pthread_mutexattr_settype.c: Likewise.
2803         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2804         Initialize mutex kind according to robust flag.
2805         * pthread_mutex_lock.c: Implement local robust mutex.
2806         * pthread_mutex_timedlock.c: Likewise.
2807         * pthread_mutex_trylock.c: Likewise.
2808         * pthread_mutex_unlock.c: Likewise.
2809         * pthread_create.c (start_thread): Mark robust mutexes which remained
2810         locked as dead.
2811         * tst-robust1.c: New file.
2812         * tst-robust2.c: New file.
2813         * tst-robust3.c: New file.
2814         * tst-robust4.c: New file.
2815         * tst-robust5.c: New file.
2816         * tst-robust6.c: New file.
2817         * tst-robust7.c: New file.
2818         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2819         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2820         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2821         tst-robust5, tst-robust6, and tst-robust7.
2823         * tst-typesizes.c: New file.
2824         * Makefile (tests): Add tst-typesizes.
2826         * tst-once3.c: More debug output.
2828 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2830         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2831         missing after last change.
2833         * version.c: Update copyright year.
2835 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2837         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2838         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2839         * pthread_mutex_trylock.c: Likewise.
2840         * pthread_mutex_timedlock.c: Likewise.
2841         * pthread_mutex_unlock.c: Likewise.
2843 2005-12-22  Roland McGrath  <roland@redhat.com>
2845         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2846         so that #include_next's search location is not reset to the -I..
2847         directory where <nptl/...> can be found.
2849 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2851         [BZ #1913]
2852         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2853         Fix unwind info.  Remove useless branch prediction prefix.
2854         * tst-cancel24.cc: New file.
2855         * Makefile: Add rules to build and run tst-cancel24.
2857 2005-12-21  Roland McGrath  <roland@redhat.com>
2859         * libc-cancellation.c: Use <> rather than "" #includes.
2860         * pt-cleanup.c: Likewise.
2861         * pthread_create.c: Likewise.
2862         * pthread_join.c: Likewise.
2863         * pthread_timedjoin.c: Likewise.
2864         * pthread_tryjoin.c: Likewise.
2865         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2866         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2867         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2868         * unwind.c: Likewise.
2870 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2872         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2873         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2874         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2875         THREAD_COPY_POINTER_GUARD): Define.
2877 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2879         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2880         rather than one.
2881         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2882         THREAD_COPY_POINTER_GUARD): Define.
2883         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2884         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2885         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2886         THREAD_COPY_POINTER_GUARD): Define.
2887         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2888         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2889         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2890         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2891         Use PTR_DEMANGLE for B0 if defined.
2893 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2895         * pthread_create.c (__pthread_create_2_1): Use
2896         THREAD_COPY_POINTER_GUARD if available.
2897         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2898         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2899         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2900         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2901         * sysdeps/x86_64/tls.h: Likewise.
2903 2005-12-15  Roland McGrath  <roland@redhat.com>
2905         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2907 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2909         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2910         sysdeps/generic.
2911         * errno-loc.c: New file.
2913 2005-12-12  Roland McGrath  <roland@redhat.com>
2915         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2916         adjustments before choosing stack size.  Update minimum stack size
2917         calculation to match allocate_stack change.
2919 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2921         * allocatestack.c (allocate_stack): Don't demand that there is an
2922         additional full page available on the stack beside guard, TLS, the
2923         minimum stack.
2925 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2927         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2928         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2930         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2931         compiling 32-bit code we must define __cleanup_fct_attribute.
2933 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2935         [BZ #1920]
2936         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2937         __attribute__ instead of __attribute.
2938         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2939         (__cleanup_fct_attribute): Likewise.
2941 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2943         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2944         a write barrier before writing libgcc_s_getcfa.
2946 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2948         * sysdeps/unix/sysv/linux/configure: Removed.
2950 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2952         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2953         optional init_array/fini_array support.
2955 2005-10-24  Roland McGrath  <roland@redhat.com>
2957         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2958         versioned_symbol use.
2960 2005-10-16  Roland McGrath  <roland@redhat.com>
2962         * init.c (__pthread_initialize_minimal_internal): Even when using a
2963         compile-time default stack size, apply the minimum that allocate_stack
2964         will require, and round up to page size.
2966 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2968         * Makefile ($(test-modules)): Remove static pattern rule.
2970 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2971             Ulrich Drepper  <drepper@redhat.com>
2973         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2974         alignment in callback function.
2975         * Makefile: Add rules to build and run tst-align3.
2976         * tst-align3.c: New file.
2978 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2980         * allocatestack.c (setxid_signal_thread): Add
2981         INTERNAL_SYSCALL_DECL (err).
2983 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2985         * allocatestack.c (setxid_signal_thread): Need to use
2986         atomic_compare_and_exchange_bool_acq.
2988 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2989             Jakub Jelinek  <jakub@redhat.com>
2991         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2992         CANCEL_RESTMASK.
2993         (struct pthread): Move specific_used field to avoid padding.
2994         Add setxid_futex field.
2995         * init.c (sighandler_setxid): Reset setxid flag and release the
2996         setxid futex.
2997         * allocatestack.c (setxid_signal_thread): New function.  Broken
2998         out of the bodies of the two loops in __nptl_setxid.  For undetached
2999         threads check whether they are exiting and if yes, don't send a signal.
3000         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3001         * pthread_create.c (start_thread): For undetached threads, check
3002         whether setxid bit is set.  If yes, wait until signal has been
3003         processed.
3005         * allocatestack.c (STACK_VARIABLES): Initialize them.
3006         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3008 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3010         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3011         waiters, awake all waiters on the associated mutex.
3013 2005-09-22  Roland McGrath  <roland@redhat.com>
3015         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3016         ../sysdeps/x86_64/hp-timing.h).
3018 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3020         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3021         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3022         (lll_futex_wake_unlock): Define.
3023         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3024         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3025         (lll_futex_wake_unlock): Define.
3026         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3027         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3028         (lll_futex_wake_unlock): Define.
3029         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3030         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3031         (lll_futex_wake_unlock): Define.
3032         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3033         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3034         (lll_futex_wake_unlock): Define.
3035         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3036         lll_futex_wake_unlock.
3037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3038         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3039         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3040         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3041         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3042         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3044 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3046         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3047         Fix typo in register name.
3049 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3051         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3052         Use __sigfillset.  Document that sigfillset does the right thing wrt
3053         to SIGSETXID.
3055 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3057         [BZ #1102]
3058         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3059         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3060         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3061         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3062         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3063         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3064         in the structure.
3065         * Makefile (tests): Add tst-initializers1.
3066         (CFLAGS-tst-initializers1.c): Set.
3067         * tst-initializers1.c: New test.
3069 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3071         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3072         Make sure __flags are located at offset 48 from the start of the
3073         structure.
3075 2005-07-02  Roland McGrath  <roland@redhat.com>
3077         * Makeconfig: Comment fix.
3079 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3081         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3082         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3083         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3084         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3085         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3086         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3087         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3088         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3089         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3090         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3092 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3094         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3095         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3096         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3097         fields.
3098         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3099         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3100         field.  Put in sysinfo field unconditionally.
3101         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3102         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3103         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3104         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3105         fields.
3106         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3107         * pthread_create.c (__pthread_create_2_1): Use
3108         THREAD_COPY_STACK_GUARD macro.
3109         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3110         tests.
3111         * tst-stackguard1.c: New file.
3112         * tst-stackguard1-static.c: New file.
3114 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3116         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3117         Invoke CGOTSETUP and CGOTRESTORE.
3118         (CGOTSETUP, CGOTRESTORE): Define.
3120 2005-05-29  Richard Henderson  <rth@redhat.com>
3122         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3123         (tf_write, tf_writev): Use it.
3124         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3125         the system minimum.
3127 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3129         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3130         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3131         __librt_*_asynccancel@local.
3133 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3135         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3136         all occurrences of JUMPTARGET.  Instead append @local to labels.
3138 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3140         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3141         size/alignment of struct pthread rather than tcbhead_t.
3142         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3143         Likewise.
3144         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3145         Likewise.
3146         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3147         Likewise.
3149 2005-05-19  Richard Henderson  <rth@redhat.com>
3151         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3152         __sync_val_compare_and_swap, not explicit _si variant.
3153         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3155 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3157         [BZ #915]
3158         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3160 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3162         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3163         .eh_frame section, use cfi_* directives.
3165 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3167         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3168         of "" includes.
3170 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3172         [BZ #1075]
3173         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3174         aio_write blocks.
3176 2005-04-27  Roland McGrath  <roland@redhat.com>
3178         * Makefile (tests): Remove tst-clock2.
3180         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3181         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3182         translating to the kernel clockid_t for our own process/thread clock.
3184         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3186 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3188         * old_pthread_cond_init.c: Include <errno.h>.
3189         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3190         process shared or uses clock other than CLOCK_REALTIME.
3191         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3193 2005-04-13  David S. Miller  <davem@davemloft.net>
3195         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3196         * sysdeps/sparc/sparc64/clone.S: New file.
3198 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3200         [BZ #1102]
3201         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3202         __inline instead of inline.
3203         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3205 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3207         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3208         functionally equivalent, but shorter instructions.
3209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3210         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3211         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3212         Likewise.
3213         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3214         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3215         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3216         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3218         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3219         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3220         Likewise.
3221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3222         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3223         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3224         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3225         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3227 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3229         * sysdeps/mips/Makefile: New file.
3230         * sysdeps/mips/nptl-sysdep.S: New file.
3231         * sysdeps/mips/tcb-offsets.sym: New file.
3232         * sysdeps/mips/pthread_spin_lock.S: New file.
3233         * sysdeps/mips/pthread_spin_trylock.S: New file.
3234         * sysdeps/mips/pthreaddef.h: New file.
3235         * sysdeps/mips/tls.h: New file.
3236         * sysdeps/mips/jmpbuf-unwind.h: New file.
3237         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3238         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3239         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3240         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3241         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3242         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3243         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3244         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3245         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3246         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3248 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3250         [BZ #1112]
3251         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3252         variable to scerr.
3254 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3256         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3258 2005-02-25  Roland McGrath  <roland@redhat.com>
3260         * alloca_cutoff.c: Correct license text.
3261         * tst-unload.c: Likewise.
3262         * sysdeps/pthread/allocalim.h: Likewise.
3263         * sysdeps/pthread/pt-initfini.c: Likewise.
3264         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3265         * sysdeps/pthread/bits/sigthread.h: Likewise.
3266         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3267         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3269 2005-02-16  Roland McGrath  <roland@redhat.com>
3271         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3272         Use unsigned int * for ptr_nthreads.
3274 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3276         [BZ #721]
3277         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3278         gcc4.
3280 2005-02-07  Richard Henderson  <rth@redhat.com>
3282         [BZ #787]
3283         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3284         argument.
3286 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3288         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3289         order of arguments in invocation of atomic_add_zero.
3291 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3293         [BZ #737]
3294         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3295         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3296         at least gotntpoff relocation and addition.
3297         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3298         Likewise.
3299         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3300         Likewise.
3301         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3302         Likewise.
3304 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3306         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3307         entry for static tls deallocation fix.
3308         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3309         also contains information whether the memory pointed to is static
3310         TLS or not.
3311         * sysdeps/i386/tls.h: Likewise.
3312         * sysdeps/ia64/tls.h: Likewise.
3313         * sysdeps/powerpc/tls.h: Likewise.
3314         * sysdeps/s390/tls.h: Likewise.
3315         * sysdeps/sh/tls.h: Likewise.
3316         * sysdeps/sparc/tls.h: Likewise.
3317         * sysdeps/x86_64/tls.h: Likewise.
3319 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3321         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3323 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3325         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3326         %esp.
3327         * Makefile (tests): Add tst-align2.
3328         * tst-align2.c: New test.
3329         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3330         -mpreferred-stack-boundary=4.
3332 2004-12-18  Roland McGrath  <roland@redhat.com>
3334         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3335         New file removed withdrawn for the moment.
3337 2004-12-17  Richard Henderson  <rth@redhat.com>
3339         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3340         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3342 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3344         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3345         Increased PTHREAD_STACK_MIN.
3347         * tst-context1.c (stacks): Use bigger stack size.
3349 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3351         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3352         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3354 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3356         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3357         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3358         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3360 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3362         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3364 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3366         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3367         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3369         * tst-getpid1.c: If child crashes, report this first.  Print which
3370         signal.
3372 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3374         * init.c (__pthread_initialize_minimal_internal): Also unblock
3375         SIGSETXID.
3377 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3379         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3380         _POSIX_THREAD_CPUTIME): Define to 0.
3381         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3382         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3383         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3384         __timer_signal_thread_tclk): Remove.
3385         (init_module): Remove their initialization.
3386         (thread_cleanup): Remove their cleanup assertions.
3387         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3388         __timer_signal_thread_tclk): Remove.
3389         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3390         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3391         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3393 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3395         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3396         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3398         * Makefile (tests): Add tst-getpid2.
3399         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3400         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3401         * tst-getpid2.c: New test.
3403 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3405         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3407 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3409         * Makefile (tests): Add tst-getpid1.
3410         * tst-getpid1.c: New file.
3411         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3412         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3414 2004-12-02  Roland McGrath  <roland@redhat.com>
3416         * Makefile (libpthread-nonshared): Variable removed.
3417         ($(objpfx)libpthread_nonshared.a): Target removed.
3418         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3419         These are now handled by generic magic from
3420         libpthread-static-only-routines being set.
3422 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3424         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3425         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3426         _POSIX_THREAD_PRIO_PROTECT): Define.
3427         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3428         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3429         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3431 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3433         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3434         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3435         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3436         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3437         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3438         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3439         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3441 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3443         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3445         * Makefile (libpthread-routines): Add pthread_setschedprio.
3446         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3447         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3448         * pthread_setschedprio.c: New file.
3450 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3452         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3453         * pthread_cancel.c (pthread_create): Likewise.
3455         * Makefile (libpthread-routines): Add vars.
3456         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3457         * init.c (__default_stacksize, __is_smp): Remove.
3458         * vars.c: New file.
3459         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3460         and define a wrapper macro.
3461         (PTHREAD_STATIC_FN_REQUIRE): Define.
3462         * allocatestack.c (__find_thread_by_id): Undefine.
3463         * pthread_create (__pthread_keys): Remove.
3464         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3465         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3466         PTHREAD_STATIC_FN_REQUIRE.
3468 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3470         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3471         parameter to REGISTER macro.
3473 2004-11-17  Roland McGrath  <roland@redhat.com>
3475         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3476         Make sure SIGCANCEL is blocked as well.
3478 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3480         * sysdeps/pthread/setxid.h: New file.
3481         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3482         (struct xid_command): Add forward decl.
3483         (struct pthread_functions): Change return type of __nptl_setxid hook
3484         to int.
3485         * pthreadP.h (__nptl_setxid): Change return type to int.
3486         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3487         calling thread, return its return value and set errno on failure.
3488         * descr.h (struct xid_command): Change id type to long array.
3490         * Makefile: Add rules to build and test tst-setuid1 and
3491         tst-setuid1-static.
3492         * tst-setuid1.c: New test.
3493         * tst-setuid1-static.c: New test.
3495 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3497         * Makefile (tests): Add tst-exit3.
3498         * tst-exit3.c: New test.
3500 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3502         * Makefile (tests): Add tst-exit2.
3503         * tst-exit2.c: New file.
3505 2004-11-09  Roland McGrath  <roland@redhat.com>
3507         [BZ #530]
3508         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3509         here, before calling clone.
3510         * pthread_create.c (start_thread): Don't do it here.
3512 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3514         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3516 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3518         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3519         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3520         assembler warning.
3522 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3524         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3525         if sched_priority is not between minprio and maxprio.
3527 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3529         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3530         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3532         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3533         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3535 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3537         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3538         not-cancelable I/O functions.
3540 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3542         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3543         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3544         make sure 2 is stored in the futex and we looked at the old value.
3545         Fix a few other problems to return the correct value.
3547 2004-10-14  Richard Henderson  <rth@redhat.com>
3549         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3550         make gcc4 happy.
3552 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3554         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3555         of pthread-functions.h and pthreaddef.h.
3556         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3558         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3559         Change __data.__nwaiters from int to unsigned int.
3561         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3562         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3564         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3565         before return type.
3567         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3568         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3570 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3572         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3573         test fails, remove message queue.
3574         (tf_msgsnd): Likewise.
3576 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3578         * tst-clock1.c: Change #ifdef to #if defined.
3579         * tst-clock2.c: Likewise.
3580         * tst-cond11.c: Likewise.
3582         * sysdeps/pthread/timer_create.c (timer_create): Use
3583         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3584         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3585         THREAD_CPUTIME.
3587 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3589         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3590         _POSIX_THREAD_CPUTIME): Define to 0.
3592 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3594         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3595         and _POSIX_THREAD_CPUTIME to zero.
3596         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3597         * tst-barrier2.c: Fix testing for POSIX feature.
3598         * tst-clock1.c: Likewise.
3599         * tst-clock2.c: Likewise.
3600         * tst-cond11.c: Likewise.
3601         * tst-cond4.c: Likewise.
3602         * tst-cond6.c: Likewise.
3603         * tst-flock2.c: Likewise.
3604         * tst-mutex4.c: Likewise.
3605         * tst-mutex9.c: Likewise.
3606         * tst-rwlock12.c: Likewise.
3607         * tst-rwlock4.c: Likewise.
3608         * tst-signal1.c: Likewise.
3609         * tst-spin2.c: Likewise.
3610         * sysdeps/pthread/posix-timer.h: Likewise.
3611         * sysdeps/pthread/timer_create.c: Likewise.
3612         * sysdeps/pthread/timer_routines.c: Likewise.
3614 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3616         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3617         (__lll_mutex_timedlock_wait): Address futex correctly.
3619         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3620         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3621         make sure 2 is stored in the futex and we looked at the old value.
3622         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3623         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3624         which might very well made the code not working at all before.
3625         [BZ #417]
3627 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3629         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3630         allow SIGSETXID to be sent.
3631         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3632         for SIGSETXID to be defined.
3633         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3634         SIGSETXID cannot be blocked.
3636         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3637         Add __extension__ to long long types.
3638         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3639         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3640         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3641         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3642         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3643         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3644         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3646 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3648         * descr.h (struct pthread): Add stopped_start field.
3649         * sysdeps/pthread/createthread.c (create_thread): Set
3650         start_stopped flag in descriptor for new thread appropriately.
3651         * pthread_create.c (start_thread): Only take lock to be stopped on
3652         startup if stopped_start flag says so.
3654 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3656         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3657         is created detached and if yes, do not try to free the stack in case
3658         the thread creation failed.
3659         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3660         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3661         case there has been no error.  [BZ #405]
3663         * pthread_create.c (start_thread): Don't wait for scheduler data
3664         etc to be set at the beginning of the function.  The cancellation
3665         infrastructure must have been set up.  And enable async
3666         cancellation before potentially going to sleep.  [BZ #401]
3668 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3670         * Versions: Remove exports for pthread_set*id_np functions.
3671         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3672         for now.
3673         * Makefile: Don't build pthread_set*id code for now.
3675 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3677         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3678         internal use.
3679         * allocatestack.c (__nptl_setxid): New function.
3680         * descr.h (struct xid_command): Define type.
3681         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3682         (sighandler_setxid): New function.
3683         (__pthread_initialize_minimal): Register sighandler_setxid for
3684         SIGCANCEL.
3685         * pt-allocrtsig.c: Update comment.
3686         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3687         Declare __nptl_setxid.
3688         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3689         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3690         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3691         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3692         and pthread_setresuid_np.
3693         * pthread_setgid_np.c: New file.
3694         * pthread_setuid_np.c: New file.
3695         * pthread_setegid_np.c: New file.
3696         * pthread_seteuid_np.c: New file.
3697         * pthread_setregid_np.c: New file.
3698         * pthread_setreuid_np.c: New file.
3699         * pthread_setresgid_np.c: New file.
3700         * pthread_setresuid_np.c: New file.
3701         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3702         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3703         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3704         and pthread_setresuid_np.
3705         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3706         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3707         pthread_setregid, and pthread_setresgid.
3709 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3711         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3712         ENOMEM when out of memory.
3714 2004-09-10  Roland McGrath  <roland@redhat.com>
3716         [BZ #379]
3717         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3718         code, since we don't try to use the broken CLONE_STOPPED any more.
3719         * pthread_create.c (start_thread): Likewise.
3721 2004-09-15  Richard Henderson  <rth@redhat.com>
3723         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3725 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3727         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3728         (__libc_unwind_longjmp): Delete macro and declare as function.
3729         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3730         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3731         nptl directory.
3732         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3733         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3734         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3736 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3738         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3739         for __USE_XOPEN2K.
3740         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3741         types also for __USE_XOPEN2K.
3742         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3743         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3744         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3745         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3746         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3747         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3748         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3749         [BZ #320]
3751 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3753         * sysdeps/pthread/pthread.h
3754         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3755         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3756         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3757         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3758         [BZ #375]
3760 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3762         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3763         PSEUDO to be used with . prefix.
3765         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3766         Use atomic_increment instead of atomic_exchange_and_add.
3767         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3768         Likewise.
3769         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3770         Likewise.
3771         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3772         Likewise.
3774         * allocatestack.c (allocate_stack): Use atomic_increment_val
3775         instead of atomic_exchange_and_add.
3776         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3777         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3778         Likewise.
3779         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3780         Likewise.
3782         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3783         the initialization function might throw.
3785 2005-09-05  Richard Henderson  <rth@redhat.com>
3787         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3788         Move definition inside libpthread, libc, librt check.  Provide
3789         definition for rtld.
3791 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3793         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3794         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3795         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3796         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3797         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3798         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3799         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3800         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3801         * unwind.c: Use it.
3803         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3804         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3805         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3806         Likewise.
3807         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3808         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3809         this is the last waiter, signal pthread_cond_destroy caller and
3810         avoid using the pthread_cond_t structure after unlock.
3811         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3812         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3813         Read clock type from the least significant bits of __nwaiters instead
3814         of __clock.
3815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3816         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3818 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3820         [BZ #342]
3821         * Makefile (tests): Add tst-cond20 and tst-cond21.
3822         * tst-cond20.c: New test.
3823         * tst-cond21.c: New test.
3824         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3825         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3826         it unsigned int.
3827         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3828         Likewise.
3829         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3830         (pthread_cond_t): Likewise.
3831         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3832         Likewise.
3833         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3834         Likewise.
3835         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3836         Likewise.
3837         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3838         (cond_nwaiters): New.
3839         (clock_bits): New.
3840         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3841         if there are waiters not signalled yet.
3842         Wait until all already signalled waiters wake up.
3843         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3844         __nwaiters.  If pthread_cond_destroy has been called and this is the
3845         last waiter, signal pthread_cond_destroy caller and avoid using
3846         the pthread_cond_t structure after unlock.
3847         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3848         decrement it when leaving.  If pthread_cond_destroy has been called
3849         and this is the last waiter, signal pthread_cond_destroy caller.
3850         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3851         Likewise.  Read clock type from the least significant bits of
3852         __nwaiters instead of __clock.
3853         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3854         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3855         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3856         clock type just from the last COND_CLOCK_BITS bits of value.
3857         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3858         instead of __clock, just from second bit of condattr's value.
3860 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3862         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3863         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3864         != 64.
3865         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3867 2004-08-15  Roland McGrath  <roland@frob.com>
3869         * pthread_atfork.c: Update copyright terms including special exception
3870         for these trivial files, which are statically linked into executables
3871         that use dynamic linking for the significant library code.
3873 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3875         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3876         pthread_rwlock_rdlock.
3877         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3878         Decrease __nr_readers_queued after reacquiring lock.
3879         * sysdeps/pthread/pthread_rwlock_timedrdlock
3880         (pthread_rwlock_timedrdlock): Likewise.
3881         Reported by Bob Cook <bobcook47@hotmail.com>.
3883 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3885         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3886         before pthread_barrier_wait.
3888 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3891         Remove unnecessary exception handling data.
3893 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3895         [BZ #284]
3896         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3897         instead of clockid_t.
3899 2004-07-21  Roland McGrath  <roland@redhat.com>
3901         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3903 2004-07-19  Roland McGrath  <roland@redhat.com>
3905         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3907 2004-07-02  Roland McGrath  <roland@redhat.com>
3909         * configure: Don't exit.
3911 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3913         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3914         (__pthread_cond_timedwait): Check for invalid nanosecond in
3915         timeout value.
3917 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3919         * Makefile: Add rules to build and run tst-fini1.
3920         * tst-fini1.c: New file.
3921         * tst-fini1mod.c: New file.
3923 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3925         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3926         if no cancellation support is needed.
3927         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3928         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3929         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3930         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3931         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3932         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3933         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3934         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3935         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3937         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3938         only if not already defined.
3940 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3942         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3943         constraint "m" instead of "0" for futex.
3945         * shlib-versions: Add powerpc64-.*-linux.*.
3947 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3949         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3950         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3951         for valid tv_nsec.
3952         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3953         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3954         bits.
3956 2004-06-29  Roland McGrath  <roland@redhat.com>
3958         * Banner: NPTL no longer has its own version number.
3959         * Makefile (nptl-version): Variable removed.
3960         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3961         using $(version), the glibc version number.
3963 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3965         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3966         Fix branch offset for a PLT entry.
3967         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3968         Likewise.
3969         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3970         Likewise.
3971         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3972         Likewise.
3973         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3974         Likewise.
3976 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3978         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3979         unconditionally.
3981 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3983         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3984         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3985         instead of tv_sec.
3986         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3987         (pthread_rwlock_timedrdlock): Likewise.
3989 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3991         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3992         Set __r7 to val, not mutex.
3994 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3996         * Makefile: Add rules to build tst-rwlock14.
3997         * tst-rwlock14.c: New file.
3999 2004-06-24  Boris Hu  <boris.hu@intel.com>
4001         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4002         check.
4003         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4005 2004-06-19  Andreas Jaeger  <aj@suse.de>
4007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4008         assembler in last patch.
4010 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4012         * sysdeps/pthread/pthread_cond_timedwait.c
4013         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4014         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4015         (__pthread_cond_timedwait): Check for invalid nanosecond in
4016         timeout value.
4017         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4018         * tst-cond19.c: New file.
4019         * Makefile: Add rules to build and run tst-cond19.
4021 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4023         * tst-context1.c (GUARD_PATTERN): Defined.
4024         (tst_context_t): Define struct containing ucontext_t & guard words.
4025         (ctx): Declare as an array of tst_context_t.
4026         (fct): Verify uc_link & guard words are still valid.
4027         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4029 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4031         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4032         Add __data.__futex field, reshuffle __data.__clock.
4033         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4034         (__pthread_cond_signal): Increment __futex at the same time as
4035         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4036         address of low 32-bits of __wakeup_seq to futex syscall.
4037         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4038         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4039         releasing internal lock to FUTEX_WAIT.
4040         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4041         (__pthread_cond_timedwait): Likewise.
4042         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4043         (FUTEX_CMP_REQUEUE): Define.
4044         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4045         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4046         Pass __futex value from before the unlock and __futex address instead
4047         of address of low 32-bits of __wakeup_seq to futex syscall.
4048         Fallback to FUTEX_WAKE all on any errors.
4050 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4052         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4053         comment typo.
4054         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4055         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4056         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4057         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4058         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4060 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4062         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4063         Add memory clobber to inline assembly.
4064         (__lll_mutex_trylock): Likewise.
4065         (__lll_mutex_cond_trylock): Likewise.
4067 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4069         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4070         Pass val argument as 6th system call argument in %r7.
4072 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4074         * Makefile (tests): Add tst-cond16.
4075         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4076         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4077         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4078         Add __data.__futex field, reshuffle __data.__clock.
4079         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4080         (__pthread_cond_signal): Increment __futex at the same time as
4081         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4082         address of low 32-bits of __wakeup_seq to futex syscall.
4083         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4084         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4085         releasing internal lock to FUTEX_WAIT.
4086         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4087         (__pthread_cond_timedwait): Likewise.
4088         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4089         (FUTEX_CMP_REQUEUE): Define.
4090         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4091         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4092         Pass __futex value from before the unlock and __futex address instead
4093         of address of low 32-bits of __wakeup_seq to futex syscall.
4094         Fallback to FUTEX_WAKE all on any errors.
4095         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4096         Define.
4097         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4098         internally.  Return non-zero if error, zero if success.
4099         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4100         Add __data.__futex field, reshuffle __data.__clock.
4101         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4102         Define.
4103         (lll_futex_requeue): Add val argument, return 1 unconditionally
4104         for the time being.
4105         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4106         Add __data.__futex field, reshuffle __data.__clock.
4107         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4108         Define.
4109         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4110         internally.  Return non-zero if error, zero if success.
4111         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4112         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4113         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4114         Define.
4115         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4116         internally.  Return non-zero if error, zero if success.
4117         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4118         Add __data.__futex field, reshuffle __data.__clock.
4119         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4120         Define.
4121         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4122         internally.  Return non-zero if error, zero if success.
4123         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4124         Add __data.__futex field, reshuffle __data.__clock.
4125         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4126         Add __data.__futex field, reshuffle __data.__clock.
4127         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4128         Increment __futex at the same time as __wakeup_seq or __total_seq.
4129         Pass address of __futex instead of address of low 32-bits of
4130         __wakeup_seq to futex syscall.
4131         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4132         Pass __futex value from before releasing internal lock
4133         to FUTEX_WAIT.
4134         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4135         Likewise.  Avoid unnecessary shadowing of variables.
4136         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4137         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4138         unlock and __futex address instead of address of low 32-bits of
4139         __wakeup_seq to futex_requeue macro, adjust for new return value
4140         meaning.
4141         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4142         (__pthread_cond_signal): Increment __futex at the same time as
4143         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4144         address of low 32-bits of __wakeup_seq to futex syscall.
4145         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4146         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4147         releasing internal lock to FUTEX_WAIT.
4148         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4149         (__pthread_cond_timedwait): Likewise.
4150         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4151         (FUTEX_CMP_REQUEUE): Define.
4152         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4153         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4154         Pass __futex value from before the unlock and __futex address instead
4155         of address of low 32-bits of __wakeup_seq to futex syscall.
4156         Fallback to FUTEX_WAKE all on any errors.
4158 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4160         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4161         Add nop to align the end of critical section.
4162         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4164 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4166         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4167         Add __broadcast_seq field.
4168         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4169         all waiters as woken with woken_seq and bump broadcast counter.
4170         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4171         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4172         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4173         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4175 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4178         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4179         Reported by Kaz Kojima.
4181 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4183         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4185 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4187         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4188         __broadcast_seq with bc_seq after acquiring internal lock instead of
4189         before it.
4191 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4193         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4194         compilation.
4195         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4196         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4197         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4198         (pthread_cond_t): Add __data.__broadcast_seq field.
4199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4200         (FRAME_SIZE): Define.
4201         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4202         Comment typo fixes.
4203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4204         Define.
4205         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4206         typo fixes.
4207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4208         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4209         fixes.
4211 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4213         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4214         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4215         Add __broadcast_seq field.
4216         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4217         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4218         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4219         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4220         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4221         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4222         all waiters as woken with woken_seq and bump broadcast counter.
4223         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4225         __broadcast_seq field.
4226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4227         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4228         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4229         * pthread_cond_init.c: Initialize __broadcast_seq field.
4230         * Makefile (tests): Add tst-cond17 and tst-cond18.
4231         Add .NOTPARALLEL goal.
4232         * tst-cond16.c: New file.  From Jakub.
4233         * tst-cond17.c: New file.  From Jakub.
4234         * tst-cond18.c: New file.  From Jakub.
4236 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4238         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4239         unwind info.
4241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4242         Parametrize frame size.  Correct some unwind info.
4243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4245 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4247         * tst-stack3.c: Note testing functionality beyond POSIX.
4249 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4251         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4252         Change conditional from ifdef to if.
4254 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4256         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4257         SYSDEP_CANCEL_ERROR): Define.
4258         (PSEUDO): Use it.
4260 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4262         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4264 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4266         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4268 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4270         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4271         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4272         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4273         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4275 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4277         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4278         thread has all signals blocked.
4280 2004-04-18  Andreas Jaeger  <aj@suse.de>
4282         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4283         (SEM_VALUE_MAX): Add missing brace.
4285 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4287         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4288         in rt subdir.
4289         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4290         * sysdeps/pthread/tst-mqueue8x.c: New test.
4291         * tst-cancel4.c: Update comment about message queues.
4293         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4294         return it_value { 0, 0 }.
4295         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4296         like SIGEV_SIGNAL.
4297         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4298         assertion for SIGEV_NONE.
4299         (thread_attr_compare): Compare all attributes, not just a partial
4300         subset.
4302 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4304         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4306 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4308         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4309         Just use a plain number.
4310         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4311         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4312         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4313         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4314         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4315         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4316         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4318 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4320         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4321         frame info.
4322         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4324 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4326         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4327         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4328         of calling sigwaitinfo.
4330 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4332         * allocatestack.c (allocate_stack): Set reported_guardsize
4333         unconditionally.
4334         * pthread_getattr_np.c (pthread_getattr_np): Use
4335         reported_guardsize instead of guardsize.
4336         * descr.h (struct pthread): Add reported_guardsize field.
4338 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4340         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4342 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4344         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4346 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4348         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4349         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4350         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4351         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4352         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4353         Define.
4354         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4355         (_POSIX_MESSAGE_PASSING): Define.
4356         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4357         (_POSIX_MESSAGE_PASSING): Define.
4358         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4359         (_POSIX_MESSAGE_PASSING): Define.
4361 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4363         * tst-context1.c (fct): Check whether correct stack is used.
4365 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4368         matching constraints for asm mem parameters.
4370         * tst-clock2.c (tf): Don't define unless needed.
4372 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4374         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4375         $(gnulib).
4377 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4379         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4380         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4381         * pthreadP.h: Declare __nptl_deallocate_tsd.
4382         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4383         Adjust caller.
4385         * Makefile (tests): Add tst-tsd5.
4386         * tst-tsd5.c: New file.
4388 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4390         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4391         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4392         is SHLIB_COMPAT check.
4393         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4394         (__pthread_attr_getaffinity_old): Likewise.
4395         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4396         (__pthread_getaffinity_old): Likewise.
4397         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4398         (__pthread_setaffinity_old): Likewise.
4400 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4402         * allocatestack.c (_make_stacks_executable): Call
4403         _dl_make_stack_executable first.
4405 2004-03-24  Roland McGrath  <roland@redhat.com>
4407         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4408         constraint instead of "0".
4410 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4412         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4413         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4415         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4416         code to avoid warning.
4418 2004-03-24  Andreas Jaeger  <aj@suse.de>
4420         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4421         (__pthread_attr_setaffinity_old): Remove const.
4423 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4425         * sysdeps/unix/sysv/linux/smp.h: New file.
4426         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4427         * init.c: Define __is_smp.
4428         (__pthread_initialize_minimal_internal): Call is_smp_system to
4429         initialize __is_smp.
4430         * pthreadP.h: Declare __is_smp.
4431         Define MAX_ADAPTIVE_COUNT is necessary.
4432         * pthread_mutex_init.c: Add comment regarding __spins field.
4433         * pthread_mutex_lock.c: Implement adaptive mutex type.
4434         * pthread_mutex_timedlock.c: Likewise.
4435         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4436         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4437         Add __spins field.
4438         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4439         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4440         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4441         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4442         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4443         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4444         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4445         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4446         lll_mutex_cond_trylock.
4447         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4448         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4449         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4450         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4451         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4452         Define BUSY_WAIT_NOP.
4453         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4454         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4456         * tst-mutex5.c: Add support for testing adaptive mutexes.
4457         * tst-mutex7.c: Likewise.
4458         * tst-mutex5a.c: New file.
4459         * tst-mutex7a.c: New file.
4460         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4462         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4463         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4464         vgettimeofday call might destroy the content.
4466         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4467         @pause in the loop.
4469         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4470         No need to restrict type of ret.  Make it int.  Add comment.
4472         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4473         Remove unnecessary setne instruction.
4475 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4477         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4478         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4479         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4480         If realloc fails, break out of the loop.
4482 2004-03-20  Andreas Jaeger  <aj@suse.de>
4484         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4485         (__pthread_setaffinity_old): Fix interface.
4486         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4487         (__pthread_getaffinity_old): Likewise.
4489         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4490         (__pthread_setaffinity_new): Remove duplicate declaration.
4492 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4494         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4495         the return value to a safe register.
4496         (CDISABLE): Set the function argument correctly.
4498 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4500         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4501         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4502         Rewrite so that only one locked memory operation per round is needed.
4503         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4504         (pthread_barrier_wait): After wakeup, release lock only when the
4505         last thread stopped using the barrier object.
4506         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4507         (__pthread_cond_wait): Don't store mutex address if the current
4508         value is ~0l.  Add correct cleanup support and unwind info.
4509         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4510         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4511         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4512         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4513         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4514         Add correct cleanup support and unwind info.
4515         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4516         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4517         information for syscall wrappers.
4519 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4521         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4522         cpusetsize field, remove next.
4523         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4524         parameter for size of the CPU set.
4525         (pthread_setaffinity_np): Likewise.
4526         (pthread_attr_getaffinity_np): Likewise.
4527         (pthread_attr_setaffinity_np): Likewise.
4528         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4529         interface change, keep compatibility code.
4530         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4531         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4532         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4533         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4534         __pthread_getaffinity_np.
4535         * Versions: Add version for changed interfaces.
4536         * tst-attr3.c: Adjust test for interface change.
4537         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4538         increasing buffer sizes.
4539         * pthread_attr_destroy.c: Remove unused list handling.
4540         * pthread_attr_init.c: Likewise.
4542 2004-03-17  Roland McGrath  <roland@redhat.com>
4544         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4545         first argument to clock_getres so we ever enable kernel timers.
4547 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4549         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4551 2004-03-12  Richard Henderson  <rth@redhat.com>
4553         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4554         oldvalue from CENABLE to CDISABLE.
4556 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4558         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4559         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4560         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4561         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4563 2004-03-11  Richard Henderson  <rth@redhat.com>
4565         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4566         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4567         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4569 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4571         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4572         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4573         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4575 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4577         * forward.c (__pthread_cond_broadcast_2_0,
4578         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4579         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4580         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4582 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4584         * sysdeps/sh/tcb-offsets.sym: Add PID.
4585         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4586         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4588 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4590         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4591         include <sysdep-cancel.h>, vfork is no cancellation point.
4592         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4593         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4594         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4596 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4598         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4599         libc_hidden_def.
4600         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4601         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4602         Likewise.
4603         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4604         Likewise.
4605         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4606         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4607         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4608         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4609         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4611         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4612         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4613         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4614         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4615         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4616         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4618         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4619         a local register for saving old PID.  Negate PID in parent upon exit.
4621         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4622         tcb-offsets.h.
4623         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4624         before syscall, set to the old value in the parent afterwards.
4625         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4626         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4627         tcb-offsets.h.
4628         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4629         before syscall, set to the old value in the parent afterwards.
4630         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4631         * sysdeps/s390/tcb-offsets.sym: Add PID.
4633         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4634         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4635         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4636         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4637         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4638         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4640 2004-03-10  Andreas Schwab  <schwab@suse.de>
4642         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4643         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4644         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4646 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4648         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4649         * tst-cancel21.c (do_one_test): Likewise.
4650         Reported by Gordon Jin <gordon.jin@intel.com>.
4652 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4654         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4655         if non-zero and set to INT_MIN if zero.
4656         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4657         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4658         (SAVE_PID, RESTORE_PID): Define.
4659         (__vfork): Use it.
4660         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4661         Use relative path to avoid including NPTL i386/vfork.S.
4662         (SAVE_PID, RESTORE_PID): Define.
4663         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4664         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4665         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4666         tst-vfork2x.
4667         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4668         * tst-vfork1.c: New test.
4669         * tst-vfork2.c: New test.
4670         * tst-vfork1x.c: New test.
4671         * tst-vfork2x.c: New test.
4673 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4675         * sysdeps/i386/tcb-offsets.sym: Add PID.
4676         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4677         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4678         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4680 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4682         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4684 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4686         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4687         _rtld_global_ro.
4689 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4691         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4692         _rtld_global_ro.
4694         * tst-once4.c: Remove unnecessary macro definition.
4696         * tst-mutex7.c (do_test): Limit thread stack size.
4697         * tst-once2.c (do_test): Likewise.
4698         * tst-tls3.c (do_test): Likewise.
4699         * tst-tls1.c (do_test): Likewise.
4700         * tst-signal3.c (do_test): Likewise.
4701         * tst-kill6.c (do_test): Likewise.
4702         * tst-key4.c (do_test): Likewise.
4703         * tst-join4.c (do_test): Likewise.
4704         * tst-fork1.c (do_test): Likewise.
4705         * tst-context1.c (do_test): Likewise.
4706         * tst-cond2.c (do_test): Likewise.
4707         * tst-cond10.c (do_test): Likewise.
4708         * tst-clock2.c (do_test): Likewise.
4709         * tst-cancel10.c (do_test): Likewise.
4710         * tst-basic2.c (do_test): Likewise.
4711         * tst-barrier4.c (do_test): Likewise.
4713 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4715         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4717 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4720         (__pthread_cond_timedwait): Optimize wakeup test.
4721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4722         (__pthread_cond_wait): Likewise.
4723         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4724         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4725         Likewise.
4727 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4729         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4730         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4731         the atomic instruction needed.
4732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4733         (__lll_mutex_lock_wait): Likewise.
4735 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4737         * Makefile (tests): Add tst-cond14 and tst-cond15.
4738         * tst-cond14.c: New file.
4739         * tst-cond15.c: New file.
4741 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4743         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4744         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4745         needs to be implemented differently to be useful.
4747 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4749         * pthread_attr_setschedparam.c: Don't test priority against limits
4750         here.  Set ATTR_FLAG_SCHED_SET flag.
4751         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4752         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4753         from parent thread to child.  If attribute is used and scheduling
4754         parameters are not inherited, copy parameters from attribute or
4755         compute them.  Check priority value.
4756         * pthread_getschedparam.c: If the parameters aren't known yet get
4757         them from the kernel.
4758         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4759         ATTR_FLAG_POLICY_SET flag for thread.
4760         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4761         and ATTR_FLAG_POLICY_SET.
4763         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4765         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4766         fail if stack address hasn't been set.  Just return 0.
4768 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4770         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4771         libpthread for the files in this list.
4772         (CFLAGS-tst-unload): Removed.
4773         * tst-unload.c (do_test): Don't use complete path for
4774         LIBPHREAD_SO.
4776         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4777         tst-_res1mod2.
4779 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4781         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4782         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4783         operation per round is needed.
4784         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4785         (__lll_mutex_lock_wait): Likewise.
4787 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4789         * tst-cancel9.c (cleanup): Don't print to stderr.
4791 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4793         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4795 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4797         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4798         (__syscall_error_handler2): Call CDISABLE.
4799         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4800         (__syscall_error_handler2): Call CDISABLE.
4802         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4803         Release lock before the loop, don't reacquire it.
4805         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4807 2004-02-19  Andreas Schwab  <schwab@suse.de>
4809         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4810         Fix last change.
4812 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4814         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4815         (pthread_barrier_wait): After wakeup, release lock only when the
4816         last thread stopped using the barrier object.
4817         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4818         (pthread_barrier_wait): Likewise.
4819         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4820         Likewise.
4821         * Makefile (tests): Add tst-barrier4.
4822         * tst-barrier4.c: New file.
4824         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4825         (__pthread_cond_timedwait): Perform timeout test while holding
4826         internal lock to prevent wakeup race.
4827         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4828         * sysdeps/pthread/pthread_cond_timedwait.c
4829         (__pthread_cond_timedwait): Likewise.
4830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4831         (__pthread_cond_timedwait): Likewise.
4833 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4835         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4836         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4837         * Makefile (tests): Add tst-rwlock13.
4838         * tst-rwlock13.c: New test.
4840 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4842         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4843         (__condvar_tw_cleanup): Little optimization.
4844         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4846 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4848         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4849         libpthread as "lib" parameter to SHLIB_COMPAT.
4850         (__novmx_siglongjmp): Fix typo in function name.
4851         (__novmx_longjmp): Fix typo in function name.
4853 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4855         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4856         __builtin_expect.
4858         * sysdeps/generic/pt-longjmp.c: Moved to...
4859         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4861 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4863         * Makefile (libpthread-routines): Add pt-cleanup.
4864         * pt-longjmp.c: Removed.
4865         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4866         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4867         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4868         Version longjmp, siglongjmp for GLIBC_2.3.4.
4869         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4871 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4873         * sysdeps/pthread/pthread_cond_timedwait.c
4874         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4875         Reuse code.  Add __builtin_expects.
4877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4878         (__pthread_cond_timedwait): Get internal lock in case timeout has
4879         passed before the futex syscall.
4880         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4882 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4884         * allocatestack.c: Pretty printing.
4886         * sysdeps/pthread/createthread.c (create_thread): Don't add
4887         CLONE_DETACHED bit if it is not necessary.
4889 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4891         * pthread_getattr_np.c: Include ldsodefs.h.
4893 2004-01-16  Richard Henderson  <rth@redhat.com>
4895         * allocatestack.c: Don't declare __libc_stack_end.
4896         * init.c (__pthread_initialize_minimal_internal): Likewise.
4897         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4899 2004-01-15  Richard Henderson  <rth@redhat.com>
4901         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4902         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4903         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4904         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4905         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4906         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4907         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4908         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4910 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4912         * init.c (pthread_functions): Make array const.
4914 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4916         * allocatestack.c (__make_stacks_executable): Change interface.
4917         Check parameters.  Pass parameter on to libc counterpart.
4918         * pthreadP.h: Change declaration.
4920 2004-01-13  Richard Henderson  <rth@redhat.com>
4922         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4923         prototype form.
4924         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4925         Likewise.
4927         * sysdeps/alpha/Makefile: New file.
4928         * sysdeps/alpha/tcb-offsets.sym: New file.
4929         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4930         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4932         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4933         on powerpc version.
4935 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4937         * Makefile (tests): Add tst-backtrace1.
4938         * tst-backtrace1.c: New test.
4940 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4942         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4943         register as second parameter to the REGISTER macro.
4944         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4945         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4946         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4947         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4948         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4949         of thread register as second parameter to REGISTER macro in 64 case.
4951 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4953         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4954         (CFLAGS-getpid.o): Defined.
4955         (CFLAGS-getpid.os): Defined.
4957 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4959         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4960         returned for main thread does not overlap with any other VMA.
4961         Patch by Jakub Jelinek.
4963 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4965         * tst-raise1.c: Include stdio.h.
4967 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4969         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4970         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4971         If pid is 0, set it to selftid.
4972         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4973         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4974         != 0, return self->tid without doing a syscall.
4975         * descr.h (struct pthread): Move pid field after tid.
4977         * Makefile (tests): Add tst-raise1.
4978         * tst-raise1.c: New file.
4980 2003-12-23  Roland McGrath  <roland@redhat.com>
4982         * tst-oddstacklimit.c: New file.
4983         * Makefile (tests): Add it.
4984         (tst-oddstacklimit-ENV): New variable.
4986         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4987         value up to page size for __default_stacksize.
4989 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4991         * Makefile (tests): Add tst-eintr5.
4992         * tst-eintr5.c: New file.
4994         * eintr.c (eintr_source): Prevent sending signal to self.
4996         * tst-eintr2.c (tf1): Improve error message.
4998 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5000         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5001         * sysdeps/unix/sysv/linux/getpid.c: New file.
5002         * pthread_cancel.c: Add comment explaining use of PID field.
5003         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5004         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5005         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5006         temporarily to signal the field must not be relied on and updated
5007         by getpid().
5008         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5009         temporarily negative.
5010         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5012 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5014         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5015         (eintr_source): If ARG != NULL, use pthread_kill.
5016         * tst-eintr1.c: Adjust for this change.
5017         * tst-eintr2.c: Likewise.
5018         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5019         * tst-eintr3.c: New file.
5020         * tst-eintr4.c: New file.
5022 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5024         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5025         if CANCELSTATE_BITMASK is set.
5026         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5027         Likewise.
5029         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5030         (tests-reverse): Add tst-cancel23.
5031         * tst-cancel22.c: New test.
5032         * tst-cancel23.c: New test.
5034 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5036         * tst-eintr1.c: Better error messages.
5038         * Makefile (tests): Add tst-eintr2.
5039         * tst-eintr2.c: New file.
5041 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5043         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5044         (CFLAGS-tst-cancelx21.c): Set.
5045         * tst-cancel21.c: New test.
5046         * tst-cancelx21.c: New test.
5048         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5049         comparison operand.
5050         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5051         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5052         * pt-longjmp.c: Include jmpbuf-unwind.h.
5053         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5054         _JMPBUF_UNWINDS.  Adjust compared pointers.
5055         * init.c (__pthread_initialize_minimal_internal): Initialize
5056         pd->stackblock_size.
5057         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5058         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5059         * sysdeps/i386/jmpbuf-unwind.h: New file.
5060         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5061         * sysdeps/s390/jmpbuf-unwind.h: New file.
5062         * sysdeps/sh/jmpbuf-unwind.h: New file.
5063         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5064         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5065         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5066         (_JMPBUF_CFA_UNWINDS): Remove.
5067         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5069 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5071         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5072         (CFLAGS-tst-cancelx20.c): Set.
5073         * tst-cancel20.c: New test.
5074         * tst-cancelx20.c: New test.
5076 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5078         * init.c (__pthread_initialize_minimal_internal): Don't treat
5079         architectures with separate register stack special here when
5080         computing default stack size.
5082 2003-12-17  Roland McGrath  <roland@redhat.com>
5084         * Makefile (tst-cancelx7-ARGS): New variable.
5085         Reportd by Greg Schafer <gschafer@zip.com.au>.
5087 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5089         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5090         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5091         (tst-stack3-ENV): Set.
5092         ($(objpfx)tst-stack3-mem): New.
5093         * tst-stack3.c: New test.
5095 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5097         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5098         Add unwind directives.  Drop unused .regstk directive.
5099         (_fini_EPILOG_BEGINS): Add unwind directives.
5101 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5103         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5104         Assume parameter is a pointer.
5105         (lll_futex_wake): Likewise.
5106         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5107         Likewise.
5108         (lll_futex_wake): Likewise.
5109         Reported by Boris Hu.
5110         * sysdeps/unix/sysv/linux/unregister-atfork.c
5111         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5113         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5115 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5117         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5118         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5119         __rtld_lock_initialize for ld.so lock.
5120         Patch in part by Adam Li <adam.li@intel.com>.
5122 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5124         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5125         in $(gnulib).  Also, remove stale comment.
5127 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5129         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5130         advantage of new syscall stub and optimize accordingly.
5132         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5133         from SYS_futex, to match expectations of
5134         sysdep.h:DO_INLINE_SYSCALL.
5135         (lll_futex_clobbers): Remove.
5136         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5137         (lll_futex_wake): Likewise.
5138         (lll_futex_requeue): Likewise.
5139         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5140         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5141         Jelinek).
5142         (__lll_mutex_lock): Likewise.
5143         (__lll_mutex_cond_lock): Likewise.
5144         (__lll_mutex_timed_lock): Likewise.
5145         (__lll_mutex_unlock): Likewise.
5146         (__lll_mutex_unlock_force): Likewise.
5148         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5149         comes before the include of <sysdep.h>.
5150         (THREAD_SELF_SYSINFO): New macro.
5151         (THREAD_SYSINFO): Likewise.
5152         (INIT_SYSINFO): New macro.
5153         (TLS_INIT_TP): Call INIT_SYSINFO.
5155         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5157         * sysdeps/pthread/createthread.c (create_thread): Use
5158         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5159         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5160         THREAD_SELF_SYSINFO instead of open code.
5161         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5162         (THREAD_SYSINFO): Likewise.
5164         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5166         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5168 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5170         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5171         instead of .init.  Patch by David Mosberger.
5173 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5175         * sysdeps/pthread/configure.in: Remove broken declaration in C
5176         cleanup handling check.
5178 2003-11-30  Andreas Jaeger  <aj@suse.de>
5180         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5181         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5182         Likewise.
5184 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5186         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5187         * pthread_attr_destroy.c: Include shlib-compat.h.
5188         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5189         is set in iattr->flags.
5190         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5192 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5194         * Makefile (distribute): Add tst-cleanup4aux.c.
5196         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5197         include.
5199 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5201         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5202         pthread_cond_signal.
5204         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5205         store mutex address if the current value is ~0l.
5206         * sysdeps/pthread/pthread_cond_timedwait.c
5207         (__pthread_cond_timedwait): Likewise.
5208         * sysdeps/pthread/pthread_cond_broadcast.c
5209         (__pthread_cond_broadcast): Don't use requeue for pshared
5210         condvars.
5212         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5213         (__pthread_cond_wait): Don't store mutex address if the current
5214         value is ~0l.
5215         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5216         (__pthread_cond_timedwait): Likewise.
5217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5218         (__pthread_cond_broadcast): Don't use requeue for pshared
5219         condvars.
5221         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5222         element with ~0l for pshared condvars, with NULL otherwise.
5224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5225         (__pthread_cond_wait): Don't store mutex address if the current
5226         value is ~0l.
5227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5228         (__pthread_cond_timedwait): Likewise.
5229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5230         (__pthread_cond_broadcast): Don't use requeue for pshared
5231         condvars.
5233         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5234         * tst-cond12.c: New file.
5235         * tst-cond13.c: New file.
5237 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5239         * sysdeps/pthread/configure.in: Make missing forced unwind support
5240         fatal.
5242 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5244         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5246 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5248         * Makefile: Add magic to clean up correctly.
5250 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5252         * unwind.c (FRAME_LEFT): Define.
5253         (unwind_stop): Handle old style cleanups here.
5254         (__pthread_unwind): Handle old style cleanups only if
5255         !HAVE_FORCED_UNWIND.
5256         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5257         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5258         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5259         ($(objpfx)tst-cleanupx4): Likewise.
5260         * tst-cleanup4.c: New test.
5261         * tst-cleanup4aux.c: New.
5262         * tst-cleanupx4.c: New test.
5264 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5266         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5267         lll_mutex_*lock macros to skip atomic operations on some archs.
5269 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5271         * sysdeps/pthread/tst-timer.c (main): Initialize
5272         sigev2.sigev_value as well.
5274 2003-10-15  Roland McGrath  <roland@redhat.com>
5276         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5277         is missing.
5278         * sysdeps/pthread/configure: Regenerated.
5280 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5282         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5283         locking macros.  No distinction between normal and mutex locking
5284         anymore.
5285         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5286         Merge bits from lowlevelmutex.S we still need.
5287         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5288         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5289         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5290         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5291         new mutex implementation.
5292         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5293         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5294         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5295         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5297         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5298         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5299         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5300         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5301         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5302         symbol for entry point to avoid cancellation.
5304 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5306         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5307         changes.
5308         (SAVE_OLDTYPE_0): Fix a typo.
5310 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5312         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5313         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5315 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5317         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5318         correct offset.
5320 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5322         * Makefile (tests): Add tst-cancel19.
5323         * tst-cancel19.c: New test.
5325 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5327         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5328         restoring of the old cancellation type.
5330 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5332         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5334 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5336         * sysdeps/pthread/malloc-machine.h: New file
5338 2003-09-24  Roland McGrath  <roland@redhat.com>
5340         * allocatestack.c (__make_stacks_executable): Don't ignore return
5341         value from _dl_make_stack_executable.
5343 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5345         * allocatestack.c (__make_stacks_executable): Also change
5346         permission of the currently unused stacks.
5348         * allocatestack.c (change_stack_perm): Split out from
5349         __make_stacks_executable.
5350         (allocate_stack): If the required permission changed between the time
5351         we started preparing the stack and queueing it, change the permission.
5352         (__make_stacks_executable): Call change_stack_perm.
5354         * Makefile: Build tst-execstack-mod locally.
5355         * tst-execstack-mod.c: New file.
5357 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5359         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5361 2003-09-23  Roland McGrath  <roland@redhat.com>
5363         * tst-execstack.c: New file.
5364         * Makefile (tests): Add it.
5365         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5366         (LDFLAGS-tst-execstack): New variable.
5368         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5369         whether to use PROT_EXEC for stack mmap.
5370         (__make_stacks_executable): New function.
5371         * pthreadP.h: Declare it.
5372         * init.c (__pthread_initialize_minimal_internal): Set
5373         GL(dl_make_stack_executable_hook) to that.
5375 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5377         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5378         recommendation from AMD re avoidance of lock prefix.
5380 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5382         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5383         lll_futex_timed_wait instead of lll_futex_wait.
5384         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5385         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5386         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5387         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5388         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5389         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5390         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5391         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5392         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5393         Completely revamp the locking macros.  No distinction between
5394         normal and mutex locking anymore.
5395         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5396         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5397         __lll_lock_timedwait): Fix prototypes.
5398         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5399         __lll_lock_timedwait): Likewise.
5400         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5401         macros, add __builtin_expect.
5402         (lll_mutex_timedlock): Likewise.  Fix return value.
5403         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5404         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5405         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5406         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5407         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5408         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5409         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5410         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5412 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5414         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5415         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5416         operation if possible.
5418         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5419         like jumping over the lock prefix.
5421 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5423         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5424         locking macros.  No distinction between normal and mutex locking
5425         anymore.
5426         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5427         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5428         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5429         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5430         locking.  Merge bits from lowlevelmutex.S we still need.
5431         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5432         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5433         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5434         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5435         * Makefile (routines): Remove libc-lowlevelmutex.
5436         (libpthread-rountines): Remove lowlevelmutex.
5437         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5438         for new mutex implementation.
5439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5440         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5442         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5443         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5444         Likewise.
5445         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5446         Likewise.
5447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5448         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5449         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5450         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5451         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5453         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5454         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5455         Likewise.
5456         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5457         Likewise.
5458         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5459         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5460         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5461         Don't use requeue.
5462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5463         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5465 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5467         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5468         in parameters of asm with output parameters.
5470         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5471         type of DECR parameter to int.
5472         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5474 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5476         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5477         guardsize for each thread.
5479 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5481         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5482         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5483         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5485         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5486         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5487         NULL.
5488         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5489         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5490         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5491         (pthread_getaffinity_np): Add hidden_def.
5493         * Makefile (tests): Add tst-attr3.
5494         * tst-attr3.c: New test.
5496         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5498 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5500         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5501         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5503 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5505         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5506         * tst-align.c: Include tst-stack-align.h.
5507         (tf, do_test): Use TEST_STACK_ALIGN macro.
5509 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5511         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5512         variable.
5514 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5516         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5517         stack-related values for the initial thread.
5519 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5521         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5523 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5525         * pthread_mutex_lock.c: Minor code rearrangements.
5527 2003-09-05  Roland McGrath  <roland@redhat.com>
5529         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5530         Instead, include ../nptl_db/db_info.c to do its magic.
5531         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5532         (__pthread_pthread_key_2ndlevel_size): Likewise.
5533         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5534         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5535         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5536         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5537         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5538         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5539         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5540         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5541         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5542         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5543         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5544         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5545         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5546         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5547         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5548         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5549         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5551 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5553         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5554         of pthread_t to be compatible with LT.
5555         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5556         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5557         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5558         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5559         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5560         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5561         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5563 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5565         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5567 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5569         * unwind-forcedunwind.c: Move to...
5570         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5571         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5572         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5573         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5574         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5575         * unwind.c: Include jmpbuf-unwind.h.
5576         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5578 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5580         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5581         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5582         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5583         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5584         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5585         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5586         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5587         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5588         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5589         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5590         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5591         function.
5592         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5593         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5594         * Makefile (tests): Add tst-stack2.
5595         * tst-stack2.c: New test.
5596         * tst-stack1.c: Include limits.h and sys/param.h.
5597         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5599         * pthread_condattr_setpshared.c: Include errno.h.
5600         (pthread_condattr_setpshared): Return EINVAL if pshared
5601         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5603         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5604         defined symbol for entry point to avoid cancellation.
5605         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5606         Likewise.
5607         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5608         Likewise.
5609         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5610         Likewise.
5611         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5612         Likewise.
5613         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5614         Likewise.
5615         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5616         __close_nocancel, __read_nocancel, __write_nocancel,
5617         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5618         libpthread.so or librt.so, define to corresponding function
5619         without _nocancel suffix.
5620         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5621         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5622         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5624         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5626 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5628         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5629         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5631         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5632         in subsections has a symbol associated with it.
5634         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5635         defined symbol for entry point to avoid cancellation.
5636         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5638 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5640         * Makefile (tests): Add tst-tls5.
5641         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5642         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5643         ($(objpfx)tst-tls5): New.
5644         ($(objpfx)tst-tls6.out): Likewise.
5645         (tests): Depend on $(objpfx)tst-tls6.out.
5646         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5647         (do_test): Check pthread_self () return value alignment.
5648         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5649         (tf): Check pthread_self () return value alignment.
5650         * tst-tls5.c: New test.
5651         * tst-tls5.h: New.
5652         * tst-tls5mod.c: New.
5653         * tst-tls5moda.c: New.
5654         * tst-tls5modb.c: New.
5655         * tst-tls5modc.c: New.
5656         * tst-tls5modd.c: New.
5657         * tst-tls5mode.c: New.
5658         * tst-tls5modf.c: New.
5659         * tst-tls6.sh: New test.
5661         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5662         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5663         * init.c (pthread_functions): Initialize them.
5664         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5665         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5666         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5667         pthread_cond_timedwait@@GLIBC_2.3.2.
5669 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5671         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5672         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5673         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5674         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5675         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5676         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5678         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5680         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5681         _POSIX_THREAD_PRIORITY_SCHEDULING.
5682         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5684 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5686         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5687         nested function, use static inline function from libio.h.
5688         Code by Richard Henderson.
5690         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5691         weak.
5693 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5695         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5696         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5697         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5698         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5699         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5700         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5701         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5702         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5703         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5704         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5705         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5706         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5707         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5708         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5709         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5710         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5711         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5712         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5713         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5714         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5715         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5716         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5717         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5718         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5719         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5720         * sysdeps/sparc/tls.h: New file.
5721         * sysdeps/sparc/tcb-offsets.sym: New file.
5722         * sysdeps/sparc/Makefile: New file.
5723         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5724         * init.c [__sparc__] (__NR_set_tid_address): Define.
5726 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5728         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5729         _IO_release_lock): Define.
5731 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5733         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5734         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5736 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5738         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5739         (__pthread_cleanup_class): Add missing return types of member
5740         functions.
5742 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5744         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5745         (lll_mutex_unlock_force): Add memory barrier between store and futex
5746         syscall.
5748 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5750         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5751         tempmsg in first loop.
5753 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5755         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5756         _POSIX_THREAD_PRIORITY_SCHEDULING.
5757         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5759 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5761         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5762         (__rtld_lock_default_lock_recursive,
5763         __rtld_lock_default_unlock_recursive): Define.
5764         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5765         __rtld_lock_unlock_recursive): Define using
5766         GL(_dl_rtld_*lock_recursive).
5767         * init.c (__pthread_initialize_minimal_internal): Initialize
5768         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5769         Lock GL(_dl_load_lock) the same number of times as
5770         GL(_dl_load_lock) using non-mt implementation was nested.
5772         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5773         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5775 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5777         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5778         PIPE_BUF.
5780 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5782         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5784 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5786         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5787         to first syscall error check.  Move syscall error check for tkill
5788         into __ASSUME_CLONE_STOPPED #ifdef.
5790 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5792         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5793         is not defined, do explicit synchronization.
5794         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5795         is not defined also unlock pd->lock for non-debugging case in case
5796         it is necessary.
5797         * pthread_create.c (start_thread): Always get and release pd->lock
5798         if __ASSUME_CLONE_STOPPED is not defined.
5799         (start_thread_debug): Removed.  Adjust users.
5800         * allocatestack.c (allocate_stack): Always initialize lock if
5801         __ASSUME_CLONE_STOPPED is not defined.
5802         * Makefile (tests): Add tst-sched1.
5803         * tst-sched1.c: New file.
5805         * sysdeps/pthread/createthread.c (do_clone): Only use
5806         sched_setschduler and pass correct parameters.
5808 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5810         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5811         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5812         PTHREAD_STACK_MIN in comments.
5814 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5816         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5817         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5818         argument.
5819         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5820         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5821         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5822         (__pthread_cleanup_upto): Fix prototype.
5823         (_longjmp_unwind): Adjust caller.
5824         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5825         Change second argument to const struct pointer.
5826         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5827         * tst-sem9.c (main): Likewise.
5828         * unwind.c: Include string.h for strlen prototype.
5830 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5832         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5833         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5834         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5835         Define HAVE_CMOV.
5836         Patch by Nicholas Miell <nmiell@attbi.com>.
5838 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5840         * init.c (__pthread_initialize_minimal_internal): Initialize
5841         GL(dl_init_static_tls).
5842         * pthreadP.h (__pthread_init_static_tls): New prototype.
5843         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5844         New functions.
5845         * Makefile (tests): Add tst-tls4.
5846         (modules-names): Add tst-tls4moda and tst-tls4modb.
5847         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5848         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5849         tst-tls4modb.so.
5850         * tst-tls4.c: New file.
5851         * tst-tls4moda.c: New file.
5852         * tst-tls4modb.c: New file.
5854 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5856         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5857         before __timer_dealloc.
5858         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5859         Don't call list_unlink.
5861 2003-07-29  Roland McGrath  <roland@redhat.com>
5863         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5865 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5867         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5868         Don't reuse struct aiocb A if it failed.
5869         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5870         not just one byte, as that does not block.
5872 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5874         * sysdeps/pthread/unwind-resume.c: New file.
5875         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5876         unwind-resume in csu subdir.
5877         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5878         exceptions.
5879         (librt-sysdep_routines, librt-shared-only-routines): Add
5880         rt-unwind-resume.
5881         * sysdeps/pthread/rt-unwind-resume.c: New file.
5882         * unwind-forcedunwind.c: New file.
5883         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5884         (libpthread-shared-only-routines): Likewise.
5885         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5886         * pthreadP.h (pthread_cancel_init): New prototype.
5887         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5889         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5890         attr argument const struct pthread_attr *.
5892         * res.c (__res_state): Return __resp.
5893         * descr.h: Include resolv.h.
5894         (struct pthread): Add res field.
5895         * pthread_create.c: Include resolv.h.
5896         (start_thread): Initialize __resp.
5897         * Makefile (tests): Add tst-_res1.
5898         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5899         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5900         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5901         libpthread.
5902         * tst-_res1.c: New file.
5903         * tst-_res1mod1.c: New file.
5904         * tst-_res1mod2.c: New file.
5906 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5908         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5910         * Makefile: Define various *-no-z-defs variables for test DSOs
5911         which has undefined symbols.
5913 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5915         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5916         Retry if the stwcx fails to store once_control.
5918 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5920         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5921         pthread_attr_setaffinity.
5922         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5923         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5924         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5925         * pthread_attr_destroy.c: Free cpuset element if allocated.
5926         * pthread_create.c: Pass iattr as additional parameter to
5927         create_thread.
5928         * sysdeps/pthread/createthread.c: If attribute is provided and
5929         a new thread is created with affinity set or scheduling parameters,
5930         start thread with CLONE_STOPPED.
5931         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5932         pthread_attr_setaffinity.
5933         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5934         cpuset element.
5936 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5938         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5940 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5942         * sysdeps/pthread/configure.in: Require CFI directives also for
5943         ppc and s390.
5945 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5947         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5948         Add cfi directives.
5950 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5952         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5953         CLEANUP_JMP_BUF.
5954         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5955         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5956         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5958         not self pointer in __writer.  Compare with TID to determine
5959         deadlocks.
5960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5961         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5962         Likewise.
5963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5964         Likewise.
5965         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5966         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5967         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5968         macros also when compiling librt.
5970 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5972         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5973         -fasynchronous-unwind-tables.
5974         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5975         (PSEUDO): Add cfi directives.
5976         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5977         Likewise.
5978         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5979         Likewise.
5981 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5983         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5984         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5985         * unwind.c (__pthread_unwind_next): Add hidden_def.
5986         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5987         Likewise.
5988         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5989         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5990         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5991         Likewise.
5992         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5993         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5994         Likewise.
5995         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5996         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5997         __pthread_unregister_cancel and __pthread_unwind_next.
5999 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6001         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6002         different symbol for the cancellation syscall wrapper and
6003         non-cancellation syscall wrapper.
6004         (PSEUDO_END): Define.
6006 2003-07-05  Richard Henderson  <rth@redhat.com>
6008         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6009         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6010         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6011         return actual return value from the syscall, not 0.
6013 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6015         * descr.h (struct pthread): Add pid field.
6016         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6017         (__reclaim_stacks): Likewise.
6018         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6019         also check for PID of the signal source.
6020         (__pthread_initialize_minimal_internal): Also initialize pid field
6021         of initial thread's descriptor.
6022         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6023         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6024         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6025         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6026         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6028 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6030         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6031         Fix use of parameter.
6032         (__libc_cleanup_pop): Likewise.
6034 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6036         * init.c (sigcancel_handler): Change parameters to match handler
6037         for SA_SIGACTION.  Check signal number and code to recognize
6038         invalid invocations.
6040 2003-07-03  Roland McGrath  <roland@redhat.com>
6042         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6043         Apply sizeof (struct pthread) bias to r13 value.
6045 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6047         * sysdeps/pthread/configure.in: Require CFI directives.
6049         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6050         definition.
6051         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6052         libpthread compilation.
6053         * unwind.c (__pthread_unwind): Add hidden_def.
6054         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6056 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6058         * libc-cancellation.c (__libc_cleanup_routine): Define.
6059         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6060         (__pthread_cleanup_pop): Define.
6062 2003-07-01  Richard Henderson  <rth@redhat.com>
6064         * sysdeps/alpha/elf/pt-initfini.c: New file.
6065         * sysdeps/alpha/pthread_spin_lock.S: New file.
6066         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6067         * sysdeps/alpha/pthreaddef.h: New file.
6068         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6069         * sysdeps/alpha/tls.h: New file.
6070         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6071         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6072         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6073         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6074         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6075         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6076         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6077         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6078         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6079         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6081 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6083         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6084         cleanup support and unwind info.
6086 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6088         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6089         Use correct cleanup handler registration.  Add unwind info.
6090         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6091         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6092         * tst-once3.c: Add cleanup handler and check it is called.
6093         * tst-once4.c: Likewise.
6094         * tst-oncex3.c: New file.
6095         * tst-oncex4.c: New file.
6096         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6098 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6100         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6102 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6104         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6105         (tf_msgsnd): Likewise.
6107         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6108         premature returns a bit more.
6110 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6112         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6113         definition to the front.
6115         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6116         the cleanup functions to make the names unique.  Fix dwarf opcode
6117         un unwind table.
6118         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6119         functions to make the names unique.  Fix CFA offset for two blocks.
6121 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6123         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6124         missing closing braces.
6125         Patch by Christophe Saout <christophe@saout.de>.
6127 2003-06-24  Roland McGrath  <roland@redhat.com>
6129         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6131 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6133         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6134         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6136         * pthreadP.h: Declare __find_thread_by_id.
6137         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6138         * pthread_clock_gettime.c: Allow using other thread's clock.
6139         * pthread_clock_settime.c: Likewise.
6140         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6141         * Makefile: Add rules to build and run tst-clock2.
6142         * tst-clock2.c: New file.
6144 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6147         to use exception-based cleanup handler.
6148         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6150         * tst-cond8.c (ch): Announce that we are done.
6152         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6154         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6155         Also test aio_suspend with timeout value.
6157 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6159         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6160         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6161         attribute_hidden.
6163         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6164         (__pthread_mutex_lock_internal): Likewise.
6165         (__pthread_mutex_unlock_internal): Likewise.
6166         (__pthread_mutex_unlock_usercnt): Declare.
6167         * pthread_mutex_destroy.c: Always fail if used in any way.
6168         * pthread_mutex_init.c: Update comment.
6169         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6170         * pthread_mutex_timedlock.c: Adjust __nusers.
6171         * pthread_mutex_trylock.c: Adjust __nusers.
6172         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6173         and public interfaces are wrapper with pass additional parameter.
6174         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6175         parameter zero.
6176         * tst-mutex8.c: New file.
6177         * Makefile (tests): Add tst-mutex8.
6178         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6179         __pthread_mutex_unlock_usercnt.
6180         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6181         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6182         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6183         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6184         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6185         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6186         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6187         Add __nusers.
6188         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6189         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6190         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6191         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6192         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6194         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6195         * pthread_mutex_timedlock.c: Likewise.
6196         * pthread_mutex_trylock.c: Adjust __nusers.
6197         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6198         * tst-mutex9.c: New file.
6199         * Makefile (tests): Add tst-mutex9.
6200         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6201         * sysdeps/ia64/tls.h: Likewise.
6202         * sysdeps/powerpc/tls.h: Likewise.
6203         * sysdeps/s390/tls.h: Likewise.
6204         * sysdeps/sh/tls.h: Likewise.
6205         * sysdeps/x86_64/tls.h: Likewise.
6206         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6207         Change type of __owner.
6208         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6209         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6210         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6211         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6212         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6214 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6216         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6217         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6219         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6220         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6221         instead of nr to lll_futex_wake.  Only set errno and return -1
6222         if err < 0.
6224         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6225         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6226         return actual return value from the syscall, not 0.
6228 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6230         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6231         find a random value.
6232         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6233         errno==EIDRM.
6235         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6236         compat_timer_settime.
6237         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6238         compat_timer_gettime.
6239         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6240         compat_timer_getoverrun.
6241         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6242         compat_timer_delete.
6244         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6245         error-checking mutex detect busy mutexes.
6247 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6249         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6250         Add ax to clobber list.
6251         (lll_mutex_cond_lock): Likewise.
6252         (lll_mutex_unlock): Likewise.
6253         (lll_lock): Likewise.
6254         (lll_unlock): Likewise.
6256         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6257         * tst-cancel18.c: New file.
6258         * tst-cancelx18.c: New file.
6260         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6261         and tcdrain.
6263         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6264         * tst-cancel17.c: New file.
6265         * tst-cancelx17.c: New file.
6267         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6268         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6269         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6271         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6273 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6275         * sysdeps/pthread/createthread.c (create_thread): Set
6276         header.multiple_threads unconditionally.
6277         * allocatestack.c (allocate_stack): Likewise.
6278         * descr.h (struct pthread): Add header.multiple_threads
6279         unconditionally.
6280         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6281         Define for librt.  #error if neither libpthread, libc nor librt.
6282         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6283         Likewise.
6284         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6285         CDISABLE): Likewise.
6286         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6287         CDISABLE): Likewise.
6288         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6289         CDISABLE): Likewise.
6290         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6291         CDISABLE): Likewise.  Access header.multiple_threads outside of
6292         libc and libpthread.
6293         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6294         Likewise.
6295         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6296         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6298 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6300         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6301         Also test early cancellation before the thread reaches the cancellation
6302         point.
6304         * Makefile: Compile forward.c with exceptions.
6306         * sysdeps/unix/sysv/linux/sleep.c: New file.
6308 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6310         * Makefile: Add CFLAGS definition to compile function wrappers
6311         duplicated from libc with exceptions.
6312         * tst-cancel4.c: Also check cancellation handlers.
6314         * Makefile: Add rules to build and run tst-cancel16 and
6315         tst-cancelx16.  Add missing CFLAGS definitions.
6316         * tst-cancel16.c: New file.
6317         * tst-cancelx16.c: New file.
6319 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6321         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6322         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6323         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6324         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6326         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6327         (LIBC_CANCEL_RESET): Likewise.
6328         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6329         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6330         librt-cancellation.
6331         (CFLAGS-libcrt-cancellation.c): Define.
6332         * sysdeps/pthread/librt-cancellation.c: New file.
6333         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6334         macros also when compiling librt.
6335         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6336         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6337         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6338         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6339         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6340         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6341         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6343         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6344         compat_timer_create.
6346 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6348         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6350         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6351         __register_atfork.
6352         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6353         Add libc_hidden_def.
6355 2003-06-13  Roland McGrath  <roland@redhat.com>
6357         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6358         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6360 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6362         * allocatestack.c (queue_stack): Always inline.
6363         * ptreadhP.h (__do_cancel): Likewise.
6365 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6367         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6368         a typo.
6370 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6373         (__pthread_cond_signal): Remove incorrect second addition for
6374         cond_lock!=0.
6376 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6378         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6379         (__pthread_cond_signal): Use correct futex pointer in
6380         __lll_mutex_lock_wait call.
6382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6383         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6385 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6387         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6388         cancelable.
6389         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6390         Likewise.
6392         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6393         hand-written CFI generation code.  Since ENTRY/END also initiated
6394         CFI frames this caused two CFI sets to be generated.
6396 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6398         * cleanup_routine.c: New file.
6399         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6400         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6401         cleanup handling.
6402         * Makefile (libpthread-routines): Add cleanup_routine.
6403         Add more CFLAGS variables to compile with exceptions.  Add comments
6404         why which file needs unwind tables.
6405         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6406         tests.
6407         * tst-cancelx1.c: New file.
6408         * tst-cancelx2.c: New file.
6409         * tst-cancelx3.c: New file.
6410         * tst-cancelx4.c: New file.
6411         * tst-cancelx5.c: New file.
6412         * tst-cancelx6.c: New file.
6413         * tst-cancelx7.c: New file.
6414         * tst-cancelx8.c: New file.
6415         * tst-cancelx9.c: New file.
6416         * tst-cancelx10.c: New file.
6417         * tst-cancelx11.c: New file.
6418         * tst-cancelx12.c: New file.
6419         * tst-cancelx13.c: New file.
6420         * tst-cancelx14.c: New file.
6421         * tst-cancelx15.c: New file.
6422         * tst-cleanupx0.c: New file.
6423         * tst-cleanupx0.expect: New file.
6424         * tst-cleanupx1.c: New file.
6425         * tst-cleanupx2.c: New file.
6426         * tst-cleanupx3.c: New file.
6428         * tst-cleanup0.c: Make standard compliant.
6429         * tst-cleanup1.c: Likewise.
6431         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6432         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6433         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6434         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6435         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6436         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6437         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6438         CLEANUP_JMP_BUF.
6439         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6440         * tst-cancel12.c: New file.
6441         * tst-cancel13.c: New file.
6442         * tst-cancel14.c: New file.
6443         * tst-cancel15.c: New file.
6444         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6445         and tst-cancel15.
6447         * tst-cancel1.c: Add some comments.
6449         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6450         timeout correctly.
6452 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6454         * Makefile (CFLAGS-pthread_cancel.c): Define.
6456 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6458         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6459         Change type of __writer element to int.
6460         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6461         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6462         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6463         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6464         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6465         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6466         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6467         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6468         Compare with TID to determine deadlocks.
6469         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6470         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6471         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6472         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6473         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6474         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6475         Likewise.
6476         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6477         Likewise.
6478         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6479         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6481         Likewise.
6482         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6483         Likewise.
6484         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6485         * Makefile (tests): Add tst-rwlock12.
6486         * tst-rwlock12.c: New file.
6488 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6490         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6491         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6492         Remove bogus hidden_proto.
6493         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6494         Likewise.
6495         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6496         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6497         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6498         ___lll_mutex_timedlock): Likewise.
6500 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6503         (__pthread_cond_signal): Add some code to eventually handle
6504         cond_lock!=0.
6506 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6508         * Makefile (tests): Add tst-exec4.
6509         (tst-exec4-ARGS): Define.
6510         * tst-exec4.c: New file.
6512 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6514         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6515         Also fail if tv_nsec < 0.
6516         (__lll_timedwait_tid): Likewise.
6517         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6518         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6519         Likewise.
6520         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6521         Likewise.
6522         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6523         Likewise.
6524         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6525         Likewise.
6526         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6527         Likewise.
6528         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6529         Likewise.
6531         * Makefile (tests): Add tst-sem8 and tst-sem9.
6532         * tst-sem8.c: New file.
6533         * tst-sem9.c: New file.
6534         * sem_open.c: Fix creation of in_use record if the file exists but
6535         no internal record.
6537         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6538         definitions.
6540         * sysdeps/pthread/timer_create.c (timer_create): In case
6541         evp==NULL, assign timer ID to sival_ptr.
6543         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6544         struct pthread_unwind_buf *.
6545         (struct pthread): Likewise for cleanup_jmp_buf element.
6547         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6548         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6549         * unwind.c (__pthread_unwind_next): Likewise.
6551 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6553         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6554         (lll_futex_timed_wait): Use int for futex value parameter.
6555         (lll_futex_wake): Likewise.
6556         (lll_futex_requeue): Likewise.
6558         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6559         Replace one memory operation with one register operation.
6561         * tst-join4.c (do_test): Fix error message.
6563         * tst-rwlock6.c (do_test): Use correct format specifier.
6565         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6566         (__lll_mutex_lock_wait): Replace one memory operation with one
6567         register operation.
6568         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6569         (__lll_mutex_lock_wait): Likewise.
6571         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6572         (__lll_mutex_cond_lock): Add one to value parameter of
6573         __lll_lock_wait to reflect reality in the futex syscall.
6574         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6575         (lll_mutex_cond_lock): Likewise.
6577 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6579         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6580         New function.
6581         (lll_mutex_cond_lock): Define.
6583 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6585         * Makefile (tests): Add tst-signal6.
6586         * tst-signal6.c: New file.
6588         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6589         (__lll_mutex_unlock_force): New function
6590         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6592         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6593         (__lll_mutex_unlock_force): New function.
6594         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6596         * tst-rwlock7.c (do_test): Use correct format specifier.
6598         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6599         Find break parameter in correct asm argument.
6601 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6603         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6604         Remove out4.
6605         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6606         error occured.
6607         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6608         Add __mutex.
6609         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6610         lll_futex_requeue, lll_mutex_unlock_force): Define.
6612 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6614         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6615         (pthread_cond_t): Add __mutex.
6616         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6617         lll_futex_requeue, lll_mutex_unlock_force): Define.
6619 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6621         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6622         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6623         Add __mutex field.
6624         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6625         Define.
6626         (lll_futex_wait, lll_futex_wake): Define.
6627         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6628         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6629         FUTEX_REQUEUE instead of FUTEX_WAIT.
6630         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6631         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6632         mutex which was used in condvar structure.  Call
6633         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6634         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6636         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6637         include tcb-offsets.h.  Read wakeup value in locked region.
6638         Use the value of gbr register as THREAD_ID.
6639         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6640         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6641         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6643         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6644         macros.
6646 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6648         * sysdeps/pthread/pthread_cond_broadcast.c
6649         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6651 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6653         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6654         typo in register name.
6655         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6656         correctly.  Actually use requeue.  Little optimization.
6657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6658         mutex address early.  Handle cancellation state as 32-bit value.
6659         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6660         Remove unnecessary label.
6662 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6664         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6665         instead of FUTEX_WAIT.
6666         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6667         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6668         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6671         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6672         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6673         of __pthread_mutex_lock_internal.
6674         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6675         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6676         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6677         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6679         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6680         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6681         Add pthread_mutex_cond_lock.
6682         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6683         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6685         lll_mutex_cond_lock.
6686         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6687         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6688         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6689         Add __mutex field.
6690         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6691         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6693         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6694         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6696         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6697         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6698         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6699         macro don't define aliases.
6701         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6702         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6703         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6704         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6706         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6707         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6708         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6709         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6711 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6713         * sem_open.c: Fix one endless loop.  Implement correct semantics
6714         wrt opening the same semaphore more then once.
6715         * sem_close.c: Adjust for sem_open change.
6716         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6717         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6718         * Makefile (tests): Add tst-sem7.
6719         * tst-sem7.c: New file.
6721 2003-05-16  Roland McGrath  <roland@redhat.com>
6723         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6724         uninitialized variable braino.
6726 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6728         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6729         test for syscall availability.
6731         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6732         __no_posix_timers to -1 if the syscalls don't exist.
6734         * pthread_join.c (pthread_join): Set tid field of the joined
6735         thread to -1.  This isn't necessary but helps to recognize some
6736         error conditions with almost no cost.
6738         * allocatestack.c (FREE_P): Also negative values indicate an
6739         unused stack.
6741         * unwind.c: Include <unistd.h>.
6743 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6745         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6747 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6749         * Makefile (crti-objs, crtn-objs): New variables.
6750         (omit-deps, extra-objs): Add crtn.
6751         ($(objpfx)libpthread.so): Depend on both crti and crtn
6752         and links to them in multidir.
6753         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6755 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6757         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6758         (lll_mutex_unlock): Use atomic_exchange_rel.
6760 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6762         * cond-perf.c (cons): Add missing locking around setting of alldone.
6764 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6766         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6767         related macros.
6768         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6770 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6772         * tst-sem6.c: New file.
6773         * Makefile (tests): Add tst-sem6.
6775         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6776         Use atomic_exchange_rel instead of atomic_exchange.
6777         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6778         Likewise.
6780         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6781         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6782         vsyscall is possible.
6784         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6785         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6786         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6787         pthread_setaffinity_np.
6788         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6789         and pthread_setaffinity_np.
6790         * Makefile (libpthread-routines): Add pthread_getaffinity and
6791         pthread_setaffinity.
6793         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6794         use it in case mmap to allocate the stack fails.
6795         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6796         ARCH_MAP_FLAGS here.
6797         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6798         ARCH_RETRY_MMAP.
6800 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6802         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6803         handler implementation.  It is now lockless in fork().
6804         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6805         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6806         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6807         declare the __fork_*_lists.
6808         (struct fork_handler): Include pointers to all three functions.
6809         Add next, refcntr and need_signal elements.
6810         (__fork_handlers): New declaration.
6811         (__register_atfork_malloc): Remove declaration.
6812         (HAVE_register_atfork_malloc): Remove definition.
6813         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6814         __pthread_child_handler variable.
6815         (__libc_pthread_init): Use __register_atfork instead of explicitly
6816         adding to the list.
6817         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6818         and lll_futex_wake.
6819         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6821         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6822         function must never be reached.
6824         * cond-perf.c: New file.
6826 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6828         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6830 2003-05-04  Roland McGrath  <roland@redhat.com>
6832         * Makefile ($(objpfx)../libc.so): New target.
6834 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6836         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6837         (pthread_condattr_t): Size is only an int, don't use long for
6838         alignment.
6839         (pthread_mutexattr_t): Likewise.
6840         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6841         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6842         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6844 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6846         * sysdeps/i386/tls.h: Define THREAD_ID.
6847         * sysdeps/ia64/tls.h: Likewise.
6848         * sysdeps/powerpc/tls.h: Likewise.
6849         * sysdeps/s390/tls.h: Likewise.
6850         * sysdeps/sh/tls.h: Likewise.
6851         * sysdeps/x86_64/tls.h: Likewise.
6852         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6853         record ownership.
6854         * pthread_mutex_timedlock.c: Likewise.
6855         * pthread_mutex_trylock.c: Likewise.
6856         * pthread_mutex_unlock.c: Likewise.
6857         * pthread_rwlock_trywrlock.c: Likewise.
6858         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6859         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6860         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6861         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6863         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6864         flag.
6866 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6868         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6869         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6870         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6871         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6872         Make __align long long instead of long.
6873         (pthread_rwlock_t): Formatting.
6874         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6875         (pthread_rwlock_t): Formatting.
6876         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6877         (pthread_cond_t): Make __align long long instead of long.
6878         (pthread_rwlock_t): Move __flags field to the same position as in
6879         linuxthreads.
6881 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6883         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6884         * tst-rwlock7.c (do_test): Likewise.
6886 2003-04-26  Roland McGrath  <roland@redhat.com>
6888         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6890 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6892         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6893         sizeof (struct pthread).
6894         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6895         1 struct pthread.
6896         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6897         to 0.
6898         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6899         struct pthread.
6900         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6901         to 32-bit bytes.
6902         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6903         tcbp.
6904         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6905         unneccessarily.
6906         (NO_TLS_OFFSET): Define.
6907         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6908         add TLS_TCB_SIZE unnecessarily.
6910 2003-04-22  Roland McGrath  <roland@redhat.com>
6912         * Makeconfig (shared-thread-library): Reverse link order to work
6913         around linker bug.
6915 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6917         * semaphore.h: Fix typo in comment.
6919 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6921         * sysdeps/pthread/sigfillset.c: New file.
6923         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6924         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6925         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6926         * sysdeps/pthread/sigaction.c: Likewise.
6927         * sysdeps/pthread/sigprocmask.c: New file.
6928         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6929         __SIGRTMIN+1.
6930         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6931         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6932         in this case.
6934 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6936         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6937         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6939         * sysdeps/unix/sysv/linux/unregister-atfork.c
6940         (__unregister_atfork): Don't free memory not allocated dynamically.
6942         * semaphore.h: Remove __THROW marker from cancellation points.
6943         * nptl/sysdeps/pthread/pthread.h: Likewise.
6945 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6947         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6948         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6949         __THROW.
6951 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6953         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6955 2003-04-15  Roland McGrath  <roland@redhat.com>
6957         * forward.c (__pthread_unwind): Tweak to avoid warning.
6959 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6961         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6963 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6965         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6966         overflow CFA advance instructions.
6967         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6969 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6971         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6972         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6973         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6974         defined.
6976         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6977         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6979         DW_CFA_advance_loc for .Laddl-.Lsubl.
6981 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6984         position-independent unwind data for static libraries.
6985         Add missing unwind info.  Add comments.
6987         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6988         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6992 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6994         * Makefile: Make sure all cancellation points are compiled with
6995         exception and asynchronous unwind tables.
6997         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6998         which mishandles loading of global object addresses in PIC.
6999         (THREAD_SETMEM_NC): Likewise.
7001 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7003         * pthread.h: Define new data structure for cleanup buffer.  Declare
7004         new cleanup handler interfaces.
7005         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7006         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7007         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7008         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7009         it.  Declare old cleanup handler installation functions.
7010         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7011         handling.
7012         * cleanup_defer.c: Likewise.
7013         * cleanup_compat.c: New file.  Old cleanup code.
7014         * cleanup_def_compat.c: New file.  Old cleanup code.
7015         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7016         if own thread descriptor.
7017         * unwind.c: New file.
7018         * forward.c: Add __pthread_unwind.
7019         * init.c (pthread_functions): Add __pthread_unwind.
7020         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7021         Add ptr___pthread_unwind.
7022         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7023         and unwind function.
7024         * Makefile (libpthread-routines): Add cleanup_compat,
7025         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7026         table generation if necessary.
7027         * version.c: Record whether unwind support is compiled in.
7028         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7029         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7030         handler interfaces.
7031         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7032         complication to generate unwind information for syscall wrappers.
7033         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7034         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7035         __cleanup_fct_attribute.
7037         * Makefile: Add rules to build and run tst-cleanup0.
7038         * tst-cleanup0.c: New file.
7039         * tst-cleanup0.expect: New file.
7041         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7042         caller.  Optimize to avoid often unecessary local variable.
7044 2003-04-11  Roland McGrath  <roland@redhat.com>
7046         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7047         sets variable `multidir'; include that.
7048         (generated): Add it.
7049         ($(objpfx)$(multidir)/crti.o): New target.
7050         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7052 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7054         * tst-attr2.c (do_test): Add cast to avoid warning.
7055         * tst-mutex4.c (do_test): Likewise.
7057 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7059         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7060         in child.
7062 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7064         * Makefile (tests): Add tst-detach1.
7065         * tst-detach1.c: New file.
7067 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7069         * sysdeps/pthread/pthread.h: Remove duplicate
7070         pthread_cleanup_{push,pop} definitions.
7072         * tst-barrier2.c: Eliminate warnings.
7073         * tst-cancel4.c: Likewise.
7074         * tst-cond4.c: Likewise.
7075         * tst-cond6.c: Likewise.
7076         * tst-detach1.c: Likewise.
7077         * tst-rwlock4.c: Likewise.
7078         * tst-rwlock6.c: Likewise.
7079         * tst-rwlock7.c: Likewise.
7080         * tst-sem3.c: Likewise.
7081         * tst-spin2.c: Likewise.
7082         * tst-umask1.c: Likewise.
7084 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7086         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7088 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7090         * descr.h (struct pthread): Move cancelhandling member to the front.
7092 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7094         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7095         malloc_parent, and malloc_child statically.
7096         (__register_atfork_malloc): New function.
7097         (free_mem): Don't free any of the malloc_* variables on the list.
7098         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7099         Define HAVE_register_atfork_malloc.
7101 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7103         * sysdeps/pthread/createthread.c (create_thread): Add some more
7104         comments explaining when to set multiple_threads and when not.
7106         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7107         THREAD_ATOMIC_BIT_SET if not already defined.
7108         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7109         THREAD_ATOMIC_BIT_SET:
7110         * sysdeps/x86_64/tls.h: Likewise.
7111         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7112         THREAD_ATOMIC_CMPXCHG_VAL.
7113         (_pthread_cleanup_pop_restore): Likewise.
7114         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7115         (__pthread_enable_asynccancel_2): Likewise.
7116         (__pthread_disable_asynccancel): Likewise.
7117         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7118         (__libc_disable_asynccancel): Likewise.
7119         * init.c (sigcancel_handler): Likewise.
7120         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7121         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7123 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7125         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7126         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7127         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7128         * Makefile (tests): Add tst-cancel11.
7129         * tst-cancel11.c: New file.
7131 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7133         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7134         round, not the first.  Use specific_used flag instead of local
7135         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7136         (__free_tcb): Don't call deallocate_tsd here.
7137         (start_thread): Call deallocate_tsd here.
7138         * pthread_setspecific.c: Set specific_used flag really only when
7139         needed.
7140         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7141         * tst-tsd3.c: New file.
7142         * tst-tsd4.c: New file.
7144 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7146         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7147         Use atomic_exchange_and_add instead of __lll_add.
7148         (__lll_mutex_timedlock): Likewise.
7149         Patch by Ian Wienand.
7151 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7153         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7154         (SINGLE_THREAD_P): Fix typo.
7155         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7157 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7159         * Makefile (tests): Add tst-align.
7160         * tst-align.c: New file.
7161         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7163         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7164         function correctly.
7166         * tst-tsd2.c: Add casts to avoid warnings.
7168 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7170         * descr.h (struct pthread): Move most often used elements to the front.
7172 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7174         * Makefile (libpthread-routines): Add pthread_atfork.
7175         (libpthread-static-only-routines): Add pthread_atfork.
7177 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7179         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7180         of TLS_DTV_AT_TP.
7181         (INSTALL_DTV): Add parens.
7182         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7183         Use passed descr instead of THREAD_SELF.
7184         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7185         (__lll_mutex_timedlock_wait): Correct expected value after
7186         spurious wakeup.
7187         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7188         Release lock before waking up the waiters.
7189         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7190         criteria.  Reorderstruct passed to cleanup handler.  Fix
7191         handling of cancellation and failung pthread_mutex_unlock call.
7192         Use __pthread_enable_asynccancel_2 instead of
7193         __pthread_enable_asynccancel.
7194         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7195         Return result of lock re-get if it fails.
7196         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7197         for __pthread_cleanup_push.
7198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7199         completely broken rwlock implementation.
7200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7201         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7202         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7203         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7204         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7205         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7206         versioned_symbol macro.
7207         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7208         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7210 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7212         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7213         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7214         and __helper_tid.
7215         (struct timer): Remove th and bar field.
7216         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7217         debugging code.  Create only one helper thread.
7218         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7219         helper thread.
7220         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7221         Renamed.  Define statically.  Use thread info from siginfo.
7222         (__helper_once): New variable.
7223         (__helper_tid): New variable.
7224         (__reset_helper_control): New function.
7225         (__start_helper_thread): New function.
7227         * pthread_create.c (start_thread): Don't use setjmp inside
7228         __builtin_expect to work around gcc bug.
7230         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7231         timer_delete syscall fails, but not with ENOSYS, set
7232         __no_posix_timers.
7234         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7235         (timer_settime): Fix typo.
7236         * sysdeps/unix/sysv/linux/timer_getoverr.c
7237         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7239 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7242         offset of cleanupbuf.__prev.
7244 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7246         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7247         of included file.
7249 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7251         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7252         NULL provide default definition to syscall.
7254 2003-03-25  Roland McGrath  <roland@redhat.com>
7256         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7257         (timer_id2ptr): Fix typo.
7259 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7261         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7262         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7263         * sysdeps/ia64/pthreaddef.h: Likewise.
7264         * sysdeps/powerpc/pthreaddef.h: Likewise.
7265         * sysdeps/s390/pthreaddef.h: Likewise.
7266         * sysdeps/sh/pthreaddef.h: Likewise.
7267         * sysdeps/x86_64/pthreaddef.h: Likewise.
7268         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7269         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7270         being changed.
7271         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7272         SIGTIMER is not unblocked.
7273         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7274         RT signal taken.
7275         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7276         be send.
7277         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7278         pass pointer through as ID.
7279         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7280         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7281         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7282         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7283         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7284         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7285         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7286         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7287         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7288         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7289         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7290         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7291         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7292         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7293         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7294         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7295         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7296         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7297         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7298         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7299         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7300         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7301         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7302         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7303         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7304         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7305         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7306         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7307         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7308         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7309         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7310         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7311         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7313         * pthreadP.h: Remove FRAME_LEFT definition.
7314         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7315         already left frame.  Programs which have this problem are not POSIX
7316         compliant.
7317         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7319 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7321         * sysdeps/pthread/tst-timer.c: Check return values of the
7322         functions we test.
7324 2003-03-23  Roland McGrath  <roland@redhat.com>
7326         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7327         * tst-tls3mod.c: Likewise.
7328         * tst-tls1.c: Likewise.
7329         * tst-tls2.c: Likewise.
7331         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7332         undefined behavior.
7334         * tst-join5.c (tf1, tf2): Add a cast.
7336         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7338         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7339         Don't test anything.
7340         * tst-cond4.c: Likewise.
7341         * tst-cond6.c: Likewise.
7342         * tst-flock2.c: Likewise.
7343         * tst-mutex4.c: Likewise.
7344         * tst-rwlock4.c: Likewise.
7345         * tst-signal1.c: Likewise.
7346         * tst-spin2.c: Likewise.
7347         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7349         * tst-mutex4.c: Use test-skeleton.c.
7350         * tst-spin2.c: Likewise.
7351         * tst-sysconf.c: Likewise.
7352         * tst-barrier2.c: Likewise.
7353         * tst-cond4.c: Likewise.
7354         * tst-cond6.c: Likewise.
7355         * tst-rwlock4.c: Likewise.
7356         * tst-unload.c: Likewise.
7357         * tst-flock2.c (do_test): Use return instead of exit.
7359 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7361         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7363 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7365         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7366         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7367         instead of __lll_compare_and_swap.
7368         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7369         Likewise.
7370         Removed definition if __lll_compare_and_swap.
7372         * cancellation.c: Adjust for new form of compare&exchange macros.
7373         * cleanup_defer.c: Likewise.
7374         * init.c: Likewise.
7375         * libc-cancellation.c: Likewise.
7376         * old_pthread_cond_broadcast.c: Likewise.
7377         * old_pthread_cond_signal.c: Likewise.
7378         * old_pthread_cond_timedwait.c: Likewise.
7379         * old_pthread_cond_wait.c: Likewise.
7380         * pthread_cancel.c: Likewise.
7381         * pthread_create.c: Likewise.
7382         * pthread_detach.c: Likewise.
7383         * pthread_join.c: Likewise.
7384         * pthread_key_delete.c: Likewise.
7385         * pthread_setcancelstate.c: Likewise.
7386         * pthread_setcanceltype.c: Likewise.
7387         * pthread_timedjoin.c: Likewise.
7388         * pthread_tryjoin.c: Likewise.
7389         * sysdeps/pthread/createthread.c: Likewise.
7391 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7393         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7394         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7395         definitions.  Replace uses with calls to atomic_* functions.
7396         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7397         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7398         __lll_test_and_set calls with atomic_exchange_and_add and
7399         atomic_exchange calls respectively.
7400         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7401         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7402         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7403         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7404         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7405         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7406         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7408         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7409         returns the old value.
7411 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7413         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7414         int for variable OLDVAL and correct inline assembler contraint.
7415         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7416         type int for variable OLD.
7418         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7419         only for s390-32.
7420         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7421         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7422         instead of multiple_threads field in the TCB.
7424 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7426         * sysdeps/i386/i686/bits/atomic.h: Removed.
7427         * sysdeps/i386/i586/bits/atomic.h: Removed.
7428         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7429         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7430         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7431         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7432         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7433         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7434         * atomic.h: Removed.  Moved to glibc.
7436         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7437         support for clock selection.
7439         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7440         signalling waiters.
7442 2003-03-18  Roland McGrath  <roland@redhat.com>
7444         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7445         Add __lll_rel_instr first.  Add memory clobber.
7446         (lll_mutex_unlock): Use __lll_test_and_set.
7447         From Paul Mackerras <paulus@samba.org>.
7449         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7450         unconditionally.
7451         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7452         (SINGLE_THREAD_P):  Add `header.' prefix.
7453         From Paul Mackerras <paulus@samba.org>.
7455         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7456         pthread_timedjoin_np to ...
7457         (libpthread: GLIBC_2.3.3): ... here.
7458         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7460         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7461         Avoid shadowing VAL variable.
7463         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7464         New macro.
7466 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7468         * Makefile (tests): Add tst-cond11.
7469         * tst-cond11.c: New file.
7471         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7472         struct passed to cleanup handler to eliminate one more
7473         instruction.
7474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7476         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7477         (pthrad_cond_t): Replace __unused field with __clock.
7479         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7480         waken all waiters in cleanup handler.
7481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7484         * pthread_condattr_getclock.c: New file.
7485         * pthread_condattr_setclock.c: New file.
7486         * sysdeps/pthread/pthread.h: Declare these new functions.
7487         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7488         * Makefile (libpthread-routines): Add the new functions.
7489         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7490         Renamed field to value.  Document use of the bits.
7491         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7492         change.
7493         * pthread_condattr_setpshared.c: Likewise.
7494         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7495         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7496         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7497         Add __clock field.
7498         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7499         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7500         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7501         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7503         Implement clock selection.
7504         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7505         * pthread-errnos.sym: Add ENOSYS.
7506         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7507         _POSIX_CLOCK_SELECTION.
7508         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7510         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7511         invalid .size directive.
7513 2003-03-17  Roland McGrath  <roland@redhat.com>
7515         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7516         Formatting tweaks.
7518 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7520         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7521         Use __lll_add instead of spelling it out.  Use protected symbol names.
7522         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7523         Use __lll_add.
7524         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7525         Renamed from lll_compare_and_swap.  Use new name where necessary.
7526         (__lll_add): Defined.
7527         (__lll_dec_if_positive): Defined.
7528         (__lll_test_and_set): Defined.
7529         * sysdeps/ia64/pthread_spin_init.c: Removed.
7530         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7531         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7532         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7533         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7534         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7535         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7536         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7537         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7538         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7539         __sync_lock_release_si.
7540         Patch by Jakub Jelinek.
7542         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7543         Fix timeout handling.
7544         (__lll_timedwait_tid): Likewise.
7545         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7546         Patch by Jakub Jelinek.
7548         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7550 2003-03-17  Roland McGrath  <roland@redhat.com>
7552         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7553         * sysdeps/pthread/pthread_spin_init.c: New file.
7554         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7555         * sysdeps/powerpc/Makefile: New file.
7556         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7557         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7558         * sysdeps/powerpc/pthreaddef.h: New file.
7559         * sysdeps/powerpc/tcb-offsets.sym: New file.
7560         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7561         * sysdeps/powerpc/tls.h: New file.
7562         * sysdeps/powerpc/bits/atomic.h: New file.
7563         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7564         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7565         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7567         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7568         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7569         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7570         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7571         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7572         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7573         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7574         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7575         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7576         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7577         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7578         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7579         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7580         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7581         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7583         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7584         not gettimeofday.
7585         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7586         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7587         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7588         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7589         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7591 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7593         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7594         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7596         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7597         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7599 2003-03-16  Roland McGrath  <roland@redhat.com>
7601         * tst-fork4.c: Include <string.h>.
7602         * tst-signal2.c: Likewise.
7603         * tst-mutex5.c (do_test): exit -> return.
7604         * tst-mutex2.c: Include <stdlib.h>.
7606 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7608         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7609         (__lll_mutex_timedlock_wait): Correct expected value after
7610         spurious wakeup.  Otherwise we would never wait again.
7612         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7613         zone versus inline asm stupidity.  Use correct instructions.
7615         * tst-rwlock6.c: Add some more status output.
7617 2003-03-15  Roland McGrath  <roland@redhat.com>
7619         * sysdeps/pthread/configure.in: New file.
7620         * sysdeps/pthread/configure: New file (generated).
7622 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7624         * allocatestack.c (allocate_stack): Store the exact stack size of
7625         user allocated stacks.
7627 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7629         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7630         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7631         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7632         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7633         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7634         Use `header.' prefix.
7635         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7637 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7639         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7640         __builtin_frame_address, use stack pointer.
7642         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7643         instead of __builtin_frame_pointer.
7645 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7647         * tst-basic1.c (do_test): Add cast to avoid warning.
7648         * tst-basic2.c (do_test): Likewise.
7650         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7651         amount of stack correction.
7653         * tst-fork4.c: Use test-skeleton.c.
7655 2003-03-14  Roland McGrath  <roland@redhat.com>
7657         * init.c: Fix typo "#eli" for "#else".
7659 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7661         * allocatestack.c (__stack_user): Use hidden_data_def.
7662         * pthread_create.c (__pthread_keys): Likewise.
7664         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7666 2003-03-14  Roland McGrath  <roland@redhat.com>
7668         * tst-fork4.c: New file.
7669         * Makefile (tests): Add it.
7671         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7672         we always define the padding space.
7673         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7674         stopped supporting its own extensions fully.
7675         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7676         struct also called `header', so `header.multiple_threads' is the field
7677         name to use on all machines.
7678         * allocatestack.c (allocate_stack): Use `header.' prefix.
7679         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7680         * pthread_create.c (__pthread_create_2_1): Likewise.
7681         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7682         (THREAD_SELF): Likewise.
7683         * sysdeps/x86_64/tls.h: Likewise.
7684         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7685         (SINGLE_THREAD_P): Likewise.
7686         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7687         (SINGLE_THREAD_P): Likewise.
7688         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7689         (SINGLE_THREAD_P): Likewise.
7691         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7692         value directly.
7694 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7696         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7697         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7699         * pthread_create.c (start_thread): setjmp is expected to return 0.
7701         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7702         (THREAD_GETMEM_NC): Likewise.
7704 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7706         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7707         and the size of the stack which must be allocated is a multiple,
7708         allocate one more page.
7709         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7710         MULTI_PAGE_ALIASING.
7712 2003-03-13  Roland McGrath  <roland@redhat.com>
7714         * pthread_create.c (start_thread): Set EXITING_BIT after the
7715         event-reporting (and destructors), not before.
7717 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7719         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7720         lll_futex_wake): Declare register variables as long int instead of
7721         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7722         Make syscall arguments clobbered by the syscall.
7723         (lll_futex_wait): Define using lll_futex_timed_wait.
7725         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7726         to void *.
7728         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7729         PPID if [! NDEBUG].
7731         * allocatestack.c (nptl_ncreated): Only declare if
7732         COLORING_INCREMENT != 0.
7734         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7735         (__libc_enable_asynccancel_2): Remove prototype.
7737         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7738         ctid to match kernel.
7740 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7742         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7743         libc_multiple_threads.
7744         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7745         __libc_multiple_threads to...
7746         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7748         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7749         versioning.
7750         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7751         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7753         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7754         (__pthread_once_internal): Define.
7756         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7757         macros instead of .symver directly.
7758         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7759         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7761         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7762         * sysdeps/x86_64/tcb-offsets.sym: New file.
7763         * sysdeps/x86_64/Makefile: New file.
7765         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7766         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7767         to access own pthread_t in TCB.
7768         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7769         Likewise.
7770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7771         Likewise.
7772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7774 2003-03-12  Roland McGrath  <roland@redhat.com>
7776         * pthread-errnos.sym: New file.
7777         * Makefile (gen-as-const-headers): New variable, list that file.
7778         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7779         header <pthread-errnos.h> instead of defining errno values here.
7780         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7781         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7782         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7783         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7785         Likewise.
7786         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7787         Likewise.
7788         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7789         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7790         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7791         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7792         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7793         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7794         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7795         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7796         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7797         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7798         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7799         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7800         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7801         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7802         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7803         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7804         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7805         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7806         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7807         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7808         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7809         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7810         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7811         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7812         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7813         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7814         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7816         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7817         CLONE_CHILD_SETTID worked.
7819 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7821         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7822         file.
7823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7824         file.
7826         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7827         (pthread_cond_t): Add padding.
7829         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7830         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7831         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7833         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7834         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7835         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7836         (__pthread_rwlock_timedrdlock): Likewise.
7837         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7838         (__pthread_rwlock_wrlock): Likewise.
7839         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7840         (__pthread_rwlock_rdlock): Likewise.
7842         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7845         result of lock re-get if it fails.
7847 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7849         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7850         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7851         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7852         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7853         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7854         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7855         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7856         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7857         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7858         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7860         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7861         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7863         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7864         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7865         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7866         (create_thread): Likewise.
7867         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7868         * init.c (__pthread_initialize_minimal_internal): Initialize
7869         __libc_multiple_threads_ptr if necessary.
7870         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7871         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7872         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7873         __libc_multiple_threads.
7874         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7875         necessary.
7877         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7878         (THREAD_SETMEM_NC): Likewise.
7880         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7881         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7882         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7883         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7885         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7886         Eliminate one entire instruction.
7888         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7889         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7891         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7892         instead of __pthread_enable_asynccancel.
7893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7894         (__pthread_cond_wait): Likewise.
7895         * sysdeps/pthread/pthread_cond_timedwait.c
7896         (__pthread_cond_timedwait): Likewise.
7897         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7900         (__condvar_cleanup): Wake up all waiters in case we got signaled
7901         after being woken up but before disabling asynchronous
7902         cancellation.
7903         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7905         (__condvar_cleanup): Likewise.
7907         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7908         Make it an error if architecture has no #if case.  Add x86-64.
7910         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7911         pt-initfini.s generation.
7913         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7914         (TLS_INIT_TP): Fix typo.
7916 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7918         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7919         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7921         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7922         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7923         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7924         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7925         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7926         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7927         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7928         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7930 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7932         * sysdeps/pthread/pthread_cond_timedwait.c
7933         (__pthread_cond_timedwait): Return the result of the final
7934         locking.  If it succeeds, the regular function return value.
7936         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7937         Return result of the final locking.
7938         * version.c (__nptl_main): Work around problems with the strange
7939         INTERNAL_SYSCALL macro on ppc32.
7940         * init.c (__pthread_initialize_minimal_internal): Unblock
7941         SIGCANCEL in case the parent blocked it.
7942         Reported by Paul Mackerras <paulus@samba.org>.
7944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7946         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7948 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7950         * sysdeps/pthread/pthread_cond_timedwait.c
7951         (__pthread_cond_timedwait): Unlock and fail if
7952         __pthread_mutex_unlock_internal failed.
7954         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7955         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7956         Use ARCH_CLONE.
7957         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7958         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7959         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7960         ALLOCATE_STACK): New macros.
7961         (TLS_TPADJ): New macro.
7962         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7963         (allocate_stack): Handle TLS_DTV_AT_TP and
7964         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7965         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7966         Don't set PD->self.
7967         * init.c [__ia64__] (__NR_set_tid_address): Define.
7969         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7970         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7971         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7972         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7973         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7974         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7975         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7976         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7977         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7978         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7979         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7980         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7981         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7982         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7983         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7984         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7985         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7986         * sysdeps/ia64/bits/atomic.h: New file.
7987         * sysdeps/ia64/Makefile: New file.
7988         * sysdeps/ia64/pthread_spin_init.c: New file.
7989         * sysdeps/ia64/pthread_spin_lock.c: New file.
7990         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7991         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7992         * sysdeps/ia64/pthreaddef.h: New file.
7993         * sysdeps/ia64/tcb-offsets.sym: New file.
7994         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7995         * sysdeps/ia64/tls.h: New file.
7997         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7998         to syscall instead of no arguments.
8000 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8002         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8003         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8004         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8005         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8007         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8008         unused code.
8010         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8012         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8013         lowlevelbarrier.sym.
8014         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8015         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8016         Include lowlevelbarrier.h and don't define offsets locally.
8017         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8019         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8020         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8021         (__lll_mutex_timedlock_wait): Likewise.
8022         (lll_mutex_lock): Adjust asm for that.
8023         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8024         (lll_lock): Adjust asm for operand order change.
8025         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8026         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8028         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8029         Reverse order of parameters.
8030         (__lll_timedwait_tid): Remove regparms attribute.
8031         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8032         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8034         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8035         (__lll_timedwait_tid): Remove one unnecessary instruction.
8037         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8038         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8039         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8040         lowlevelmutex.S.
8042         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8043         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8044         for NOT_IN_libc.
8045         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8046         lowlevellock.S.
8048         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8049         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8050         for libc.so.
8051         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8052         define LOCK here (if UP is not defined).  The actual code is in
8053         lowlevelmutex.S.
8055         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8056         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8057         __lll_timedwait_tid for libc.so.
8058         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8059         define LOCK here (if UP is not defined).  The actual code is in
8060         lowlevellock.S.
8062         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8063         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8064         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8065         instead of lowlevelsem.h.
8066         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8067         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8068         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8070         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8071         lowlevelrwlock.sym.
8072         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8073         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8074         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8076         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8077         register loading.
8078         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8079         last changed.  D'oh.
8081         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8083         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8084         of __libc_locking_needed.
8085         (lll_trylock): Initialize %eax to zero.
8087         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8088         pthread_cond_t definition.
8090 2003-03-10  Roland McGrath  <roland@redhat.com>
8092         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8093         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8094         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8095         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8096         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8098         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8099         Instead of setting PD->multiple_threads, set globals
8100         __pthread_multiple_threads and __libc_multiple_threads.
8101         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8102         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8103         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8105         * descr.h (struct pthread): Conditionalize first member on
8106         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8107         containing an anonymous tcbhead_t.  Move `list' member out.
8108         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8109         * allocatestack.c: Remove use of `header.data.' prefix.
8110         * pthread_create.c: Likewise.
8111         * init.c (__pthread_initialize_minimal_internal): Likewise.
8112         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8113         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8114         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8115         * sysdeps/x86_64/tls.h: Likewise.
8116         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8117         (SINGLE_THREAD_P): Likewise.
8118         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8119         (SINGLE_THREAD_P): Likewise.
8120         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8121         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8123 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8125         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8127         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8128         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8130         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8131         leftovers from the ia32 code.
8133         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8134         memory load.
8135         (clear_once_control): Don't load %esi.
8137         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8138         handling.
8140         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8142         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8143         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8145         * Makefile (tests): Add tst-cond10.
8146         * tst-cond10.c: New file.
8148 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8150         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8151         * tst-signal3.c (do_test): Likewise.
8152         * tst-sem5.c (do_test): Likewise.
8153         * tst-kill6.c (do_test): Likewise.
8154         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8156         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8157         of inc/dec.
8158         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8159         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8160         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8161         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8162         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8165         Likewise.
8166         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8167         Likewise.
8168         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8169         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8170         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8171         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8172         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8173         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8174         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8175         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8177         * allocatestack.c (allocate_stack): If mprotect() fails free the
8178         TLS memory.
8180 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8182         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8184         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8185         lll_wake_tid.  This was used only to work around kernel limits in
8186         the early days.
8187         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8188         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8189         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8190         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8192         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8193         (__pthread_initialize_minimal_internal): Change initialization of
8194         __static_tls_align_m1 appropriately.
8195         * pthreadP.h (__static_tls_align_m1): Renamed from
8196         __static_tls_align.
8197         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8198         instead of __static_tls_align-1.
8200 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8202         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8204         * pthread_create.c: Define __pthread_keys using nocommon
8205         attribute, not by placing it explicitly in bss.
8206         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8208         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8209         Use it in mmap call to allocate stacks.
8211         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8213         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8214         result of the thread function.
8216 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8218         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8219         version is just fine.
8221         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8222         (__pthread_child_handler): Renamed from pthread_child_handler,
8223         exported, and marked hidden.  Change all users.
8224         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8225         free __pthread_child_handler from child list.
8227 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8229         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8231         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8232         Fix handling of cancellation and failing pthread_mutex_unlock call.
8233         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8234         (__pthread_cond_wait): Likewise.
8236         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8237         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8238         lll_futex_timed_wait call.
8239         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8240         (pthread_rwlock_timedwrlock): Likewise.
8242         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8243         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8244         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8246         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8247         check of lll_futex_wake return value.
8249 2003-03-03  Roland McGrath  <roland@redhat.com>
8251         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8253         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8254         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8255         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8257 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8259         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8260         error for CPU clocks.
8262         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8263         _POSIX_MONOTONIC_CLOCK.
8264         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8266         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8267         recent kernels.
8269 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8271         * descr.h (struct pthread): Move cleanup field to the front.
8273 2003-03-01  Roland McGrath  <roland@redhat.com>
8275         * sem_open.c (sem_open): Braino fix.
8277 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8279         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8280         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8281         __pthread_cleanup_pop functionality.
8282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8284         * descr.h (struct pthread): Move tid field to the front now that
8285         it is often used.
8287         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8288         (__lll_mutex_timedlock_wait): Remove.
8289         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8291         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8292         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8293         (lll_unlock_wake_cb): Don't save and restore %esi.
8294         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8295         %esi.
8296         (__lll_timedwait_tid): Add alignment.
8297         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8298         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8299         %esi.
8300         (__lll_timedwait_tid): Removed.
8301         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8302         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8303         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8304         (pthread_barrier_wait): Don't save, load, and restore %esi for
8305         last thread.
8306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8307         (__pthread_cond_signal): Don't save, load, and restore %esi.
8308         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8309         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8310         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8311         Don't save, load, and restore %esi.
8313 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8316         Release lock before waking up the waiters.
8318         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8320         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8321         (reader_thread): Likewise.
8323         * sysdeps/pthread/pthread_rwlock_unlock.c
8324         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8325         to wake up readers if there are none.
8327         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8328         Release internal lock before wake threads.
8330 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8332         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8333         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8334         predefined.
8335         * tst-rwlock9.c: Likewise.
8336         * tst-rwlock10.c: New file.
8337         * tst-rwlock11.c: New file.
8339         * Makefile (tests): Add tst-dlsym1.
8340         * tst-dlsym1.c: New file.
8342         * init.c (__pthread_initialize_minimal_internal): Set
8343         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8344         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8346 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8348         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8350         * tst-cond2.c: Fix sychronization with child.
8352         * tst-rwlock8.c (reader_thread): Remove unused variable.
8354         * Makefile: Add rules to build and run tst-tls3.
8355         * tst-tls3.c: New file.
8356         * tst-tls3mod.c: New file.
8358         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8359         * tst-rwlock8.c: New file.
8360         * tst-rwlock9.c: New file.
8361         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8362         complete broken rwlock implementation.
8363         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8364         Likewise.
8365         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8366         Likewise.
8367         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8368         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8369         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8370         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8371         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8372         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8373         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8375 2003-02-23  Roland McGrath  <roland@redhat.com>
8377         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8379 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8381         * Makefile (tests): Add tst-context1.
8382         * tst-context1.c: New file.
8384         * Makefile (tests): Add tst-tls1 and tst-tls2.
8385         * tst-tls1.c: New file.
8386         * tst-tls2.c: New file.
8388         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8389         for failed cmpxchg.
8391         * pthread_create.c (start_thread): Set EXITING_BIT early.
8393         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8394         (THREAD_GETMEM_NC): Likewise.
8396 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8398         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8399         off 3 more bytes by using offset-less instructions when possible.
8401         * Makefile: Add dependency for $(objpfx)version.d.
8403         * eintr.c (eintr_source): Add unnecessary return but the compiler
8404         insists.
8406         * tst-kill3.c: Include <unistd.h>.
8408 2003-02-21  Roland McGrath  <roland@redhat.com>
8410         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8412 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8414         * Makefile (tests): Add tst-eintr1.
8415         (distribute): Add eintr.c.
8416         * tst-eintr1.c: New file.
8417         * eintr.c: New file.
8419         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8421         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8422         Disallow sending SIGCANCEL.
8424         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8425         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8426         * tst-kill1.c: New file.
8427         * tst-kill2.c: New file.
8428         * tst-kill3.c: New file.
8429         * tst-kill5.c: New file.
8430         * tst-kill6.c: New file.
8431         * tst-basic7.c: Renamed to...
8432         * tst-kill4.c: ...this.
8434 2003-02-21  Roland McGrath  <roland@redhat.com>
8436         * Makefile (install-lib-ldscripts): New variable.
8438 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8440         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8441         * pthread_cancel.c: Use INVALID_TD_P.
8442         * pthread_detach.c: Likewise.
8443         * pthread_getschedparam.c: Likewise.
8444         * pthread_setschedparam.c: Likewise.
8445         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8446         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8447         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8448         * pthread_timedjoin.c: Likewise.
8450         * tst-basic7.c: Include <signal.h>.
8452         * pthread_join.c (pthread_join): Limited checking for invalid
8453         descriptors.
8454         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8456 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8458         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8459         beginning of the loop.  Clear the entire first block of TSD.
8460         * Makefile (tests): Add tst-key4.
8461         * tst-key4.c: New file.
8463 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8465         * Makefile (tests): Add tst-basic7.
8466         * tst-basic7.c: New file.
8468         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8469         Add some more __builtin_expect.
8471         * pthreadP.h: Define dummy version of DEBUGGING_P.
8473 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8475         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8476         _POSIX_THREAD_PRIORITY_SCHEDULING.
8477         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8478         _XOPEN_REALTIME_THREADS.
8479         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8481         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8482         kernel returns EINVAL for PID <= 0, work around it.
8484         * Makefile (tests): Add tst-signal5.
8485         * tst-signal5.c: New file.
8487         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8488         and LOGIN_NAME_MAX.
8490         * tst-cancel1.c (tf): Block all signals.
8492         * Makefile (tests): Add tst-basic6.
8493         * tst-basic6.c: New file.
8495         * tst-basic1.c: Add test for process ID.
8497         * Makefile (tests): Add tst-cancel10.
8498         * tst-cancel10.c: New file.
8500         * Makefile (tests): Add tst-signal4.
8501         * tst-signal4.c: New file.
8503         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8504         __sigismember instead of sigismember.  Add __builtin_expect.
8506 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8508         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8509         pthread_setcancelstate, and pthread_rwlock_setpshared.
8511         * tst-cancel7.c (do_test): Make sure the pid file exists before
8512         canceling the thread.
8514         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8515         pthread_rwlock_timedrdlock tests.
8516         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8518         Check for invalid tv_nsec field.
8519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8520         Likewise.
8522         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8523         recursive mutex of overflow.
8525         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8527         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8528         going into an endless loop.
8529         * Makefile (tests): Add tst-cancel9.
8530         * tst-cancel9.c: New file.
8532         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8534 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8536         * tst-mutex5.c (do_test): Add more timedlock tests.
8538         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8539         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8541         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8542         use INLINE_SYSCALL.  Error number is returned, not -1.
8544         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8545         and __deallocate_stack with internal_function.
8546         * pthread_create.c: Adjust definitions appropriately.
8547         * allocatestack.c: Likewise.
8549         * pthread_join.c: Add one more __builtin_expect.
8550         * pthread_timedjoin.c: Likewise.
8552         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8553         not data of sequence number does not match.
8554         Add one __builtin_expect.
8556         * Makefile (tests): Add tst-clock1.
8557         * tst-clock1.c: New file.
8559         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8560         negative arguments.
8561         * Makefile (tests): Add tst-basic5.
8562         * tst-basic5.c: New file.
8564 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8566         * Makefile (tests): Add tst-basic4.
8567         * tst-basic4.c: New file.
8569         * pthreadP.h: Add declaraction for __nptl_nthreads.
8570         * pthread_create.c: Define __nptl_nthreads
8571         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8572         after thread is done.  If then zero, call exit(0).
8573         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8574         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8575         * init.c (pthread_functions): Initialize ptr_nthreads.
8576         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8577         (__reclaim_stacks): Decrement __nptl_nthreads.
8578         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8579         Define.
8580         * Makefile (tests): Add tst-basic3.
8581         * tst-basic3.c: New file.
8583         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8584         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8585         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8586         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8587         if asynchronous canceling is enabled.
8588         * pthread_join.c (pthread_join): When recognizing circular joins,
8589         take into account the other thread might be already canceled.
8590         * Makefile (tests): Add tst-join5.
8591         * tst-join5.c: New file.
8593         * Makefile (tests): Add tst-join4.
8594         * tst-join4.c: New file.
8596 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8598         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8600 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8602         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8603         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8604         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8605         warning.
8606         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8607         to avoid warning.
8608         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8609         error if lll_futex_wake failed.
8611 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8613         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8614         handling of cancellation and failung pthread_mutex_unlock call.
8615         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8616         * Makefile (tests): Add tst-cond8 and tst-cond9.
8617         * tst-cond8.c: New file.
8618         * tst-cond9.c: New file.
8620         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8622         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8623         non-standard initializers with __USE_GNU.
8625         * Makefile (tests): Add tst-cleanup3.
8626         * tst-cleanup3.c: New file.
8628 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8630         * Makefile (tests): Add tst-attr1 and tst-attr2.
8631         * tst-attr1.c: New file.
8632         * tst-attr2.c: New file.
8634         * Makefile: Add rules to build and run tst-atfork2 test.
8635         * tst-atfork2.c: New file.
8636         * tst-atfork2mod.c: New file.
8638         * sysdeps/unix/sysv/linux/unregister-atfork.c
8639         (__unregister_atfork): Free the memory allocated for the handlers
8640         after removing them from the lists.
8642         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8643         cleanup function.
8645         * tst-atfork1.c (do_test): Wait for the child we forked.
8646         Report error in child.
8648         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8650         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8652 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8654         * Makefile (tests): Add tst-cancel8.
8655         * tst-cancel8.c: New file.
8657         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8658         clearing of control variable.
8659         * Makefile (tests): Add tst-once3 and tst-once4.
8660         * tst-once3.c: New file.
8661         * tst-once4.c: New file.
8663 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8665         * sysdeps/sh/Makefile: New file.
8666         * sysdeps/sh/bits/atomic.h: New file.
8667         * sysdeps/sh/pthread_spin_init.c: New file.
8668         * sysdeps/sh/pthread_spin_lock.c: New file.
8669         * sysdeps/sh/pthread_spin_trylock.S: New file.
8670         * sysdeps/sh/pthread_spin_unlock.S: New file.
8671         * sysdeps/sh/pthreaddef.h: New file.
8672         * sysdeps/sh/tcb-offsets.sym: New file.
8673         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8674         * sysdeps/sh/tls.h: New file.
8675         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8676         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8677         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8678         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8679         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8680         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8681         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8682         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8683         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8684         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8685         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8686         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8687         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8688         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8689         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8690         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8691         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8692         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8693         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8694         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8695         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8696         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8697         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8698         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8699         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8700         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8701         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8702         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8703         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8704         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8706 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8708         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8709         according to POSIX.
8711         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8713 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8715         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8716         (TLS_GET_FS): New #define.
8717         (TLS_SET_FS): New #define.
8718         Correct value of __NR_set_thread_area.
8720         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8722 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8724         * Makefile (tests): Add tst-popen1.
8725         * tst-popen1.c: New file.
8727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8728         but inactive generalization.
8729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8730         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8731         Minor optimization, remove one instruction.
8732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8734 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8736         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8738 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8740         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8741         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8742         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8743         * sysdeps/pthread/pthread_cond_signal.c: New file.
8744         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8745         * sysdeps/pthread/pthread_cond_wait.c: New file.
8746         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8747         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8748         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8749         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8750         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8751         * sysdeps/s390/Makefile: New file.
8752         * sysdeps/s390/bits/atomic.h: New file.
8753         * sysdeps/s390/pthread_spin_init.c: New file.
8754         * sysdeps/s390/pthread_spin_lock.c: New file.
8755         * sysdeps/s390/pthread_spin_trylock.c: New file.
8756         * sysdeps/s390/pthread_spin_unlock.c: New file.
8757         * sysdeps/s390/pthreaddef.h: New file.
8758         * sysdeps/s390/tcb-offsets.sym: New file.
8759         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8760         * sysdeps/s390/tls.h: New file.
8761         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8762         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8763         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8764         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8765         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8766         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8767         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8768         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8769         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8770         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8771         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8772         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8773         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8774         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8775         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8776         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8777         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8778         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8779         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8780         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8781         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8782         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8783         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8785 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8787         * atomic.h: Add a couple more default implementations.
8788         (atomic_compare_and_exchange_acq): Use
8789         __arch_compare_and_exchange_32_acq in return value definition.  It
8790         always exists.
8791         (atomic_bit_set): Renamed from atomic_set_bit.
8792         Add missing atomic_ prefixes.
8794         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8795         thread library is available, use correct value to mark initialized
8796         once variable.
8798 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8800         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8801         __sysconf to determine pagesize.
8803         * pthread_create.c: Include <atomic.h>.
8804         * allocatestack.c (allocate_stack): Implement coloring of the
8805         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8806         size minus one.  Adjust users.
8807         * sysdeps/i386/i686/Makefile: New file.
8809 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8811         * allocatestack.c: Improve comment throughout the file.
8813         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8814         (__lll_lock_wait): Add branch prediction.
8815         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8816         (__lll_lock_wait): Likewise.
8817         (lll_unlock_wake_cb): Removed.
8819 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8821         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8822         _POSIX_THREAD_PRIORITY_SCHEDULING.
8824 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8826         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8827         Fix return type of ptr___pthread_getspecific.
8829 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8831         * Makefile (tests): Add tst-umask1.
8832         (tst-umask1-ARGS): Define.
8833         * tst-umask1.c: New file.
8835 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8837         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8838         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8839         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8840         pthread_rwlock_unlock.
8841         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8842         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8843         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8844         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8845         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8846         New file.
8847         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8848         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8849         New file.
8850         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8851         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8852         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8853         New file.
8854         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8855         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8856         New file.
8857         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8858         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8859         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8860         New file.
8861         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8862         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8863         New file.
8864         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8866         * Makefile (libpthread-routines): Remove lowlevelcond and
8867         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8868         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8869         and pthread_cond_broadcast.
8870         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8871         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8872         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8873         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8874         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8875         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8876         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8877         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8878         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8879         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8880         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8884         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8885         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8886         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8887         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8888         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8889         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8890         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8891         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8892         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8893         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8894         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8895         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8896         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8897         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8898         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8899         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8900         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8902         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8903         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8904         of the code is moved to ...
8905         * sysdeps/pthread/createthread.c: ...here.  New file.
8907 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8909         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8910         (__new_sem_post): Clear %eax before returning.
8911         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8913         * Makefile (tests): Add tst-cleanup2.
8914         * tst-cleanup2.c: New file.
8916         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8917         Interpret first parameter correctly.
8919 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8921         * Makefile (headers): Add bits/semaphore.h.
8923 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8925         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8926         if not SHARED.
8928 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8930         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8931         must be used and mapping failed.
8932         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8934         * Makefile (CFLAGS-pthread_self.os): Define this, not
8935         CFLAGS-pthread_self.c.
8937 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8939         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8940         lll_unlock_wake_cb.
8942         * Makefile (libpthread-routines): Add version.  Add rules to build
8943         version.os and banner.h.
8944         * version.c: New file.
8946 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8948         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8949         the alias unconditional.
8950         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8952 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8954         * Makefile (CFLAGS-pthread_self.c): New definition.
8956 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8958         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8959         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8960         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8961         * init.c (__pthread_initialize_minimal_internal): Likewise.
8963 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8965         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8967         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8968         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8969         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8970         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8971         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8972         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8974 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8976         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8977         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8978         * tst-cancel-wrappers.sh: Remove all exceptions.
8980 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8982         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8983         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8985         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8986         Use __libc_pthread_functions array if SHARED.
8988         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8989         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8991         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8992         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8993         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8994         __libc_ptf_call instead of __libc_maybe_call.
8995         (PTF): New #define.
8996         (__libc_cleanup_region_start): Wrap function name with PTF call.
8997         (__libc_cleanup_region_end): Likewise.
8998         (__libc_cleanup_end): Likewise.
9000         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9001         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9002         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9003         * pthreadP.h: Add prototypes.
9005         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9006         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9007         __pthread_rwlock_unlock aliases.
9008         * pthreadP.h: Add prototypes for new aliases.
9010         * pthreadP.h (struct pthead_functions): Moved to...
9011         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9012         * init.c (pthread_functions): Add initializers for new elements.
9014         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9015         __pthread_cleanup_pop_restore aliases.
9016         * pthreadP.h: Add prototypes.
9018         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9019         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9020         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9021         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9022         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9023         * pthreadP.h: Adjust prototypes and callers.
9025 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9027         * Makefile (tests): Add tst-cancel7.
9028         (tst-cancel7-ARGS): New variable.
9029         * tst-cancel7.c: New file.
9031         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9032         around gcc defficiencies.
9033         * old_pthread_cond_signal.c: Likewise.
9034         * old_pthread_cond_timedwait.c: Likewise.
9035         * old_pthread_cond_wait.c: Likewise.
9037         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9039 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9041         * Makefile (tests): Add tst-cond7.
9042         * tst-cond7.c: New file.
9044         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9045         (condvar_cleanup): Get condvar address from the right place.
9047         * atomic.h: Correct definitions of atomic_full_barrier,
9048         atomic_read_barrier, atomic_write_barrier.
9050         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9051         race-free.
9052         * old_pthread_cond_signal.c: Likewise.
9053         * old_pthread_cond_timedwait.c: Likewise.
9054         * old_pthread_cond_wait.c: Likewise.
9056 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9058         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9060 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9062         * pthreadP.h (pthread_cond_2_0_t): New type.
9063         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9064         Use new type for the 2.0 condvar function prototypes.
9065         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9066         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9067         parameter.
9068         * old_pthread_cond_destroy.c: Likewise.
9069         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9070         * old_pthread_cond_signal.c: Likewise.
9071         * old_pthread_cond_timedwait.c: Likewise.
9072         * old_pthread_cond_wait.c: Likewise.
9074         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9075         (__pthread_cond_wait): Don't save cancellation mode and seq value
9076         in same location.
9078         * herrno.c (__h_errno_location): Don't define as weak.
9080 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9082         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9083         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9084         and pthread_cond_wait.
9085         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9086         Renamed to...
9087         (__pthread_cond_broadcast_2_0): ... this.
9088         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9089         Renamed to...
9090         (__pthread_cond_destroy_2_0): ... this.
9091         * old_pthread_cond_init.c (__old_pthread_cond_init):
9092         Renamed to...
9093         (__pthread_cond_init_2_0): ... this.
9094         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9095         Renamed to...
9096         (__pthread_cond_signal_2_0): ... this.
9097         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9098         Renamed to...
9099         (__pthread_cond_wait_2_0): ... this.
9100         * pthread_cond_destroy.c: Include shlib-compat.h.
9101         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9102         * pthread_cond_init.c: Include shlib-compat.h.
9103         (pthread_cond_init): Change strong_alias into versioned_symbol.
9104         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9105         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9106         fields.
9107         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9108         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9109         __pthread_cond_wait_2_0): New prototypes.
9110         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9111         __old_pthread_cond_init, __old_pthread_cond_signal,
9112         __old_pthread_cond_wait): Removed.
9113         * init.c: Include shlib-compat.h.
9114         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9115         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9116         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9117         ptr___pthread_cond_*_2_0 fields.
9118         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9119         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9121         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9122         LIBC_SIGACTION was not yet defined.
9123         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9124         [!defined LIBC_SIGACTION] (__sigaction): New function and
9125         libc_hidden_weak.
9126         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9127         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9129 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9131         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9133 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9135         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9136         New, larger type definition.
9137         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9138         implementation.
9139         * Versions [libpthread]: Add definitions for new pthread_cond_*
9140         interfaces for version GLIBC_2.3.2.
9141         * pthread_cond_init.c: Update initialization for new type definition.
9142         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9143         pthread_cond_timedwait, pthread_cond_signal, and
9144         pthread_cond_broadcast.  Add old_pthread_cond_init,
9145         old_pthread_cond_destroy, old_pthread_cond_wait,
9146         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9147         old_pthread_cond_broadcast.
9148         * old_pthread_cond_broadcast.c: New file.
9149         * old_pthread_cond_destroy.c: New file.
9150         * old_pthread_cond_init.c: New file.
9151         * old_pthread_cond_signal.c: New file.
9152         * old_pthread_cond_timedwait.c: New file.
9153         * old_pthread_cond_wait.c: New file.
9154         * pthreadP.h: Add prototypes for the compatibility interfaces.
9156         * pthread_cond_destroy.c: Don't include <errno.h>.
9158 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9160         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9161         unnecessary zero offset when addressing MUTEX.
9163 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9165         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9166         __register_atfork.
9167         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9168         for __register_atfork.
9170 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9172         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9173         instead of ASSEMBLER test macro.
9175         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9176         __libc_current_sigrtmax): Add libc_hidden_def.
9178         * sysdeps/pthread/list.h: Remove assert.h include.
9180 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9182         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9183         __pthread_initialize_minimal_internal not
9184         __pthread_initialize_minimal.
9186 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9188         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9189         __pthread_initialize_minimal as hidden.
9191         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9192         constructor.
9194 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9196         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9197         $(common-objpfx)format.lds, include that into the output script.
9198         Fix comment.
9199         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9201 2002-12-28  Andreas Jaeger  <aj@suse.de>
9203         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9204         nsec resolution changes.
9205         (xstat64_conv): Likewise.
9206         (xstat32_conv): Likewise.
9207         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9208         struct kernel_stat.
9209         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9210         structs stat and stat64.
9211         * time/time.h (__timespec_defined): Define for __USE_MISC.
9212         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9214 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9216         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9217         argument.
9218         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9219         (pthread_exit): Use strong_alias to avoid warnings.
9220         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9221         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9222         ptr___pthread_attr_init_2_*.
9223         * init.c (pthread_functions): Adjust.
9225 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9227         * forward.c: Make all functions available by default again.  It
9228         caused too much trouble.
9230         * pt-siglongjmp.c: Removed.
9232 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9234         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9235         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9236         * sysdeps/i386/Makefile: New file.
9237         * sysdeps/i386/tcb-offsets.sym: New file.
9238         * sysdeps/pthread/tcb-offsets.h: New file.
9239         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9240         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9242         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9243         __register_atfork...
9244         (GLIBC_2.3.2): ...here.
9246 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9248         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9249         pthread_attr_setstackaddr with __attribute_deprecated__.
9251 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9253         * pt-system.c (system): Remove cancellation handling.
9254         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9255         cancellation routines.
9257 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9259         * descr.h: Include <dl-sysdep.h>.
9260         (struct pthread): Move header.data.list to the back of the struct.
9261         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9262         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9263         (SYSINFO_OFFSEET): Likewise.
9265 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9267         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9268         Define.
9269         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9270         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9271         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9272         (USE_DL_SYSINFO): Undef.
9274 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9276         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9277         $(common-objpfx)libc.so.
9278         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9279         it is bigger than pipe buffer size even on arches with bigger
9280         page size.
9281         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9283 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9285         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9286         correct errno access for case that USE___THREAD is not defined.
9288 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9290         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9291         Patch by Marijn Ros <marijn@mad.scientist.com>.
9293 2002-12-22  Roland McGrath  <roland@redhat.com>
9295         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9297 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9299         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9301 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9303         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9304         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9305         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9307         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9308         of int $0x80.
9309         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9310         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9311         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9312         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9313         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9314         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9315         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9316         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9318         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9319         sysenter.
9320         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9322         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9324         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9325         in new TCB.
9326         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9327         that sysinfo is properly initialized.
9328         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9329         to 1 only for ld.so.
9331         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9332         RTLD_CORRECT_DYNAMIC_WEAK.
9334 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9336         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9337         Use return 0 as 6th argument to FORWARD4.
9338         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9340 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9342         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9343         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9344         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9345         (INIT_SYSINFO): New #define.
9346         (TLS_TP_INIT): Use INIT_SYSINFO.
9347         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9348         At test to make sure SYSINFO_OFFSET value is correct.
9349         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9351 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9353         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9354         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9355         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9356         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9357         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9358         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9359         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9361 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9363         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9364         macro instead of using int $0x80 directly.
9366         * sysdeps/pthread/bits/stdio-lock.h: New file.
9367         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9368         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9369         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9370         * Makefile (routines): Add libc-lowlevelmutex.
9372         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9373         __i686.get_pc_thunk.dx.
9375 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9377         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9378         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9379         ($(objpfx)tst-cancel-wrappers.out): New rule.
9380         * tst-cancel-wrappers.sh: New test.
9381         * tst-locale1.c: Include signal.h.
9382         (uselocale): Test static linking of __libc_current_sigrt*.
9384 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9386         * Makefile (tests): Add tst-cancel6.
9387         * tst-cancel6.c: New file
9389 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9391         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9392         Define meaningfully for assembler as well.
9393         * pthreadP.h (struct pthread_functions): Remove
9394         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9395         and ptr_pthread_attr_init_2_1 fields.
9396         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9397         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9398         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9399         (FORWARD3): Define using FORWARD4.
9400         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9401         versions.
9402         * pt-system.c: Remove duplicate stdlib.h include.
9404 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9406         * sem_init.c: Define sem_init@GLIBC_2.0.
9407         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9408         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9410         * flockfile.c: Moved to...
9411         * sysdeps/pthread/flockfile.c: ...here.  New file.
9412         * funlockfile.c: Moved to...
9413         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9414         * ftrylockfile.c: Moved to...
9415         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9417 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9419         * libc-cancellation.c: Guard both function with
9420         #if !defined NOT_IN_libc.
9421         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9422         automatically provided pthread wrappers.
9423         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9424         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9425         nor in libpthread.
9426         * pt-open.c: Removed.
9427         * pt-fcntl.c: Removed.
9428         * pt-fsync.c: Removed.
9429         * pt-lseek.c: Removed.
9430         * pt-msgrcv.c: Removed.
9431         * pt-msgsnd.c: Removed.
9432         * pt-msync.c: Removed.
9433         * pt-nanosleep.c: Removed.
9434         * pt-open64.c: Removed.
9435         * pt-pause.c: Removed.
9436         * pt-pread.c: Removed.
9437         * pt-pread64.c: Removed.
9438         * pt-pwrite.c: Removed.
9439         * pt-pwrite64.c: Removed.
9440         * pt-read.c: Removed.
9441         * pt-recv.c: Removed.
9442         * pt-recvfrom.c: Removed.
9443         * pt-recvmsg.c: Removed.
9444         * pt-send.c: Removed.
9445         * pt-sendto.c: Removed.
9446         * pt-sigtimedwait.c: Removed.
9447         * pt-sigwait.c: Removed.
9448         * pt-wait.c: Removed.
9449         * pt-waitpid.c: Removed.
9450         * pt-write.c: Removed.
9451         * pt-accept.c: Removed.
9452         * pt-close.c: Removed.
9453         * pt-connect.c: Removed.
9454         * pt-lseek64.c: Removed.
9455         * pt-sendmsg.c: Removed.
9456         * pt-tcdrain.c: Removed.
9458 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9460         * init.c (__pthread_initialize_minimal_internal): Renamed from
9461         __pthread_initialize_minimal.  Make old name an alias.  This
9462         converts a normal relocation into a relative relocation.
9464         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9466         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9467         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9468         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9469         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9470         pt-sigwaitinfo, pt-waitid, and pt-writev.
9471         * pt-creat.c: Removed.
9472         * pt-poll.c: Removed.
9473         * pt-pselect.c: Removed.
9474         * pt-readv.c: Removed.
9475         * pt-select.c: Removed.
9476         * pt-sigpause.c: Removed.
9477         * pt-sigsuspend.c: Removed.
9478         * pt-sigwaitinfo.c: Removed.
9479         * pt-waitid.c: Removed.
9480         * pt-writev.c: Removed.
9482         * init.c (pthread_functions): New variable.
9483         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9484         (or NULL) to __libc_pthread_init.
9485         * forward.c: Rewrite to use __libc:pthread_functions array to get
9486         function addresses.
9487         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9488         prototype.
9489         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9490         Take new parameter.  Copy content of variable pointed to by it
9491         to __libc_pthread_init.
9493         * pthreadP.h (struct pthread_functions): New type.
9494         (__libc_pthread_init): Declare.
9496         * pthread_attr_destroy.c: Add namespace protected alias.
9497         * pthread_attr_getdetachstate.c: Likewise.
9498         * pthread_attr_getinheritsched.c: Likewise.
9499         * pthread_attr_getschedparam.c: Likewise.
9500         * pthread_attr_getschedpolicy.c: Likewise.
9501         * pthread_attr_getscope.c: Likewise.
9502         * pthread_attr_setdetachstate.c: Likewise.
9503         * pthread_attr_setinheritsched.c: Likewise.
9504         * pthread_attr_setschedparam.c: Likewise.
9505         * pthread_attr_setschedpolicy.c: Likewise.
9506         * pthread_attr_setscope.c: Likewise.
9507         * pthread_cond_broadcast.c: Likewise.
9508         * pthread_cond_destroy.c: Likewise.
9509         * pthread_cond_init.c: Likewise.
9510         * pthread_cond_signal.c: Likewise.
9511         * pthread_cond_wait.c: Likewise.
9512         * pthread_condattr_destroy.c: Likewise.
9513         * pthread_condattr_init.c: Likewise.
9514         * pthread_equal.c: Likewise.
9515         * pthread_exit.c: Likewise.
9516         * pthread_getschedparam.c: Likewise.
9517         * pthread_self.c: Likewise.
9518         * pthread_setcancelstate.c: Likewise.
9519         * pthread_setschedparam.c: Likewise.
9520         * pthread_mutex_destroy.c: Likewise.
9521         * pthread_mutex_init.c: Likewise.
9522         * pthreadP.h: Add prototypes for the aliases.
9524         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9525         multiple_threads member in correct TCB to 1.
9527         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9528         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9529         member of thread decriptor, otherwise return unconditionally 1.
9531 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9533         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9534         regular Linux version.  Remove file.
9535         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9536         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9537         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9538         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9539         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9540         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9541         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9542         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9543         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9544         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9545         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9546         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9547         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9548         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9549         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9550         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9551         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9552         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9553         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9554         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9555         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9556         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9557         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9558         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9559         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9560         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9561         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9562         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9563         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9564         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9566 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9568         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9569         * sysdeps/unix/sysv/linux/open.c: Removed.
9570         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9571         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9572         * sysdeps/unix/sysv/linux/msync.c: Removed.
9573         * sysdeps/unix/sysv/linux/read.c: Removed.
9574         * sysdeps/unix/sysv/linux/close.c: Removed.
9575         * sysdeps/unix/sysv/linux/creat.c: Removed.
9576         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9577         * sysdeps/unix/sysv/linux/pause.c: Removed.
9578         * sysdeps/unix/sysv/linux/select.c: Removed.
9579         * sysdeps/unix/sysv/linux/write.c: Removed.
9581 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9583         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9584         element in TCB to see whether locking is needed.
9586         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9587         MULTIPLE_THREADS_OFFSET value is correct.
9589         * sysdeps/unix/sysv/linux/close.c: New file.
9590         * sysdeps/unix/sysv/linux/connect.S: New file.
9591         * sysdeps/unix/sysv/linux/creat.c: New file.
9592         * sysdeps/unix/sysv/linux/fsync.c: New file.
9593         * sysdeps/unix/sysv/linux/llseek.c: New file.
9594         * sysdeps/unix/sysv/linux/lseek.c: New file.
9595         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9596         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9597         * sysdeps/unix/sysv/linux/msync.c: New file.
9598         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9599         * sysdeps/unix/sysv/linux/open.c: New file.
9600         * sysdeps/unix/sysv/linux/open64.c: New file.
9601         * sysdeps/unix/sysv/linux/pause.c: New file.
9602         * sysdeps/unix/sysv/linux/poll.c: New file.
9603         * sysdeps/unix/sysv/linux/pread.c: New file.
9604         * sysdeps/unix/sysv/linux/pread64.c: New file.
9605         * sysdeps/unix/sysv/linux/pselect.c: New file.
9606         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9607         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9608         * sysdeps/unix/sysv/linux/readv.c: New file.
9609         * sysdeps/unix/sysv/linux/recv.S: New file.
9610         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9611         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9612         * sysdeps/unix/sysv/linux/select.c: New file.
9613         * sysdeps/unix/sysv/linux/send.S: New file.
9614         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9615         * sysdeps/unix/sysv/linux/sendto.S: New file.
9616         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9617         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9618         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9619         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9620         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9621         * sysdeps/unix/sysv/linux/system.c: New file.
9622         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9623         * sysdeps/unix/sysv/linux/wait.c: New file.
9624         * sysdeps/unix/sysv/linux/waitid.c: New file.
9625         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9626         * sysdeps/unix/sysv/linux/writev.c: New file.
9627         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9629         * pt-readv.c: Fix comment.
9631 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9633         * tst-cleanup1.c: Include stdlib.h.
9635         * tst-cancel5.c: New test.
9636         * Makefile (tests): Add tst-cancel5.
9637         (tst-cancel5): Link against libc.so libpthread.so in that order.
9639 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9641         * forward.c (test_loaded): Prevent recursive calls.
9643         * Makefile (routines): Add libc-cancellation.
9644         * libc-cancellation.c: New file.
9645         * descr.h (struct pthread): Add multiple_threads field.
9646         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9647         new thread descriptor to 1.
9648         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9649         Initialize multiple_thread field after successful thread creation.
9650         * cancellation.c (__do_cancel): Move to pthreadP.h.
9651         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9652         (__pthread_disable_asynccancel): Add internal_function attribute.
9653         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9654         * pthread_setcancelstate.c: Likewise.
9655         * pthread_setcanceltype.c: Likewise.
9656         * pthread_exit.c: Likewise.
9657         * pthreadP.h (CANCELLATION_P): Likewise.
9658         (__do_cancel): Define as static inline.
9659         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9660         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9661         declarations.
9662         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9663         fields.  Define MULTIPLE_THREADS_OFFSET.
9664         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9665         declaration.
9666         * sysdeps/unix/sysv/linux/accept.S: New file.
9667         * sysdeps/unix/sysv/linux/read.c: New file.
9668         * sysdeps/unix/sysv/linux/write.c: New file.
9669         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9670         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9671         initialization of __libc_locking_needed.
9672         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9673         __libc_locking_needed, use multiple_threads field in TCB.
9674         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9676 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9678         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9679         version.
9680         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9682         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9683         access to __libc_locking_needed for PIC.
9685 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9687         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9688         declare for libc.so.
9689         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9690         expression.
9691         (__libc_lock_lock): Put into statement expression.
9692         (__libc_lock_unlock): Remove trailing semicolon.
9693         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9695 2002-12-12  Roland McGrath  <roland@redhat.com>
9697         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9698         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9700 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9702         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9703         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9704         Initialize __libc_locking_needed.
9705         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9706         instead of __register_pthread_fork_handler.
9707         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9708         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9709         fork-gen with libc_pthread_init.
9710         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9711         of __register_pthread_fork_handler.
9712         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9713         of __register_pthread_fork_handler.
9714         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9715         __libc_locking_needed to determine whether lock prefix can be avoided.
9716         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9718 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9720         * Makefile (tests): Add tst-cleanup1.
9721         * tst-cleanup1.c: New file.
9722         * cancellation.c (__cleanup_thread): Removed.
9723         (__do_cancel): Remove call to __cleanup_thread.
9724         * pthreadP.h: Remove __cleanup_thread prorotype.
9726         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9727         Remember function and argument even if cancellation handler
9728         function is not available.
9729         (__libc_cleanup_region_end): Execute registered function directly if
9730         pthread functions are not available.
9731         (__libc_cleanup_end): Likewise.
9733         * init.c (__pthread_initialize_minimal): Fix initialization in
9734         static lib by preventing gcc from being too clever.
9736 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9738         * init.c (__pthread_initialize_minimal): Remove unneccesary
9739         sigaddset call.
9741         * Makefile (tests): We can run tst-locale2 now.
9743 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9745         * Versions: Remove duplicated sigwait entry.
9747 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9749         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9750         inside libpthread.
9752         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9754         * pthreadP.h: Declare __pthread_enable_asynccancel and
9755         __pthread_disable_asynccancel.
9756         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9757         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9758         * cancellation.c (__pthread_enable_asynccancel): New function.
9759         (__pthread_disable_asynccancel): New function.
9760         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9761         * pt-close.c: Likewise.
9762         * pt-connect.c: Likewise.
9763         * pt-creat.c: Likewise.
9764         * pt-fcntl.c: Likewise.
9765         * pt-fsync.c: Likewise.
9766         * pt-lseek.c: Likewise.
9767         * pt-lseek64.c: Likewise.
9768         * pt-msgrcv.c: Likewise.
9769         * pt-msgsnd.c: Likewise.
9770         * pt-msync.c: Likewise.
9771         * pt-nanosleep.c: Likewise.
9772         * pt-open.c: Likewise.
9773         * pt-open64.c: Likewise.
9774         * pt-pause.c: Likewise.
9775         * pt-poll.c: Likewise.
9776         * pt-pread.c: Likewise.
9777         * pt-pread64.c: Likewise.
9778         * pt-pselect.c: Likewise.
9779         * pt-pwrite.c: Likewise.
9780         * pt-pwrite64.c: Likewise.
9781         * pt-read.c: Likewise.
9782         * pt-readv.c: Likewise.
9783         * pt-recv.c: Likewise.
9784         * pt-recvfrom.c: Likewise.
9785         * pt-recvmsg.c: Likewise.
9786         * pt-select.c: Likewise.
9787         * pt-send.c: Likewise.
9788         * pt-sendmsg.c: Likewise.
9789         * pt-sendto.c: Likewise.
9790         * pt-sigpause.c: Likewise.
9791         * pt-sigsuspend.c: Likewise.
9792         * pt-sigtimedwait.c: Likewise.
9793         * pt-sigwait.c: Likewise.
9794         * pt-sigwaitinfo.c: Likewise.
9795         * pt-system.c: Likewise.
9796         * pt-tcdrain.c: Likewise.
9797         * pt-wait.c: Likewise.
9798         * pt-waitid.c: Likewise.
9799         * pt-waitpid.c: Likewise.
9800         * pt-write.c: Likewise.
9801         * pt-writev.c: Likewise.
9802         * pthread_join.c: Likewise.
9803         * pthread_timedjoin.c: Likewise.
9805         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9806         (__xpg_sigpause): New function.
9807         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9809 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9811         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9813         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9814         _GI_pthread_cleanup_pop to pthreadP.h.
9816         * ftrylockfile.c: Use _IO_lock_trylock instead of
9817         pthread_mutex_trylock.
9819         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9820         (CANCEL_RESET): Likewise.
9821         (__pthread_setcanceltype_): Declare.
9822         (__pthread_mutex_lock_internal): Declare.
9823         (__pthread_mutex_unlock_internal): Declare.
9824         (__pthread_once_internal): Declare.
9825         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9826         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9828         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9829         and pthread_mutex_unlock.
9830         * pthread_cond_wait.c: Likewise.
9831         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9832         * pthread_mutex_unlock.c: Likewise.
9834         * pthread_setcanceltype.c: Add additional alias
9835         __pthread_setcanceltype.
9837         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9838         * sem_open.c (sem_open): Likewise.
9839         Use __libc_open, __libc_write, and __libc_close instead of
9840         open, write, and close respectively.
9842         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9843         Rewrite as statement expression since it must return a value.
9845         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9846         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9847         __pthread_kill.
9849         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9850         alias __pthread_once_internal.
9852         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9854 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9856         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9857         * tst-stdio1.c: New file.
9858         * tst-stdio2.c: New file.
9860         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9862         * Makefile (tests): Comment out tst-locale2 for now.
9863         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9865         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9866         -D_IO_MTSAFE_IO.
9867         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9868         Use _IO_lock_init instead of explicit assignment.
9870         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9871         Define __libc_lock_* and __libc_lock_recursive macros with
9872         lowlevellock macros, not pthread mutexes.
9874         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9875         of pthread_mutex_lock.
9876         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9877         instead of pthread_mutex_unlock.
9879 2002-12-06  Roland McGrath  <roland@redhat.com>
9881         * allocatestack.c (__stack_user): Use uninitialized defn.
9882         * init.c (__pthread_initialize_minimal): Initialize it here.
9884 2002-12-05  Roland McGrath  <roland@redhat.com>
9886         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9887         string.
9888         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9890         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9891         missing & here too.
9893 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9895         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9896         lowlevellock.
9897         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9898         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9899         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9900         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9901         for __libc_lock_* macros.
9902         * Makefile (routines): Add libc-lowlevellock.
9904 2002-10-09  Roland McGrath  <roland@redhat.com>
9906         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9907         Under [__PIC__], call the function via the pointer fetched for
9908         comparison rather than a call by name that uses the PLT.
9909         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9910         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9911         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9912         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9913         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9915 2002-12-04  Roland McGrath  <roland@redhat.com>
9917         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9919         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9920         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9922         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9924 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9926         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9927         a completely opaque, non-integer type.
9928         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9930 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9932         * sysdeps/i386/tls.h: Include stdlib.h.
9933         * sysdeps/x86_64/tls.h: Likewise.
9935 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9937         * Makefile (tests): Add tst-locale2.
9938         (tests-static): Likewise.
9939         * tst-locale2.c: New file.
9941         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9942         volatile and add memory clobbers to lock operations.
9944 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9946         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9947         * sysdeps/i386/i486/bits/atomic.h: New file.
9948         * sysdeps/i386/i586/bits/atomic.h: New file.
9949         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9950         include i486 version.
9951         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9952         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9953         Patch by Marijn Ros <marijn@mad.scientist.com>.
9955         * allocatestack.c (get_cached_stack): Don't crash if we first
9956         found a stack with a larger size then needed.
9957         Reported by Hui Huang <hui.huang@sun.com>.
9959         * Makefile (tests): Add tst-sysconf.
9960         * tst-sysconf.c: New file.
9962         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9963         PTHREAD_THREADS_MAX.
9965 2002-12-02  Roland McGrath  <roland@redhat.com>
9967         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9968         Declare using hidden_proto instead of attribute_hidden, so there are
9969         non-.hidden static symbols for gdb to find.
9970         (__pthread_keys): Likewise.
9971         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9972         * allocatestack.c (__stack_user): Likewise.
9973         * pthread_create.c (__pthread_keys): Likewise.
9974         (__nptl_threads_events, __nptl_last_event): Make these static instead
9975         of hidden.
9976         * pthread_key_create.c (__pthread_pthread_keys_max,
9977         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9979 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9981         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9982         statically.
9983         * tst-locale1.c: New file.
9985         * pthread_cond_timedwait.c: Include <stdlib.h>.
9987         * Makefile (tests): Add tst-fork2 and tst-fork3.
9988         * tst-fork2.c: New file.
9989         * tst-fork3.c: New file.
9991 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9993         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9995         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9996         require it to 200112L.
9998         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9999         instruction only if HAVE_CMOV is defined.
10000         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10002         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10004         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10006         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10008         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10010 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10012         * sysdeps/x86_64/bits/atomic.h: New file.
10014         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10015         16-bit operations.
10017         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10018         possible since gettid cannot fail.
10020         * sysdeps/x86_64/pthreaddef.h: New file.
10022         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10024         * sysdeps/x86_64/pthread_spin_init.c: New file.
10025         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10026         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10027         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10029         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10030         Add missing lock prefix.  Minute optimization.
10032         * tst-spin2.c (main): Also check successful trylock call.
10034         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10035         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10037         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10038         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10040         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10041         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10042         value in case of an error.  Add support for INTERNAL_SYSCALL.
10044         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10045         value in case of an error.
10047         * sysdeps/x86_64/tls.h: New file.
10049 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10051         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10052         takes the array member name and the index as parameters.
10053         (THREAD_SETMEM_NC): Likewise.
10054         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10055         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10056         interfaces.
10058         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10059         to decide which code to use.
10060         (THREAD_SETMEM_NC): Likewise.
10062         * allocatestack.c (queue_stack): Don't remove stack from list here.
10063         Do it in the caller.  Correct condition to prematurely terminate
10064         loop to free stacks.
10065         (__deallocate_stack): Remove stack from list here.
10067 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10069         * Makefile (tests): Add tst-stack1.
10070         * tst-stack1.c: New file.
10072         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10073         provided stack.
10075         * pthread_attr_getstack.c: Return bottom of the thread area.
10077 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10079         * Makefile (libpthread-routines): Add pt-allocrtsig and
10080         pthread_kill_other_threads.
10081         * pt-allocrtsig.c: New file.
10082         * pthread_kill_other_threads.c: New file.
10083         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10084         all three functions.
10085         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10086         allocrtsig.
10087         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10088         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10089         and __libc_allocate_rtsig_private.
10090         * Versions (libpthread): Export pthread_kill_other_threads_np,
10091         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10093 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10095         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10096         the end of the stack.  Adjust computations.
10097         When mprotect call fails dequeue stack and free it.
10098         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10099         attribute.
10100         * pthread_getattr_np.c: Likewise.
10102         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10103         surprises.
10105 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10107         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10108         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10110 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10112         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10113         * pthread_setspecific.c: Likewise.
10115 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10117         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10118         definitions.  Get them from the official place.
10119         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10121         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10122         Use new CLONE_ flags in clone() calls.
10124         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10125         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10127         * Versions: Add pthread_* functions for libc.
10128         * forward.c: New file.
10130         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10131         errno-loc.
10132         * herrno.c: New file.
10133         * res.c: New file.
10135         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10136         sem_trywait, and sem_timedwait.  Add herrno and res.
10137         * sem_init.c: Don't initialize lock and waiters members.
10138         * sem_open.c: Likewise.
10139         * sem_post.c: Removed.
10140         * sem_wait.c: Removed.
10141         * sem_trywait.c: Removed.
10142         * sem_timedwait.c: Removed.
10143         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10144         Includes full implementations of sem_post, sem_wait, sem_trywait,
10145         and sem_timedwait.
10146         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10147         for new implementation.
10148         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10149         and waiters fields.
10151         * tst-sem3.c: Improve error message.
10152         * tst-signal3.c: Likewise.
10154         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10155         to tell the kernel about the termination futex and to initialize tid
10156         member.  Don't initialize main_thread.
10157         * descr.h (struct pthread): Remove main_thread member.
10158         * cancelllation.c (__do_cancel): Remove code handling main thread.
10159         The main thread is not special anymore.
10161         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10162         size of the stacks to stack_cache_actsize.
10164         * pt-readv.c: Add missing "defined".
10165         * pt-sigwait.c: Likewise.
10166         * pt-writev.c: Likewise.
10168 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10170         * Versions: Export __connect from libpthread.
10171         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10173         * Makefile (libpthread-routines): Add pt-raise.
10174         * sysdeps/unix/sysv/linux/raise.c: New file.
10175         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10176         * sysdeps/generic/pt-raise.c: New file.
10178         * pthread_cond_init.c: Initialize all data elements of the condvar
10179         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10181         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10182         * pthread_create.c: Likewise.
10184         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10185         * tst-key1.c: New file.
10186         * tst-key2.c: New file.
10187         * tst-key3.c: New file.
10189         * Versions: Export pthread_detach for version GLIBC_2.0.
10190         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10192 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10194         * pthread_key_create.c: Terminate search after an unused key was found.
10195         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10197         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10198         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10200 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10202         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10203         dynamic lookup for errno in PIC.
10205         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10206         release the stack lock as soon as possible.
10207         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10208         the static TLS block.
10209         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10211         * cancellation.c: Renamed from cancelation.c.
10212         * Makefile: Adjust accordingly.
10213         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10214         * cleanup_defer.c: Use CANCELLATION_P.
10215         * pthread_testcancel.c: Likewise.
10216         * descr.h: Fix spelling in comments.
10217         * init.c: Likewise.
10218         * pthread_getattr_np.c: Likewise.
10219         * pthread_getschedparam.c: Likewise.
10220         * pthread_setschedparam.c: Likewise.
10221         * Versions: Likewise.
10223         * pt-pselect.c: New file.
10224         * Makefile (libpthread-routines): Add pt-pselect.
10225         * Versions: Add pselect.
10227         * tst-cancel4.c: New file.
10228         * Makefile (tests): Add tst-cancel4.
10230 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10232         * pthread_mutex_lock.c: Always record lock ownership.
10233         * pthread_mutex_timedlock.c: Likewise.
10234         * pthread_mutex_trylock.c: Likewise.
10236         * pt-readv.c: New file.
10237         * pt-writev.c: New file.
10238         * pt-creat.c: New file.
10239         * pt-msgrcv.c: New file.
10240         * pt-msgsnd.c: New file.
10241         * pt-poll.c: New file.
10242         * pt-select.c: New file.
10243         * pt-sigpause.c: New file.
10244         * pt-sigsuspend.c: New file.
10245         * pt-sigwait.c: New file.
10246         * pt-sigwaitinfo.c: New file.
10247         * pt-waitid.c: New file.
10248         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10249         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10250         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10251         * Versions: Add all the new functions.
10253         * tst-exit1.c: New file.
10254         * Makefile (tests): Add tst-exit1.
10256         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10258 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10260         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10262         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10263         call.  pthread_join is an official cancellation point.
10264         * pthread_timedjoin.c: Likewise.
10266         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10267         and the condvar's mutex are retrieved.
10268         * pthread_cond_timedwait.c: Likewise.
10269         Reported by dice@saros.East.Sun.COM.
10271 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10273         * pthreadP.h: Cut out all type definitions and move them...
10274         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10275         * pthreadP.h: Include <internaltypes.h>.
10277         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10278         performance tweaks.
10280         * sem_trywait.c: Shuffle #includes around to get right order.
10281         * sem_timedwait.c: Likewise.
10282         * sem_post.c: Likewise.
10283         * sem_wait.c: Likewise.
10285         * nptl 0.3 released.
10287         * Makefile (tests): Add tst-signal3.
10288         * tst-signal3.c: New file.
10290 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10292         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10293         the asms modify the sem object.
10294         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10296         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10297         the actual members.
10298         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10299         * semaphoreP.h: Include pthreadP.h.
10300         * sem_getvalue.c: Adjust to sem_t change.
10301         * sem_init.c: Likewise.
10302         * sem_open.c: Likewise.
10303         * sem_post.c: Likewise.
10304         * sem_timedwait.c: Likewise.
10305         * sem_trywait.c: Likewise.
10306         * sem_wait.c: Likewise.
10308 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10310         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10311         * tst-basic2.c: New file.
10312         * tst-exec1.c: New file.
10313         * tst-exec2.c: New file.
10314         * tst-exec3.c: New file.
10316         * tst-fork1.c: Remove extra */.
10318         * nptl 0.2 released.  The API for IA-32 is complete.