* sysdeps/pthread/pthread.h (pthread_cleanup_push,
[glibc.git] / nptl / ChangeLog
blobc147c180df0c9aba97596a8955a512554c02666f
1 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
3         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
4         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
5         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
7 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
9         [BZ #5240]
10         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
11         If we time out, try one last time to lock the futex to avoid
12         losing a wakeup signal.
13         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
14         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
16         [BZ #5245]
17         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
18         if necessary.
20 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
22         [BZ #5245]
23         * allocatestack.c (allocate_stack): Change ENOMEM error in case
24         mmap failed to EAGAIN.
25         * Makefile (tests): Add tst-basic7.
26         * tst-basic7.c: New file.
28 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
30         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
31         Use __linkin_atfork.
33 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
35         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
36         missing line continuations.
37         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
38         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
40 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
42         [BZ #5220]
43         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
44         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
45         (struct timer): Add next element.
46         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
47         enqueue timer structure into __active_timer_sigev_thread list.
48         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
49         remove timer struct from __active_timer_sigev_thread.
50         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
51         Before using timer structure make sure it is still on the
52         __active_timer_sigev_thread list.  Keep lock until done.
53         Define __active_timer_sigev_thread and
54         __active_timer_sigev_thread_lock.
56 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
58         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
59         Redefine thread_atfork for use of ATFORK_MEM.
60         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
61         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
62         function.
63         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
64         Use atomic operation when removing first element of list.
66 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
68         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
69         routine instead of an alias to __new_sem_post.
71 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
73         * init.c (__pthread_initialize_minimal): Initialize word to appease
74         valgrind.
76 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
78         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
79         libc.so just clear NAME.
80         (__libc_rwlock_fini): Nop inside of libc.so.
81         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
82         all zeros.
84 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
86         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
87         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
88         unlocking failed.
89         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
91 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
93         [BZ #4938]
94         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
95         reclaimed stack if necessary.
96         * Makefile (tests): Add tst-tsd6.
97         * tst-tsd6.c: New file.
99 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
101         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
102         Add private argument.
104 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
107         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
109 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
111         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
112         (__lll_robust_timedlock): Pass private as last argument to
113         __lll_robust_timedlock_wait.
114         (__lll_unlock): Fix a pasto.
116 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
118         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
119         sparc_old_sem): New structs.
120         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
121         (__sem_wait_cleanup): New function.
122         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
123         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
124         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
125         lll_futex_wait.
126         (__old_sem_wait): New function.
127         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
128         nptl/sysdeps/unix/sysv/linux/sparc version.
129         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
130         Likewise.
131         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
132         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
133         (__new_sem_trywait): Use sparc_old_sem structure.
134         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
135         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
136         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
137         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
138         lll_futex_timed_wait.
139         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
140         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
141         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
142         lll_futex_wake.
143         (__old_sem_post): New function.
144         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
145         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
146         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
147         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
148         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
149         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
151 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
153         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
154         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
155         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
156         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
157         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
158         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
159         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
160         Use FUTEX_WAKE_OP.
161         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
162         kernel-features.h and tcb-offsets.h.
163         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
164         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
165         process private.
166         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
167         tcb-offsets.h.
168         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
169         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
170         process private.
171         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
172         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
173         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
174         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
175         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
176         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
177         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
179 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
181         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
182         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
183         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
184         lll_futex_timed_wait.
186         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
187         __lll_robust_unlock): Rewrite as macros instead of inline functions.
188         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
189         __lll_robust_unlock, __lll_wait_tid): Likewise.
191 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
193         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
194         Fix a pasto.
195         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
196         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
197         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
198         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
199         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
200         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
201         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
203         kernel-features.h.
204         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
205         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
206         process private.  Switch DW_CFA_advance_loc1 and some
207         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
209         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
210         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
211         process private.  Switch DW_CFA_advance_loc{1,2} and some
212         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
213         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
214         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
215         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
216         Likewise.
217         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
218         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
219         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
220         Likewise.
221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
222         (__pthread_cond_broadcast): Compare %r8 instead of
223         dep_mutex-cond_*(%rdi) with $-1.
224         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
225         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
226         of oring.
228 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
230         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
232 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
234         * allocatestack.c: Include kernel-features.h.
235         * pthread_create.c: Likewise.
236         * pthread_mutex_init.c: Likewise.
237         * init.c: Likewise.
238         * pthread_cond_timedwait.c: Likewise.
239         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
240         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
241         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
243         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
245         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
246         Likewise.
247         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
248         Likewise.
249         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
250         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
251         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
252         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
254 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
256         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
257         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
258         byte elements.  One of them is the new __shared element.
259         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
260         adjust names of other padding elements.
261         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
262         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
263         byte elements.  One of them is the new __shared element.
264         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
265         adjust names of other padding elements.
266         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
267         Renamed __pad1 element to __shared, adjust names of other padding
268         elements.
269         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
270         (pthread_rwlock_t): Likewise.
271         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
272         typo.
274 2007-08-09  Anton Blanchard  <anton@samba.org>
276         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
278 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
280         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
281         <kernel-features.h>.
282         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
284 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
286         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
287         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
288         dealing with robust mutexes.
289         * pthread_mutex_timedlock.c: Likewise.
290         * pthread_mutex_trylock.c: Likewise.
291         * pthread_mutex_unlock.c: Likewise.
292         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
294 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
296         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
297         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
298         (PTHREAD_MUTEX_PSHARED): Define.
299         * pthread_mutex_init.c (__pthread_mutex_init): Set
300         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
301         mutexes.
302         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
303         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
304         as second argument to lll_lock.
305         (LLL_MUTEX_TRYLOCK): Take mutex as argument
306         instead of its __data.__lock field.
307         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
308         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
309         to lll_robust_lock.
310         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
311         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
312         instead of mutex->__data.__kind directly, pass
313         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
314         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
315         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
316         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
317         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
318         to lll_timedlock, lll_robust_timedlock, lll_unlock and
319         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
320         of mutex->__data.__kind directly.
321         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
322         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
323         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
324         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
325         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
326         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
327         and lll_futex_wake.
328         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
329         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
330         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
331         directly.
332         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
333         Take mutex as argument instead of its __data.__lock field, pass
334         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
335         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
336         __data.__lock field.
337         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
338         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
339         to lll_robust_cond_lock.
340         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
341         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
342         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
343         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
344         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
345         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
346         lll_futex_wait.
347         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
348         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
349         lll_futex_wake.
350         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
351         pshared variable, pass it to lll_lock, lll_unlock,
352         lll_futex_timedwait and lll_futex_wake.
353         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
354         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
355         and lll_futex_wake.
356         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
357         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
358         macro.
359         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
360         lll_futex_wake_unlock): Likewise.
361         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
362         Likewise.
363         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
364         lll_futex_wake_unlock): Likewise.
365         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
366         Likewise.
367         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
368         lll_futex_wake_unlock): Likewise.
369         (lll_futex_wake): Fix a typo.
370         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
371         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
372         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
373         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
374         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
376         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
377         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
378         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
379         (__pthread_cond_timedwait): Likewise.
380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
381         (__condvar_cleanup, __pthread_cond_wait): Likewise.
383 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
385         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
386         Don't use CGOTSETUP and CGOTRESTORE macros.
387         (CGOTSETUP, CGOTRESTORE): Remove.
388         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
389         @local symbol.
391 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
393         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
394         definitions for private futexes.
395         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
396         kernel-features.h and lowlevellock.h.  Use private futexes if
397         they are available.
398         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
399         (__lll_mutex_lock_wait): Rename to
400         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
401         (__lll_mutex_timedlock_wait): Rename to ...
402         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
403         Don't compile in for libc.so.
404         (__lll_mutex_unlock_wake): Rename to ...
405         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
406         (__lll_timedwait_tid): Use __NR_gettimeofday.
407         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
408         the header from assembler.  Renamed all lll_mutex_* resp.
409         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
410         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
411         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
412         Define.
413         (__lll_lock_wait_private): Add prototype.
414         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
415         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
416         __lll_unlock_wake): Likewise.
417         (lll_lock): Add private argument.  Call __lll_lock_wait_private
418         if private is constant LLL_PRIVATE.
419         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
420         lll_timedlock, lll_robust_timedlock): Add private argument.
421         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
422         if private is constant LLL_PRIVATE.
423         (lll_robust_unlock, lll_robust_dead): Add private argument.
424         (lll_lock_t): Remove.
425         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
426         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
427         lll_cond_wake, lll_cond_broadcast): Remove.
428         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
429         kernel-features.h and lowlevellock.h.
430         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
431         (LOAD_FUTEX_WAIT): Define.
432         (__lll_robust_mutex_lock_wait): Rename to ...
433         (__lll_robust_lock_wait): ... this.  Add private argument.
434         Use LOAD_FUTEX_WAIT macro.
435         (__lll_robust_mutex_timedlock_wait): Rename to ...
436         (__lll_robust_timedlock_wait): ... this.    Add private argument.
437         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
438         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
439         lowlevellock.h.
440         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
441         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
442         __lll_mutex_{lock,unlock}_*.
443         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
444         lowlevellock.h and pthread-errnos.h.
445         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
446         FUTEX_CMP_REQUEUE, EINVAL): Remove.
447         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
448         __lll_mutex_{lock,unlock}_*.
449         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
450         lowlevellock.h and pthread-errnos.h.
451         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
452         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
453         __lll_mutex_{lock,unlock}_*.
454         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
455         lowlevellock.h.
456         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
457         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
458         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
459         (__condvar_tw_cleanup): Likewise.
460         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
461         lowlevellock.h.
462         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
463         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
464         __lll_mutex_{lock,unlock}_*.
465         ( __condvar_w_cleanup): Likewise.
466         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
467         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
469         lowlevellock.h.
470         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
471         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
472         __lll_mutex_{lock,unlock}_*.
473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
474         lowlevellock.h.
475         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
476         FUTEX_PRIVATE_FLAG): Remove.
477         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
478         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
479         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
480         lowlevellock.h.
481         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
482         FUTEX_PRIVATE_FLAG): Remove.
483         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
484         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
485         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
486         lowlevellock.h.
487         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
488         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
489         __lll_mutex_{lock,unlock}_*.
490         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
491         lowlevellock.h.
492         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
493         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
494         __lll_mutex_{lock,unlock}_*.
495         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
496         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
497         (__new_sem_post): Use standard initial exec code sequences.
498         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
499         lowlevellock.h.
500         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
501         FUTEX_PRIVATE_FLAG): Remove.
502         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
503         exec code sequences.
504         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
505         (__new_sem_trywait): Use standard initial exec code sequences.
506         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
507         (__new_sem_wait): Use standard initial exec code sequences.
509 2007-07-31  Anton Blanchard  <anton@samba.org>
511         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
512         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
513         atomic_full_barrier.
515 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
517         * allocatestack.c (stack_cache_lock): Change type to int.
518         (get_cached_stack, allocate_stack, __deallocate_stack,
519         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
520         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
521         as second argument to lll_lock and lll_unlock macros on
522         stack_cache_lock.
523         * pthread_create.c (__find_in_stack_list): Likewise.
524         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
525         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
526         as second argument.
527         * descr.h (struct pthread): Change lock and setxid_futex field
528         type to int.
529         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
530         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
531         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
532         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
533         Likewise.
534         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
535         * pthread_cond_init.c (__pthread_cond_init): Likewise.
536         * pthreadP.h (__attr_list_lock): Change type to int.
537         * pthread_attr_init.c (__attr_list_lock): Likewise.
538         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
539         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
540         lll_{,un}lock.
541         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
542         also for lll_futex_{wake,wait}.
543         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
544         a pointer to const.
545         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
546         LLL_SHARED as second argument to lll_{,un}lock.
547         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
548         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
549         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
550         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
551         Likewise.
552         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
553         as second argument to lll_{,un}lock macros on pd->lock.
554         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
555         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
556         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
557         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
558         Likewise.
559         * sysdeps/pthread/createthread.c (do_clone, create_thread):
560         Likewise.
561         * pthread_once.c (once_lock): Change type to int.
562         (__pthread_once): Pass LLL_PRIVATE as second argument to
563         lll_{,un}lock macros on once_lock.
564         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
565         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
566         rwlock->__data.__shared as second argument to them and similarly
567         for lll_futex_w*.
568         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
569         Likewise.
570         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
571         Likewise.
572         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
573         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
574         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
575         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
576         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
577         to lll_{,un}lock macros on __sem_mappings_lock.
578         * sem_open.c (check_add_mapping): Likewise.
579         (__sem_mappings_lock): Change type to int.
580         * semaphoreP.h (__sem_mappings_lock): Likewise.
581         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
582         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
583         instead of lll_*mutex_*, pass LLL_SHARED as last
584         argument.
585         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
586         pass LLL_SHARED as last argument.
587         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
588         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
589         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
590         pass LLL_SHARED as last argument.
591         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
592         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
593         LLL_SHARED as last argument.
594         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
595         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
596         Similarly.
597         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
598         __libc_lock_lock_recursive, __libc_lock_unlock,
599         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
600         argument to lll_{,un}lock.
601         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
602         _IO_lock_unlock): Likewise.
603         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
604         compound literal.
605         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
606         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
607         __fork_lock.
608         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
609         free_mem): Likewise.
610         (__fork_lock): Change type to int.
611         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
612         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
613         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
614         lll_futex_wake.
615         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
616         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
617         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
618         New function.
619         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
620         pass it through to lll_futex_*wait, only compile in when
621         IS_IN_libpthread.
622         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
623         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
624         argument and pass it through to lll_futex_*wait.
625         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
626         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
627         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
628         inline functions to __lll_* resp. __lll_robust_*.
629         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
630         (lll_mutex_dead): Add private argument.
631         (__lll_lock_wait_private): New prototype.
632         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
633         __lll_robust_lock_timedwait): Add private argument to prototypes.
634         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
635         call __lll_lock_wait_private, otherwise pass private to
636         __lll_lock_wait.
637         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
638         __lll_robust_timedlock): Add private argument, pass it to
639         __lll_*wait functions.
640         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
641         call __lll_unlock_wake_private, otherwise pass private to
642         __lll_unlock_wake.
643         (__lll_robust_unlock): Add private argument, pass it to
644         __lll_robust_unlock_wake.
645         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
646         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
647         argument, pass it through to __lll_* inline function.
648         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
649         (lll_lock_t): Remove.
650         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
651         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
652         lll_cond_wake, lll_cond_broadcast): Remove.
653         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
654         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
655         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
656         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
657         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
658         the header from assembler.  Renamed all lll_mutex_* resp.
659         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
660         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
661         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
662         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
663         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
664         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
665         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
666         Remove prototype.
667         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
668         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
669         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
670         (lll_trylock): Likewise, use __lll_trylock_asm, pass
671         MULTIPLE_THREADS_OFFSET as another asm operand.
672         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
673         MULTIPLE_THREADS_OFFSET as last asm operand, call
674         __lll_lock_wait_private if private is constant LLL_PRIVATE,
675         otherwise pass private as another argument to __lll_lock_wait.
676         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
677         lll_timedlock, lll_robust_timedlock): Add private argument, pass
678         private as another argument to __lll_*lock_wait call.
679         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
680         MULTIPLE_THREADS_OFFSET as another asm operand, call
681         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
682         otherwise pass private as another argument to __lll_unlock_wake.
683         (lll_robust_unlock): Add private argument, pass private as another
684         argument to __lll_unlock_wake.
685         (lll_robust_dead): Add private argument, use __lll_private_flag
686         macro.
687         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
688         LLL_MUTEX_LOCK_INITIALIZER.
689         (lll_lock_t): Remove.
690         (LLL_LOCK_INITIALIZER_WAITERS): Define.
691         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
692         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
693         lll_cond_wake, lll_cond_broadcast): Remove.
694         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
695         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
696         2007-05-2{3,9} changes.
697         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
698         kernel-features.h and lowlevellock.h.
699         (LOAD_PRIVATE_FUTEX_WAIT): Define.
700         (LOAD_FUTEX_WAIT): Rewritten.
701         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
702         define.
703         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
704         (__lll_mutex_lock_wait): Rename to ...
705         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
706         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
707         (__lll_mutex_timedlock_wait): Rename to ...
708         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
709         contains private argument.  Don't compile in for libc.so.
710         (__lll_mutex_unlock_wake): Rename to ...
711         (__lll_unlock_wake): ... this.  %ecx contains private argument.
712         Don't compile in for libc.so.
713         (__lll_timedwait_tid): Use __NR_gettimeofday.
714         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
715         kernel-features.h and lowlevellock.h.
716         (LOAD_FUTEX_WAIT): Define.
717         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
718         define.
719         (__lll_robust_mutex_lock_wait): Rename to ...
720         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
721         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
722         macro.
723         (__lll_robust_mutex_timedlock_wait): Rename to ...
724         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
725         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
726         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
727         lowlevellock.h.
728         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
729         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
730         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
731         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
732         to __lll_lock_wait in %edx.
733         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
734         Include lowlevellock.h and pthread-errnos.h.
735         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
736         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
737         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
738         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
739         pass LLL_SHARED in %ecx to both __lll_lock_wait and
740         __lll_unlock_wake.
741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
742         Include lowlevellock.h and pthread-errnos.h.
743         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
744         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
745         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
746         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
747         pass LLL_SHARED in %ecx to both __lll_lock_wait and
748         __lll_unlock_wake.
749         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
750         Include lowlevellock.h.
751         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
752         Don't define.
753         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
754         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
755         pass LLL_SHARED in %ecx to both __lll_lock_wait and
756         __lll_unlock_wake.  Use __NR_gettimeofday.
757         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
758         Include lowlevellock.h.
759         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
760         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
761         to __lll_*, pass cond_lock address in %edx rather than %ecx to
762         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
763         and __lll_unlock_wake.
764         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
765         Include lowlevellock.h.
766         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
767         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
768         MUTEX(%ebx) address in %edx rather than %ecx to
769         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
770         and __lll_unlock_wake.  Move return value from %ecx to %edx
771         register.
772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
773         Include lowlevellock.h.
774         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
775         Don't define.
776         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
777         MUTEX(%ebp) address in %edx rather than %ecx to
778         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
779         and __lll_unlock_wake.  Move return value from %ecx to %edx
780         register.  Use __NR_gettimeofday.
781         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
782         Include lowlevellock.h.
783         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
784         Don't define.
785         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
786         MUTEX(%ebp) address in %edx rather than %ecx to
787         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
788         and __lll_unlock_wake.  Move return value from %ecx to %edx
789         register.  Use __NR_gettimeofday.
790         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
791         Include lowlevellock.h.
792         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
793         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
794         MUTEX(%edi) address in %edx rather than %ecx to
795         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
796         and __lll_unlock_wake.
797         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
798         Include lowlevellock.h.
799         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
800         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
801         MUTEX(%ebx) address in %edx rather than %ecx to
802         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
803         and __lll_unlock_wake.  Move return value from %ecx to %edx
804         register.
805         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
806         lowlevellock.h.
807         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
808         define.
809         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
810         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
811         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
812         lowlevellock.h.
813         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
814         (sem_timedwait): Use __NR_gettimeofday.
815         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
816         lowlevellock.h.
817         (LOCK): Don't define.
818         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
819         lowlevellock.h.
820         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
821         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
822         are waiters.
823         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
824         2007-05-2{3,9} changes.
825         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
826         kernel-features.h and lowlevellock.h.
827         (LOAD_PRIVATE_FUTEX_WAIT): Define.
828         (LOAD_FUTEX_WAIT): Rewritten.
829         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
830         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
831         (__lll_mutex_lock_wait): Rename to ...
832         (__lll_lock_wait): ... this.  %esi is now private argument.
833         Don't compile in for libc.so.
834         (__lll_mutex_timedlock_wait): Rename to ...
835         (__lll_timedlock_wait): ... this.  %esi contains private argument.
836         Don't compile in for libc.so.
837         (__lll_mutex_unlock_wake): Rename to ...
838         (__lll_unlock_wake): ... this.  %esi contains private argument.
839         Don't compile in for libc.so.
840         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
841         kernel-features.h and lowlevellock.h.
842         (LOAD_FUTEX_WAIT): Define.
843         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
844         (__lll_robust_mutex_lock_wait): Rename to ...
845         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
846         Use LOAD_FUTEX_WAIT macro.
847         (__lll_robust_mutex_timedlock_wait): Rename to ...
848         (__lll_robust_timedlock_wait): ... this. %esi argument contains
849         private, use LOAD_FUTEX_WAIT macro.
850         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
851         lowlevellock.h.
852         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
853         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
854         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
855         __lll_lock_wait and __lll_unlock_wake.
856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
857         Include lowlevellock.h and pthread-errnos.h.
858         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
859         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
860         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
861         pass LLL_SHARED in %esi to both __lll_lock_wait and
862         __lll_unlock_wake.
863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
864         Include lowlevellock.h and pthread-errnos.h.
865         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
866         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
867         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
868         pass LLL_SHARED in %esi to both __lll_lock_wait and
869         __lll_unlock_wake.
870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
871         Include lowlevellock.h.
872         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
873         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
874         pass LLL_SHARED in %esi to both __lll_lock_wait and
875         __lll_unlock_wake.
876         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
877         Include lowlevellock.h.
878         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
879         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
880         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
881         and __lll_unlock_wake.
882         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
883         Include lowlevellock.h.
884         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
885         Don't define.
886         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
887         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
888         and __lll_unlock_wake.
889         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
890         Include lowlevellock.h.
891         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
892         Don't define.
893         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
894         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
895         and __lll_unlock_wake.
896         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
897         Include lowlevellock.h.
898         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
899         Don't define.
900         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
901         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
902         and __lll_unlock_wake.
903         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
904         Include lowlevellock.h.
905         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
906         Don't define.
907         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
908         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
909         and __lll_unlock_wake.
910         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
911         Include lowlevellock.h.
912         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
913         Don't define.
914         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
915         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
916         and __lll_unlock_wake.
917         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
918         lowlevellock.h.
919         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
920         define.
921         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
922         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
923         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
924         lowlevellock.h.
925         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
926         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
927         lowlevellock.h.
928         (LOCK): Don't define.
929         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
930         lowlevellock.h.
931         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
932         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
933         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
934         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
935         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
936         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
937         (__lll_lock_wait_private): New function.
938         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
939         it to lll_futex_*wait.  Don't compile in for libc.so.
940         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
941         Remove.
942         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
943         (struct sparc_pthread_barrier): Remove.
944         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
945         struct sparc_pthread_barrier.  Pass
946         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
947         and lll_futex_wait macros.
948         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
949         Remove.
950         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
951         Include sparc pthread_barrier_wait.c instead of generic one.
953 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
955         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
957         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
958         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
959         %ecx.
960         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
961         (pthread_rwlock_timedwrlock): Likewise.
962         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
963         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
965 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
967         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
969 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
971         * tst-locale2.c (useless): Add return statement.
973 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
975         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
976         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
977         * pthread_create.c (start_thread): Likewise.
978         * init.c (sighandler_setxid): Likewise.
979         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
980         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
981         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
982         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
983         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
984         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
985         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
986         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
987         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
988         Likewise.
989         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
990         Likewise.
991         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
992         Likewise.
993         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
994         __rtld_notify): Likewise.
995         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
996         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
997         __pthread_once): Likewise.
998         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
999         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1000         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1001         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1002         (lll_futex_wait): Add private argument, define as wrapper around
1003         lll_futex_timed_wait.
1004         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1005         use __lll_private_flag macro.
1006         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1007         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1008         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1009         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1010         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1011         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1012         (lll_futex_wait): Add private argument, define as wrapper around
1013         lll_futex_timed_wait.
1014         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1015         use __lll_private_flag macro.
1016         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1017         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1018         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1019         Define.
1020         (lll_futex_timed_wait, lll_futex_wake): Use it.
1021         (lll_private_futex_wait, lll_private_futex_timed_wait,
1022         lll_private_futex_wake): Removed.
1023         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1024         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1025         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1026         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1027         (lll_futex_wait): Add private argument, define as wrapper around
1028         lll_futex_timed_wait.
1029         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1030         use __lll_private_flag macro.
1031         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1032         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1033         to lll_futex_*.
1034         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1035         (lll_private_futex_wait, lll_private_futex_timed_wait,
1036         lll_private_futex_wake): Removed.
1037         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1038         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1039         (lll_private_futex_wait, lll_private_futex_timed_wait,
1040         lll_private_futex_wake): Removed.
1041         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1042         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1043         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1044         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1045         (lll_futex_wait): Add private argument, define as wrapper around
1046         lll_futex_timed_wait.
1047         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1048         use __lll_private_flag macro.
1049         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1050         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1051         to lll_futex_*.
1052         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1053         Define.
1054         (lll_futex_timed_wait, lll_futex_wake): Use it.
1055         (lll_private_futex_wait, lll_private_futex_timed_wait,
1056         lll_private_futex_wake): Removed.
1058 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1060         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1061         of the structure for sparc32.
1063 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1065         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1067 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1069         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1070         code used when private futexes are assumed.
1071         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1072         Likewise.
1074 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1076         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1077         (__lll_private_flag): Define.
1078         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1079         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1080         __lll_private_flag.
1081         (lll_private_futex_wait, lll_private_futex_timedwait,
1082         lll_private_futex_wake): Define as wrapper around non-_private
1083         macros.
1084         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1085         (__lll_private_flag): Define.
1086         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1087         (lll_private_futex_wait, lll_private_futex_timedwait,
1088         lll_private_futex_wake): Define as wrapper around non-_private
1089         macros.
1091 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1093         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1094         parameter to lll_futex_wait call.
1095         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1097         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1098         Replace lll_futex_wait with lll_private_futex_wait.
1099         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1100         Add LLL_SHARED parameter to lll_futex_wake().
1102         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1103         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1104         lll_private_futex_wake.
1105         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1106         bit from private parm before syscall.
1107         (lll_futex_timed_wait): Likewise.
1108         (lll_futex_wake): Likewise.
1109         (lll_futex_wake_unlock): Likewise.
1110         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1111         (lll_robust_mutex_unlock): Likewise.
1112         (lll_mutex_unlock_force): Likewise.
1113         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1115 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1117         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1118         compilation when unconditionally using private futexes.
1119         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1120         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1121         Likewise.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1125 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1127         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1128         Define.
1130 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1132         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1133         kernel-features.h.
1135 2007-05-16  Roland McGrath  <roland@redhat.com>
1137         * init.c (__nptl_initial_report_events): New variable.
1138         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1139         to that.
1141 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1143         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1144         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1146 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1148         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1149         implementation.
1151 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1153         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1154         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1155         * pthread_mutex_timedlock.c: Likewise.
1156         * pthread_mutex_trylock.c: Likewise.
1157         * pthread_mutex_unlock.c: Likewise.
1159 2007-06-17  Andreas Schwab  <schwab@suse.de>
1161         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1162         sections.
1164 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1166         * allocatestack.c (allocate_stack): Make code compile if
1167         __ASSUME_PRIVATE_FUTEX is set.
1169 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1171         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1172         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1173         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1174         (__pthread_rwlock_wrlock): Likewise.
1175         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1176         (pthread_rwlock_timedrdlock): Likewise.
1177         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1178         (pthread_rwlock_timedwrlock): Likewise.
1179         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1180         (__pthread_rwlock_unlock): Likewise.
1182 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1184         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1185         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1186         Split __flags into __flags, __shared, __pad1 and __pad2.
1187         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1188         futexes if they are available.
1189         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1190         in libc-lowlevellock.S allow using private futexes.
1191         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1192         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1193         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1194         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1195         lll_private_futex_timed_wait and lll_private_futex_wake.
1196         (lll_robust_mutex_unlock): Fix typo.
1197         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1198         field in futex command setup.
1199         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1200         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1201         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1202         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1203         if they are available.  Remove clear_once_control.
1204         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1205         futexes if they are available.
1206         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1207         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1208         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1209         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1210         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1211         Wake only when there are waiters.
1212         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1213         support.  Indicate that there are waiters.  Remove unnecessary
1214         extra cancellation test.
1215         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1216         left-over duplication of __sem_wait_cleanup.
1218 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1220         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1221         parameter to lll_futex_wait, lll_futex_timed_wait, and
1222         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1223         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1224         lll_private_futex_wake.
1225         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1226         * allocatestack.c: Adjust use of lll_futex_* macros.
1227         * init.c: Likewise.
1228         * lowlevellock.h: Likewise.
1229         * pthread_barrier_wait.c: Likewise.
1230         * pthread_cond_broadcast.c: Likewise.
1231         * pthread_cond_destroy.c: Likewise.
1232         * pthread_cond_signal.c: Likewise.
1233         * pthread_cond_timedwait.c: Likewise.
1234         * pthread_cond_wait.c: Likewise.
1235         * pthread_create.c: Likewise.
1236         * pthread_mutex_lock.c: Likewise.
1237         * pthread_mutex_setprioceiling.c: Likewise.
1238         * pthread_mutex_timedlock.c: Likewise.
1239         * pthread_mutex_unlock.c: Likewise.
1240         * pthread_rwlock_timedrdlock.c: Likewise.
1241         * pthread_rwlock_timedwrlock.c: Likewise.
1242         * pthread_rwlock_unlock.c: Likewise.
1243         * sysdeps/alpha/tls.h: Likewise.
1244         * sysdeps/i386/tls.h: Likewise.
1245         * sysdeps/ia64/tls.h: Likewise.
1246         * sysdeps/powerpc/tls.h: Likewise.
1247         * sysdeps/pthread/aio_misc.h: Likewise.
1248         * sysdeps/pthread/gai_misc.h: Likewise.
1249         * sysdeps/s390/tls.h: Likewise.
1250         * sysdeps/sh/tls.h: Likewise.
1251         * sysdeps/sparc/tls.h: Likewise.
1252         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1253         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1254         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1255         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1256         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1257         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1258         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1259         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1260         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1261         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1262         Likewise.
1263         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1264         * sysdeps/x86_64/tls.h: Likewise.
1266 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1268         * pthread_getattr_np.c: No need to install a cancellation handler,
1269         this is no cancellation point.
1270         * pthread_getschedparam.c: Likewise.
1271         * pthread_setschedparam.c: Likewise.
1272         * pthread_setschedprio.c: Likewise.
1273         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1274         lll_unlock_wake_cb.
1275         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1276         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1277         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1278         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1279         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1280         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1281         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1282         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1283         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1284         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1285         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1286         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1288         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1289         whether there are more than one thread makes no sense here since
1290         we only call the slow path if the locks are taken.
1291         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1293         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1294         COND_NWAITERS_SHIFT.
1295         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1296         COND_CLOCK_BITS.
1297         * pthread_cond_init.c: Likewise.
1298         * pthread_cond_timedwait.c: Likewise.
1299         * pthread_cond_wait.c: Likewise.
1300         * pthread_condattr_getclock.c: Likewise.
1301         * pthread_condattr_setclock.c: Likewise.
1302         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1303         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1304         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1306         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1308 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1310         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1311         unistd.h.
1313         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1314         insn suffix.
1315         (THREAD_GSCOPE_GET_FLAG): Remove.
1316         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1317         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1318         changes.
1319         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1320         (THREAD_GSCOPE_GET_FLAG): Remove.
1321         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1322         instead of THREAD_GSCOPE_GET_FLAG.
1323         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1324         it.
1325         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1326         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1327         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1328         THREAD_GSCOPE_WAIT): Define.
1329         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1330         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1331         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1332         THREAD_GSCOPE_WAIT): Define.
1333         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1334         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1335         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1336         THREAD_GSCOPE_WAIT): Define.
1337         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1338         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1339         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1340         THREAD_GSCOPE_WAIT): Define.
1342 2007-05-24  Richard Henderson  <rth@redhat.com>
1344         * descr.h (struct pthread): Add header.gscope_flag.
1345         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1346         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1347         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1348         THREAD_GSCOPE_WAIT): Define.
1350 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1352         * init.c: Make it compile with older kernel headers.
1354         * tst-initializers1.c: Show through exit code which test failed.
1356         * pthread_rwlock_init.c: Also initialize __shared field.
1357         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1358         element in rwlock structure into four byte elements.  One of them is
1359         the new __shared element.
1360         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1361         Likewise.
1362         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1363         __shared, adjust names of other padding elements.
1364         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1365         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1366         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1368         FUTEX_PRIVATE_FLAG.
1369         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1370         futex to use private operations if possible.
1371         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1372         Likewise.
1373         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1374         Likewise.
1375         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1376         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1377         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1378         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1379         Likewise.
1380         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1381         Likewise.
1382         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1383         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1385 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1387         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1388         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1389         * pthread_rwlock_timedrdlock.c: Likewise.
1390         * pthread_rwlock_tryrdlock.c: Likewise.
1392         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1393         optimization.
1395         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1396         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1397         duplication of __sem_wait_cleanup.
1399         * allocatestack.c: Revert last change.
1400         * init.c: Likewise.
1401         * sysdeps/i386/tls.h: Likewise.
1402         * sysdeps/x86_64/tls.h: Likewise.
1403         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1404         header structure.
1405         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1407         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1408         Add private field.
1409         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1410         * pthread_barrier_init.c: Set private flag if pshared and private
1411         futexes are supported.
1412         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1413         private field in futex command setup.
1414         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1416 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1418         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1419         support.
1420         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1421         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1422         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1423         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1424         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1426         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1427         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1428         fields in the structure.
1429         (__old_sem_init): New function.
1430         * sem_open.c: Initialize all fields of the structure.
1431         * sem_getvalue.c: Adjust for renamed element.
1432         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1433         (gen-as-const-headers): Add structsem.sym.
1434         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1435         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1436         struct new_sem.  Add struct old_sem.
1437         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1438         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1439         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1440         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1441         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1442         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1443         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1444         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1445         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1446         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1447         * tst-sem10.c: New file.
1448         * tst-sem11.c: New file.
1449         * tst-sem12.c: New file.
1450         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1451         of struct sem.
1453 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1454             Jakub Jelinek  <jakub@redhat.com>
1456         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1457         Move __pthread_enable_asynccancel right before futex syscall.
1458         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1459         Likewise.
1461 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1463         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1464         THREAD_COPY_PRIVATE_FUTEX): Define.
1465         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1466         THREAD_COPY_PRIVATE_FUTEX): Define.
1467         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1468         * init.c (__pthread_initialize_minimal_internal): Use
1469         THREAD_SET_PRIVATE_FUTEX.
1471         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1472         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1473         THREAD_GSCOPE_FLAG_WAIT): Define.
1474         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1475         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1476         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1477         PTR_DEMANGLE.
1478         (THREAD_GSCOPE_GET_FLAG): Define.
1479         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1480         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1481         instead of ->header.gscope_flag directly.
1483 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1485         * init.c (__pthread_initialize_minimal_internal): Check whether
1486         private futexes are available.
1487         * allocatestack.c (allocate_stack): Copy private_futex field from
1488         current thread into the new stack.
1489         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1490         futexes if they are available.
1491         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1492         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1493         in libc-lowlevellock.S allow using private futexes.
1494         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1495         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1496         FUTEX_PRIVATE_FLAG.
1497         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1498         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1499         if they are available.
1500         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1501         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1502         * sysdeps/i386/tcb-offsets.sym: Likewise.
1503         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1504         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1506 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1508         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1509         Remove ptr_wait_lookup_done again.
1510         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1511         (__pthread_initialize_minimal_internal): Initialize
1512         _dl_wait_lookup_done pointer in _rtld_global directly.
1513         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1514         Remove code to code _dl_wait_lookup_done.
1515         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1516         encrypted for now.
1518 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1520         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1521         pthread_mutex_init failed with ENOTSUP.
1523 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1525         * allocatestack.c (__wait_lookup_done): New function.
1526         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1527         Add ptr_wait_lookup_done.
1528         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1529         * pthreadP.h: Declare __wait_lookup_done.
1530         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1531         Define macros to implement reference handling of global scope.
1532         * sysdeps/x86_64/tls.h: Likewise.
1533         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1534         Initialize GL(dl_wait_lookup_done).
1536 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1538         [BZ #4512]
1539         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1540         is detected.
1541         * pthread_mutex_timedlock.c: Likewise.
1542         * pthread_mutex_trylock.c: Likewise.
1543         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1545         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1546         * tst-robust9.c: New file.
1547         * tst-robustpi9.c: New file.
1549         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1550         unnecessary extra cancellation test.
1552 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1554         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1555         extra cancellation test.
1556         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1558 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1560         * descr.h (struct pthread): Rearrange members to fill hole in
1561         64-bit layout.
1563         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1564         (__pthread_setaffinity_new): If syscall was successful and
1565         RESET_VGETCPU_CACHE is defined, use it before returning.
1566         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1568 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1570         [BZ #4455]
1571         * tst-align2.c: Include stackinfo.h.
1572         * tst-getpid1.c: Likewise.
1574 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1576         [BZ #4455]
1577         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1578         * tst-getpid1.c (do_test): Likewise.
1580         [BZ #4456]
1581         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1582         (allocate_stack): Likewise.
1584 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1586         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1587         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1588         (__lll_robust_timedlock_wait): Likewise.
1589         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1591 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1593         [BZ #4465]
1594         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1595         * tst-cancel4.c (tf_fdatasync): New test.
1597 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1599         [BZ #4392]
1600         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1601         check mutexes like normal mutexes.
1603         [BZ #4306]
1604         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1605         Initialize the whole sigevent structure to appease valgrind.
1607 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1609         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1610         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1612 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1614         * tst-locale1.c: Avoid warnings.
1615         * tst-locale2.c: Likewise.
1617 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1619         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1620         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1622 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1624         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1625         __extern_always_inline where appropriate.
1626         * sysdeps/pthread/pthread.h: Likewise.
1628 2007-03-13  Richard Henderson  <rth@redhat.com>
1630         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1631         separate cfi regions for the two subsections.
1633 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1635         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1636         new thread, don't just decrement it.
1637         Patch by Suzuki K P <suzuki@in.ibm.com>.
1639 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1641         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1642         PTHFCT_CALL definition.
1644 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1646         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1647         available, don't use it.
1649 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1651         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1652         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1653         call into the kernel to delay.
1655 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1657         * tst-initializers1.c: We want to test the initializers as seen
1658         outside of libc, so undefined _LIBC.
1660         * pthread_join.c (cleanup): Avoid warning.
1662 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1664         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1665         (__lll_timedwait_tid): Add unwind info.
1667         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1668         function table, mangle the pointers.
1669         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1670         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1671         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1672         demangle pointers before use.
1673         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1674         demangle pointer.
1675         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1676         * sysdeps/pthread/setxid.h: Likewise.
1678 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1680         * tst-rwlock7.c: Show some more information in case of correct
1681         behavior.
1683 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1685         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1686         (lll_futex_timed_wait): Undo part of last change, don't negate
1687         return value.
1689 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1691         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1692         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1694 2006-12-28  David S. Miller  <davem@davemloft.net>
1696         * shlib-versions: Fix sparc64 linux target specification.
1698 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1700         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1701         Adjust include path for pthread_barrier_wait.c move.
1703 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1705         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1706         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1708 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1710         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1711         6 argument cancellable syscalls.
1712         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1713         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1714         6 argument cancellable syscalls.
1715         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1717 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1719         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1720         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1722 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1724         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1725         __sync_lock_release instead of __sync_lock_release_si.
1727 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1729         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1730         Define.
1731         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1732         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1733         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1734         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1735         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1736         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1737         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1738         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1739         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1740         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1741         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1743 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1745         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1746         * pthread_barrier_wait.c: ...here.
1747         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1748         * pthread_cond_broadcast.c: ...here.
1749         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1750         * pthread_cond_signal.c: ...here.
1751         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1752         * pthread_cond_timedwait.c: ...here.
1753         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1754         * pthread_cond_wait.c: ...here.
1755         * sysdeps/pthread/pthread_once.c: Move to...
1756         * pthread_once.c: ...here.
1757         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1758         * pthread_rwlock_rdlock.c: ...here.
1759         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1760         * pthread_rwlock_timedrdlock.c: ...here.
1761         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1762         * pthread_rwlock_timedwrlock.c: ...here.
1763         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1764         * pthread_rwlock_unlock.c: ...here.
1765         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1766         * pthread_rwlock_wrlock.c: ...here.
1767         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1768         * pthread_spin_destroy.c: ...here.
1769         * sysdeps/pthread/pthread_spin_init.c: Move to...
1770         * pthread_spin_init.c: ...here.
1771         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1772         * pthread_spin_unlock.c: ...here.
1773         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1774         * pthread_getcpuclockid.c: ...here.
1776         * init.c: USE_TLS support is now always enabled.
1777         * tst-tls5.h: Likewise.
1778         * sysdeps/alpha/tls.h: Likewise.
1779         * sysdeps/i386/tls.h: Likewise.
1780         * sysdeps/ia64/tls.h: Likewise.
1781         * sysdeps/powerpc/tls.h: Likewise.
1782         * sysdeps/s390/tls.h: Likewise.
1783         * sysdeps/sh/tls.h: Likewise.
1784         * sysdeps/sparc/tls.h: Likewise.
1785         * sysdeps/x86_64/tls.h: Likewise.
1787 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1789         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1790         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1791         failed.
1793         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1794         Define to THREAD_SELF->header.multiple_threads.
1795         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1796         Likewise.
1797         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1798         Likewise.
1799         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1800         (SINGLE_THREAD_P): Likewise.
1801         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1802         (SINGLE_THREAD_P): Likewise.
1803         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1804         (SINGLE_THREAD_P): Likewise.
1805         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1806         (SINGLE_THREAD_P): Likewise.
1807         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1808         Likewise.
1809         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1810         (SINGLE_THREAD_P): Likewise.
1811         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1812         (SINGLE_THREAD_P): Likewise.
1813         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1814         Likewise.
1816 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1818         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1819         by default rather than 2_3_3.
1821 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1823         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1824         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1825         atomic_* instead of catomic_* macros.
1827 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1829         [BZ #3285]
1830         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1831         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1832         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1833         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1834         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1835         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1836         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1837         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1838         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1839         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1840         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1841         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1842         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1844 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1846         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1847         cancelable syscalls with six parameters.
1849         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1850         operations instead of atomic_*.
1852 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1854         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1856 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1858         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1859         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1860         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1861         New file.
1862         * pthread_attr_setstack.c: Allow overwriting the version number of the
1863         new symbol.
1864         * pthread_attr_setstacksize.c: Likewise.
1865         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1866         it.
1867         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1868         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1870 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1872         [BZ #3251]
1873         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1874         Patch by Petr Baudis.
1876 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1878         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1880         * tst-cancel2.c (tf): Loop as long as something was written.
1882 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1884         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1885         mutexes wake all mutexes.
1886         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1887         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1888         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1890 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1892         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1893         to guarantee the thread is always canceled.
1895 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1897         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1898         Include stdlib.h.
1899         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1900         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1902         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1903         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1905 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1907         [BZ #3123]
1908         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1909         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1910         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1912         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1913         * Makefile (tests): Add tst-cond22.
1914         * tst-cond22.c: New file.
1916 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1918         [BZ #3124]
1919         * descr.h (struct pthread): Add parent_cancelhandling.
1920         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1921         cancelhandling value to child.
1922         * pthread_create.c (start_thread): If parent thread was canceled
1923         reset the SIGCANCEL mask.
1924         * Makefile (tests): Add tst-cancel25.
1925         * tst-cancel25.c: New file.
1927 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1928             Ulrich Drepper  <drepper@redhat.com>
1930         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1931         counterp if it is already zero.
1932         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1934 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1935             Roland McGrath  <roland@redhat.com>
1937         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1938         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1939         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1940         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1941         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1942         lll_robust_mutex_timedlock, lll_mutex_unlock,
1943         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1944         Add _L_*_ symbols around the subsection.
1945         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1946         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1948 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1949             Roland McGrath  <roland@redhat.com>
1951         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1952         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1953         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1954         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1955         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1956         lll_robust_mutex_timedlock, lll_mutex_unlock,
1957         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1958         Add _L_*_ symbols around the subsection.
1959         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1960         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1962 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1964         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1965         change because it can disturb too much existing code.  If real hard
1966         reader preference is needed we'll introduce another type.
1967         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1968         (pthread_rwlock_timedwrlock): Likewise.
1969         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1970         Likewise.
1972 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1974         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1975         reader preference.
1976         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1977         (pthread_rwlock_timedwrlock): Likewise.
1978         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1979         Likewise.
1981 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1983         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1984         Only define ifdef SHARED.
1986 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1988         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1989         (free_stacks): ...here.
1990         (__free_stack_cache): New function.
1991         * pthreadP.h: Declare __free_stack_cache.
1992         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1993         ptr_freeres.
1994         * init.c (pthread_functions): Initialize ptr_freeres.
1995         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
1996         New freeres function.
1998 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2000         [BZ #3018]
2001         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2003 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2005         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2006         _XOPEN_REALTIME_THREADS.
2008 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2010         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2011         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2012         HAVE_CLOCK_GETTIME_VSYSCALL.
2013         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2015 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2017         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2018         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2019         * descr.h (struct priority_protection_data): New type.
2020         (struct pthread): Add tpp field.
2021         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2022         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2023         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2024         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2025         TPP mutexes.
2026         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2027         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2028         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2029         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2030         * tpp.c: New file.
2031         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2032         boosted by TPP.
2033         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2034         * pthread_mutexattr_getprioceiling.c
2035         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2036         in the SCHED_FIFO priority range.
2037         * pthread_mutexattr_setprioceiling.c
2038         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2039         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2040         if mutex is not TPP.  Ceiling is now in __data.__lock.
2041         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2042         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2043         is now in __data.__lock.  Add locking.
2044         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2045         * Makefile (libpthread-routines): Add tpp.
2046         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2047         * tst-tpp.h: New file.
2048         * tst-mutexpp1.c: New file.
2049         * tst-mutexpp6.c: New file.
2050         * tst-mutexpp10.c: New file.
2051         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2052         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2054 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2056         [BZ #2843]
2057         * pthread_join.c (pthread_join): Account for self being canceled
2058         when checking for deadlocks.
2059         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2060         (tf1): Don't print anything after pthread_join returns, this would be
2061         another cancellation point.
2062         (tf2): Likewise.
2063         * tst-join6.c: New file.
2064         * Makefile (tests): Add tst-join6.
2066 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2068         [BZ #2892]
2069         * pthread_setspecific.c (__pthread_setspecific): Check
2070         out-of-range index before checking for unused key.
2072         * sysdeps/pthread/gai_misc.h: New file.
2074 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2076         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2077         file.  Don't use sysctl.
2078         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2079         overwrite the file if this is likely not true.
2081 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2083         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2084         * Makefile (tests): Add tst-getpid3.
2085         * tst-getpid3.c: New file.
2087 2006-07-30  Roland McGrath  <roland@redhat.com>
2089         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2091         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2092         (pause_not_cancel): New macro.
2093         (nanosleep_not_cancel): New macro.
2094         (sigsuspend_not_cancel): New macro.
2095         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2096         nanosleep_not_cancel macro from <not-cancel.h>.
2097         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2098         macro from <not-cancel.h>.
2100 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2101             Jakub Jelinek  <jakub@redhat.com>
2103         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2104         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2105         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2106         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2107         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2108         * pthread_mutex_lock.c: Likewise.
2109         * pthread_mutex_timedlock.c: Likewise.
2110         * pthread_mutex_trylock.c: Likewise.
2111         * pthread_mutex_unlock.c: Likewise.
2112         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2113         all mutexes.
2114         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2116         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2117         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2118         pthread-pi-defines.sym.
2119         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2120         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2121         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2122         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2123         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2124         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2125         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2126         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2127         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2128         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2129         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2130         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2131         * tst-mutex2.c: Likewise.
2132         * tst-mutex3.c: Likewise.
2133         * tst-mutex4.c: Likewise.
2134         * tst-mutex5.c: Likewise.
2135         * tst-mutex6.c: Likewise.
2136         * tst-mutex7.c: Likewise.
2137         * tst-mutex7a.c: Likewise.
2138         * tst-mutex8.c: Likewise.
2139         * tst-mutex9.c: Likewise.
2140         * tst-robust1.c: Likewise.
2141         * tst-robust7.c: Likewise.
2142         * tst-robust8.c: Likewise.
2143         * tst-mutexpi1.c: New file.
2144         * tst-mutexpi2.c: New file.
2145         * tst-mutexpi3.c: New file.
2146         * tst-mutexpi4.c: New file.
2147         * tst-mutexpi5.c: New file.
2148         * tst-mutexpi6.c: New file.
2149         * tst-mutexpi7.c: New file.
2150         * tst-mutexpi7a.c: New file.
2151         * tst-mutexpi8.c: New file.
2152         * tst-mutexpi9.c: New file.
2153         * tst-robust1.c: New file.
2154         * tst-robust2.c: New file.
2155         * tst-robust3.c: New file.
2156         * tst-robust4.c: New file.
2157         * tst-robust5.c: New file.
2158         * tst-robust6.c: New file.
2159         * tst-robust7.c: New file.
2160         * tst-robust8.c: New file.
2161         * Makefile (tests): Add the new tests.
2163         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2164         * pthread_mutex_destroy.c: Remove unneeded label.
2166 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2168         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2169         computations to compile time.
2171 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2173         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2175 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2177         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2179 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2181         * pthread_key_create.c (__pthread_key_create): Do away with
2182         __pthread_keys_lock.
2184         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2185         (__kernel_cpumask_size): Mark as hidden.
2186         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2188         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2189         * semaphoreP.h (__sem_mappings_lock): Likewise.
2191 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2193         * pthread_atfork.c: Mark __dso_handle as hidden.
2195 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2197         [BZ #2644]
2198         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2199         the reload problem.  Change the one path in pthread_cancel_init
2200         which causes the problem.  Force gcc to reload.  Simplify callers.
2201         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2202         (_Unwind_GetBSP): Undo last patch.
2204 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2206         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2207         function pointer is reloaded after pthread_cancel_init calls.
2209         [BZ #2644]
2210         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2211         pointers are reloaded after pthread_cancel_init calls.
2213 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2215         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2216         __always_inline.
2218 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2220         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2221         Allocate new object which is passed to timer_sigev_thread so that
2222         the timer can be deleted before the new thread is scheduled.
2224 2006-04-26  Roland McGrath  <roland@redhat.com>
2226         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2228 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2230         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2231         suffix for conditional jumps.
2232         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2233         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2234         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2235         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2236         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2237         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2239         * init.c (sigcancel_handler): Compare with correct PID even if the
2240         thread is in the middle of a fork call.
2241         (sighandler_setxid): Likewise.
2242         Reported by Suzuki K P <suzuki@in.ibm.com> .
2244 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2246         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2248 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2250         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2251         fails [Coverity CID 105].
2253 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2255         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2257 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2259         [BZ #2505]
2260         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2261         Define __lll_rel_instr using lwsync.
2263 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2265         * allocatestack.c (allocate_stack): Always initialize robust_head.
2266         * descr.h: Define struct robust_list_head.
2267         (struct pthread): Use robust_list_head in robust mutex list definition.
2268         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2269         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2270         (__pthread_initialize_minimal_internal): Register robust_list with
2271         the kernel.
2272         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2273         Declare __set_robust_list_avail.
2274         * pthread_create.c (start_thread): Register robust_list of new thread.
2275         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2276         waiters.
2277         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2278         number of users, it's unreliable.
2279         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2280         set_robust_list syscall is available.
2281         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2282         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2283         Set robust_head.list_op_pending before trying to lock a robust mutex.
2284         * pthread_mutex_timedlock.c: Likewise.
2285         * pthread_mutex_trylock.c: Likewise.
2286         * pthread_mutex_unlock.c: Likewise for unlocking.
2287         * Makefile (tests): Add tst-robust8.
2288         * tst-robust8.c: New file.
2290 2006-03-08  Andreas Schwab  <schwab@suse.de>
2292         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2293         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2295 2006-03-05  Roland McGrath  <roland@redhat.com>
2297         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2298         and $config_os doesn't match *linux*.
2300 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2302         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2303         Use __syscall_error.
2304         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2305         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2306         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2307         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2308         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2309         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2311 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2313         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2315 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2317         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2318         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2319         mutex.
2320         (__lll_robust_timedlock_wait): Likewise.
2321         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2322         (__lll_robust_lock_wait): Likewise.
2323         (__lll_robust_timedlock_wait): Likewise.
2324         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2325         (__lll_robust_lock_wait): Likewise.
2326         (__lll_robust_timedlock_wait): Likewise.
2328 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2330         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2331         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2332         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2333         lll_robust_mutex_unlock): Define.
2334         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2336 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2338         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2339         instead of <clone.S>.
2341 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2343         * Makefile (libpthread-routines): Add
2344         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2345         and pthread_mutex_[sg]etprioceiling.
2346         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2347         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2348         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2349         pthread_mutex_setprioceiling.
2350         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2351         PTHREAD_PRIO_PROTECT): New enum values.
2352         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2353         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2354         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2355         prototypes.
2356         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2357         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2358         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2359         Define.
2360         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2361         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2362         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2363         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2364         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2365         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2366         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2367         protocol mutexes.
2368         * pthread_mutex_getprioceiling.c: New file.
2369         * pthread_mutex_setprioceiling.c: New file.
2370         * pthread_mutexattr_getprioceiling.c: New file.
2371         * pthread_mutexattr_setprioceiling.c: New file.
2372         * pthread_mutexattr_getprotocol.c: New file.
2373         * pthread_mutexattr_setprotocol.c: New file.
2375 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2377         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2379 2006-02-27  Roland McGrath  <roland@redhat.com>
2381         * sysdeps/pthread/Subdirs: List nptl here too.
2382         * configure (libc_add_on_canonical): New variable.
2384         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2386         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2387         self to get main source tree's file.
2388         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2389         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2390         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2391         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2392         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2393         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2394         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2395         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2396         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2397         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2398         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2399         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2400         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2402         * Makefile: Use $(sysdirs) in vpath directive.
2404         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2405         (CPPFLAGS-timer_routines.c): Likewise.
2407         * Makeconfig (includes): Variable removed.
2409 2006-02-26  Roland McGrath  <roland@redhat.com>
2411         * sysdeps/generic/pt-raise.c: Moved to ...
2412         * pt-raise.c: ... here.
2413         * sysdeps/generic/lowlevellock.h: Moved to ...
2414         * lowlevellock.h: ... here.
2416 2006-02-23  Roland McGrath  <roland@redhat.com>
2418         * descr.h (struct pthread): Add final member `end_padding'.
2419         (PTHREAD_STRUCT_END_PADDING): Use it.
2421 2006-02-20  Roland McGrath  <roland@redhat.com>
2423         * sysdeps/mips: Directory removed, saved in ports repository.
2424         * sysdeps/unix/sysv/linux/mips: Likewise.
2426 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2428         * tst-robust1.c: Add second mutex to check that the mutex list is
2429         handled correctly.
2431 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2433         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2434         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2435         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2436         lll_robust_mutex_unlock): New macros.
2437         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2438         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2439         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2440         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2441         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2443 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2445         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2446         definitions.
2447         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2449 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2451         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2452         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2453         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2454         (lll_robust_mutex_unlock): Likewise.
2456 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2458         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2459         Set robust_list.__next rather than robust_list.
2460         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2461         (__pthread_list_t): New typedef.
2462         (pthread_mutex_t): Replace __next and __prev fields with __list.
2463         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2464         (__pthread_list_t): New typedef.
2465         (pthread_mutex_t): Replace __next and __prev fields with __list.
2466         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2467         (__pthread_list_t, __pthread_slist_t): New typedefs.
2468         (pthread_mutex_t): Replace __next and __prev fields with __list.
2469         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2470         (__pthread_list_t, __pthread_slist_t): New typedefs.
2471         (pthread_mutex_t): Replace __next and __prev fields with __list.
2472         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2473         (__pthread_list_t, __pthread_slist_t): New typedefs.
2474         (pthread_mutex_t): Replace __next and __prev fields with __list.
2475         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2476         (__pthread_slist_t): New typedef.
2477         (pthread_mutex_t): Replace __next field with __list.
2479 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2481         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2482         PTHREAD_MUTEX_OWNERDEAD.
2483         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2484         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2485         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2486         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2487         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2488         to PTHREAD_MUTEX_INCONSISTENT.
2489         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2490         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2491         * pthread_mutex_trylock.c: Likewise.
2492         * pthread_mutex_timedlock.c: Likewise.
2493         * pthread_mutex_unlock.c: Likewise.
2494         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2495         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2496         lowlevelrobustlock.sym.
2497         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2498         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2499         definitions.
2500         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2501         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2502         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2503         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2504         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2506 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2508         * allocatestack.c (allocate_stack): Initialize robust_list.
2509         * init.c (__pthread_initialize_minimal_internal): Likewise.
2510         * descr.h (struct xid_command): Pretty printing.
2511         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2512         robust_list.  Adjust macros.
2513         * pthread_create.c (start_thread): Adjust robust_list handling.
2514         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2515         but the owner for all robust mutex types.
2516         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2517         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2518         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2519         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2521         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2522         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2524 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2526         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2527         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2529 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2531         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2532         Return status.
2533         (lll_futex_timed_wait): Define.
2535 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2537         * tst-cancel4.c: Test ppoll.
2539 2006-01-18  Andreas Jaeger  <aj@suse.de>
2541         [BZ #2167]
2542         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2543         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2544         by Jim Gifford <patches@jg555.com>.
2546 2006-01-13  Richard Henderson  <rth@redhat.com>
2548         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2550 2006-01-10  Roland McGrath  <roland@redhat.com>
2552         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2553         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2554         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2555         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2556         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2557         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2558         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2559         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2560         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2561         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2563 2006-01-09  Roland McGrath  <roland@redhat.com>
2565         * tst-initializers1-c89.c: New file.
2566         * tst-initializers1-c99.c: New file.
2567         * tst-initializers1-gnu89.c: New file.
2568         * tst-initializers1-gnu99.c: New file.
2569         * Makefile (tests): Add them.
2570         (CFLAGS-tst-initializers1-c89.c): New variable.
2571         (CFLAGS-tst-initializers1-c99.c): New variable.
2572         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2573         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2575         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2576         Use __extension__ on anonymous union definition.
2577         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2578         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2579         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2580         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2581         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2583 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2585         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2586         Don't give the union a name because it changes the mangled name.
2587         Instead name the struct for __data.
2588         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2589         Likewise.
2590         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2591         Likewise.
2593 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2595         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2596         stack bias to mc_ftp field.
2598 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2600         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2601         being too clever and reloading the futex value where it shouldn't.
2603 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2605         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2606         correct type.
2608 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2610         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2611         Add cfi directives.
2613 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2615         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2616         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2617         rename in tcbhead_t.
2619         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2620         Don't give the union a name because it changes the mangled name.
2621         Instead name the struct for __data.
2622         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2623         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2624         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2625         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2626         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2627         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2629 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2631         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2632         Return status.
2633         (lll_futex_timed_wait): Define.
2634         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2635         * sysdeps/pthread/aio_misc.h: New file.
2637 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2639         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2641 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2643         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2644         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2645         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2647 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2649         * tst-cancel24.cc: Use C headers instead of C++ headers.
2651 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2653         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2654         sparc-linux configured glibc.
2655         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2656         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2657         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2658         atomic_compare_and_exchange_val_24_acq instead of
2659         atomic_compare_and_exchange_val_acq.
2660         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2661         instead of atomic_exchange_rel.
2662         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2663         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2664         file.
2665         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2666         file.
2667         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2668         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2669         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2670         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2671         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2672         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2673         New file.
2674         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2675         New file.
2676         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2677         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2678         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2679         file.
2680         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2681         file.
2682         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2684 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2686         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2687         mutex initializers.
2689 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2691         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2692         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2693         THREAD_COPY_POINTER_GUARD): Define.
2694         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2695         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2697 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2699         * version.c: Update copyright year.
2701 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2703         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2704         .eh_frame section, use cfi_* directives.
2705         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2707 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2709         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2710         now.
2712 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2714         * sysdeps/pthread/sigaction.c: Removed.
2715         * sigaction.c: New file.
2716         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2718 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2720         * Makefile (tests): Add tst-signal7.
2721         * tst-signal7.c: New file.
2723 2005-12-27  Roland McGrath  <roland@redhat.com>
2725         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2726         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2727         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2728         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2729         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2730         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2731         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2732         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2733         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2734         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2735         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2737 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2739         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2740         and __prev field to pthread_mutex_t.
2741         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2742         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2743         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2744         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2745         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2746         to pthread_mutex_t.
2748 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2750         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2751         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2752         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2753         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2754         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2755         and PTHREAD_MUTEXATTR_FLAG_BITS.
2756         * descr.h (struct pthread): Add robust_list field and define
2757         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2758         * pthread_mutexattr_getrobust.c: New file.
2759         * pthread_mutexattr_setrobust.c: New file.
2760         * pthread_mutex_consistent.c: New file.
2761         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2762         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2763         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2764         Adjust pthread_mutex_t initializers.
2765         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2766         field to pthread_mutex_t.
2767         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2768         and __prev field to pthread_mutex_t.
2769         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2770         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2771         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2772         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2773         * pthread_mutexattr_gettype.c: Likewise.
2774         * pthread_mutexattr_setpshared.c: Likewise.
2775         * pthread_mutexattr_settype.c: Likewise.
2776         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2777         Initialize mutex kind according to robust flag.
2778         * pthread_mutex_lock.c: Implement local robust mutex.
2779         * pthread_mutex_timedlock.c: Likewise.
2780         * pthread_mutex_trylock.c: Likewise.
2781         * pthread_mutex_unlock.c: Likewise.
2782         * pthread_create.c (start_thread): Mark robust mutexes which remained
2783         locked as dead.
2784         * tst-robust1.c: New file.
2785         * tst-robust2.c: New file.
2786         * tst-robust3.c: New file.
2787         * tst-robust4.c: New file.
2788         * tst-robust5.c: New file.
2789         * tst-robust6.c: New file.
2790         * tst-robust7.c: New file.
2791         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2792         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2793         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2794         tst-robust5, tst-robust6, and tst-robust7.
2796         * tst-typesizes.c: New file.
2797         * Makefile (tests): Add tst-typesizes.
2799         * tst-once3.c: More debug output.
2801 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2803         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2804         missing after last change.
2806         * version.c: Update copyright year.
2808 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2810         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2811         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2812         * pthread_mutex_trylock.c: Likewise.
2813         * pthread_mutex_timedlock.c: Likewise.
2814         * pthread_mutex_unlock.c: Likewise.
2816 2005-12-22  Roland McGrath  <roland@redhat.com>
2818         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2819         so that #include_next's search location is not reset to the -I..
2820         directory where <nptl/...> can be found.
2822 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2824         [BZ #1913]
2825         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2826         Fix unwind info.  Remove useless branch prediction prefix.
2827         * tst-cancel24.cc: New file.
2828         * Makefile: Add rules to build and run tst-cancel24.
2830 2005-12-21  Roland McGrath  <roland@redhat.com>
2832         * libc-cancellation.c: Use <> rather than "" #includes.
2833         * pt-cleanup.c: Likewise.
2834         * pthread_create.c: Likewise.
2835         * pthread_join.c: Likewise.
2836         * pthread_timedjoin.c: Likewise.
2837         * pthread_tryjoin.c: Likewise.
2838         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2839         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2840         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2841         * unwind.c: Likewise.
2843 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2845         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2846         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2847         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2848         THREAD_COPY_POINTER_GUARD): Define.
2850 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2852         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2853         rather than one.
2854         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2855         THREAD_COPY_POINTER_GUARD): Define.
2856         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2857         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2858         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2859         THREAD_COPY_POINTER_GUARD): Define.
2860         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2861         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2862         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2863         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2864         Use PTR_DEMANGLE for B0 if defined.
2866 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2868         * pthread_create.c (__pthread_create_2_1): Use
2869         THREAD_COPY_POINTER_GUARD if available.
2870         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2871         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2872         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2873         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2874         * sysdeps/x86_64/tls.h: Likewise.
2876 2005-12-15  Roland McGrath  <roland@redhat.com>
2878         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2880 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2882         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2883         sysdeps/generic.
2884         * errno-loc.c: New file.
2886 2005-12-12  Roland McGrath  <roland@redhat.com>
2888         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2889         adjustments before choosing stack size.  Update minimum stack size
2890         calculation to match allocate_stack change.
2892 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2894         * allocatestack.c (allocate_stack): Don't demand that there is an
2895         additional full page available on the stack beside guard, TLS, the
2896         minimum stack.
2898 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2900         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2901         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2903         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2904         compiling 32-bit code we must define __cleanup_fct_attribute.
2906 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2908         [BZ #1920]
2909         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2910         __attribute__ instead of __attribute.
2911         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2912         (__cleanup_fct_attribute): Likewise.
2914 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2916         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2917         a write barrier before writing libgcc_s_getcfa.
2919 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2921         * sysdeps/unix/sysv/linux/configure: Removed.
2923 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2925         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2926         optional init_array/fini_array support.
2928 2005-10-24  Roland McGrath  <roland@redhat.com>
2930         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2931         versioned_symbol use.
2933 2005-10-16  Roland McGrath  <roland@redhat.com>
2935         * init.c (__pthread_initialize_minimal_internal): Even when using a
2936         compile-time default stack size, apply the minimum that allocate_stack
2937         will require, and round up to page size.
2939 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2941         * Makefile ($(test-modules)): Remove static pattern rule.
2943 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2944             Ulrich Drepper  <drepper@redhat.com>
2946         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2947         alignment in callback function.
2948         * Makefile: Add rules to build and run tst-align3.
2949         * tst-align3.c: New file.
2951 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2953         * allocatestack.c (setxid_signal_thread): Add
2954         INTERNAL_SYSCALL_DECL (err).
2956 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2958         * allocatestack.c (setxid_signal_thread): Need to use
2959         atomic_compare_and_exchange_bool_acq.
2961 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2962             Jakub Jelinek  <jakub@redhat.com>
2964         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2965         CANCEL_RESTMASK.
2966         (struct pthread): Move specific_used field to avoid padding.
2967         Add setxid_futex field.
2968         * init.c (sighandler_setxid): Reset setxid flag and release the
2969         setxid futex.
2970         * allocatestack.c (setxid_signal_thread): New function.  Broken
2971         out of the bodies of the two loops in __nptl_setxid.  For undetached
2972         threads check whether they are exiting and if yes, don't send a signal.
2973         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2974         * pthread_create.c (start_thread): For undetached threads, check
2975         whether setxid bit is set.  If yes, wait until signal has been
2976         processed.
2978         * allocatestack.c (STACK_VARIABLES): Initialize them.
2979         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2981 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2983         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2984         waiters, awake all waiters on the associated mutex.
2986 2005-09-22  Roland McGrath  <roland@redhat.com>
2988         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2989         ../sysdeps/x86_64/hp-timing.h).
2991 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
2993         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
2994         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2995         (lll_futex_wake_unlock): Define.
2996         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
2997         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2998         (lll_futex_wake_unlock): Define.
2999         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3000         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3001         (lll_futex_wake_unlock): Define.
3002         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3003         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3004         (lll_futex_wake_unlock): Define.
3005         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3006         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3007         (lll_futex_wake_unlock): Define.
3008         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3009         lll_futex_wake_unlock.
3010         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3011         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3012         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3013         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3014         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3015         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3017 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3019         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3020         Fix typo in register name.
3022 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3024         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3025         Use __sigfillset.  Document that sigfillset does the right thing wrt
3026         to SIGSETXID.
3028 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3030         [BZ #1102]
3031         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3032         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3033         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3034         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3035         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3036         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3037         in the structure.
3038         * Makefile (tests): Add tst-initializers1.
3039         (CFLAGS-tst-initializers1.c): Set.
3040         * tst-initializers1.c: New test.
3042 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3044         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3045         Make sure __flags are located at offset 48 from the start of the
3046         structure.
3048 2005-07-02  Roland McGrath  <roland@redhat.com>
3050         * Makeconfig: Comment fix.
3052 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3054         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3055         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3056         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3057         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3058         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3059         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3060         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3061         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3062         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3063         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3065 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3067         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3068         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3069         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3070         fields.
3071         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3072         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3073         field.  Put in sysinfo field unconditionally.
3074         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3075         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3076         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3077         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3078         fields.
3079         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3080         * pthread_create.c (__pthread_create_2_1): Use
3081         THREAD_COPY_STACK_GUARD macro.
3082         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3083         tests.
3084         * tst-stackguard1.c: New file.
3085         * tst-stackguard1-static.c: New file.
3087 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3089         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3090         Invoke CGOTSETUP and CGOTRESTORE.
3091         (CGOTSETUP, CGOTRESTORE): Define.
3093 2005-05-29  Richard Henderson  <rth@redhat.com>
3095         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3096         (tf_write, tf_writev): Use it.
3097         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3098         the system minimum.
3100 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3102         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3103         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3104         __librt_*_asynccancel@local.
3106 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3108         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3109         all occurrences of JUMPTARGET.  Instead append @local to labels.
3111 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3113         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3114         size/alignment of struct pthread rather than tcbhead_t.
3115         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3116         Likewise.
3117         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3118         Likewise.
3119         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3120         Likewise.
3122 2005-05-19  Richard Henderson  <rth@redhat.com>
3124         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3125         __sync_val_compare_and_swap, not explicit _si variant.
3126         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3128 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3130         [BZ #915]
3131         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3133 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3135         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3136         .eh_frame section, use cfi_* directives.
3138 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3140         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3141         of "" includes.
3143 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3145         [BZ #1075]
3146         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3147         aio_write blocks.
3149 2005-04-27  Roland McGrath  <roland@redhat.com>
3151         * Makefile (tests): Remove tst-clock2.
3153         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3154         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3155         translating to the kernel clockid_t for our own process/thread clock.
3157         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3159 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3161         * old_pthread_cond_init.c: Include <errno.h>.
3162         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3163         process shared or uses clock other than CLOCK_REALTIME.
3164         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3166 2005-04-13  David S. Miller  <davem@davemloft.net>
3168         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3169         * sysdeps/sparc/sparc64/clone.S: New file.
3171 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3173         [BZ #1102]
3174         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3175         __inline instead of inline.
3176         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3178 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3180         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3181         functionally equivalent, but shorter instructions.
3182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3183         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3184         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3185         Likewise.
3186         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3187         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3188         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3189         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3191         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3192         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3193         Likewise.
3194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3195         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3197         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3198         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3200 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3202         * sysdeps/mips/Makefile: New file.
3203         * sysdeps/mips/nptl-sysdep.S: New file.
3204         * sysdeps/mips/tcb-offsets.sym: New file.
3205         * sysdeps/mips/pthread_spin_lock.S: New file.
3206         * sysdeps/mips/pthread_spin_trylock.S: New file.
3207         * sysdeps/mips/pthreaddef.h: New file.
3208         * sysdeps/mips/tls.h: New file.
3209         * sysdeps/mips/jmpbuf-unwind.h: New file.
3210         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3211         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3212         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3213         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3214         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3215         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3216         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3217         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3218         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3219         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3221 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3223         [BZ #1112]
3224         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3225         variable to scerr.
3227 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3229         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3231 2005-02-25  Roland McGrath  <roland@redhat.com>
3233         * alloca_cutoff.c: Correct license text.
3234         * tst-unload.c: Likewise.
3235         * sysdeps/pthread/allocalim.h: Likewise.
3236         * sysdeps/pthread/pt-initfini.c: Likewise.
3237         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3238         * sysdeps/pthread/bits/sigthread.h: Likewise.
3239         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3240         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3242 2005-02-16  Roland McGrath  <roland@redhat.com>
3244         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3245         Use unsigned int * for ptr_nthreads.
3247 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3249         [BZ #721]
3250         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3251         gcc4.
3253 2005-02-07  Richard Henderson  <rth@redhat.com>
3255         [BZ #787]
3256         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3257         argument.
3259 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3261         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3262         order of arguments in invocation of atomic_add_zero.
3264 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3266         [BZ #737]
3267         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3268         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3269         at least gotntpoff relocation and addition.
3270         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3271         Likewise.
3272         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3273         Likewise.
3274         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3275         Likewise.
3277 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3279         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3280         entry for static tls deallocation fix.
3281         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3282         also contains information whether the memory pointed to is static
3283         TLS or not.
3284         * sysdeps/i386/tls.h: Likewise.
3285         * sysdeps/ia64/tls.h: Likewise.
3286         * sysdeps/powerpc/tls.h: Likewise.
3287         * sysdeps/s390/tls.h: Likewise.
3288         * sysdeps/sh/tls.h: Likewise.
3289         * sysdeps/sparc/tls.h: Likewise.
3290         * sysdeps/x86_64/tls.h: Likewise.
3292 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3294         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3296 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3298         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3299         %esp.
3300         * Makefile (tests): Add tst-align2.
3301         * tst-align2.c: New test.
3302         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3303         -mpreferred-stack-boundary=4.
3305 2004-12-18  Roland McGrath  <roland@redhat.com>
3307         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3308         New file removed withdrawn for the moment.
3310 2004-12-17  Richard Henderson  <rth@redhat.com>
3312         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3313         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3315 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3317         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3318         Increased PTHREAD_STACK_MIN.
3320         * tst-context1.c (stacks): Use bigger stack size.
3322 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3324         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3325         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3327 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3329         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3330         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3331         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3333 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3335         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3337 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3339         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3340         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3342         * tst-getpid1.c: If child crashes, report this first.  Print which
3343         signal.
3345 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3347         * init.c (__pthread_initialize_minimal_internal): Also unblock
3348         SIGSETXID.
3350 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3352         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3353         _POSIX_THREAD_CPUTIME): Define to 0.
3354         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3355         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3356         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3357         __timer_signal_thread_tclk): Remove.
3358         (init_module): Remove their initialization.
3359         (thread_cleanup): Remove their cleanup assertions.
3360         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3361         __timer_signal_thread_tclk): Remove.
3362         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3363         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3364         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3366 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3368         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3369         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3371         * Makefile (tests): Add tst-getpid2.
3372         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3373         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3374         * tst-getpid2.c: New test.
3376 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3378         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3380 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3382         * Makefile (tests): Add tst-getpid1.
3383         * tst-getpid1.c: New file.
3384         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3385         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3387 2004-12-02  Roland McGrath  <roland@redhat.com>
3389         * Makefile (libpthread-nonshared): Variable removed.
3390         ($(objpfx)libpthread_nonshared.a): Target removed.
3391         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3392         These are now handled by generic magic from
3393         libpthread-static-only-routines being set.
3395 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3397         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3398         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3399         _POSIX_THREAD_PRIO_PROTECT): Define.
3400         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3401         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3402         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3404 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3406         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3407         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3408         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3409         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3410         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3411         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3412         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3414 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3416         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3418         * Makefile (libpthread-routines): Add pthread_setschedprio.
3419         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3420         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3421         * pthread_setschedprio.c: New file.
3423 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3425         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3426         * pthread_cancel.c (pthread_create): Likewise.
3428         * Makefile (libpthread-routines): Add vars.
3429         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3430         * init.c (__default_stacksize, __is_smp): Remove.
3431         * vars.c: New file.
3432         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3433         and define a wrapper macro.
3434         (PTHREAD_STATIC_FN_REQUIRE): Define.
3435         * allocatestack.c (__find_thread_by_id): Undefine.
3436         * pthread_create (__pthread_keys): Remove.
3437         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3438         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3439         PTHREAD_STATIC_FN_REQUIRE.
3441 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3443         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3444         parameter to REGISTER macro.
3446 2004-11-17  Roland McGrath  <roland@redhat.com>
3448         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3449         Make sure SIGCANCEL is blocked as well.
3451 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3453         * sysdeps/pthread/setxid.h: New file.
3454         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3455         (struct xid_command): Add forward decl.
3456         (struct pthread_functions): Change return type of __nptl_setxid hook
3457         to int.
3458         * pthreadP.h (__nptl_setxid): Change return type to int.
3459         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3460         calling thread, return its return value and set errno on failure.
3461         * descr.h (struct xid_command): Change id type to long array.
3463         * Makefile: Add rules to build and test tst-setuid1 and
3464         tst-setuid1-static.
3465         * tst-setuid1.c: New test.
3466         * tst-setuid1-static.c: New test.
3468 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3470         * Makefile (tests): Add tst-exit3.
3471         * tst-exit3.c: New test.
3473 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3475         * Makefile (tests): Add tst-exit2.
3476         * tst-exit2.c: New file.
3478 2004-11-09  Roland McGrath  <roland@redhat.com>
3480         [BZ #530]
3481         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3482         here, before calling clone.
3483         * pthread_create.c (start_thread): Don't do it here.
3485 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3487         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3489 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3491         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3492         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3493         assembler warning.
3495 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3497         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3498         if sched_priority is not between minprio and maxprio.
3500 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3502         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3503         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3505         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3506         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3508 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3510         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3511         not-cancelable I/O functions.
3513 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3515         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3516         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3517         make sure 2 is stored in the futex and we looked at the old value.
3518         Fix a few other problems to return the correct value.
3520 2004-10-14  Richard Henderson  <rth@redhat.com>
3522         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3523         make gcc4 happy.
3525 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3527         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3528         of pthread-functions.h and pthreaddef.h.
3529         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3531         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3532         Change __data.__nwaiters from int to unsigned int.
3534         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3535         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3537         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3538         before return type.
3540         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3541         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3543 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3545         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3546         test fails, remove message queue.
3547         (tf_msgsnd): Likewise.
3549 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3551         * tst-clock1.c: Change #ifdef to #if defined.
3552         * tst-clock2.c: Likewise.
3553         * tst-cond11.c: Likewise.
3555         * sysdeps/pthread/timer_create.c (timer_create): Use
3556         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3557         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3558         THREAD_CPUTIME.
3560 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3562         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3563         _POSIX_THREAD_CPUTIME): Define to 0.
3565 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3567         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3568         and _POSIX_THREAD_CPUTIME to zero.
3569         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3570         * tst-barrier2.c: Fix testing for POSIX feature.
3571         * tst-clock1.c: Likewise.
3572         * tst-clock2.c: Likewise.
3573         * tst-cond11.c: Likewise.
3574         * tst-cond4.c: Likewise.
3575         * tst-cond6.c: Likewise.
3576         * tst-flock2.c: Likewise.
3577         * tst-mutex4.c: Likewise.
3578         * tst-mutex9.c: Likewise.
3579         * tst-rwlock12.c: Likewise.
3580         * tst-rwlock4.c: Likewise.
3581         * tst-signal1.c: Likewise.
3582         * tst-spin2.c: Likewise.
3583         * sysdeps/pthread/posix-timer.h: Likewise.
3584         * sysdeps/pthread/timer_create.c: Likewise.
3585         * sysdeps/pthread/timer_routines.c: Likewise.
3587 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3589         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3590         (__lll_mutex_timedlock_wait): Address futex correctly.
3592         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3593         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3594         make sure 2 is stored in the futex and we looked at the old value.
3595         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3596         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3597         which might very well made the code not working at all before.
3598         [BZ #417]
3600 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3602         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3603         allow SIGSETXID to be sent.
3604         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3605         for SIGSETXID to be defined.
3606         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3607         SIGSETXID cannot be blocked.
3609         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3610         Add __extension__ to long long types.
3611         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3612         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3613         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3614         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3615         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3616         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3617         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3619 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3621         * descr.h (struct pthread): Add stopped_start field.
3622         * sysdeps/pthread/createthread.c (create_thread): Set
3623         start_stopped flag in descriptor for new thread appropriately.
3624         * pthread_create.c (start_thread): Only take lock to be stopped on
3625         startup if stopped_start flag says so.
3627 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3629         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3630         is created detached and if yes, do not try to free the stack in case
3631         the thread creation failed.
3632         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3633         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3634         case there has been no error.  [BZ #405]
3636         * pthread_create.c (start_thread): Don't wait for scheduler data
3637         etc to be set at the beginning of the function.  The cancellation
3638         infrastructure must have been set up.  And enable async
3639         cancellation before potentially going to sleep.  [BZ #401]
3641 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3643         * Versions: Remove exports for pthread_set*id_np functions.
3644         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3645         for now.
3646         * Makefile: Don't build pthread_set*id code for now.
3648 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3650         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3651         internal use.
3652         * allocatestack.c (__nptl_setxid): New function.
3653         * descr.h (struct xid_command): Define type.
3654         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3655         (sighandler_setxid): New function.
3656         (__pthread_initialize_minimal): Register sighandler_setxid for
3657         SIGCANCEL.
3658         * pt-allocrtsig.c: Update comment.
3659         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3660         Declare __nptl_setxid.
3661         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3662         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3663         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3664         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3665         and pthread_setresuid_np.
3666         * pthread_setgid_np.c: New file.
3667         * pthread_setuid_np.c: New file.
3668         * pthread_setegid_np.c: New file.
3669         * pthread_seteuid_np.c: New file.
3670         * pthread_setregid_np.c: New file.
3671         * pthread_setreuid_np.c: New file.
3672         * pthread_setresgid_np.c: New file.
3673         * pthread_setresuid_np.c: New file.
3674         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3675         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3676         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3677         and pthread_setresuid_np.
3678         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3679         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3680         pthread_setregid, and pthread_setresgid.
3682 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3684         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3685         ENOMEM when out of memory.
3687 2004-09-10  Roland McGrath  <roland@redhat.com>
3689         [BZ #379]
3690         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3691         code, since we don't try to use the broken CLONE_STOPPED any more.
3692         * pthread_create.c (start_thread): Likewise.
3694 2004-09-15  Richard Henderson  <rth@redhat.com>
3696         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3698 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3700         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3701         (__libc_unwind_longjmp): Delete macro and declare as function.
3702         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3703         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3704         nptl directory.
3705         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3706         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3707         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3709 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3711         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3712         for __USE_XOPEN2K.
3713         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3714         types also for __USE_XOPEN2K.
3715         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3716         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3717         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3718         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3719         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3720         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3721         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3722         [BZ #320]
3724 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3726         * sysdeps/pthread/pthread.h
3727         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3728         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3729         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3730         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3731         [BZ #375]
3733 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3735         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3736         PSEUDO to be used with . prefix.
3738         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3739         Use atomic_increment instead of atomic_exchange_and_add.
3740         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3741         Likewise.
3742         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3743         Likewise.
3744         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3745         Likewise.
3747         * allocatestack.c (allocate_stack): Use atomic_increment_val
3748         instead of atomic_exchange_and_add.
3749         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3750         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3751         Likewise.
3752         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3753         Likewise.
3755         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3756         the initialization function might throw.
3758 2005-09-05  Richard Henderson  <rth@redhat.com>
3760         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3761         Move definition inside libpthread, libc, librt check.  Provide
3762         definition for rtld.
3764 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3766         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3767         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3768         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3769         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3770         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3771         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3772         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3773         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3774         * unwind.c: Use it.
3776         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3777         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3778         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3779         Likewise.
3780         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3781         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3782         this is the last waiter, signal pthread_cond_destroy caller and
3783         avoid using the pthread_cond_t structure after unlock.
3784         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3785         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3786         Read clock type from the least significant bits of __nwaiters instead
3787         of __clock.
3788         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3789         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3791 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3793         [BZ #342]
3794         * Makefile (tests): Add tst-cond20 and tst-cond21.
3795         * tst-cond20.c: New test.
3796         * tst-cond21.c: New test.
3797         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3798         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3799         it unsigned int.
3800         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3801         Likewise.
3802         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3803         (pthread_cond_t): Likewise.
3804         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3805         Likewise.
3806         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3807         Likewise.
3808         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3809         Likewise.
3810         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3811         (cond_nwaiters): New.
3812         (clock_bits): New.
3813         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3814         if there are waiters not signalled yet.
3815         Wait until all already signalled waiters wake up.
3816         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3817         __nwaiters.  If pthread_cond_destroy has been called and this is the
3818         last waiter, signal pthread_cond_destroy caller and avoid using
3819         the pthread_cond_t structure after unlock.
3820         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3821         decrement it when leaving.  If pthread_cond_destroy has been called
3822         and this is the last waiter, signal pthread_cond_destroy caller.
3823         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3824         Likewise.  Read clock type from the least significant bits of
3825         __nwaiters instead of __clock.
3826         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3827         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3828         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3829         clock type just from the last COND_CLOCK_BITS bits of value.
3830         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3831         instead of __clock, just from second bit of condattr's value.
3833 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3835         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3836         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3837         != 64.
3838         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3840 2004-08-15  Roland McGrath  <roland@frob.com>
3842         * pthread_atfork.c: Update copyright terms including special exception
3843         for these trivial files, which are statically linked into executables
3844         that use dynamic linking for the significant library code.
3846 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3848         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3849         pthread_rwlock_rdlock.
3850         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3851         Decrease __nr_readers_queued after reacquiring lock.
3852         * sysdeps/pthread/pthread_rwlock_timedrdlock
3853         (pthread_rwlock_timedrdlock): Likewise.
3854         Reported by Bob Cook <bobcook47@hotmail.com>.
3856 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3858         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3859         before pthread_barrier_wait.
3861 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3864         Remove unnecessary exception handling data.
3866 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3868         [BZ #284]
3869         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3870         instead of clockid_t.
3872 2004-07-21  Roland McGrath  <roland@redhat.com>
3874         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3876 2004-07-19  Roland McGrath  <roland@redhat.com>
3878         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3880 2004-07-02  Roland McGrath  <roland@redhat.com>
3882         * configure: Don't exit.
3884 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3886         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3887         (__pthread_cond_timedwait): Check for invalid nanosecond in
3888         timeout value.
3890 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3892         * Makefile: Add rules to build and run tst-fini1.
3893         * tst-fini1.c: New file.
3894         * tst-fini1mod.c: New file.
3896 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3898         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3899         if no cancellation support is needed.
3900         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3901         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3902         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3903         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3904         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3905         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3906         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3907         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3908         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3910         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3911         only if not already defined.
3913 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3915         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3916         constraint "m" instead of "0" for futex.
3918         * shlib-versions: Add powerpc64-.*-linux.*.
3920 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3922         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3923         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3924         for valid tv_nsec.
3925         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3926         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3927         bits.
3929 2004-06-29  Roland McGrath  <roland@redhat.com>
3931         * Banner: NPTL no longer has its own version number.
3932         * Makefile (nptl-version): Variable removed.
3933         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3934         using $(version), the glibc version number.
3936 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3938         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3939         Fix branch offset for a PLT entry.
3940         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3941         Likewise.
3942         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3943         Likewise.
3944         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3945         Likewise.
3946         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3947         Likewise.
3949 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3951         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3952         unconditionally.
3954 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3956         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3957         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3958         instead of tv_sec.
3959         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3960         (pthread_rwlock_timedrdlock): Likewise.
3962 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3964         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3965         Set __r7 to val, not mutex.
3967 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3969         * Makefile: Add rules to build tst-rwlock14.
3970         * tst-rwlock14.c: New file.
3972 2004-06-24  Boris Hu  <boris.hu@intel.com>
3974         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3975         check.
3976         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3978 2004-06-19  Andreas Jaeger  <aj@suse.de>
3980         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3981         assembler in last patch.
3983 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3985         * sysdeps/pthread/pthread_cond_timedwait.c
3986         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3988         (__pthread_cond_timedwait): Check for invalid nanosecond in
3989         timeout value.
3990         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3991         * tst-cond19.c: New file.
3992         * Makefile: Add rules to build and run tst-cond19.
3994 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
3996         * tst-context1.c (GUARD_PATTERN): Defined.
3997         (tst_context_t): Define struct containing ucontext_t & guard words.
3998         (ctx): Declare as an array of tst_context_t.
3999         (fct): Verify uc_link & guard words are still valid.
4000         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4002 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4004         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4005         Add __data.__futex field, reshuffle __data.__clock.
4006         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4007         (__pthread_cond_signal): Increment __futex at the same time as
4008         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4009         address of low 32-bits of __wakeup_seq to futex syscall.
4010         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4011         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4012         releasing internal lock to FUTEX_WAIT.
4013         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4014         (__pthread_cond_timedwait): Likewise.
4015         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4016         (FUTEX_CMP_REQUEUE): Define.
4017         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4018         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4019         Pass __futex value from before the unlock and __futex address instead
4020         of address of low 32-bits of __wakeup_seq to futex syscall.
4021         Fallback to FUTEX_WAKE all on any errors.
4023 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4025         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4026         comment typo.
4027         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4028         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4029         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4030         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4031         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4033 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4035         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4036         Add memory clobber to inline assembly.
4037         (__lll_mutex_trylock): Likewise.
4038         (__lll_mutex_cond_trylock): Likewise.
4040 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4042         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4043         Pass val argument as 6th system call argument in %r7.
4045 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4047         * Makefile (tests): Add tst-cond16.
4048         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4049         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4050         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4051         Add __data.__futex field, reshuffle __data.__clock.
4052         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4053         (__pthread_cond_signal): Increment __futex at the same time as
4054         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4055         address of low 32-bits of __wakeup_seq to futex syscall.
4056         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4057         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4058         releasing internal lock to FUTEX_WAIT.
4059         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4060         (__pthread_cond_timedwait): Likewise.
4061         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4062         (FUTEX_CMP_REQUEUE): Define.
4063         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4064         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4065         Pass __futex value from before the unlock and __futex address instead
4066         of address of low 32-bits of __wakeup_seq to futex syscall.
4067         Fallback to FUTEX_WAKE all on any errors.
4068         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4069         Define.
4070         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4071         internally.  Return non-zero if error, zero if success.
4072         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4073         Add __data.__futex field, reshuffle __data.__clock.
4074         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4075         Define.
4076         (lll_futex_requeue): Add val argument, return 1 unconditionally
4077         for the time being.
4078         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4079         Add __data.__futex field, reshuffle __data.__clock.
4080         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4081         Define.
4082         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4083         internally.  Return non-zero if error, zero if success.
4084         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4085         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4086         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4087         Define.
4088         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4089         internally.  Return non-zero if error, zero if success.
4090         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4091         Add __data.__futex field, reshuffle __data.__clock.
4092         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4093         Define.
4094         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4095         internally.  Return non-zero if error, zero if success.
4096         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4097         Add __data.__futex field, reshuffle __data.__clock.
4098         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4099         Add __data.__futex field, reshuffle __data.__clock.
4100         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4101         Increment __futex at the same time as __wakeup_seq or __total_seq.
4102         Pass address of __futex instead of address of low 32-bits of
4103         __wakeup_seq to futex syscall.
4104         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4105         Pass __futex value from before releasing internal lock
4106         to FUTEX_WAIT.
4107         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4108         Likewise.  Avoid unnecessary shadowing of variables.
4109         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4110         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4111         unlock and __futex address instead of address of low 32-bits of
4112         __wakeup_seq to futex_requeue macro, adjust for new return value
4113         meaning.
4114         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4115         (__pthread_cond_signal): Increment __futex at the same time as
4116         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4117         address of low 32-bits of __wakeup_seq to futex syscall.
4118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4119         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4120         releasing internal lock to FUTEX_WAIT.
4121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4122         (__pthread_cond_timedwait): Likewise.
4123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4124         (FUTEX_CMP_REQUEUE): Define.
4125         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4126         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4127         Pass __futex value from before the unlock and __futex address instead
4128         of address of low 32-bits of __wakeup_seq to futex syscall.
4129         Fallback to FUTEX_WAKE all on any errors.
4131 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4133         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4134         Add nop to align the end of critical section.
4135         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4137 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4139         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4140         Add __broadcast_seq field.
4141         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4142         all waiters as woken with woken_seq and bump broadcast counter.
4143         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4144         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4145         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4146         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4148 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4151         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4152         Reported by Kaz Kojima.
4154 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4156         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4158 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4160         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4161         __broadcast_seq with bc_seq after acquiring internal lock instead of
4162         before it.
4164 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4166         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4167         compilation.
4168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4169         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4170         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4171         (pthread_cond_t): Add __data.__broadcast_seq field.
4172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4173         (FRAME_SIZE): Define.
4174         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4175         Comment typo fixes.
4176         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4177         Define.
4178         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4179         typo fixes.
4180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4181         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4182         fixes.
4184 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4186         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4187         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4188         Add __broadcast_seq field.
4189         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4190         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4191         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4192         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4193         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4195         all waiters as woken with woken_seq and bump broadcast counter.
4196         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4198         __broadcast_seq field.
4199         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4200         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4201         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4202         * pthread_cond_init.c: Initialize __broadcast_seq field.
4203         * Makefile (tests): Add tst-cond17 and tst-cond18.
4204         Add .NOTPARALLEL goal.
4205         * tst-cond16.c: New file.  From Jakub.
4206         * tst-cond17.c: New file.  From Jakub.
4207         * tst-cond18.c: New file.  From Jakub.
4209 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4211         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4212         unwind info.
4214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4215         Parametrize frame size.  Correct some unwind info.
4216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4218 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4220         * tst-stack3.c: Note testing functionality beyond POSIX.
4222 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4224         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4225         Change conditional from ifdef to if.
4227 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4229         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4230         SYSDEP_CANCEL_ERROR): Define.
4231         (PSEUDO): Use it.
4233 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4235         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4237 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4239         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4241 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4243         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4244         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4245         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4246         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4248 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4250         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4251         thread has all signals blocked.
4253 2004-04-18  Andreas Jaeger  <aj@suse.de>
4255         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4256         (SEM_VALUE_MAX): Add missing brace.
4258 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4260         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4261         in rt subdir.
4262         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4263         * sysdeps/pthread/tst-mqueue8x.c: New test.
4264         * tst-cancel4.c: Update comment about message queues.
4266         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4267         return it_value { 0, 0 }.
4268         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4269         like SIGEV_SIGNAL.
4270         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4271         assertion for SIGEV_NONE.
4272         (thread_attr_compare): Compare all attributes, not just a partial
4273         subset.
4275 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4277         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4279 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4281         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4282         Just use a plain number.
4283         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4284         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4285         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4286         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4287         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4288         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4289         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4291 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4293         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4294         frame info.
4295         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4297 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4299         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4300         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4301         of calling sigwaitinfo.
4303 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4305         * allocatestack.c (allocate_stack): Set reported_guardsize
4306         unconditionally.
4307         * pthread_getattr_np.c (pthread_getattr_np): Use
4308         reported_guardsize instead of guardsize.
4309         * descr.h (struct pthread): Add reported_guardsize field.
4311 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4313         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4315 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4317         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4319 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4321         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4322         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4323         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4324         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4325         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4326         Define.
4327         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4328         (_POSIX_MESSAGE_PASSING): Define.
4329         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4330         (_POSIX_MESSAGE_PASSING): Define.
4331         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4332         (_POSIX_MESSAGE_PASSING): Define.
4334 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4336         * tst-context1.c (fct): Check whether correct stack is used.
4338 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4340         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4341         matching constraints for asm mem parameters.
4343         * tst-clock2.c (tf): Don't define unless needed.
4345 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4347         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4348         $(gnulib).
4350 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4352         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4353         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4354         * pthreadP.h: Declare __nptl_deallocate_tsd.
4355         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4356         Adjust caller.
4358         * Makefile (tests): Add tst-tsd5.
4359         * tst-tsd5.c: New file.
4361 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4363         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4364         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4365         is SHLIB_COMPAT check.
4366         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4367         (__pthread_attr_getaffinity_old): Likewise.
4368         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4369         (__pthread_getaffinity_old): Likewise.
4370         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4371         (__pthread_setaffinity_old): Likewise.
4373 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4375         * allocatestack.c (_make_stacks_executable): Call
4376         _dl_make_stack_executable first.
4378 2004-03-24  Roland McGrath  <roland@redhat.com>
4380         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4381         constraint instead of "0".
4383 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4385         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4386         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4388         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4389         code to avoid warning.
4391 2004-03-24  Andreas Jaeger  <aj@suse.de>
4393         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4394         (__pthread_attr_setaffinity_old): Remove const.
4396 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4398         * sysdeps/unix/sysv/linux/smp.h: New file.
4399         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4400         * init.c: Define __is_smp.
4401         (__pthread_initialize_minimal_internal): Call is_smp_system to
4402         initialize __is_smp.
4403         * pthreadP.h: Declare __is_smp.
4404         Define MAX_ADAPTIVE_COUNT is necessary.
4405         * pthread_mutex_init.c: Add comment regarding __spins field.
4406         * pthread_mutex_lock.c: Implement adaptive mutex type.
4407         * pthread_mutex_timedlock.c: Likewise.
4408         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4409         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4410         Add __spins field.
4411         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4412         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4413         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4414         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4415         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4416         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4417         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4418         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4419         lll_mutex_cond_trylock.
4420         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4421         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4422         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4423         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4424         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4425         Define BUSY_WAIT_NOP.
4426         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4427         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4429         * tst-mutex5.c: Add support for testing adaptive mutexes.
4430         * tst-mutex7.c: Likewise.
4431         * tst-mutex5a.c: New file.
4432         * tst-mutex7a.c: New file.
4433         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4435         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4436         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4437         vgettimeofday call might destroy the content.
4439         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4440         @pause in the loop.
4442         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4443         No need to restrict type of ret.  Make it int.  Add comment.
4445         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4446         Remove unnecessary setne instruction.
4448 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4450         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4451         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4452         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4453         If realloc fails, break out of the loop.
4455 2004-03-20  Andreas Jaeger  <aj@suse.de>
4457         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4458         (__pthread_setaffinity_old): Fix interface.
4459         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4460         (__pthread_getaffinity_old): Likewise.
4462         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4463         (__pthread_setaffinity_new): Remove duplicate declaration.
4465 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4467         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4468         the return value to a safe register.
4469         (CDISABLE): Set the function argument correctly.
4471 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4473         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4474         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4475         Rewrite so that only one locked memory operation per round is needed.
4476         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4477         (pthread_barrier_wait): After wakeup, release lock only when the
4478         last thread stopped using the barrier object.
4479         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4480         (__pthread_cond_wait): Don't store mutex address if the current
4481         value is ~0l.  Add correct cleanup support and unwind info.
4482         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4483         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4484         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4485         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4486         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4487         Add correct cleanup support and unwind info.
4488         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4489         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4490         information for syscall wrappers.
4492 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4494         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4495         cpusetsize field, remove next.
4496         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4497         parameter for size of the CPU set.
4498         (pthread_setaffinity_np): Likewise.
4499         (pthread_attr_getaffinity_np): Likewise.
4500         (pthread_attr_setaffinity_np): Likewise.
4501         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4502         interface change, keep compatibility code.
4503         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4504         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4505         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4506         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4507         __pthread_getaffinity_np.
4508         * Versions: Add version for changed interfaces.
4509         * tst-attr3.c: Adjust test for interface change.
4510         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4511         increasing buffer sizes.
4512         * pthread_attr_destroy.c: Remove unused list handling.
4513         * pthread_attr_init.c: Likewise.
4515 2004-03-17  Roland McGrath  <roland@redhat.com>
4517         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4518         first argument to clock_getres so we ever enable kernel timers.
4520 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4522         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4524 2004-03-12  Richard Henderson  <rth@redhat.com>
4526         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4527         oldvalue from CENABLE to CDISABLE.
4529 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4531         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4532         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4533         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4534         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4536 2004-03-11  Richard Henderson  <rth@redhat.com>
4538         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4539         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4540         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4542 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4544         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4545         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4546         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4548 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4550         * forward.c (__pthread_cond_broadcast_2_0,
4551         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4552         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4553         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4555 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4557         * sysdeps/sh/tcb-offsets.sym: Add PID.
4558         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4559         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4561 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4563         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4564         include <sysdep-cancel.h>, vfork is no cancellation point.
4565         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4566         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4567         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4569 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4571         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4572         libc_hidden_def.
4573         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4574         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4575         Likewise.
4576         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4577         Likewise.
4578         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4579         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4580         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4581         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4582         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4584         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4585         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4586         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4587         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4588         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4589         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4591         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4592         a local register for saving old PID.  Negate PID in parent upon exit.
4594         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4595         tcb-offsets.h.
4596         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4597         before syscall, set to the old value in the parent afterwards.
4598         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4599         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4600         tcb-offsets.h.
4601         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4602         before syscall, set to the old value in the parent afterwards.
4603         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4604         * sysdeps/s390/tcb-offsets.sym: Add PID.
4606         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4607         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4608         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4609         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4610         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4611         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4613 2004-03-10  Andreas Schwab  <schwab@suse.de>
4615         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4616         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4617         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4619 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4621         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4622         * tst-cancel21.c (do_one_test): Likewise.
4623         Reported by Gordon Jin <gordon.jin@intel.com>.
4625 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4627         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4628         if non-zero and set to INT_MIN if zero.
4629         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4630         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4631         (SAVE_PID, RESTORE_PID): Define.
4632         (__vfork): Use it.
4633         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4634         Use relative path to avoid including NPTL i386/vfork.S.
4635         (SAVE_PID, RESTORE_PID): Define.
4636         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4637         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4638         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4639         tst-vfork2x.
4640         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4641         * tst-vfork1.c: New test.
4642         * tst-vfork2.c: New test.
4643         * tst-vfork1x.c: New test.
4644         * tst-vfork2x.c: New test.
4646 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4648         * sysdeps/i386/tcb-offsets.sym: Add PID.
4649         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4650         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4651         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4653 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4655         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4657 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4659         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4660         _rtld_global_ro.
4662 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4664         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4665         _rtld_global_ro.
4667         * tst-once4.c: Remove unnecessary macro definition.
4669         * tst-mutex7.c (do_test): Limit thread stack size.
4670         * tst-once2.c (do_test): Likewise.
4671         * tst-tls3.c (do_test): Likewise.
4672         * tst-tls1.c (do_test): Likewise.
4673         * tst-signal3.c (do_test): Likewise.
4674         * tst-kill6.c (do_test): Likewise.
4675         * tst-key4.c (do_test): Likewise.
4676         * tst-join4.c (do_test): Likewise.
4677         * tst-fork1.c (do_test): Likewise.
4678         * tst-context1.c (do_test): Likewise.
4679         * tst-cond2.c (do_test): Likewise.
4680         * tst-cond10.c (do_test): Likewise.
4681         * tst-clock2.c (do_test): Likewise.
4682         * tst-cancel10.c (do_test): Likewise.
4683         * tst-basic2.c (do_test): Likewise.
4684         * tst-barrier4.c (do_test): Likewise.
4686 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4688         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4690 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4693         (__pthread_cond_timedwait): Optimize wakeup test.
4694         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4695         (__pthread_cond_wait): Likewise.
4696         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4697         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4698         Likewise.
4700 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4702         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4703         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4704         the atomic instruction needed.
4705         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4706         (__lll_mutex_lock_wait): Likewise.
4708 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4710         * Makefile (tests): Add tst-cond14 and tst-cond15.
4711         * tst-cond14.c: New file.
4712         * tst-cond15.c: New file.
4714 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4716         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4717         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4718         needs to be implemented differently to be useful.
4720 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4722         * pthread_attr_setschedparam.c: Don't test priority against limits
4723         here.  Set ATTR_FLAG_SCHED_SET flag.
4724         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4725         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4726         from parent thread to child.  If attribute is used and scheduling
4727         parameters are not inherited, copy parameters from attribute or
4728         compute them.  Check priority value.
4729         * pthread_getschedparam.c: If the parameters aren't known yet get
4730         them from the kernel.
4731         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4732         ATTR_FLAG_POLICY_SET flag for thread.
4733         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4734         and ATTR_FLAG_POLICY_SET.
4736         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4738         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4739         fail if stack address hasn't been set.  Just return 0.
4741 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4743         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4744         libpthread for the files in this list.
4745         (CFLAGS-tst-unload): Removed.
4746         * tst-unload.c (do_test): Don't use complete path for
4747         LIBPHREAD_SO.
4749         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4750         tst-_res1mod2.
4752 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4754         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4755         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4756         operation per round is needed.
4757         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4758         (__lll_mutex_lock_wait): Likewise.
4760 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4762         * tst-cancel9.c (cleanup): Don't print to stderr.
4764 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4766         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4768 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4770         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4771         (__syscall_error_handler2): Call CDISABLE.
4772         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4773         (__syscall_error_handler2): Call CDISABLE.
4775         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4776         Release lock before the loop, don't reacquire it.
4778         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4780 2004-02-19  Andreas Schwab  <schwab@suse.de>
4782         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4783         Fix last change.
4785 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4787         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4788         (pthread_barrier_wait): After wakeup, release lock only when the
4789         last thread stopped using the barrier object.
4790         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4791         (pthread_barrier_wait): Likewise.
4792         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4793         Likewise.
4794         * Makefile (tests): Add tst-barrier4.
4795         * tst-barrier4.c: New file.
4797         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4798         (__pthread_cond_timedwait): Perform timeout test while holding
4799         internal lock to prevent wakeup race.
4800         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4801         * sysdeps/pthread/pthread_cond_timedwait.c
4802         (__pthread_cond_timedwait): Likewise.
4803         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4804         (__pthread_cond_timedwait): Likewise.
4806 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4808         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4809         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4810         * Makefile (tests): Add tst-rwlock13.
4811         * tst-rwlock13.c: New test.
4813 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4815         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4816         (__condvar_tw_cleanup): Little optimization.
4817         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4819 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4821         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4822         libpthread as "lib" parameter to SHLIB_COMPAT.
4823         (__novmx_siglongjmp): Fix typo in function name.
4824         (__novmx_longjmp): Fix typo in function name.
4826 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4828         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4829         __builtin_expect.
4831         * sysdeps/generic/pt-longjmp.c: Moved to...
4832         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4834 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4836         * Makefile (libpthread-routines): Add pt-cleanup.
4837         * pt-longjmp.c: Removed.
4838         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4839         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4840         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4841         Version longjmp, siglongjmp for GLIBC_2.3.4.
4842         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4844 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4846         * sysdeps/pthread/pthread_cond_timedwait.c
4847         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4848         Reuse code.  Add __builtin_expects.
4850         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4851         (__pthread_cond_timedwait): Get internal lock in case timeout has
4852         passed before the futex syscall.
4853         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4855 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4857         * allocatestack.c: Pretty printing.
4859         * sysdeps/pthread/createthread.c (create_thread): Don't add
4860         CLONE_DETACHED bit if it is not necessary.
4862 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4864         * pthread_getattr_np.c: Include ldsodefs.h.
4866 2004-01-16  Richard Henderson  <rth@redhat.com>
4868         * allocatestack.c: Don't declare __libc_stack_end.
4869         * init.c (__pthread_initialize_minimal_internal): Likewise.
4870         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4872 2004-01-15  Richard Henderson  <rth@redhat.com>
4874         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4875         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4876         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4877         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4878         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4879         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4880         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4881         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4883 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4885         * init.c (pthread_functions): Make array const.
4887 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4889         * allocatestack.c (__make_stacks_executable): Change interface.
4890         Check parameters.  Pass parameter on to libc counterpart.
4891         * pthreadP.h: Change declaration.
4893 2004-01-13  Richard Henderson  <rth@redhat.com>
4895         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4896         prototype form.
4897         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4898         Likewise.
4900         * sysdeps/alpha/Makefile: New file.
4901         * sysdeps/alpha/tcb-offsets.sym: New file.
4902         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4903         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4905         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4906         on powerpc version.
4908 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4910         * Makefile (tests): Add tst-backtrace1.
4911         * tst-backtrace1.c: New test.
4913 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4915         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4916         register as second parameter to the REGISTER macro.
4917         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4918         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4919         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4920         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4921         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4922         of thread register as second parameter to REGISTER macro in 64 case.
4924 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4926         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4927         (CFLAGS-getpid.o): Defined.
4928         (CFLAGS-getpid.os): Defined.
4930 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4932         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4933         returned for main thread does not overlap with any other VMA.
4934         Patch by Jakub Jelinek.
4936 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4938         * tst-raise1.c: Include stdio.h.
4940 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4942         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4943         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4944         If pid is 0, set it to selftid.
4945         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4946         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4947         != 0, return self->tid without doing a syscall.
4948         * descr.h (struct pthread): Move pid field after tid.
4950         * Makefile (tests): Add tst-raise1.
4951         * tst-raise1.c: New file.
4953 2003-12-23  Roland McGrath  <roland@redhat.com>
4955         * tst-oddstacklimit.c: New file.
4956         * Makefile (tests): Add it.
4957         (tst-oddstacklimit-ENV): New variable.
4959         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4960         value up to page size for __default_stacksize.
4962 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4964         * Makefile (tests): Add tst-eintr5.
4965         * tst-eintr5.c: New file.
4967         * eintr.c (eintr_source): Prevent sending signal to self.
4969         * tst-eintr2.c (tf1): Improve error message.
4971 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4973         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4974         * sysdeps/unix/sysv/linux/getpid.c: New file.
4975         * pthread_cancel.c: Add comment explaining use of PID field.
4976         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4977         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4978         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4979         temporarily to signal the field must not be relied on and updated
4980         by getpid().
4981         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4982         temporarily negative.
4983         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4985 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4987         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4988         (eintr_source): If ARG != NULL, use pthread_kill.
4989         * tst-eintr1.c: Adjust for this change.
4990         * tst-eintr2.c: Likewise.
4991         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
4992         * tst-eintr3.c: New file.
4993         * tst-eintr4.c: New file.
4995 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
4997         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
4998         if CANCELSTATE_BITMASK is set.
4999         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5000         Likewise.
5002         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5003         (tests-reverse): Add tst-cancel23.
5004         * tst-cancel22.c: New test.
5005         * tst-cancel23.c: New test.
5007 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5009         * tst-eintr1.c: Better error messages.
5011         * Makefile (tests): Add tst-eintr2.
5012         * tst-eintr2.c: New file.
5014 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5016         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5017         (CFLAGS-tst-cancelx21.c): Set.
5018         * tst-cancel21.c: New test.
5019         * tst-cancelx21.c: New test.
5021         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5022         comparison operand.
5023         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5024         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5025         * pt-longjmp.c: Include jmpbuf-unwind.h.
5026         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5027         _JMPBUF_UNWINDS.  Adjust compared pointers.
5028         * init.c (__pthread_initialize_minimal_internal): Initialize
5029         pd->stackblock_size.
5030         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5031         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5032         * sysdeps/i386/jmpbuf-unwind.h: New file.
5033         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5034         * sysdeps/s390/jmpbuf-unwind.h: New file.
5035         * sysdeps/sh/jmpbuf-unwind.h: New file.
5036         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5037         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5038         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5039         (_JMPBUF_CFA_UNWINDS): Remove.
5040         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5042 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5044         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5045         (CFLAGS-tst-cancelx20.c): Set.
5046         * tst-cancel20.c: New test.
5047         * tst-cancelx20.c: New test.
5049 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5051         * init.c (__pthread_initialize_minimal_internal): Don't treat
5052         architectures with separate register stack special here when
5053         computing default stack size.
5055 2003-12-17  Roland McGrath  <roland@redhat.com>
5057         * Makefile (tst-cancelx7-ARGS): New variable.
5058         Reportd by Greg Schafer <gschafer@zip.com.au>.
5060 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5062         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5063         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5064         (tst-stack3-ENV): Set.
5065         ($(objpfx)tst-stack3-mem): New.
5066         * tst-stack3.c: New test.
5068 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5070         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5071         Add unwind directives.  Drop unused .regstk directive.
5072         (_fini_EPILOG_BEGINS): Add unwind directives.
5074 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5076         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5077         Assume parameter is a pointer.
5078         (lll_futex_wake): Likewise.
5079         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5080         Likewise.
5081         (lll_futex_wake): Likewise.
5082         Reported by Boris Hu.
5083         * sysdeps/unix/sysv/linux/unregister-atfork.c
5084         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5086         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5088 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5090         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5091         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5092         __rtld_lock_initialize for ld.so lock.
5093         Patch in part by Adam Li <adam.li@intel.com>.
5095 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5097         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5098         in $(gnulib).  Also, remove stale comment.
5100 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5102         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5103         advantage of new syscall stub and optimize accordingly.
5105         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5106         from SYS_futex, to match expectations of
5107         sysdep.h:DO_INLINE_SYSCALL.
5108         (lll_futex_clobbers): Remove.
5109         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5110         (lll_futex_wake): Likewise.
5111         (lll_futex_requeue): Likewise.
5112         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5113         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5114         Jelinek).
5115         (__lll_mutex_lock): Likewise.
5116         (__lll_mutex_cond_lock): Likewise.
5117         (__lll_mutex_timed_lock): Likewise.
5118         (__lll_mutex_unlock): Likewise.
5119         (__lll_mutex_unlock_force): Likewise.
5121         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5122         comes before the include of <sysdep.h>.
5123         (THREAD_SELF_SYSINFO): New macro.
5124         (THREAD_SYSINFO): Likewise.
5125         (INIT_SYSINFO): New macro.
5126         (TLS_INIT_TP): Call INIT_SYSINFO.
5128         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5130         * sysdeps/pthread/createthread.c (create_thread): Use
5131         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5132         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5133         THREAD_SELF_SYSINFO instead of open code.
5134         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5135         (THREAD_SYSINFO): Likewise.
5137         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5139         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5141 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5143         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5144         instead of .init.  Patch by David Mosberger.
5146 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5148         * sysdeps/pthread/configure.in: Remove broken declaration in C
5149         cleanup handling check.
5151 2003-11-30  Andreas Jaeger  <aj@suse.de>
5153         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5154         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5155         Likewise.
5157 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5159         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5160         * pthread_attr_destroy.c: Include shlib-compat.h.
5161         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5162         is set in iattr->flags.
5163         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5165 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5167         * Makefile (distribute): Add tst-cleanup4aux.c.
5169         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5170         include.
5172 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5174         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5175         pthread_cond_signal.
5177         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5178         store mutex address if the current value is ~0l.
5179         * sysdeps/pthread/pthread_cond_timedwait.c
5180         (__pthread_cond_timedwait): Likewise.
5181         * sysdeps/pthread/pthread_cond_broadcast.c
5182         (__pthread_cond_broadcast): Don't use requeue for pshared
5183         condvars.
5185         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5186         (__pthread_cond_wait): Don't store mutex address if the current
5187         value is ~0l.
5188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5189         (__pthread_cond_timedwait): Likewise.
5190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5191         (__pthread_cond_broadcast): Don't use requeue for pshared
5192         condvars.
5194         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5195         element with ~0l for pshared condvars, with NULL otherwise.
5197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5198         (__pthread_cond_wait): Don't store mutex address if the current
5199         value is ~0l.
5200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5201         (__pthread_cond_timedwait): Likewise.
5202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5203         (__pthread_cond_broadcast): Don't use requeue for pshared
5204         condvars.
5206         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5207         * tst-cond12.c: New file.
5208         * tst-cond13.c: New file.
5210 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5212         * sysdeps/pthread/configure.in: Make missing forced unwind support
5213         fatal.
5215 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5217         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5219 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5221         * Makefile: Add magic to clean up correctly.
5223 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5225         * unwind.c (FRAME_LEFT): Define.
5226         (unwind_stop): Handle old style cleanups here.
5227         (__pthread_unwind): Handle old style cleanups only if
5228         !HAVE_FORCED_UNWIND.
5229         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5230         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5231         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5232         ($(objpfx)tst-cleanupx4): Likewise.
5233         * tst-cleanup4.c: New test.
5234         * tst-cleanup4aux.c: New.
5235         * tst-cleanupx4.c: New test.
5237 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5239         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5240         lll_mutex_*lock macros to skip atomic operations on some archs.
5242 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5244         * sysdeps/pthread/tst-timer.c (main): Initialize
5245         sigev2.sigev_value as well.
5247 2003-10-15  Roland McGrath  <roland@redhat.com>
5249         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5250         is missing.
5251         * sysdeps/pthread/configure: Regenerated.
5253 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5255         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5256         locking macros.  No distinction between normal and mutex locking
5257         anymore.
5258         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5259         Merge bits from lowlevelmutex.S we still need.
5260         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5261         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5262         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5263         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5264         new mutex implementation.
5265         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5266         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5267         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5268         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5269         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5270         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5271         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5272         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5273         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5274         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5275         symbol for entry point to avoid cancellation.
5277 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5279         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5280         changes.
5281         (SAVE_OLDTYPE_0): Fix a typo.
5283 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5285         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5286         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5288 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5290         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5291         correct offset.
5293 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5295         * Makefile (tests): Add tst-cancel19.
5296         * tst-cancel19.c: New test.
5298 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5300         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5301         restoring of the old cancellation type.
5303 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5305         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5307 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5309         * sysdeps/pthread/malloc-machine.h: New file
5311 2003-09-24  Roland McGrath  <roland@redhat.com>
5313         * allocatestack.c (__make_stacks_executable): Don't ignore return
5314         value from _dl_make_stack_executable.
5316 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5318         * allocatestack.c (__make_stacks_executable): Also change
5319         permission of the currently unused stacks.
5321         * allocatestack.c (change_stack_perm): Split out from
5322         __make_stacks_executable.
5323         (allocate_stack): If the required permission changed between the time
5324         we started preparing the stack and queueing it, change the permission.
5325         (__make_stacks_executable): Call change_stack_perm.
5327         * Makefile: Build tst-execstack-mod locally.
5328         * tst-execstack-mod.c: New file.
5330 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5332         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5334 2003-09-23  Roland McGrath  <roland@redhat.com>
5336         * tst-execstack.c: New file.
5337         * Makefile (tests): Add it.
5338         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5339         (LDFLAGS-tst-execstack): New variable.
5341         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5342         whether to use PROT_EXEC for stack mmap.
5343         (__make_stacks_executable): New function.
5344         * pthreadP.h: Declare it.
5345         * init.c (__pthread_initialize_minimal_internal): Set
5346         GL(dl_make_stack_executable_hook) to that.
5348 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5350         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5351         recommendation from AMD re avoidance of lock prefix.
5353 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5355         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5356         lll_futex_timed_wait instead of lll_futex_wait.
5357         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5358         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5359         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5360         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5361         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5362         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5363         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5364         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5365         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5366         Completely revamp the locking macros.  No distinction between
5367         normal and mutex locking anymore.
5368         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5369         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5370         __lll_lock_timedwait): Fix prototypes.
5371         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5372         __lll_lock_timedwait): Likewise.
5373         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5374         macros, add __builtin_expect.
5375         (lll_mutex_timedlock): Likewise.  Fix return value.
5376         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5377         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5378         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5379         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5380         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5381         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5382         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5383         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5385 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5387         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5388         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5389         operation if possible.
5391         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5392         like jumping over the lock prefix.
5394 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5396         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5397         locking macros.  No distinction between normal and mutex locking
5398         anymore.
5399         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5400         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5401         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5402         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5403         locking.  Merge bits from lowlevelmutex.S we still need.
5404         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5405         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5406         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5407         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5408         * Makefile (routines): Remove libc-lowlevelmutex.
5409         (libpthread-rountines): Remove lowlevelmutex.
5410         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5411         for new mutex implementation.
5412         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5413         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5415         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5416         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5417         Likewise.
5418         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5419         Likewise.
5420         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5422         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5423         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5426         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5427         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5428         Likewise.
5429         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5430         Likewise.
5431         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5432         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5434         Don't use requeue.
5435         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5436         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5438 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5440         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5441         in parameters of asm with output parameters.
5443         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5444         type of DECR parameter to int.
5445         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5447 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5449         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5450         guardsize for each thread.
5452 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5454         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5455         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5456         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5458         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5459         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5460         NULL.
5461         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5462         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5463         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5464         (pthread_getaffinity_np): Add hidden_def.
5466         * Makefile (tests): Add tst-attr3.
5467         * tst-attr3.c: New test.
5469         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5471 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5473         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5474         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5476 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5478         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5479         * tst-align.c: Include tst-stack-align.h.
5480         (tf, do_test): Use TEST_STACK_ALIGN macro.
5482 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5484         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5485         variable.
5487 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5489         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5490         stack-related values for the initial thread.
5492 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5494         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5496 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5498         * pthread_mutex_lock.c: Minor code rearrangements.
5500 2003-09-05  Roland McGrath  <roland@redhat.com>
5502         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5503         Instead, include ../nptl_db/db_info.c to do its magic.
5504         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5505         (__pthread_pthread_key_2ndlevel_size): Likewise.
5506         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5507         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5508         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5509         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5510         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5511         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5512         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5513         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5514         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5515         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5516         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5517         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5518         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5519         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5520         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5521         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5522         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5524 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5526         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5527         of pthread_t to be compatible with LT.
5528         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5529         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5530         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5531         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5532         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5533         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5534         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5536 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5538         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5540 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5542         * unwind-forcedunwind.c: Move to...
5543         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5544         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5545         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5546         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5547         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5548         * unwind.c: Include jmpbuf-unwind.h.
5549         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5551 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5553         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5554         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5555         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5556         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5557         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5558         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5559         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5560         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5561         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5562         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5563         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5564         function.
5565         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5566         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5567         * Makefile (tests): Add tst-stack2.
5568         * tst-stack2.c: New test.
5569         * tst-stack1.c: Include limits.h and sys/param.h.
5570         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5572         * pthread_condattr_setpshared.c: Include errno.h.
5573         (pthread_condattr_setpshared): Return EINVAL if pshared
5574         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5576         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5577         defined symbol for entry point to avoid cancellation.
5578         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5579         Likewise.
5580         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5581         Likewise.
5582         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5583         Likewise.
5584         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5585         Likewise.
5586         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5587         Likewise.
5588         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5589         __close_nocancel, __read_nocancel, __write_nocancel,
5590         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5591         libpthread.so or librt.so, define to corresponding function
5592         without _nocancel suffix.
5593         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5594         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5595         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5597         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5599 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5601         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5602         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5604         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5605         in subsections has a symbol associated with it.
5607         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5608         defined symbol for entry point to avoid cancellation.
5609         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5611 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5613         * Makefile (tests): Add tst-tls5.
5614         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5615         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5616         ($(objpfx)tst-tls5): New.
5617         ($(objpfx)tst-tls6.out): Likewise.
5618         (tests): Depend on $(objpfx)tst-tls6.out.
5619         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5620         (do_test): Check pthread_self () return value alignment.
5621         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5622         (tf): Check pthread_self () return value alignment.
5623         * tst-tls5.c: New test.
5624         * tst-tls5.h: New.
5625         * tst-tls5mod.c: New.
5626         * tst-tls5moda.c: New.
5627         * tst-tls5modb.c: New.
5628         * tst-tls5modc.c: New.
5629         * tst-tls5modd.c: New.
5630         * tst-tls5mode.c: New.
5631         * tst-tls5modf.c: New.
5632         * tst-tls6.sh: New test.
5634         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5635         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5636         * init.c (pthread_functions): Initialize them.
5637         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5638         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5639         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5640         pthread_cond_timedwait@@GLIBC_2.3.2.
5642 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5644         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5645         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5646         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5647         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5648         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5649         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5651         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5653         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5654         _POSIX_THREAD_PRIORITY_SCHEDULING.
5655         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5657 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5659         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5660         nested function, use static inline function from libio.h.
5661         Code by Richard Henderson.
5663         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5664         weak.
5666 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5668         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5669         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5670         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5671         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5672         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5673         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5674         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5675         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5676         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5677         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5678         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5679         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5680         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5681         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5682         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5683         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5684         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5685         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5686         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5687         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5688         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5689         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5690         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5691         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5692         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5693         * sysdeps/sparc/tls.h: New file.
5694         * sysdeps/sparc/tcb-offsets.sym: New file.
5695         * sysdeps/sparc/Makefile: New file.
5696         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5697         * init.c [__sparc__] (__NR_set_tid_address): Define.
5699 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5701         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5702         _IO_release_lock): Define.
5704 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5706         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5707         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5709 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5711         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5712         (__pthread_cleanup_class): Add missing return types of member
5713         functions.
5715 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5717         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5718         (lll_mutex_unlock_force): Add memory barrier between store and futex
5719         syscall.
5721 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5723         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5724         tempmsg in first loop.
5726 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5728         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5729         _POSIX_THREAD_PRIORITY_SCHEDULING.
5730         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5732 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5734         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5735         (__rtld_lock_default_lock_recursive,
5736         __rtld_lock_default_unlock_recursive): Define.
5737         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5738         __rtld_lock_unlock_recursive): Define using
5739         GL(_dl_rtld_*lock_recursive).
5740         * init.c (__pthread_initialize_minimal_internal): Initialize
5741         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5742         Lock GL(_dl_load_lock) the same number of times as
5743         GL(_dl_load_lock) using non-mt implementation was nested.
5745         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5746         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5748 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5750         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5751         PIPE_BUF.
5753 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5755         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5757 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5759         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5760         to first syscall error check.  Move syscall error check for tkill
5761         into __ASSUME_CLONE_STOPPED #ifdef.
5763 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5765         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5766         is not defined, do explicit synchronization.
5767         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5768         is not defined also unlock pd->lock for non-debugging case in case
5769         it is necessary.
5770         * pthread_create.c (start_thread): Always get and release pd->lock
5771         if __ASSUME_CLONE_STOPPED is not defined.
5772         (start_thread_debug): Removed.  Adjust users.
5773         * allocatestack.c (allocate_stack): Always initialize lock if
5774         __ASSUME_CLONE_STOPPED is not defined.
5775         * Makefile (tests): Add tst-sched1.
5776         * tst-sched1.c: New file.
5778         * sysdeps/pthread/createthread.c (do_clone): Only use
5779         sched_setschduler and pass correct parameters.
5781 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5783         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5784         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5785         PTHREAD_STACK_MIN in comments.
5787 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5789         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5790         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5791         argument.
5792         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5793         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5794         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5795         (__pthread_cleanup_upto): Fix prototype.
5796         (_longjmp_unwind): Adjust caller.
5797         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5798         Change second argument to const struct pointer.
5799         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5800         * tst-sem9.c (main): Likewise.
5801         * unwind.c: Include string.h for strlen prototype.
5803 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5805         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5806         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5807         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5808         Define HAVE_CMOV.
5809         Patch by Nicholas Miell <nmiell@attbi.com>.
5811 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5813         * init.c (__pthread_initialize_minimal_internal): Initialize
5814         GL(dl_init_static_tls).
5815         * pthreadP.h (__pthread_init_static_tls): New prototype.
5816         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5817         New functions.
5818         * Makefile (tests): Add tst-tls4.
5819         (modules-names): Add tst-tls4moda and tst-tls4modb.
5820         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5821         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5822         tst-tls4modb.so.
5823         * tst-tls4.c: New file.
5824         * tst-tls4moda.c: New file.
5825         * tst-tls4modb.c: New file.
5827 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5829         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5830         before __timer_dealloc.
5831         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5832         Don't call list_unlink.
5834 2003-07-29  Roland McGrath  <roland@redhat.com>
5836         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5838 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5840         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5841         Don't reuse struct aiocb A if it failed.
5842         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5843         not just one byte, as that does not block.
5845 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5847         * sysdeps/pthread/unwind-resume.c: New file.
5848         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5849         unwind-resume in csu subdir.
5850         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5851         exceptions.
5852         (librt-sysdep_routines, librt-shared-only-routines): Add
5853         rt-unwind-resume.
5854         * sysdeps/pthread/rt-unwind-resume.c: New file.
5855         * unwind-forcedunwind.c: New file.
5856         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5857         (libpthread-shared-only-routines): Likewise.
5858         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5859         * pthreadP.h (pthread_cancel_init): New prototype.
5860         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5862         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5863         attr argument const struct pthread_attr *.
5865         * res.c (__res_state): Return __resp.
5866         * descr.h: Include resolv.h.
5867         (struct pthread): Add res field.
5868         * pthread_create.c: Include resolv.h.
5869         (start_thread): Initialize __resp.
5870         * Makefile (tests): Add tst-_res1.
5871         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5872         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5873         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5874         libpthread.
5875         * tst-_res1.c: New file.
5876         * tst-_res1mod1.c: New file.
5877         * tst-_res1mod2.c: New file.
5879 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5881         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5883         * Makefile: Define various *-no-z-defs variables for test DSOs
5884         which has undefined symbols.
5886 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5888         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5889         Retry if the stwcx fails to store once_control.
5891 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5893         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5894         pthread_attr_setaffinity.
5895         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5896         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5897         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5898         * pthread_attr_destroy.c: Free cpuset element if allocated.
5899         * pthread_create.c: Pass iattr as additional parameter to
5900         create_thread.
5901         * sysdeps/pthread/createthread.c: If attribute is provided and
5902         a new thread is created with affinity set or scheduling parameters,
5903         start thread with CLONE_STOPPED.
5904         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5905         pthread_attr_setaffinity.
5906         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5907         cpuset element.
5909 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5911         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5913 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5915         * sysdeps/pthread/configure.in: Require CFI directives also for
5916         ppc and s390.
5918 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5920         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5921         Add cfi directives.
5923 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5925         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5926         CLEANUP_JMP_BUF.
5927         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5928         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5929         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5930         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5931         not self pointer in __writer.  Compare with TID to determine
5932         deadlocks.
5933         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5934         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5935         Likewise.
5936         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5937         Likewise.
5938         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5939         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5940         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5941         macros also when compiling librt.
5943 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5945         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5946         -fasynchronous-unwind-tables.
5947         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5948         (PSEUDO): Add cfi directives.
5949         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5950         Likewise.
5951         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5952         Likewise.
5954 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5956         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5957         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5958         * unwind.c (__pthread_unwind_next): Add hidden_def.
5959         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5960         Likewise.
5961         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5962         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5963         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5964         Likewise.
5965         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5966         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5967         Likewise.
5968         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5969         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5970         __pthread_unregister_cancel and __pthread_unwind_next.
5972 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5974         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5975         different symbol for the cancellation syscall wrapper and
5976         non-cancellation syscall wrapper.
5977         (PSEUDO_END): Define.
5979 2003-07-05  Richard Henderson  <rth@redhat.com>
5981         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5982         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5983         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5984         return actual return value from the syscall, not 0.
5986 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5988         * descr.h (struct pthread): Add pid field.
5989         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5990         (__reclaim_stacks): Likewise.
5991         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
5992         also check for PID of the signal source.
5993         (__pthread_initialize_minimal_internal): Also initialize pid field
5994         of initial thread's descriptor.
5995         * pthread_cancel.c: Use tgkill instead of tkill if possible.
5996         * sysdeps/unix/sysv/linux/fork.c: Likewise.
5997         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
5998         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5999         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6001 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6003         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6004         Fix use of parameter.
6005         (__libc_cleanup_pop): Likewise.
6007 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6009         * init.c (sigcancel_handler): Change parameters to match handler
6010         for SA_SIGACTION.  Check signal number and code to recognize
6011         invalid invocations.
6013 2003-07-03  Roland McGrath  <roland@redhat.com>
6015         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6016         Apply sizeof (struct pthread) bias to r13 value.
6018 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6020         * sysdeps/pthread/configure.in: Require CFI directives.
6022         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6023         definition.
6024         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6025         libpthread compilation.
6026         * unwind.c (__pthread_unwind): Add hidden_def.
6027         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6029 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6031         * libc-cancellation.c (__libc_cleanup_routine): Define.
6032         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6033         (__pthread_cleanup_pop): Define.
6035 2003-07-01  Richard Henderson  <rth@redhat.com>
6037         * sysdeps/alpha/elf/pt-initfini.c: New file.
6038         * sysdeps/alpha/pthread_spin_lock.S: New file.
6039         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6040         * sysdeps/alpha/pthreaddef.h: New file.
6041         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6042         * sysdeps/alpha/tls.h: New file.
6043         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6044         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6045         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6046         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6047         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6048         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6049         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6050         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6051         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6052         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6054 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6056         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6057         cleanup support and unwind info.
6059 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6061         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6062         Use correct cleanup handler registration.  Add unwind info.
6063         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6064         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6065         * tst-once3.c: Add cleanup handler and check it is called.
6066         * tst-once4.c: Likewise.
6067         * tst-oncex3.c: New file.
6068         * tst-oncex4.c: New file.
6069         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6071 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6073         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6075 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6077         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6078         (tf_msgsnd): Likewise.
6080         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6081         premature returns a bit more.
6083 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6085         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6086         definition to the front.
6088         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6089         the cleanup functions to make the names unique.  Fix dwarf opcode
6090         un unwind table.
6091         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6092         functions to make the names unique.  Fix CFA offset for two blocks.
6094 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6096         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6097         missing closing braces.
6098         Patch by Christophe Saout <christophe@saout.de>.
6100 2003-06-24  Roland McGrath  <roland@redhat.com>
6102         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6104 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6106         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6107         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6109         * pthreadP.h: Declare __find_thread_by_id.
6110         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6111         * pthread_clock_gettime.c: Allow using other thread's clock.
6112         * pthread_clock_settime.c: Likewise.
6113         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6114         * Makefile: Add rules to build and run tst-clock2.
6115         * tst-clock2.c: New file.
6117 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6120         to use exception-based cleanup handler.
6121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6123         * tst-cond8.c (ch): Announce that we are done.
6125         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6127         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6128         Also test aio_suspend with timeout value.
6130 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6132         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6133         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6134         attribute_hidden.
6136         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6137         (__pthread_mutex_lock_internal): Likewise.
6138         (__pthread_mutex_unlock_internal): Likewise.
6139         (__pthread_mutex_unlock_usercnt): Declare.
6140         * pthread_mutex_destroy.c: Always fail if used in any way.
6141         * pthread_mutex_init.c: Update comment.
6142         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6143         * pthread_mutex_timedlock.c: Adjust __nusers.
6144         * pthread_mutex_trylock.c: Adjust __nusers.
6145         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6146         and public interfaces are wrapper with pass additional parameter.
6147         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6148         parameter zero.
6149         * tst-mutex8.c: New file.
6150         * Makefile (tests): Add tst-mutex8.
6151         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6152         __pthread_mutex_unlock_usercnt.
6153         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6157         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6158         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6159         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6160         Add __nusers.
6161         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6162         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6163         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6164         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6165         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6167         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6168         * pthread_mutex_timedlock.c: Likewise.
6169         * pthread_mutex_trylock.c: Adjust __nusers.
6170         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6171         * tst-mutex9.c: New file.
6172         * Makefile (tests): Add tst-mutex9.
6173         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6174         * sysdeps/ia64/tls.h: Likewise.
6175         * sysdeps/powerpc/tls.h: Likewise.
6176         * sysdeps/s390/tls.h: Likewise.
6177         * sysdeps/sh/tls.h: Likewise.
6178         * sysdeps/x86_64/tls.h: Likewise.
6179         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6180         Change type of __owner.
6181         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6182         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6183         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6184         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6185         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6187 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6189         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6190         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6192         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6193         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6194         instead of nr to lll_futex_wake.  Only set errno and return -1
6195         if err < 0.
6197         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6198         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6199         return actual return value from the syscall, not 0.
6201 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6203         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6204         find a random value.
6205         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6206         errno==EIDRM.
6208         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6209         compat_timer_settime.
6210         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6211         compat_timer_gettime.
6212         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6213         compat_timer_getoverrun.
6214         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6215         compat_timer_delete.
6217         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6218         error-checking mutex detect busy mutexes.
6220 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6222         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6223         Add ax to clobber list.
6224         (lll_mutex_cond_lock): Likewise.
6225         (lll_mutex_unlock): Likewise.
6226         (lll_lock): Likewise.
6227         (lll_unlock): Likewise.
6229         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6230         * tst-cancel18.c: New file.
6231         * tst-cancelx18.c: New file.
6233         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6234         and tcdrain.
6236         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6237         * tst-cancel17.c: New file.
6238         * tst-cancelx17.c: New file.
6240         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6241         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6242         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6244         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6246 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6248         * sysdeps/pthread/createthread.c (create_thread): Set
6249         header.multiple_threads unconditionally.
6250         * allocatestack.c (allocate_stack): Likewise.
6251         * descr.h (struct pthread): Add header.multiple_threads
6252         unconditionally.
6253         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6254         Define for librt.  #error if neither libpthread, libc nor librt.
6255         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6256         Likewise.
6257         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6258         CDISABLE): Likewise.
6259         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6260         CDISABLE): Likewise.
6261         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6262         CDISABLE): Likewise.
6263         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6264         CDISABLE): Likewise.  Access header.multiple_threads outside of
6265         libc and libpthread.
6266         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6267         Likewise.
6268         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6269         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6271 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6273         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6274         Also test early cancellation before the thread reaches the cancellation
6275         point.
6277         * Makefile: Compile forward.c with exceptions.
6279         * sysdeps/unix/sysv/linux/sleep.c: New file.
6281 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6283         * Makefile: Add CFLAGS definition to compile function wrappers
6284         duplicated from libc with exceptions.
6285         * tst-cancel4.c: Also check cancellation handlers.
6287         * Makefile: Add rules to build and run tst-cancel16 and
6288         tst-cancelx16.  Add missing CFLAGS definitions.
6289         * tst-cancel16.c: New file.
6290         * tst-cancelx16.c: New file.
6292 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6294         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6295         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6296         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6297         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6299         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6300         (LIBC_CANCEL_RESET): Likewise.
6301         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6302         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6303         librt-cancellation.
6304         (CFLAGS-libcrt-cancellation.c): Define.
6305         * sysdeps/pthread/librt-cancellation.c: New file.
6306         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6307         macros also when compiling librt.
6308         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6309         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6310         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6311         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6312         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6313         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6314         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6316         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6317         compat_timer_create.
6319 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6321         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6323         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6324         __register_atfork.
6325         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6326         Add libc_hidden_def.
6328 2003-06-13  Roland McGrath  <roland@redhat.com>
6330         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6331         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6333 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6335         * allocatestack.c (queue_stack): Always inline.
6336         * ptreadhP.h (__do_cancel): Likewise.
6338 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6340         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6341         a typo.
6343 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6345         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6346         (__pthread_cond_signal): Remove incorrect second addition for
6347         cond_lock!=0.
6349 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6352         (__pthread_cond_signal): Use correct futex pointer in
6353         __lll_mutex_lock_wait call.
6355         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6356         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6358 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6360         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6361         cancelable.
6362         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6363         Likewise.
6365         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6366         hand-written CFI generation code.  Since ENTRY/END also initiated
6367         CFI frames this caused two CFI sets to be generated.
6369 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6371         * cleanup_routine.c: New file.
6372         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6373         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6374         cleanup handling.
6375         * Makefile (libpthread-routines): Add cleanup_routine.
6376         Add more CFLAGS variables to compile with exceptions.  Add comments
6377         why which file needs unwind tables.
6378         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6379         tests.
6380         * tst-cancelx1.c: New file.
6381         * tst-cancelx2.c: New file.
6382         * tst-cancelx3.c: New file.
6383         * tst-cancelx4.c: New file.
6384         * tst-cancelx5.c: New file.
6385         * tst-cancelx6.c: New file.
6386         * tst-cancelx7.c: New file.
6387         * tst-cancelx8.c: New file.
6388         * tst-cancelx9.c: New file.
6389         * tst-cancelx10.c: New file.
6390         * tst-cancelx11.c: New file.
6391         * tst-cancelx12.c: New file.
6392         * tst-cancelx13.c: New file.
6393         * tst-cancelx14.c: New file.
6394         * tst-cancelx15.c: New file.
6395         * tst-cleanupx0.c: New file.
6396         * tst-cleanupx0.expect: New file.
6397         * tst-cleanupx1.c: New file.
6398         * tst-cleanupx2.c: New file.
6399         * tst-cleanupx3.c: New file.
6401         * tst-cleanup0.c: Make standard compliant.
6402         * tst-cleanup1.c: Likewise.
6404         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6405         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6406         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6407         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6408         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6409         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6410         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6411         CLEANUP_JMP_BUF.
6412         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6413         * tst-cancel12.c: New file.
6414         * tst-cancel13.c: New file.
6415         * tst-cancel14.c: New file.
6416         * tst-cancel15.c: New file.
6417         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6418         and tst-cancel15.
6420         * tst-cancel1.c: Add some comments.
6422         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6423         timeout correctly.
6425 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6427         * Makefile (CFLAGS-pthread_cancel.c): Define.
6429 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6431         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6432         Change type of __writer element to int.
6433         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6434         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6435         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6436         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6437         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6438         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6439         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6440         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6441         Compare with TID to determine deadlocks.
6442         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6443         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6444         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6445         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6446         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6448         Likewise.
6449         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6450         Likewise.
6451         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6452         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6453         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6454         Likewise.
6455         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6456         Likewise.
6457         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6458         * Makefile (tests): Add tst-rwlock12.
6459         * tst-rwlock12.c: New file.
6461 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6463         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6464         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6465         Remove bogus hidden_proto.
6466         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6467         Likewise.
6468         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6469         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6470         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6471         ___lll_mutex_timedlock): Likewise.
6473 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6475         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6476         (__pthread_cond_signal): Add some code to eventually handle
6477         cond_lock!=0.
6479 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6481         * Makefile (tests): Add tst-exec4.
6482         (tst-exec4-ARGS): Define.
6483         * tst-exec4.c: New file.
6485 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6487         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6488         Also fail if tv_nsec < 0.
6489         (__lll_timedwait_tid): Likewise.
6490         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6491         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6492         Likewise.
6493         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6494         Likewise.
6495         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6496         Likewise.
6497         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6498         Likewise.
6499         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6500         Likewise.
6501         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6502         Likewise.
6504         * Makefile (tests): Add tst-sem8 and tst-sem9.
6505         * tst-sem8.c: New file.
6506         * tst-sem9.c: New file.
6507         * sem_open.c: Fix creation of in_use record if the file exists but
6508         no internal record.
6510         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6511         definitions.
6513         * sysdeps/pthread/timer_create.c (timer_create): In case
6514         evp==NULL, assign timer ID to sival_ptr.
6516         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6517         struct pthread_unwind_buf *.
6518         (struct pthread): Likewise for cleanup_jmp_buf element.
6520         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6521         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6522         * unwind.c (__pthread_unwind_next): Likewise.
6524 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6526         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6527         (lll_futex_timed_wait): Use int for futex value parameter.
6528         (lll_futex_wake): Likewise.
6529         (lll_futex_requeue): Likewise.
6531         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6532         Replace one memory operation with one register operation.
6534         * tst-join4.c (do_test): Fix error message.
6536         * tst-rwlock6.c (do_test): Use correct format specifier.
6538         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6539         (__lll_mutex_lock_wait): Replace one memory operation with one
6540         register operation.
6541         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6542         (__lll_mutex_lock_wait): Likewise.
6544         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6545         (__lll_mutex_cond_lock): Add one to value parameter of
6546         __lll_lock_wait to reflect reality in the futex syscall.
6547         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6548         (lll_mutex_cond_lock): Likewise.
6550 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6552         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6553         New function.
6554         (lll_mutex_cond_lock): Define.
6556 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6558         * Makefile (tests): Add tst-signal6.
6559         * tst-signal6.c: New file.
6561         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6562         (__lll_mutex_unlock_force): New function
6563         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6565         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6566         (__lll_mutex_unlock_force): New function.
6567         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6569         * tst-rwlock7.c (do_test): Use correct format specifier.
6571         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6572         Find break parameter in correct asm argument.
6574 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6576         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6577         Remove out4.
6578         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6579         error occured.
6580         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6581         Add __mutex.
6582         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6583         lll_futex_requeue, lll_mutex_unlock_force): Define.
6585 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6587         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6588         (pthread_cond_t): Add __mutex.
6589         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6590         lll_futex_requeue, lll_mutex_unlock_force): Define.
6592 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6594         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6595         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6596         Add __mutex field.
6597         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6598         Define.
6599         (lll_futex_wait, lll_futex_wake): Define.
6600         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6601         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6602         FUTEX_REQUEUE instead of FUTEX_WAIT.
6603         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6604         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6605         mutex which was used in condvar structure.  Call
6606         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6607         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6609         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6610         include tcb-offsets.h.  Read wakeup value in locked region.
6611         Use the value of gbr register as THREAD_ID.
6612         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6613         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6614         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6616         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6617         macros.
6619 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6621         * sysdeps/pthread/pthread_cond_broadcast.c
6622         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6624 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6626         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6627         typo in register name.
6628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6629         correctly.  Actually use requeue.  Little optimization.
6630         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6631         mutex address early.  Handle cancellation state as 32-bit value.
6632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6633         Remove unnecessary label.
6635 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6637         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6638         instead of FUTEX_WAIT.
6639         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6640         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6642         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6643         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6644         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6645         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6646         of __pthread_mutex_lock_internal.
6647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6649         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6650         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6651         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6652         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6653         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6654         Add pthread_mutex_cond_lock.
6655         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6656         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6657         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6658         lll_mutex_cond_lock.
6659         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6660         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6661         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6662         Add __mutex field.
6663         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6664         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6666         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6667         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6669         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6670         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6671         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6672         macro don't define aliases.
6674         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6675         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6676         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6677         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6679         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6680         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6682         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6684 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6686         * sem_open.c: Fix one endless loop.  Implement correct semantics
6687         wrt opening the same semaphore more then once.
6688         * sem_close.c: Adjust for sem_open change.
6689         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6690         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6691         * Makefile (tests): Add tst-sem7.
6692         * tst-sem7.c: New file.
6694 2003-05-16  Roland McGrath  <roland@redhat.com>
6696         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6697         uninitialized variable braino.
6699 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6701         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6702         test for syscall availability.
6704         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6705         __no_posix_timers to -1 if the syscalls don't exist.
6707         * pthread_join.c (pthread_join): Set tid field of the joined
6708         thread to -1.  This isn't necessary but helps to recognize some
6709         error conditions with almost no cost.
6711         * allocatestack.c (FREE_P): Also negative values indicate an
6712         unused stack.
6714         * unwind.c: Include <unistd.h>.
6716 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6718         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6720 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6722         * Makefile (crti-objs, crtn-objs): New variables.
6723         (omit-deps, extra-objs): Add crtn.
6724         ($(objpfx)libpthread.so): Depend on both crti and crtn
6725         and links to them in multidir.
6726         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6728 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6730         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6731         (lll_mutex_unlock): Use atomic_exchange_rel.
6733 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6735         * cond-perf.c (cons): Add missing locking around setting of alldone.
6737 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6739         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6740         related macros.
6741         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6743 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6745         * tst-sem6.c: New file.
6746         * Makefile (tests): Add tst-sem6.
6748         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6749         Use atomic_exchange_rel instead of atomic_exchange.
6750         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6751         Likewise.
6753         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6754         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6755         vsyscall is possible.
6757         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6758         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6759         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6760         pthread_setaffinity_np.
6761         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6762         and pthread_setaffinity_np.
6763         * Makefile (libpthread-routines): Add pthread_getaffinity and
6764         pthread_setaffinity.
6766         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6767         use it in case mmap to allocate the stack fails.
6768         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6769         ARCH_MAP_FLAGS here.
6770         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6771         ARCH_RETRY_MMAP.
6773 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6775         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6776         handler implementation.  It is now lockless in fork().
6777         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6778         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6779         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6780         declare the __fork_*_lists.
6781         (struct fork_handler): Include pointers to all three functions.
6782         Add next, refcntr and need_signal elements.
6783         (__fork_handlers): New declaration.
6784         (__register_atfork_malloc): Remove declaration.
6785         (HAVE_register_atfork_malloc): Remove definition.
6786         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6787         __pthread_child_handler variable.
6788         (__libc_pthread_init): Use __register_atfork instead of explicitly
6789         adding to the list.
6790         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6791         and lll_futex_wake.
6792         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6794         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6795         function must never be reached.
6797         * cond-perf.c: New file.
6799 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6801         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6803 2003-05-04  Roland McGrath  <roland@redhat.com>
6805         * Makefile ($(objpfx)../libc.so): New target.
6807 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6809         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6810         (pthread_condattr_t): Size is only an int, don't use long for
6811         alignment.
6812         (pthread_mutexattr_t): Likewise.
6813         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6814         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6815         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6817 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6819         * sysdeps/i386/tls.h: Define THREAD_ID.
6820         * sysdeps/ia64/tls.h: Likewise.
6821         * sysdeps/powerpc/tls.h: Likewise.
6822         * sysdeps/s390/tls.h: Likewise.
6823         * sysdeps/sh/tls.h: Likewise.
6824         * sysdeps/x86_64/tls.h: Likewise.
6825         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6826         record ownership.
6827         * pthread_mutex_timedlock.c: Likewise.
6828         * pthread_mutex_trylock.c: Likewise.
6829         * pthread_mutex_unlock.c: Likewise.
6830         * pthread_rwlock_trywrlock.c: Likewise.
6831         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6832         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6833         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6834         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6836         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6837         flag.
6839 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6841         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6842         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6843         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6844         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6845         Make __align long long instead of long.
6846         (pthread_rwlock_t): Formatting.
6847         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6848         (pthread_rwlock_t): Formatting.
6849         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6850         (pthread_cond_t): Make __align long long instead of long.
6851         (pthread_rwlock_t): Move __flags field to the same position as in
6852         linuxthreads.
6854 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6856         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6857         * tst-rwlock7.c (do_test): Likewise.
6859 2003-04-26  Roland McGrath  <roland@redhat.com>
6861         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6863 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6865         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6866         sizeof (struct pthread).
6867         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6868         1 struct pthread.
6869         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6870         to 0.
6871         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6872         struct pthread.
6873         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6874         to 32-bit bytes.
6875         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6876         tcbp.
6877         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6878         unneccessarily.
6879         (NO_TLS_OFFSET): Define.
6880         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6881         add TLS_TCB_SIZE unnecessarily.
6883 2003-04-22  Roland McGrath  <roland@redhat.com>
6885         * Makeconfig (shared-thread-library): Reverse link order to work
6886         around linker bug.
6888 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6890         * semaphore.h: Fix typo in comment.
6892 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6894         * sysdeps/pthread/sigfillset.c: New file.
6896         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6897         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6898         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6899         * sysdeps/pthread/sigaction.c: Likewise.
6900         * sysdeps/pthread/sigprocmask.c: New file.
6901         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6902         __SIGRTMIN+1.
6903         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6904         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6905         in this case.
6907 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6909         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6910         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6912         * sysdeps/unix/sysv/linux/unregister-atfork.c
6913         (__unregister_atfork): Don't free memory not allocated dynamically.
6915         * semaphore.h: Remove __THROW marker from cancellation points.
6916         * nptl/sysdeps/pthread/pthread.h: Likewise.
6918 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6920         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6921         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6922         __THROW.
6924 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6926         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6928 2003-04-15  Roland McGrath  <roland@redhat.com>
6930         * forward.c (__pthread_unwind): Tweak to avoid warning.
6932 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6934         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6936 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6939         overflow CFA advance instructions.
6940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6942 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6944         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6945         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6946         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6947         defined.
6949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6950         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6952         DW_CFA_advance_loc for .Laddl-.Lsubl.
6954 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6956         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6957         position-independent unwind data for static libraries.
6958         Add missing unwind info.  Add comments.
6960         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6961         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6962         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6963         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6965 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6967         * Makefile: Make sure all cancellation points are compiled with
6968         exception and asynchronous unwind tables.
6970         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6971         which mishandles loading of global object addresses in PIC.
6972         (THREAD_SETMEM_NC): Likewise.
6974 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6976         * pthread.h: Define new data structure for cleanup buffer.  Declare
6977         new cleanup handler interfaces.
6978         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6979         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6980         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6981         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6982         it.  Declare old cleanup handler installation functions.
6983         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6984         handling.
6985         * cleanup_defer.c: Likewise.
6986         * cleanup_compat.c: New file.  Old cleanup code.
6987         * cleanup_def_compat.c: New file.  Old cleanup code.
6988         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6989         if own thread descriptor.
6990         * unwind.c: New file.
6991         * forward.c: Add __pthread_unwind.
6992         * init.c (pthread_functions): Add __pthread_unwind.
6993         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
6994         Add ptr___pthread_unwind.
6995         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
6996         and unwind function.
6997         * Makefile (libpthread-routines): Add cleanup_compat,
6998         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
6999         table generation if necessary.
7000         * version.c: Record whether unwind support is compiled in.
7001         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7002         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7003         handler interfaces.
7004         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7005         complication to generate unwind information for syscall wrappers.
7006         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7007         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7008         __cleanup_fct_attribute.
7010         * Makefile: Add rules to build and run tst-cleanup0.
7011         * tst-cleanup0.c: New file.
7012         * tst-cleanup0.expect: New file.
7014         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7015         caller.  Optimize to avoid often unecessary local variable.
7017 2003-04-11  Roland McGrath  <roland@redhat.com>
7019         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7020         sets variable `multidir'; include that.
7021         (generated): Add it.
7022         ($(objpfx)$(multidir)/crti.o): New target.
7023         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7025 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7027         * tst-attr2.c (do_test): Add cast to avoid warning.
7028         * tst-mutex4.c (do_test): Likewise.
7030 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7032         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7033         in child.
7035 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7037         * Makefile (tests): Add tst-detach1.
7038         * tst-detach1.c: New file.
7040 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7042         * sysdeps/pthread/pthread.h: Remove duplicate
7043         pthread_cleanup_{push,pop} definitions.
7045         * tst-barrier2.c: Eliminate warnings.
7046         * tst-cancel4.c: Likewise.
7047         * tst-cond4.c: Likewise.
7048         * tst-cond6.c: Likewise.
7049         * tst-detach1.c: Likewise.
7050         * tst-rwlock4.c: Likewise.
7051         * tst-rwlock6.c: Likewise.
7052         * tst-rwlock7.c: Likewise.
7053         * tst-sem3.c: Likewise.
7054         * tst-spin2.c: Likewise.
7055         * tst-umask1.c: Likewise.
7057 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7059         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7061 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7063         * descr.h (struct pthread): Move cancelhandling member to the front.
7065 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7067         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7068         malloc_parent, and malloc_child statically.
7069         (__register_atfork_malloc): New function.
7070         (free_mem): Don't free any of the malloc_* variables on the list.
7071         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7072         Define HAVE_register_atfork_malloc.
7074 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7076         * sysdeps/pthread/createthread.c (create_thread): Add some more
7077         comments explaining when to set multiple_threads and when not.
7079         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7080         THREAD_ATOMIC_BIT_SET if not already defined.
7081         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7082         THREAD_ATOMIC_BIT_SET:
7083         * sysdeps/x86_64/tls.h: Likewise.
7084         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7085         THREAD_ATOMIC_CMPXCHG_VAL.
7086         (_pthread_cleanup_pop_restore): Likewise.
7087         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7088         (__pthread_enable_asynccancel_2): Likewise.
7089         (__pthread_disable_asynccancel): Likewise.
7090         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7091         (__libc_disable_asynccancel): Likewise.
7092         * init.c (sigcancel_handler): Likewise.
7093         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7094         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7096 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7098         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7099         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7100         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7101         * Makefile (tests): Add tst-cancel11.
7102         * tst-cancel11.c: New file.
7104 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7106         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7107         round, not the first.  Use specific_used flag instead of local
7108         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7109         (__free_tcb): Don't call deallocate_tsd here.
7110         (start_thread): Call deallocate_tsd here.
7111         * pthread_setspecific.c: Set specific_used flag really only when
7112         needed.
7113         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7114         * tst-tsd3.c: New file.
7115         * tst-tsd4.c: New file.
7117 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7119         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7120         Use atomic_exchange_and_add instead of __lll_add.
7121         (__lll_mutex_timedlock): Likewise.
7122         Patch by Ian Wienand.
7124 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7126         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7127         (SINGLE_THREAD_P): Fix typo.
7128         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7130 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7132         * Makefile (tests): Add tst-align.
7133         * tst-align.c: New file.
7134         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7136         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7137         function correctly.
7139         * tst-tsd2.c: Add casts to avoid warnings.
7141 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7143         * descr.h (struct pthread): Move most often used elements to the front.
7145 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7147         * Makefile (libpthread-routines): Add pthread_atfork.
7148         (libpthread-static-only-routines): Add pthread_atfork.
7150 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7152         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7153         of TLS_DTV_AT_TP.
7154         (INSTALL_DTV): Add parens.
7155         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7156         Use passed descr instead of THREAD_SELF.
7157         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7158         (__lll_mutex_timedlock_wait): Correct expected value after
7159         spurious wakeup.
7160         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7161         Release lock before waking up the waiters.
7162         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7163         criteria.  Reorderstruct passed to cleanup handler.  Fix
7164         handling of cancellation and failung pthread_mutex_unlock call.
7165         Use __pthread_enable_asynccancel_2 instead of
7166         __pthread_enable_asynccancel.
7167         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7168         Return result of lock re-get if it fails.
7169         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7170         for __pthread_cleanup_push.
7171         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7172         completely broken rwlock implementation.
7173         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7174         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7175         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7176         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7177         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7178         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7179         versioned_symbol macro.
7180         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7181         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7183 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7185         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7186         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7187         and __helper_tid.
7188         (struct timer): Remove th and bar field.
7189         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7190         debugging code.  Create only one helper thread.
7191         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7192         helper thread.
7193         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7194         Renamed.  Define statically.  Use thread info from siginfo.
7195         (__helper_once): New variable.
7196         (__helper_tid): New variable.
7197         (__reset_helper_control): New function.
7198         (__start_helper_thread): New function.
7200         * pthread_create.c (start_thread): Don't use setjmp inside
7201         __builtin_expect to work around gcc bug.
7203         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7204         timer_delete syscall fails, but not with ENOSYS, set
7205         __no_posix_timers.
7207         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7208         (timer_settime): Fix typo.
7209         * sysdeps/unix/sysv/linux/timer_getoverr.c
7210         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7212 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7215         offset of cleanupbuf.__prev.
7217 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7219         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7220         of included file.
7222 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7224         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7225         NULL provide default definition to syscall.
7227 2003-03-25  Roland McGrath  <roland@redhat.com>
7229         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7230         (timer_id2ptr): Fix typo.
7232 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7234         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7235         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7236         * sysdeps/ia64/pthreaddef.h: Likewise.
7237         * sysdeps/powerpc/pthreaddef.h: Likewise.
7238         * sysdeps/s390/pthreaddef.h: Likewise.
7239         * sysdeps/sh/pthreaddef.h: Likewise.
7240         * sysdeps/x86_64/pthreaddef.h: Likewise.
7241         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7242         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7243         being changed.
7244         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7245         SIGTIMER is not unblocked.
7246         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7247         RT signal taken.
7248         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7249         be send.
7250         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7251         pass pointer through as ID.
7252         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7253         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7254         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7255         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7256         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7257         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7258         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7259         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7260         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7261         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7262         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7263         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7264         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7265         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7266         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7267         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7268         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7269         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7270         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7271         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7272         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7273         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7274         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7275         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7276         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7277         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7278         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7279         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7280         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7281         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7282         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7283         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7284         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7286         * pthreadP.h: Remove FRAME_LEFT definition.
7287         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7288         already left frame.  Programs which have this problem are not POSIX
7289         compliant.
7290         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7292 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7294         * sysdeps/pthread/tst-timer.c: Check return values of the
7295         functions we test.
7297 2003-03-23  Roland McGrath  <roland@redhat.com>
7299         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7300         * tst-tls3mod.c: Likewise.
7301         * tst-tls1.c: Likewise.
7302         * tst-tls2.c: Likewise.
7304         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7305         undefined behavior.
7307         * tst-join5.c (tf1, tf2): Add a cast.
7309         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7311         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7312         Don't test anything.
7313         * tst-cond4.c: Likewise.
7314         * tst-cond6.c: Likewise.
7315         * tst-flock2.c: Likewise.
7316         * tst-mutex4.c: Likewise.
7317         * tst-rwlock4.c: Likewise.
7318         * tst-signal1.c: Likewise.
7319         * tst-spin2.c: Likewise.
7320         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7322         * tst-mutex4.c: Use test-skeleton.c.
7323         * tst-spin2.c: Likewise.
7324         * tst-sysconf.c: Likewise.
7325         * tst-barrier2.c: Likewise.
7326         * tst-cond4.c: Likewise.
7327         * tst-cond6.c: Likewise.
7328         * tst-rwlock4.c: Likewise.
7329         * tst-unload.c: Likewise.
7330         * tst-flock2.c (do_test): Use return instead of exit.
7332 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7334         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7336 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7338         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7339         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7340         instead of __lll_compare_and_swap.
7341         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7342         Likewise.
7343         Removed definition if __lll_compare_and_swap.
7345         * cancellation.c: Adjust for new form of compare&exchange macros.
7346         * cleanup_defer.c: Likewise.
7347         * init.c: Likewise.
7348         * libc-cancellation.c: Likewise.
7349         * old_pthread_cond_broadcast.c: Likewise.
7350         * old_pthread_cond_signal.c: Likewise.
7351         * old_pthread_cond_timedwait.c: Likewise.
7352         * old_pthread_cond_wait.c: Likewise.
7353         * pthread_cancel.c: Likewise.
7354         * pthread_create.c: Likewise.
7355         * pthread_detach.c: Likewise.
7356         * pthread_join.c: Likewise.
7357         * pthread_key_delete.c: Likewise.
7358         * pthread_setcancelstate.c: Likewise.
7359         * pthread_setcanceltype.c: Likewise.
7360         * pthread_timedjoin.c: Likewise.
7361         * pthread_tryjoin.c: Likewise.
7362         * sysdeps/pthread/createthread.c: Likewise.
7364 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7366         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7367         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7368         definitions.  Replace uses with calls to atomic_* functions.
7369         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7370         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7371         __lll_test_and_set calls with atomic_exchange_and_add and
7372         atomic_exchange calls respectively.
7373         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7374         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7375         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7376         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7377         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7378         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7379         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7381         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7382         returns the old value.
7384 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7386         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7387         int for variable OLDVAL and correct inline assembler contraint.
7388         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7389         type int for variable OLD.
7391         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7392         only for s390-32.
7393         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7394         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7395         instead of multiple_threads field in the TCB.
7397 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7399         * sysdeps/i386/i686/bits/atomic.h: Removed.
7400         * sysdeps/i386/i586/bits/atomic.h: Removed.
7401         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7402         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7403         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7404         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7405         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7406         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7407         * atomic.h: Removed.  Moved to glibc.
7409         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7410         support for clock selection.
7412         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7413         signalling waiters.
7415 2003-03-18  Roland McGrath  <roland@redhat.com>
7417         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7418         Add __lll_rel_instr first.  Add memory clobber.
7419         (lll_mutex_unlock): Use __lll_test_and_set.
7420         From Paul Mackerras <paulus@samba.org>.
7422         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7423         unconditionally.
7424         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7425         (SINGLE_THREAD_P):  Add `header.' prefix.
7426         From Paul Mackerras <paulus@samba.org>.
7428         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7429         pthread_timedjoin_np to ...
7430         (libpthread: GLIBC_2.3.3): ... here.
7431         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7433         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7434         Avoid shadowing VAL variable.
7436         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7437         New macro.
7439 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7441         * Makefile (tests): Add tst-cond11.
7442         * tst-cond11.c: New file.
7444         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7445         struct passed to cleanup handler to eliminate one more
7446         instruction.
7447         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7449         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7450         (pthrad_cond_t): Replace __unused field with __clock.
7452         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7453         waken all waiters in cleanup handler.
7454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7455         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7457         * pthread_condattr_getclock.c: New file.
7458         * pthread_condattr_setclock.c: New file.
7459         * sysdeps/pthread/pthread.h: Declare these new functions.
7460         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7461         * Makefile (libpthread-routines): Add the new functions.
7462         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7463         Renamed field to value.  Document use of the bits.
7464         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7465         change.
7466         * pthread_condattr_setpshared.c: Likewise.
7467         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7468         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7469         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7470         Add __clock field.
7471         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7472         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7473         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7474         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7475         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7476         Implement clock selection.
7477         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7478         * pthread-errnos.sym: Add ENOSYS.
7479         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7480         _POSIX_CLOCK_SELECTION.
7481         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7483         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7484         invalid .size directive.
7486 2003-03-17  Roland McGrath  <roland@redhat.com>
7488         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7489         Formatting tweaks.
7491 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7493         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7494         Use __lll_add instead of spelling it out.  Use protected symbol names.
7495         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7496         Use __lll_add.
7497         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7498         Renamed from lll_compare_and_swap.  Use new name where necessary.
7499         (__lll_add): Defined.
7500         (__lll_dec_if_positive): Defined.
7501         (__lll_test_and_set): Defined.
7502         * sysdeps/ia64/pthread_spin_init.c: Removed.
7503         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7504         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7505         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7506         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7507         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7508         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7509         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7510         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7511         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7512         __sync_lock_release_si.
7513         Patch by Jakub Jelinek.
7515         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7516         Fix timeout handling.
7517         (__lll_timedwait_tid): Likewise.
7518         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7519         Patch by Jakub Jelinek.
7521         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7523 2003-03-17  Roland McGrath  <roland@redhat.com>
7525         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7526         * sysdeps/pthread/pthread_spin_init.c: New file.
7527         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7528         * sysdeps/powerpc/Makefile: New file.
7529         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7530         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7531         * sysdeps/powerpc/pthreaddef.h: New file.
7532         * sysdeps/powerpc/tcb-offsets.sym: New file.
7533         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7534         * sysdeps/powerpc/tls.h: New file.
7535         * sysdeps/powerpc/bits/atomic.h: New file.
7536         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7537         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7538         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7540         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7541         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7542         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7543         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7544         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7545         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7546         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7547         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7548         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7549         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7550         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7551         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7552         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7553         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7554         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7556         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7557         not gettimeofday.
7558         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7559         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7560         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7561         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7562         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7564 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7566         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7567         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7568         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7570         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7572 2003-03-16  Roland McGrath  <roland@redhat.com>
7574         * tst-fork4.c: Include <string.h>.
7575         * tst-signal2.c: Likewise.
7576         * tst-mutex5.c (do_test): exit -> return.
7577         * tst-mutex2.c: Include <stdlib.h>.
7579 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7581         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7582         (__lll_mutex_timedlock_wait): Correct expected value after
7583         spurious wakeup.  Otherwise we would never wait again.
7585         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7586         zone versus inline asm stupidity.  Use correct instructions.
7588         * tst-rwlock6.c: Add some more status output.
7590 2003-03-15  Roland McGrath  <roland@redhat.com>
7592         * sysdeps/pthread/configure.in: New file.
7593         * sysdeps/pthread/configure: New file (generated).
7595 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7597         * allocatestack.c (allocate_stack): Store the exact stack size of
7598         user allocated stacks.
7600 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7602         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7603         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7604         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7605         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7606         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7607         Use `header.' prefix.
7608         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7610 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7612         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7613         __builtin_frame_address, use stack pointer.
7615         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7616         instead of __builtin_frame_pointer.
7618 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7620         * tst-basic1.c (do_test): Add cast to avoid warning.
7621         * tst-basic2.c (do_test): Likewise.
7623         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7624         amount of stack correction.
7626         * tst-fork4.c: Use test-skeleton.c.
7628 2003-03-14  Roland McGrath  <roland@redhat.com>
7630         * init.c: Fix typo "#eli" for "#else".
7632 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7634         * allocatestack.c (__stack_user): Use hidden_data_def.
7635         * pthread_create.c (__pthread_keys): Likewise.
7637         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7639 2003-03-14  Roland McGrath  <roland@redhat.com>
7641         * tst-fork4.c: New file.
7642         * Makefile (tests): Add it.
7644         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7645         we always define the padding space.
7646         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7647         stopped supporting its own extensions fully.
7648         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7649         struct also called `header', so `header.multiple_threads' is the field
7650         name to use on all machines.
7651         * allocatestack.c (allocate_stack): Use `header.' prefix.
7652         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7653         * pthread_create.c (__pthread_create_2_1): Likewise.
7654         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7655         (THREAD_SELF): Likewise.
7656         * sysdeps/x86_64/tls.h: Likewise.
7657         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7658         (SINGLE_THREAD_P): Likewise.
7659         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7660         (SINGLE_THREAD_P): Likewise.
7661         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7662         (SINGLE_THREAD_P): Likewise.
7664         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7665         value directly.
7667 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7669         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7670         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7672         * pthread_create.c (start_thread): setjmp is expected to return 0.
7674         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7675         (THREAD_GETMEM_NC): Likewise.
7677 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7679         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7680         and the size of the stack which must be allocated is a multiple,
7681         allocate one more page.
7682         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7683         MULTI_PAGE_ALIASING.
7685 2003-03-13  Roland McGrath  <roland@redhat.com>
7687         * pthread_create.c (start_thread): Set EXITING_BIT after the
7688         event-reporting (and destructors), not before.
7690 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7692         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7693         lll_futex_wake): Declare register variables as long int instead of
7694         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7695         Make syscall arguments clobbered by the syscall.
7696         (lll_futex_wait): Define using lll_futex_timed_wait.
7698         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7699         to void *.
7701         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7702         PPID if [! NDEBUG].
7704         * allocatestack.c (nptl_ncreated): Only declare if
7705         COLORING_INCREMENT != 0.
7707         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7708         (__libc_enable_asynccancel_2): Remove prototype.
7710         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7711         ctid to match kernel.
7713 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7715         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7716         libc_multiple_threads.
7717         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7718         __libc_multiple_threads to...
7719         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7721         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7722         versioning.
7723         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7724         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7726         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7727         (__pthread_once_internal): Define.
7729         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7730         macros instead of .symver directly.
7731         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7732         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7734         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7735         * sysdeps/x86_64/tcb-offsets.sym: New file.
7736         * sysdeps/x86_64/Makefile: New file.
7738         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7739         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7740         to access own pthread_t in TCB.
7741         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7742         Likewise.
7743         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7744         Likewise.
7745         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7747 2003-03-12  Roland McGrath  <roland@redhat.com>
7749         * pthread-errnos.sym: New file.
7750         * Makefile (gen-as-const-headers): New variable, list that file.
7751         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7752         header <pthread-errnos.h> instead of defining errno values here.
7753         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7754         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7755         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7756         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7757         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7758         Likewise.
7759         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7760         Likewise.
7761         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7762         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7763         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7764         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7765         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7766         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7767         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7768         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7769         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7770         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7771         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7772         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7773         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7774         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7775         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7776         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7777         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7778         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7779         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7780         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7781         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7782         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7783         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7784         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7785         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7786         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7787         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7789         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7790         CLONE_CHILD_SETTID worked.
7792 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7794         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7795         file.
7796         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7797         file.
7799         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7800         (pthread_cond_t): Add padding.
7802         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7803         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7804         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7806         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7807         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7809         (__pthread_rwlock_timedrdlock): Likewise.
7810         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7811         (__pthread_rwlock_wrlock): Likewise.
7812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7813         (__pthread_rwlock_rdlock): Likewise.
7815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7818         result of lock re-get if it fails.
7820 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7822         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7823         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7824         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7826         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7827         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7828         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7829         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7830         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7831         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7833         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7834         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7836         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7837         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7838         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7839         (create_thread): Likewise.
7840         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7841         * init.c (__pthread_initialize_minimal_internal): Initialize
7842         __libc_multiple_threads_ptr if necessary.
7843         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7844         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7845         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7846         __libc_multiple_threads.
7847         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7848         necessary.
7850         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7851         (THREAD_SETMEM_NC): Likewise.
7853         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7854         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7855         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7856         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7858         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7859         Eliminate one entire instruction.
7861         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7862         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7864         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7865         instead of __pthread_enable_asynccancel.
7866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7867         (__pthread_cond_wait): Likewise.
7868         * sysdeps/pthread/pthread_cond_timedwait.c
7869         (__pthread_cond_timedwait): Likewise.
7870         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7873         (__condvar_cleanup): Wake up all waiters in case we got signaled
7874         after being woken up but before disabling asynchronous
7875         cancellation.
7876         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7877         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7878         (__condvar_cleanup): Likewise.
7880         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7881         Make it an error if architecture has no #if case.  Add x86-64.
7883         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7884         pt-initfini.s generation.
7886         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7887         (TLS_INIT_TP): Fix typo.
7889 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7891         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7892         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7894         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7895         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7896         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7897         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7898         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7899         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7900         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7901         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7903 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7905         * sysdeps/pthread/pthread_cond_timedwait.c
7906         (__pthread_cond_timedwait): Return the result of the final
7907         locking.  If it succeeds, the regular function return value.
7909         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7910         Return result of the final locking.
7911         * version.c (__nptl_main): Work around problems with the strange
7912         INTERNAL_SYSCALL macro on ppc32.
7913         * init.c (__pthread_initialize_minimal_internal): Unblock
7914         SIGCANCEL in case the parent blocked it.
7915         Reported by Paul Mackerras <paulus@samba.org>.
7917         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7918         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7921 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7923         * sysdeps/pthread/pthread_cond_timedwait.c
7924         (__pthread_cond_timedwait): Unlock and fail if
7925         __pthread_mutex_unlock_internal failed.
7927         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7928         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7929         Use ARCH_CLONE.
7930         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7931         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7932         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7933         ALLOCATE_STACK): New macros.
7934         (TLS_TPADJ): New macro.
7935         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7936         (allocate_stack): Handle TLS_DTV_AT_TP and
7937         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7938         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7939         Don't set PD->self.
7940         * init.c [__ia64__] (__NR_set_tid_address): Define.
7942         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7943         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7944         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7945         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7946         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7947         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7948         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7949         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7950         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7951         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7952         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7953         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7954         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7955         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7956         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7957         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7958         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7959         * sysdeps/ia64/bits/atomic.h: New file.
7960         * sysdeps/ia64/Makefile: New file.
7961         * sysdeps/ia64/pthread_spin_init.c: New file.
7962         * sysdeps/ia64/pthread_spin_lock.c: New file.
7963         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7964         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7965         * sysdeps/ia64/pthreaddef.h: New file.
7966         * sysdeps/ia64/tcb-offsets.sym: New file.
7967         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7968         * sysdeps/ia64/tls.h: New file.
7970         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7971         to syscall instead of no arguments.
7973 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7975         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7976         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7977         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7978         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7980         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7981         unused code.
7983         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7985         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7986         lowlevelbarrier.sym.
7987         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7988         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7989         Include lowlevelbarrier.h and don't define offsets locally.
7990         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
7992         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
7993         (__lll_mutex_lock_wait): Reverse order of first two parameters.
7994         (__lll_mutex_timedlock_wait): Likewise.
7995         (lll_mutex_lock): Adjust asm for that.
7996         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
7997         (lll_lock): Adjust asm for operand order change.
7998         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
7999         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8001         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8002         Reverse order of parameters.
8003         (__lll_timedwait_tid): Remove regparms attribute.
8004         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8005         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8007         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8008         (__lll_timedwait_tid): Remove one unnecessary instruction.
8010         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8011         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8012         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8013         lowlevelmutex.S.
8015         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8016         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8017         for NOT_IN_libc.
8018         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8019         lowlevellock.S.
8021         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8022         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8023         for libc.so.
8024         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8025         define LOCK here (if UP is not defined).  The actual code is in
8026         lowlevelmutex.S.
8028         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8029         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8030         __lll_timedwait_tid for libc.so.
8031         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8032         define LOCK here (if UP is not defined).  The actual code is in
8033         lowlevellock.S.
8035         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8036         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8037         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8038         instead of lowlevelsem.h.
8039         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8040         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8041         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8043         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8044         lowlevelrwlock.sym.
8045         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8046         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8047         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8049         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8050         register loading.
8051         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8052         last changed.  D'oh.
8054         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8056         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8057         of __libc_locking_needed.
8058         (lll_trylock): Initialize %eax to zero.
8060         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8061         pthread_cond_t definition.
8063 2003-03-10  Roland McGrath  <roland@redhat.com>
8065         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8066         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8067         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8068         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8069         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8071         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8072         Instead of setting PD->multiple_threads, set globals
8073         __pthread_multiple_threads and __libc_multiple_threads.
8074         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8075         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8076         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8078         * descr.h (struct pthread): Conditionalize first member on
8079         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8080         containing an anonymous tcbhead_t.  Move `list' member out.
8081         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8082         * allocatestack.c: Remove use of `header.data.' prefix.
8083         * pthread_create.c: Likewise.
8084         * init.c (__pthread_initialize_minimal_internal): Likewise.
8085         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8086         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8087         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8088         * sysdeps/x86_64/tls.h: Likewise.
8089         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8090         (SINGLE_THREAD_P): Likewise.
8091         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8092         (SINGLE_THREAD_P): Likewise.
8093         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8094         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8096 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8098         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8100         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8101         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8103         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8104         leftovers from the ia32 code.
8106         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8107         memory load.
8108         (clear_once_control): Don't load %esi.
8110         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8111         handling.
8113         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8115         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8116         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8118         * Makefile (tests): Add tst-cond10.
8119         * tst-cond10.c: New file.
8121 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8123         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8124         * tst-signal3.c (do_test): Likewise.
8125         * tst-sem5.c (do_test): Likewise.
8126         * tst-kill6.c (do_test): Likewise.
8127         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8129         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8130         of inc/dec.
8131         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8132         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8133         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8134         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8135         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8136         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8137         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8138         Likewise.
8139         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8140         Likewise.
8141         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8142         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8145         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8146         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8147         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8148         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8150         * allocatestack.c (allocate_stack): If mprotect() fails free the
8151         TLS memory.
8153 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8155         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8157         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8158         lll_wake_tid.  This was used only to work around kernel limits in
8159         the early days.
8160         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8161         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8162         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8163         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8165         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8166         (__pthread_initialize_minimal_internal): Change initialization of
8167         __static_tls_align_m1 appropriately.
8168         * pthreadP.h (__static_tls_align_m1): Renamed from
8169         __static_tls_align.
8170         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8171         instead of __static_tls_align-1.
8173 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8175         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8177         * pthread_create.c: Define __pthread_keys using nocommon
8178         attribute, not by placing it explicitly in bss.
8179         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8181         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8182         Use it in mmap call to allocate stacks.
8184         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8186         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8187         result of the thread function.
8189 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8191         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8192         version is just fine.
8194         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8195         (__pthread_child_handler): Renamed from pthread_child_handler,
8196         exported, and marked hidden.  Change all users.
8197         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8198         free __pthread_child_handler from child list.
8200 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8202         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8204         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8205         Fix handling of cancellation and failing pthread_mutex_unlock call.
8206         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8207         (__pthread_cond_wait): Likewise.
8209         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8210         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8211         lll_futex_timed_wait call.
8212         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8213         (pthread_rwlock_timedwrlock): Likewise.
8215         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8216         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8217         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8219         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8220         check of lll_futex_wake return value.
8222 2003-03-03  Roland McGrath  <roland@redhat.com>
8224         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8226         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8227         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8228         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8230 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8232         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8233         error for CPU clocks.
8235         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8236         _POSIX_MONOTONIC_CLOCK.
8237         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8239         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8240         recent kernels.
8242 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8244         * descr.h (struct pthread): Move cleanup field to the front.
8246 2003-03-01  Roland McGrath  <roland@redhat.com>
8248         * sem_open.c (sem_open): Braino fix.
8250 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8252         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8254         __pthread_cleanup_pop functionality.
8255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8257         * descr.h (struct pthread): Move tid field to the front now that
8258         it is often used.
8260         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8261         (__lll_mutex_timedlock_wait): Remove.
8262         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8263         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8264         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8265         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8266         (lll_unlock_wake_cb): Don't save and restore %esi.
8267         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8268         %esi.
8269         (__lll_timedwait_tid): Add alignment.
8270         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8271         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8272         %esi.
8273         (__lll_timedwait_tid): Removed.
8274         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8275         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8276         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8277         (pthread_barrier_wait): Don't save, load, and restore %esi for
8278         last thread.
8279         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8280         (__pthread_cond_signal): Don't save, load, and restore %esi.
8281         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8282         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8283         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8284         Don't save, load, and restore %esi.
8286 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8288         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8289         Release lock before waking up the waiters.
8291         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8293         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8294         (reader_thread): Likewise.
8296         * sysdeps/pthread/pthread_rwlock_unlock.c
8297         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8298         to wake up readers if there are none.
8300         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8301         Release internal lock before wake threads.
8303 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8305         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8306         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8307         predefined.
8308         * tst-rwlock9.c: Likewise.
8309         * tst-rwlock10.c: New file.
8310         * tst-rwlock11.c: New file.
8312         * Makefile (tests): Add tst-dlsym1.
8313         * tst-dlsym1.c: New file.
8315         * init.c (__pthread_initialize_minimal_internal): Set
8316         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8317         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8319 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8321         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8323         * tst-cond2.c: Fix sychronization with child.
8325         * tst-rwlock8.c (reader_thread): Remove unused variable.
8327         * Makefile: Add rules to build and run tst-tls3.
8328         * tst-tls3.c: New file.
8329         * tst-tls3mod.c: New file.
8331         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8332         * tst-rwlock8.c: New file.
8333         * tst-rwlock9.c: New file.
8334         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8335         complete broken rwlock implementation.
8336         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8337         Likewise.
8338         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8339         Likewise.
8340         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8342         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8343         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8344         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8345         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8346         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8348 2003-02-23  Roland McGrath  <roland@redhat.com>
8350         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8352 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8354         * Makefile (tests): Add tst-context1.
8355         * tst-context1.c: New file.
8357         * Makefile (tests): Add tst-tls1 and tst-tls2.
8358         * tst-tls1.c: New file.
8359         * tst-tls2.c: New file.
8361         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8362         for failed cmpxchg.
8364         * pthread_create.c (start_thread): Set EXITING_BIT early.
8366         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8367         (THREAD_GETMEM_NC): Likewise.
8369 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8371         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8372         off 3 more bytes by using offset-less instructions when possible.
8374         * Makefile: Add dependency for $(objpfx)version.d.
8376         * eintr.c (eintr_source): Add unnecessary return but the compiler
8377         insists.
8379         * tst-kill3.c: Include <unistd.h>.
8381 2003-02-21  Roland McGrath  <roland@redhat.com>
8383         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8385 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8387         * Makefile (tests): Add tst-eintr1.
8388         (distribute): Add eintr.c.
8389         * tst-eintr1.c: New file.
8390         * eintr.c: New file.
8392         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8394         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8395         Disallow sending SIGCANCEL.
8397         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8398         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8399         * tst-kill1.c: New file.
8400         * tst-kill2.c: New file.
8401         * tst-kill3.c: New file.
8402         * tst-kill5.c: New file.
8403         * tst-kill6.c: New file.
8404         * tst-basic7.c: Renamed to...
8405         * tst-kill4.c: ...this.
8407 2003-02-21  Roland McGrath  <roland@redhat.com>
8409         * Makefile (install-lib-ldscripts): New variable.
8411 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8413         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8414         * pthread_cancel.c: Use INVALID_TD_P.
8415         * pthread_detach.c: Likewise.
8416         * pthread_getschedparam.c: Likewise.
8417         * pthread_setschedparam.c: Likewise.
8418         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8419         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8420         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8421         * pthread_timedjoin.c: Likewise.
8423         * tst-basic7.c: Include <signal.h>.
8425         * pthread_join.c (pthread_join): Limited checking for invalid
8426         descriptors.
8427         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8429 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8431         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8432         beginning of the loop.  Clear the entire first block of TSD.
8433         * Makefile (tests): Add tst-key4.
8434         * tst-key4.c: New file.
8436 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8438         * Makefile (tests): Add tst-basic7.
8439         * tst-basic7.c: New file.
8441         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8442         Add some more __builtin_expect.
8444         * pthreadP.h: Define dummy version of DEBUGGING_P.
8446 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8448         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8449         _POSIX_THREAD_PRIORITY_SCHEDULING.
8450         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8451         _XOPEN_REALTIME_THREADS.
8452         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8454         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8455         kernel returns EINVAL for PID <= 0, work around it.
8457         * Makefile (tests): Add tst-signal5.
8458         * tst-signal5.c: New file.
8460         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8461         and LOGIN_NAME_MAX.
8463         * tst-cancel1.c (tf): Block all signals.
8465         * Makefile (tests): Add tst-basic6.
8466         * tst-basic6.c: New file.
8468         * tst-basic1.c: Add test for process ID.
8470         * Makefile (tests): Add tst-cancel10.
8471         * tst-cancel10.c: New file.
8473         * Makefile (tests): Add tst-signal4.
8474         * tst-signal4.c: New file.
8476         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8477         __sigismember instead of sigismember.  Add __builtin_expect.
8479 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8481         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8482         pthread_setcancelstate, and pthread_rwlock_setpshared.
8484         * tst-cancel7.c (do_test): Make sure the pid file exists before
8485         canceling the thread.
8487         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8488         pthread_rwlock_timedrdlock tests.
8489         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8491         Check for invalid tv_nsec field.
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8493         Likewise.
8495         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8496         recursive mutex of overflow.
8498         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8500         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8501         going into an endless loop.
8502         * Makefile (tests): Add tst-cancel9.
8503         * tst-cancel9.c: New file.
8505         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8507 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8509         * tst-mutex5.c (do_test): Add more timedlock tests.
8511         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8512         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8514         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8515         use INLINE_SYSCALL.  Error number is returned, not -1.
8517         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8518         and __deallocate_stack with internal_function.
8519         * pthread_create.c: Adjust definitions appropriately.
8520         * allocatestack.c: Likewise.
8522         * pthread_join.c: Add one more __builtin_expect.
8523         * pthread_timedjoin.c: Likewise.
8525         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8526         not data of sequence number does not match.
8527         Add one __builtin_expect.
8529         * Makefile (tests): Add tst-clock1.
8530         * tst-clock1.c: New file.
8532         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8533         negative arguments.
8534         * Makefile (tests): Add tst-basic5.
8535         * tst-basic5.c: New file.
8537 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8539         * Makefile (tests): Add tst-basic4.
8540         * tst-basic4.c: New file.
8542         * pthreadP.h: Add declaraction for __nptl_nthreads.
8543         * pthread_create.c: Define __nptl_nthreads
8544         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8545         after thread is done.  If then zero, call exit(0).
8546         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8547         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8548         * init.c (pthread_functions): Initialize ptr_nthreads.
8549         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8550         (__reclaim_stacks): Decrement __nptl_nthreads.
8551         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8552         Define.
8553         * Makefile (tests): Add tst-basic3.
8554         * tst-basic3.c: New file.
8556         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8557         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8558         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8559         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8560         if asynchronous canceling is enabled.
8561         * pthread_join.c (pthread_join): When recognizing circular joins,
8562         take into account the other thread might be already canceled.
8563         * Makefile (tests): Add tst-join5.
8564         * tst-join5.c: New file.
8566         * Makefile (tests): Add tst-join4.
8567         * tst-join4.c: New file.
8569 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8571         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8573 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8575         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8576         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8577         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8578         warning.
8579         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8580         to avoid warning.
8581         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8582         error if lll_futex_wake failed.
8584 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8587         handling of cancellation and failung pthread_mutex_unlock call.
8588         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8589         * Makefile (tests): Add tst-cond8 and tst-cond9.
8590         * tst-cond8.c: New file.
8591         * tst-cond9.c: New file.
8593         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8595         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8596         non-standard initializers with __USE_GNU.
8598         * Makefile (tests): Add tst-cleanup3.
8599         * tst-cleanup3.c: New file.
8601 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8603         * Makefile (tests): Add tst-attr1 and tst-attr2.
8604         * tst-attr1.c: New file.
8605         * tst-attr2.c: New file.
8607         * Makefile: Add rules to build and run tst-atfork2 test.
8608         * tst-atfork2.c: New file.
8609         * tst-atfork2mod.c: New file.
8611         * sysdeps/unix/sysv/linux/unregister-atfork.c
8612         (__unregister_atfork): Free the memory allocated for the handlers
8613         after removing them from the lists.
8615         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8616         cleanup function.
8618         * tst-atfork1.c (do_test): Wait for the child we forked.
8619         Report error in child.
8621         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8623         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8625 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8627         * Makefile (tests): Add tst-cancel8.
8628         * tst-cancel8.c: New file.
8630         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8631         clearing of control variable.
8632         * Makefile (tests): Add tst-once3 and tst-once4.
8633         * tst-once3.c: New file.
8634         * tst-once4.c: New file.
8636 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8638         * sysdeps/sh/Makefile: New file.
8639         * sysdeps/sh/bits/atomic.h: New file.
8640         * sysdeps/sh/pthread_spin_init.c: New file.
8641         * sysdeps/sh/pthread_spin_lock.c: New file.
8642         * sysdeps/sh/pthread_spin_trylock.S: New file.
8643         * sysdeps/sh/pthread_spin_unlock.S: New file.
8644         * sysdeps/sh/pthreaddef.h: New file.
8645         * sysdeps/sh/tcb-offsets.sym: New file.
8646         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8647         * sysdeps/sh/tls.h: New file.
8648         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8649         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8650         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8651         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8652         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8653         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8654         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8655         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8656         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8657         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8658         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8659         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8660         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8661         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8662         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8663         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8664         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8665         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8666         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8667         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8668         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8669         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8670         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8671         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8672         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8673         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8674         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8675         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8676         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8677         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8679 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8681         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8682         according to POSIX.
8684         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8686 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8688         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8689         (TLS_GET_FS): New #define.
8690         (TLS_SET_FS): New #define.
8691         Correct value of __NR_set_thread_area.
8693         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8695 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8697         * Makefile (tests): Add tst-popen1.
8698         * tst-popen1.c: New file.
8700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8701         but inactive generalization.
8702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8704         Minor optimization, remove one instruction.
8705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8707 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8709         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8711 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8713         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8714         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8715         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8716         * sysdeps/pthread/pthread_cond_signal.c: New file.
8717         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8718         * sysdeps/pthread/pthread_cond_wait.c: New file.
8719         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8720         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8721         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8722         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8723         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8724         * sysdeps/s390/Makefile: New file.
8725         * sysdeps/s390/bits/atomic.h: New file.
8726         * sysdeps/s390/pthread_spin_init.c: New file.
8727         * sysdeps/s390/pthread_spin_lock.c: New file.
8728         * sysdeps/s390/pthread_spin_trylock.c: New file.
8729         * sysdeps/s390/pthread_spin_unlock.c: New file.
8730         * sysdeps/s390/pthreaddef.h: New file.
8731         * sysdeps/s390/tcb-offsets.sym: New file.
8732         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8733         * sysdeps/s390/tls.h: New file.
8734         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8735         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8736         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8737         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8738         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8739         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8740         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8741         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8742         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8743         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8744         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8745         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8746         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8747         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8748         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8749         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8750         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8751         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8752         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8753         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8754         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8755         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8756         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8758 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8760         * atomic.h: Add a couple more default implementations.
8761         (atomic_compare_and_exchange_acq): Use
8762         __arch_compare_and_exchange_32_acq in return value definition.  It
8763         always exists.
8764         (atomic_bit_set): Renamed from atomic_set_bit.
8765         Add missing atomic_ prefixes.
8767         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8768         thread library is available, use correct value to mark initialized
8769         once variable.
8771 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8773         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8774         __sysconf to determine pagesize.
8776         * pthread_create.c: Include <atomic.h>.
8777         * allocatestack.c (allocate_stack): Implement coloring of the
8778         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8779         size minus one.  Adjust users.
8780         * sysdeps/i386/i686/Makefile: New file.
8782 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8784         * allocatestack.c: Improve comment throughout the file.
8786         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8787         (__lll_lock_wait): Add branch prediction.
8788         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8789         (__lll_lock_wait): Likewise.
8790         (lll_unlock_wake_cb): Removed.
8792 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8794         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8795         _POSIX_THREAD_PRIORITY_SCHEDULING.
8797 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8799         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8800         Fix return type of ptr___pthread_getspecific.
8802 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8804         * Makefile (tests): Add tst-umask1.
8805         (tst-umask1-ARGS): Define.
8806         * tst-umask1.c: New file.
8808 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8810         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8811         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8812         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8813         pthread_rwlock_unlock.
8814         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8815         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8816         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8819         New file.
8820         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8821         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8822         New file.
8823         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8824         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8825         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8826         New file.
8827         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8828         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8829         New file.
8830         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8831         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8832         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8833         New file.
8834         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8835         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8836         New file.
8837         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8839         * Makefile (libpthread-routines): Remove lowlevelcond and
8840         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8841         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8842         and pthread_cond_broadcast.
8843         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8844         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8845         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8846         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8847         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8848         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8849         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8850         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8851         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8852         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8853         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8854         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8857         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8858         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8859         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8860         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8861         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8862         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8863         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8864         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8865         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8866         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8867         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8868         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8869         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8870         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8871         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8872         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8873         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8875         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8876         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8877         of the code is moved to ...
8878         * sysdeps/pthread/createthread.c: ...here.  New file.
8880 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8882         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8883         (__new_sem_post): Clear %eax before returning.
8884         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8886         * Makefile (tests): Add tst-cleanup2.
8887         * tst-cleanup2.c: New file.
8889         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8890         Interpret first parameter correctly.
8892 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8894         * Makefile (headers): Add bits/semaphore.h.
8896 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8898         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8899         if not SHARED.
8901 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8903         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8904         must be used and mapping failed.
8905         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8907         * Makefile (CFLAGS-pthread_self.os): Define this, not
8908         CFLAGS-pthread_self.c.
8910 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8912         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8913         lll_unlock_wake_cb.
8915         * Makefile (libpthread-routines): Add version.  Add rules to build
8916         version.os and banner.h.
8917         * version.c: New file.
8919 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8921         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8922         the alias unconditional.
8923         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8925 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8927         * Makefile (CFLAGS-pthread_self.c): New definition.
8929 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8931         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8932         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8933         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8934         * init.c (__pthread_initialize_minimal_internal): Likewise.
8936 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8938         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8940         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8941         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8942         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8943         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8944         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8945         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8947 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8949         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8950         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8951         * tst-cancel-wrappers.sh: Remove all exceptions.
8953 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8955         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8956         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8958         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8959         Use __libc_pthread_functions array if SHARED.
8961         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8962         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8964         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8965         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8966         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8967         __libc_ptf_call instead of __libc_maybe_call.
8968         (PTF): New #define.
8969         (__libc_cleanup_region_start): Wrap function name with PTF call.
8970         (__libc_cleanup_region_end): Likewise.
8971         (__libc_cleanup_end): Likewise.
8973         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8974         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8975         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8976         * pthreadP.h: Add prototypes.
8978         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8979         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8980         __pthread_rwlock_unlock aliases.
8981         * pthreadP.h: Add prototypes for new aliases.
8983         * pthreadP.h (struct pthead_functions): Moved to...
8984         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8985         * init.c (pthread_functions): Add initializers for new elements.
8987         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8988         __pthread_cleanup_pop_restore aliases.
8989         * pthreadP.h: Add prototypes.
8991         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
8992         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
8993         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
8994         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
8995         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8996         * pthreadP.h: Adjust prototypes and callers.
8998 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9000         * Makefile (tests): Add tst-cancel7.
9001         (tst-cancel7-ARGS): New variable.
9002         * tst-cancel7.c: New file.
9004         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9005         around gcc defficiencies.
9006         * old_pthread_cond_signal.c: Likewise.
9007         * old_pthread_cond_timedwait.c: Likewise.
9008         * old_pthread_cond_wait.c: Likewise.
9010         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9012 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9014         * Makefile (tests): Add tst-cond7.
9015         * tst-cond7.c: New file.
9017         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9018         (condvar_cleanup): Get condvar address from the right place.
9020         * atomic.h: Correct definitions of atomic_full_barrier,
9021         atomic_read_barrier, atomic_write_barrier.
9023         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9024         race-free.
9025         * old_pthread_cond_signal.c: Likewise.
9026         * old_pthread_cond_timedwait.c: Likewise.
9027         * old_pthread_cond_wait.c: Likewise.
9029 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9031         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9033 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9035         * pthreadP.h (pthread_cond_2_0_t): New type.
9036         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9037         Use new type for the 2.0 condvar function prototypes.
9038         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9039         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9040         parameter.
9041         * old_pthread_cond_destroy.c: Likewise.
9042         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9043         * old_pthread_cond_signal.c: Likewise.
9044         * old_pthread_cond_timedwait.c: Likewise.
9045         * old_pthread_cond_wait.c: Likewise.
9047         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9048         (__pthread_cond_wait): Don't save cancellation mode and seq value
9049         in same location.
9051         * herrno.c (__h_errno_location): Don't define as weak.
9053 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9055         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9056         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9057         and pthread_cond_wait.
9058         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9059         Renamed to...
9060         (__pthread_cond_broadcast_2_0): ... this.
9061         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9062         Renamed to...
9063         (__pthread_cond_destroy_2_0): ... this.
9064         * old_pthread_cond_init.c (__old_pthread_cond_init):
9065         Renamed to...
9066         (__pthread_cond_init_2_0): ... this.
9067         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9068         Renamed to...
9069         (__pthread_cond_signal_2_0): ... this.
9070         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9071         Renamed to...
9072         (__pthread_cond_wait_2_0): ... this.
9073         * pthread_cond_destroy.c: Include shlib-compat.h.
9074         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9075         * pthread_cond_init.c: Include shlib-compat.h.
9076         (pthread_cond_init): Change strong_alias into versioned_symbol.
9077         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9078         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9079         fields.
9080         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9081         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9082         __pthread_cond_wait_2_0): New prototypes.
9083         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9084         __old_pthread_cond_init, __old_pthread_cond_signal,
9085         __old_pthread_cond_wait): Removed.
9086         * init.c: Include shlib-compat.h.
9087         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9088         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9089         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9090         ptr___pthread_cond_*_2_0 fields.
9091         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9092         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9094         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9095         LIBC_SIGACTION was not yet defined.
9096         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9097         [!defined LIBC_SIGACTION] (__sigaction): New function and
9098         libc_hidden_weak.
9099         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9100         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9102 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9104         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9106 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9108         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9109         New, larger type definition.
9110         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9111         implementation.
9112         * Versions [libpthread]: Add definitions for new pthread_cond_*
9113         interfaces for version GLIBC_2.3.2.
9114         * pthread_cond_init.c: Update initialization for new type definition.
9115         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9116         pthread_cond_timedwait, pthread_cond_signal, and
9117         pthread_cond_broadcast.  Add old_pthread_cond_init,
9118         old_pthread_cond_destroy, old_pthread_cond_wait,
9119         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9120         old_pthread_cond_broadcast.
9121         * old_pthread_cond_broadcast.c: New file.
9122         * old_pthread_cond_destroy.c: New file.
9123         * old_pthread_cond_init.c: New file.
9124         * old_pthread_cond_signal.c: New file.
9125         * old_pthread_cond_timedwait.c: New file.
9126         * old_pthread_cond_wait.c: New file.
9127         * pthreadP.h: Add prototypes for the compatibility interfaces.
9129         * pthread_cond_destroy.c: Don't include <errno.h>.
9131 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9133         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9134         unnecessary zero offset when addressing MUTEX.
9136 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9138         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9139         __register_atfork.
9140         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9141         for __register_atfork.
9143 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9145         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9146         instead of ASSEMBLER test macro.
9148         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9149         __libc_current_sigrtmax): Add libc_hidden_def.
9151         * sysdeps/pthread/list.h: Remove assert.h include.
9153 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9155         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9156         __pthread_initialize_minimal_internal not
9157         __pthread_initialize_minimal.
9159 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9161         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9162         __pthread_initialize_minimal as hidden.
9164         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9165         constructor.
9167 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9169         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9170         $(common-objpfx)format.lds, include that into the output script.
9171         Fix comment.
9172         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9174 2002-12-28  Andreas Jaeger  <aj@suse.de>
9176         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9177         nsec resolution changes.
9178         (xstat64_conv): Likewise.
9179         (xstat32_conv): Likewise.
9180         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9181         struct kernel_stat.
9182         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9183         structs stat and stat64.
9184         * time/time.h (__timespec_defined): Define for __USE_MISC.
9185         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9187 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9189         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9190         argument.
9191         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9192         (pthread_exit): Use strong_alias to avoid warnings.
9193         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9194         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9195         ptr___pthread_attr_init_2_*.
9196         * init.c (pthread_functions): Adjust.
9198 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9200         * forward.c: Make all functions available by default again.  It
9201         caused too much trouble.
9203         * pt-siglongjmp.c: Removed.
9205 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9207         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9208         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9209         * sysdeps/i386/Makefile: New file.
9210         * sysdeps/i386/tcb-offsets.sym: New file.
9211         * sysdeps/pthread/tcb-offsets.h: New file.
9212         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9213         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9215         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9216         __register_atfork...
9217         (GLIBC_2.3.2): ...here.
9219 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9221         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9222         pthread_attr_setstackaddr with __attribute_deprecated__.
9224 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9226         * pt-system.c (system): Remove cancellation handling.
9227         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9228         cancellation routines.
9230 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9232         * descr.h: Include <dl-sysdep.h>.
9233         (struct pthread): Move header.data.list to the back of the struct.
9234         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9235         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9236         (SYSINFO_OFFSEET): Likewise.
9238 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9240         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9241         Define.
9242         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9243         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9244         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9245         (USE_DL_SYSINFO): Undef.
9247 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9249         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9250         $(common-objpfx)libc.so.
9251         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9252         it is bigger than pipe buffer size even on arches with bigger
9253         page size.
9254         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9256 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9258         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9259         correct errno access for case that USE___THREAD is not defined.
9261 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9263         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9264         Patch by Marijn Ros <marijn@mad.scientist.com>.
9266 2002-12-22  Roland McGrath  <roland@redhat.com>
9268         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9270 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9272         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9274 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9276         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9277         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9278         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9280         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9281         of int $0x80.
9282         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9283         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9284         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9285         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9286         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9287         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9288         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9289         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9291         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9292         sysenter.
9293         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9295         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9297         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9298         in new TCB.
9299         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9300         that sysinfo is properly initialized.
9301         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9302         to 1 only for ld.so.
9304         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9305         RTLD_CORRECT_DYNAMIC_WEAK.
9307 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9309         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9310         Use return 0 as 6th argument to FORWARD4.
9311         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9313 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9315         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9316         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9317         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9318         (INIT_SYSINFO): New #define.
9319         (TLS_TP_INIT): Use INIT_SYSINFO.
9320         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9321         At test to make sure SYSINFO_OFFSET value is correct.
9322         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9324 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9326         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9327         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9328         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9329         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9330         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9331         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9332         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9334 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9336         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9337         macro instead of using int $0x80 directly.
9339         * sysdeps/pthread/bits/stdio-lock.h: New file.
9340         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9341         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9342         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9343         * Makefile (routines): Add libc-lowlevelmutex.
9345         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9346         __i686.get_pc_thunk.dx.
9348 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9350         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9351         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9352         ($(objpfx)tst-cancel-wrappers.out): New rule.
9353         * tst-cancel-wrappers.sh: New test.
9354         * tst-locale1.c: Include signal.h.
9355         (uselocale): Test static linking of __libc_current_sigrt*.
9357 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9359         * Makefile (tests): Add tst-cancel6.
9360         * tst-cancel6.c: New file
9362 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9364         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9365         Define meaningfully for assembler as well.
9366         * pthreadP.h (struct pthread_functions): Remove
9367         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9368         and ptr_pthread_attr_init_2_1 fields.
9369         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9370         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9371         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9372         (FORWARD3): Define using FORWARD4.
9373         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9374         versions.
9375         * pt-system.c: Remove duplicate stdlib.h include.
9377 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9379         * sem_init.c: Define sem_init@GLIBC_2.0.
9380         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9381         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9383         * flockfile.c: Moved to...
9384         * sysdeps/pthread/flockfile.c: ...here.  New file.
9385         * funlockfile.c: Moved to...
9386         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9387         * ftrylockfile.c: Moved to...
9388         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9390 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9392         * libc-cancellation.c: Guard both function with
9393         #if !defined NOT_IN_libc.
9394         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9395         automatically provided pthread wrappers.
9396         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9397         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9398         nor in libpthread.
9399         * pt-open.c: Removed.
9400         * pt-fcntl.c: Removed.
9401         * pt-fsync.c: Removed.
9402         * pt-lseek.c: Removed.
9403         * pt-msgrcv.c: Removed.
9404         * pt-msgsnd.c: Removed.
9405         * pt-msync.c: Removed.
9406         * pt-nanosleep.c: Removed.
9407         * pt-open64.c: Removed.
9408         * pt-pause.c: Removed.
9409         * pt-pread.c: Removed.
9410         * pt-pread64.c: Removed.
9411         * pt-pwrite.c: Removed.
9412         * pt-pwrite64.c: Removed.
9413         * pt-read.c: Removed.
9414         * pt-recv.c: Removed.
9415         * pt-recvfrom.c: Removed.
9416         * pt-recvmsg.c: Removed.
9417         * pt-send.c: Removed.
9418         * pt-sendto.c: Removed.
9419         * pt-sigtimedwait.c: Removed.
9420         * pt-sigwait.c: Removed.
9421         * pt-wait.c: Removed.
9422         * pt-waitpid.c: Removed.
9423         * pt-write.c: Removed.
9424         * pt-accept.c: Removed.
9425         * pt-close.c: Removed.
9426         * pt-connect.c: Removed.
9427         * pt-lseek64.c: Removed.
9428         * pt-sendmsg.c: Removed.
9429         * pt-tcdrain.c: Removed.
9431 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9433         * init.c (__pthread_initialize_minimal_internal): Renamed from
9434         __pthread_initialize_minimal.  Make old name an alias.  This
9435         converts a normal relocation into a relative relocation.
9437         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9439         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9440         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9441         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9442         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9443         pt-sigwaitinfo, pt-waitid, and pt-writev.
9444         * pt-creat.c: Removed.
9445         * pt-poll.c: Removed.
9446         * pt-pselect.c: Removed.
9447         * pt-readv.c: Removed.
9448         * pt-select.c: Removed.
9449         * pt-sigpause.c: Removed.
9450         * pt-sigsuspend.c: Removed.
9451         * pt-sigwaitinfo.c: Removed.
9452         * pt-waitid.c: Removed.
9453         * pt-writev.c: Removed.
9455         * init.c (pthread_functions): New variable.
9456         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9457         (or NULL) to __libc_pthread_init.
9458         * forward.c: Rewrite to use __libc:pthread_functions array to get
9459         function addresses.
9460         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9461         prototype.
9462         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9463         Take new parameter.  Copy content of variable pointed to by it
9464         to __libc_pthread_init.
9466         * pthreadP.h (struct pthread_functions): New type.
9467         (__libc_pthread_init): Declare.
9469         * pthread_attr_destroy.c: Add namespace protected alias.
9470         * pthread_attr_getdetachstate.c: Likewise.
9471         * pthread_attr_getinheritsched.c: Likewise.
9472         * pthread_attr_getschedparam.c: Likewise.
9473         * pthread_attr_getschedpolicy.c: Likewise.
9474         * pthread_attr_getscope.c: Likewise.
9475         * pthread_attr_setdetachstate.c: Likewise.
9476         * pthread_attr_setinheritsched.c: Likewise.
9477         * pthread_attr_setschedparam.c: Likewise.
9478         * pthread_attr_setschedpolicy.c: Likewise.
9479         * pthread_attr_setscope.c: Likewise.
9480         * pthread_cond_broadcast.c: Likewise.
9481         * pthread_cond_destroy.c: Likewise.
9482         * pthread_cond_init.c: Likewise.
9483         * pthread_cond_signal.c: Likewise.
9484         * pthread_cond_wait.c: Likewise.
9485         * pthread_condattr_destroy.c: Likewise.
9486         * pthread_condattr_init.c: Likewise.
9487         * pthread_equal.c: Likewise.
9488         * pthread_exit.c: Likewise.
9489         * pthread_getschedparam.c: Likewise.
9490         * pthread_self.c: Likewise.
9491         * pthread_setcancelstate.c: Likewise.
9492         * pthread_setschedparam.c: Likewise.
9493         * pthread_mutex_destroy.c: Likewise.
9494         * pthread_mutex_init.c: Likewise.
9495         * pthreadP.h: Add prototypes for the aliases.
9497         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9498         multiple_threads member in correct TCB to 1.
9500         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9501         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9502         member of thread decriptor, otherwise return unconditionally 1.
9504 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9506         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9507         regular Linux version.  Remove file.
9508         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9509         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9510         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9511         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9512         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9513         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9514         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9515         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9516         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9517         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9518         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9519         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9520         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9521         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9522         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9523         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9524         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9525         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9526         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9527         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9528         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9529         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9530         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9531         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9532         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9533         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9534         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9535         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9536         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9537         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9539 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9541         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9542         * sysdeps/unix/sysv/linux/open.c: Removed.
9543         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9544         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9545         * sysdeps/unix/sysv/linux/msync.c: Removed.
9546         * sysdeps/unix/sysv/linux/read.c: Removed.
9547         * sysdeps/unix/sysv/linux/close.c: Removed.
9548         * sysdeps/unix/sysv/linux/creat.c: Removed.
9549         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9550         * sysdeps/unix/sysv/linux/pause.c: Removed.
9551         * sysdeps/unix/sysv/linux/select.c: Removed.
9552         * sysdeps/unix/sysv/linux/write.c: Removed.
9554 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9556         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9557         element in TCB to see whether locking is needed.
9559         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9560         MULTIPLE_THREADS_OFFSET value is correct.
9562         * sysdeps/unix/sysv/linux/close.c: New file.
9563         * sysdeps/unix/sysv/linux/connect.S: New file.
9564         * sysdeps/unix/sysv/linux/creat.c: New file.
9565         * sysdeps/unix/sysv/linux/fsync.c: New file.
9566         * sysdeps/unix/sysv/linux/llseek.c: New file.
9567         * sysdeps/unix/sysv/linux/lseek.c: New file.
9568         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9569         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9570         * sysdeps/unix/sysv/linux/msync.c: New file.
9571         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9572         * sysdeps/unix/sysv/linux/open.c: New file.
9573         * sysdeps/unix/sysv/linux/open64.c: New file.
9574         * sysdeps/unix/sysv/linux/pause.c: New file.
9575         * sysdeps/unix/sysv/linux/poll.c: New file.
9576         * sysdeps/unix/sysv/linux/pread.c: New file.
9577         * sysdeps/unix/sysv/linux/pread64.c: New file.
9578         * sysdeps/unix/sysv/linux/pselect.c: New file.
9579         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9580         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9581         * sysdeps/unix/sysv/linux/readv.c: New file.
9582         * sysdeps/unix/sysv/linux/recv.S: New file.
9583         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9584         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9585         * sysdeps/unix/sysv/linux/select.c: New file.
9586         * sysdeps/unix/sysv/linux/send.S: New file.
9587         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9588         * sysdeps/unix/sysv/linux/sendto.S: New file.
9589         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9590         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9591         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9592         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9593         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9594         * sysdeps/unix/sysv/linux/system.c: New file.
9595         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9596         * sysdeps/unix/sysv/linux/wait.c: New file.
9597         * sysdeps/unix/sysv/linux/waitid.c: New file.
9598         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9599         * sysdeps/unix/sysv/linux/writev.c: New file.
9600         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9602         * pt-readv.c: Fix comment.
9604 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9606         * tst-cleanup1.c: Include stdlib.h.
9608         * tst-cancel5.c: New test.
9609         * Makefile (tests): Add tst-cancel5.
9610         (tst-cancel5): Link against libc.so libpthread.so in that order.
9612 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9614         * forward.c (test_loaded): Prevent recursive calls.
9616         * Makefile (routines): Add libc-cancellation.
9617         * libc-cancellation.c: New file.
9618         * descr.h (struct pthread): Add multiple_threads field.
9619         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9620         new thread descriptor to 1.
9621         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9622         Initialize multiple_thread field after successful thread creation.
9623         * cancellation.c (__do_cancel): Move to pthreadP.h.
9624         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9625         (__pthread_disable_asynccancel): Add internal_function attribute.
9626         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9627         * pthread_setcancelstate.c: Likewise.
9628         * pthread_setcanceltype.c: Likewise.
9629         * pthread_exit.c: Likewise.
9630         * pthreadP.h (CANCELLATION_P): Likewise.
9631         (__do_cancel): Define as static inline.
9632         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9633         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9634         declarations.
9635         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9636         fields.  Define MULTIPLE_THREADS_OFFSET.
9637         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9638         declaration.
9639         * sysdeps/unix/sysv/linux/accept.S: New file.
9640         * sysdeps/unix/sysv/linux/read.c: New file.
9641         * sysdeps/unix/sysv/linux/write.c: New file.
9642         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9643         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9644         initialization of __libc_locking_needed.
9645         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9646         __libc_locking_needed, use multiple_threads field in TCB.
9647         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9649 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9651         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9652         version.
9653         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9655         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9656         access to __libc_locking_needed for PIC.
9658 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9660         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9661         declare for libc.so.
9662         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9663         expression.
9664         (__libc_lock_lock): Put into statement expression.
9665         (__libc_lock_unlock): Remove trailing semicolon.
9666         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9668 2002-12-12  Roland McGrath  <roland@redhat.com>
9670         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9671         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9673 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9675         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9676         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9677         Initialize __libc_locking_needed.
9678         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9679         instead of __register_pthread_fork_handler.
9680         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9681         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9682         fork-gen with libc_pthread_init.
9683         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9684         of __register_pthread_fork_handler.
9685         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9686         of __register_pthread_fork_handler.
9687         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9688         __libc_locking_needed to determine whether lock prefix can be avoided.
9689         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9691 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9693         * Makefile (tests): Add tst-cleanup1.
9694         * tst-cleanup1.c: New file.
9695         * cancellation.c (__cleanup_thread): Removed.
9696         (__do_cancel): Remove call to __cleanup_thread.
9697         * pthreadP.h: Remove __cleanup_thread prorotype.
9699         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9700         Remember function and argument even if cancellation handler
9701         function is not available.
9702         (__libc_cleanup_region_end): Execute registered function directly if
9703         pthread functions are not available.
9704         (__libc_cleanup_end): Likewise.
9706         * init.c (__pthread_initialize_minimal): Fix initialization in
9707         static lib by preventing gcc from being too clever.
9709 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9711         * init.c (__pthread_initialize_minimal): Remove unneccesary
9712         sigaddset call.
9714         * Makefile (tests): We can run tst-locale2 now.
9716 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9718         * Versions: Remove duplicated sigwait entry.
9720 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9722         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9723         inside libpthread.
9725         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9727         * pthreadP.h: Declare __pthread_enable_asynccancel and
9728         __pthread_disable_asynccancel.
9729         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9730         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9731         * cancellation.c (__pthread_enable_asynccancel): New function.
9732         (__pthread_disable_asynccancel): New function.
9733         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9734         * pt-close.c: Likewise.
9735         * pt-connect.c: Likewise.
9736         * pt-creat.c: Likewise.
9737         * pt-fcntl.c: Likewise.
9738         * pt-fsync.c: Likewise.
9739         * pt-lseek.c: Likewise.
9740         * pt-lseek64.c: Likewise.
9741         * pt-msgrcv.c: Likewise.
9742         * pt-msgsnd.c: Likewise.
9743         * pt-msync.c: Likewise.
9744         * pt-nanosleep.c: Likewise.
9745         * pt-open.c: Likewise.
9746         * pt-open64.c: Likewise.
9747         * pt-pause.c: Likewise.
9748         * pt-poll.c: Likewise.
9749         * pt-pread.c: Likewise.
9750         * pt-pread64.c: Likewise.
9751         * pt-pselect.c: Likewise.
9752         * pt-pwrite.c: Likewise.
9753         * pt-pwrite64.c: Likewise.
9754         * pt-read.c: Likewise.
9755         * pt-readv.c: Likewise.
9756         * pt-recv.c: Likewise.
9757         * pt-recvfrom.c: Likewise.
9758         * pt-recvmsg.c: Likewise.
9759         * pt-select.c: Likewise.
9760         * pt-send.c: Likewise.
9761         * pt-sendmsg.c: Likewise.
9762         * pt-sendto.c: Likewise.
9763         * pt-sigpause.c: Likewise.
9764         * pt-sigsuspend.c: Likewise.
9765         * pt-sigtimedwait.c: Likewise.
9766         * pt-sigwait.c: Likewise.
9767         * pt-sigwaitinfo.c: Likewise.
9768         * pt-system.c: Likewise.
9769         * pt-tcdrain.c: Likewise.
9770         * pt-wait.c: Likewise.
9771         * pt-waitid.c: Likewise.
9772         * pt-waitpid.c: Likewise.
9773         * pt-write.c: Likewise.
9774         * pt-writev.c: Likewise.
9775         * pthread_join.c: Likewise.
9776         * pthread_timedjoin.c: Likewise.
9778         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9779         (__xpg_sigpause): New function.
9780         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9782 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9784         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9786         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9787         _GI_pthread_cleanup_pop to pthreadP.h.
9789         * ftrylockfile.c: Use _IO_lock_trylock instead of
9790         pthread_mutex_trylock.
9792         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9793         (CANCEL_RESET): Likewise.
9794         (__pthread_setcanceltype_): Declare.
9795         (__pthread_mutex_lock_internal): Declare.
9796         (__pthread_mutex_unlock_internal): Declare.
9797         (__pthread_once_internal): Declare.
9798         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9799         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9801         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9802         and pthread_mutex_unlock.
9803         * pthread_cond_wait.c: Likewise.
9804         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9805         * pthread_mutex_unlock.c: Likewise.
9807         * pthread_setcanceltype.c: Add additional alias
9808         __pthread_setcanceltype.
9810         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9811         * sem_open.c (sem_open): Likewise.
9812         Use __libc_open, __libc_write, and __libc_close instead of
9813         open, write, and close respectively.
9815         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9816         Rewrite as statement expression since it must return a value.
9818         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9819         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9820         __pthread_kill.
9822         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9823         alias __pthread_once_internal.
9825         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9827 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9829         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9830         * tst-stdio1.c: New file.
9831         * tst-stdio2.c: New file.
9833         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9835         * Makefile (tests): Comment out tst-locale2 for now.
9836         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9838         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9839         -D_IO_MTSAFE_IO.
9840         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9841         Use _IO_lock_init instead of explicit assignment.
9843         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9844         Define __libc_lock_* and __libc_lock_recursive macros with
9845         lowlevellock macros, not pthread mutexes.
9847         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9848         of pthread_mutex_lock.
9849         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9850         instead of pthread_mutex_unlock.
9852 2002-12-06  Roland McGrath  <roland@redhat.com>
9854         * allocatestack.c (__stack_user): Use uninitialized defn.
9855         * init.c (__pthread_initialize_minimal): Initialize it here.
9857 2002-12-05  Roland McGrath  <roland@redhat.com>
9859         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9860         string.
9861         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9863         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9864         missing & here too.
9866 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9868         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9869         lowlevellock.
9870         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9871         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9872         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9873         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9874         for __libc_lock_* macros.
9875         * Makefile (routines): Add libc-lowlevellock.
9877 2002-10-09  Roland McGrath  <roland@redhat.com>
9879         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9880         Under [__PIC__], call the function via the pointer fetched for
9881         comparison rather than a call by name that uses the PLT.
9882         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9883         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9884         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9885         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9886         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9888 2002-12-04  Roland McGrath  <roland@redhat.com>
9890         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9892         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9893         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9895         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9897 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9899         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9900         a completely opaque, non-integer type.
9901         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9903 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9905         * sysdeps/i386/tls.h: Include stdlib.h.
9906         * sysdeps/x86_64/tls.h: Likewise.
9908 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9910         * Makefile (tests): Add tst-locale2.
9911         (tests-static): Likewise.
9912         * tst-locale2.c: New file.
9914         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9915         volatile and add memory clobbers to lock operations.
9917 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9919         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9920         * sysdeps/i386/i486/bits/atomic.h: New file.
9921         * sysdeps/i386/i586/bits/atomic.h: New file.
9922         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9923         include i486 version.
9924         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9925         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9926         Patch by Marijn Ros <marijn@mad.scientist.com>.
9928         * allocatestack.c (get_cached_stack): Don't crash if we first
9929         found a stack with a larger size then needed.
9930         Reported by Hui Huang <hui.huang@sun.com>.
9932         * Makefile (tests): Add tst-sysconf.
9933         * tst-sysconf.c: New file.
9935         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9936         PTHREAD_THREADS_MAX.
9938 2002-12-02  Roland McGrath  <roland@redhat.com>
9940         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9941         Declare using hidden_proto instead of attribute_hidden, so there are
9942         non-.hidden static symbols for gdb to find.
9943         (__pthread_keys): Likewise.
9944         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9945         * allocatestack.c (__stack_user): Likewise.
9946         * pthread_create.c (__pthread_keys): Likewise.
9947         (__nptl_threads_events, __nptl_last_event): Make these static instead
9948         of hidden.
9949         * pthread_key_create.c (__pthread_pthread_keys_max,
9950         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9952 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9954         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9955         statically.
9956         * tst-locale1.c: New file.
9958         * pthread_cond_timedwait.c: Include <stdlib.h>.
9960         * Makefile (tests): Add tst-fork2 and tst-fork3.
9961         * tst-fork2.c: New file.
9962         * tst-fork3.c: New file.
9964 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9966         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9968         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9969         require it to 200112L.
9971         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9972         instruction only if HAVE_CMOV is defined.
9973         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9975         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9977         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9979         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9981         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9983 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9985         * sysdeps/x86_64/bits/atomic.h: New file.
9987         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9988         16-bit operations.
9990         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
9991         possible since gettid cannot fail.
9993         * sysdeps/x86_64/pthreaddef.h: New file.
9995         * sysdeps/i386/pthreaddef.h (gettid): Removed.
9997         * sysdeps/x86_64/pthread_spin_init.c: New file.
9998         * sysdeps/x86_64/pthread_spin_lock.c: New file.
9999         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10000         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10002         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10003         Add missing lock prefix.  Minute optimization.
10005         * tst-spin2.c (main): Also check successful trylock call.
10007         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10008         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10010         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10011         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10013         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10014         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10015         value in case of an error.  Add support for INTERNAL_SYSCALL.
10017         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10018         value in case of an error.
10020         * sysdeps/x86_64/tls.h: New file.
10022 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10024         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10025         takes the array member name and the index as parameters.
10026         (THREAD_SETMEM_NC): Likewise.
10027         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10028         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10029         interfaces.
10031         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10032         to decide which code to use.
10033         (THREAD_SETMEM_NC): Likewise.
10035         * allocatestack.c (queue_stack): Don't remove stack from list here.
10036         Do it in the caller.  Correct condition to prematurely terminate
10037         loop to free stacks.
10038         (__deallocate_stack): Remove stack from list here.
10040 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10042         * Makefile (tests): Add tst-stack1.
10043         * tst-stack1.c: New file.
10045         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10046         provided stack.
10048         * pthread_attr_getstack.c: Return bottom of the thread area.
10050 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10052         * Makefile (libpthread-routines): Add pt-allocrtsig and
10053         pthread_kill_other_threads.
10054         * pt-allocrtsig.c: New file.
10055         * pthread_kill_other_threads.c: New file.
10056         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10057         all three functions.
10058         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10059         allocrtsig.
10060         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10061         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10062         and __libc_allocate_rtsig_private.
10063         * Versions (libpthread): Export pthread_kill_other_threads_np,
10064         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10066 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10068         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10069         the end of the stack.  Adjust computations.
10070         When mprotect call fails dequeue stack and free it.
10071         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10072         attribute.
10073         * pthread_getattr_np.c: Likewise.
10075         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10076         surprises.
10078 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10080         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10081         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10083 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10085         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10086         * pthread_setspecific.c: Likewise.
10088 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10090         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10091         definitions.  Get them from the official place.
10092         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10094         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10095         Use new CLONE_ flags in clone() calls.
10097         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10098         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10100         * Versions: Add pthread_* functions for libc.
10101         * forward.c: New file.
10103         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10104         errno-loc.
10105         * herrno.c: New file.
10106         * res.c: New file.
10108         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10109         sem_trywait, and sem_timedwait.  Add herrno and res.
10110         * sem_init.c: Don't initialize lock and waiters members.
10111         * sem_open.c: Likewise.
10112         * sem_post.c: Removed.
10113         * sem_wait.c: Removed.
10114         * sem_trywait.c: Removed.
10115         * sem_timedwait.c: Removed.
10116         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10117         Includes full implementations of sem_post, sem_wait, sem_trywait,
10118         and sem_timedwait.
10119         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10120         for new implementation.
10121         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10122         and waiters fields.
10124         * tst-sem3.c: Improve error message.
10125         * tst-signal3.c: Likewise.
10127         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10128         to tell the kernel about the termination futex and to initialize tid
10129         member.  Don't initialize main_thread.
10130         * descr.h (struct pthread): Remove main_thread member.
10131         * cancelllation.c (__do_cancel): Remove code handling main thread.
10132         The main thread is not special anymore.
10134         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10135         size of the stacks to stack_cache_actsize.
10137         * pt-readv.c: Add missing "defined".
10138         * pt-sigwait.c: Likewise.
10139         * pt-writev.c: Likewise.
10141 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10143         * Versions: Export __connect from libpthread.
10144         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10146         * Makefile (libpthread-routines): Add pt-raise.
10147         * sysdeps/unix/sysv/linux/raise.c: New file.
10148         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10149         * sysdeps/generic/pt-raise.c: New file.
10151         * pthread_cond_init.c: Initialize all data elements of the condvar
10152         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10154         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10155         * pthread_create.c: Likewise.
10157         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10158         * tst-key1.c: New file.
10159         * tst-key2.c: New file.
10160         * tst-key3.c: New file.
10162         * Versions: Export pthread_detach for version GLIBC_2.0.
10163         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10165 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10167         * pthread_key_create.c: Terminate search after an unused key was found.
10168         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10170         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10171         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10173 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10175         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10176         dynamic lookup for errno in PIC.
10178         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10179         release the stack lock as soon as possible.
10180         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10181         the static TLS block.
10182         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10184         * cancellation.c: Renamed from cancelation.c.
10185         * Makefile: Adjust accordingly.
10186         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10187         * cleanup_defer.c: Use CANCELLATION_P.
10188         * pthread_testcancel.c: Likewise.
10189         * descr.h: Fix spelling in comments.
10190         * init.c: Likewise.
10191         * pthread_getattr_np.c: Likewise.
10192         * pthread_getschedparam.c: Likewise.
10193         * pthread_setschedparam.c: Likewise.
10194         * Versions: Likewise.
10196         * pt-pselect.c: New file.
10197         * Makefile (libpthread-routines): Add pt-pselect.
10198         * Versions: Add pselect.
10200         * tst-cancel4.c: New file.
10201         * Makefile (tests): Add tst-cancel4.
10203 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10205         * pthread_mutex_lock.c: Always record lock ownership.
10206         * pthread_mutex_timedlock.c: Likewise.
10207         * pthread_mutex_trylock.c: Likewise.
10209         * pt-readv.c: New file.
10210         * pt-writev.c: New file.
10211         * pt-creat.c: New file.
10212         * pt-msgrcv.c: New file.
10213         * pt-msgsnd.c: New file.
10214         * pt-poll.c: New file.
10215         * pt-select.c: New file.
10216         * pt-sigpause.c: New file.
10217         * pt-sigsuspend.c: New file.
10218         * pt-sigwait.c: New file.
10219         * pt-sigwaitinfo.c: New file.
10220         * pt-waitid.c: New file.
10221         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10222         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10223         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10224         * Versions: Add all the new functions.
10226         * tst-exit1.c: New file.
10227         * Makefile (tests): Add tst-exit1.
10229         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10231 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10233         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10235         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10236         call.  pthread_join is an official cancellation point.
10237         * pthread_timedjoin.c: Likewise.
10239         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10240         and the condvar's mutex are retrieved.
10241         * pthread_cond_timedwait.c: Likewise.
10242         Reported by dice@saros.East.Sun.COM.
10244 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10246         * pthreadP.h: Cut out all type definitions and move them...
10247         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10248         * pthreadP.h: Include <internaltypes.h>.
10250         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10251         performance tweaks.
10253         * sem_trywait.c: Shuffle #includes around to get right order.
10254         * sem_timedwait.c: Likewise.
10255         * sem_post.c: Likewise.
10256         * sem_wait.c: Likewise.
10258         * nptl 0.3 released.
10260         * Makefile (tests): Add tst-signal3.
10261         * tst-signal3.c: New file.
10263 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10265         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10266         the asms modify the sem object.
10267         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10269         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10270         the actual members.
10271         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10272         * semaphoreP.h: Include pthreadP.h.
10273         * sem_getvalue.c: Adjust to sem_t change.
10274         * sem_init.c: Likewise.
10275         * sem_open.c: Likewise.
10276         * sem_post.c: Likewise.
10277         * sem_timedwait.c: Likewise.
10278         * sem_trywait.c: Likewise.
10279         * sem_wait.c: Likewise.
10281 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10283         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10284         * tst-basic2.c: New file.
10285         * tst-exec1.c: New file.
10286         * tst-exec2.c: New file.
10287         * tst-exec3.c: New file.
10289         * tst-fork1.c: Remove extra */.
10291         * nptl 0.2 released.  The API for IA-32 is complete.