[BZ #5441, BZ #5452, BZ #5454]
[glibc.git] / nptl / ChangeLog
blobc882028750fe9b4bd300ab35c74b7172586d9411
1 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
3         [BZ #5455]
4         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
5         Allow label before pthread_cleanup_pop.
6         (pthread_cleanup_pop_restore_np): Likewise.
8 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
10         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
11         Store 2 before returning ETIMEDOUT.
13 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
15         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
16         Store 2 before returning ETIMEDOUT.
17         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
18         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
19         (__lll_lock_wait_private): Optimize.
20         (__lll_lock_wait): Likewise.
22 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
24         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
25         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
26         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
28 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
30         [BZ #5240]
31         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
32         If we time out, try one last time to lock the futex to avoid
33         losing a wakeup signal.
34         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
35         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
37         [BZ #5245]
38         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
39         if necessary.
41 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
43         [BZ #5245]
44         * allocatestack.c (allocate_stack): Change ENOMEM error in case
45         mmap failed to EAGAIN.
46         * Makefile (tests): Add tst-basic7.
47         * tst-basic7.c: New file.
49 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
51         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
52         Use __linkin_atfork.
54 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
56         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
57         missing line continuations.
58         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
59         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
61 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
63         [BZ #5220]
64         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
65         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
66         (struct timer): Add next element.
67         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
68         enqueue timer structure into __active_timer_sigev_thread list.
69         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
70         remove timer struct from __active_timer_sigev_thread.
71         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
72         Before using timer structure make sure it is still on the
73         __active_timer_sigev_thread list.  Keep lock until done.
74         Define __active_timer_sigev_thread and
75         __active_timer_sigev_thread_lock.
77 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
79         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
80         Redefine thread_atfork for use of ATFORK_MEM.
81         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
82         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
83         function.
84         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
85         Use atomic operation when removing first element of list.
87 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
89         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
90         routine instead of an alias to __new_sem_post.
92 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
94         * init.c (__pthread_initialize_minimal): Initialize word to appease
95         valgrind.
97 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
99         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
100         libc.so just clear NAME.
101         (__libc_rwlock_fini): Nop inside of libc.so.
102         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
103         all zeros.
105 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
108         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
109         unlocking failed.
110         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
112 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
114         [BZ #4938]
115         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
116         reclaimed stack if necessary.
117         * Makefile (tests): Add tst-tsd6.
118         * tst-tsd6.c: New file.
120 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
122         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
123         Add private argument.
125 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
128         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
130 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
132         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
133         (__lll_robust_timedlock): Pass private as last argument to
134         __lll_robust_timedlock_wait.
135         (__lll_unlock): Fix a pasto.
137 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
139         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
140         sparc_old_sem): New structs.
141         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
142         (__sem_wait_cleanup): New function.
143         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
144         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
145         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
146         lll_futex_wait.
147         (__old_sem_wait): New function.
148         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
149         nptl/sysdeps/unix/sysv/linux/sparc version.
150         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
151         Likewise.
152         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
153         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
154         (__new_sem_trywait): Use sparc_old_sem structure.
155         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
156         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
157         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
158         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
159         lll_futex_timed_wait.
160         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
161         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
162         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
163         lll_futex_wake.
164         (__old_sem_post): New function.
165         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
166         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
167         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
168         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
169         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
170         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
172 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
174         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
175         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
176         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
177         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
178         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
179         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
180         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
181         Use FUTEX_WAKE_OP.
182         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
183         kernel-features.h and tcb-offsets.h.
184         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
185         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
186         process private.
187         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
188         tcb-offsets.h.
189         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
190         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
191         process private.
192         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
193         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
194         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
195         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
196         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
197         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
200 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
202         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
203         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
204         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
205         lll_futex_timed_wait.
207         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
208         __lll_robust_unlock): Rewrite as macros instead of inline functions.
209         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
210         __lll_robust_unlock, __lll_wait_tid): Likewise.
212 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
214         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
215         Fix a pasto.
216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
217         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
218         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
219         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
221         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
222         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
224         kernel-features.h.
225         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
226         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
227         process private.  Switch DW_CFA_advance_loc1 and some
228         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
230         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
231         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
232         process private.  Switch DW_CFA_advance_loc{1,2} and some
233         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
234         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
235         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
236         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
237         Likewise.
238         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
239         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
240         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
241         Likewise.
242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
243         (__pthread_cond_broadcast): Compare %r8 instead of
244         dep_mutex-cond_*(%rdi) with $-1.
245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
246         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
247         of oring.
249 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
251         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
253 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
255         * allocatestack.c: Include kernel-features.h.
256         * pthread_create.c: Likewise.
257         * pthread_mutex_init.c: Likewise.
258         * init.c: Likewise.
259         * pthread_cond_timedwait.c: Likewise.
260         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
261         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
262         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
263         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
264         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
266         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
267         Likewise.
268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
269         Likewise.
270         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
271         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
272         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
273         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
275 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
277         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
278         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
279         byte elements.  One of them is the new __shared element.
280         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
281         adjust names of other padding elements.
282         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
283         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
284         byte elements.  One of them is the new __shared element.
285         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
286         adjust names of other padding elements.
287         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
288         Renamed __pad1 element to __shared, adjust names of other padding
289         elements.
290         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
291         (pthread_rwlock_t): Likewise.
292         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
293         typo.
295 2007-08-09  Anton Blanchard  <anton@samba.org>
297         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
299 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
302         <kernel-features.h>.
303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
305 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
307         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
308         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
309         dealing with robust mutexes.
310         * pthread_mutex_timedlock.c: Likewise.
311         * pthread_mutex_trylock.c: Likewise.
312         * pthread_mutex_unlock.c: Likewise.
313         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
315 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
317         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
318         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
319         (PTHREAD_MUTEX_PSHARED): Define.
320         * pthread_mutex_init.c (__pthread_mutex_init): Set
321         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
322         mutexes.
323         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
324         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
325         as second argument to lll_lock.
326         (LLL_MUTEX_TRYLOCK): Take mutex as argument
327         instead of its __data.__lock field.
328         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
329         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
330         to lll_robust_lock.
331         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
332         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
333         instead of mutex->__data.__kind directly, pass
334         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
335         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
336         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
337         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
338         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
339         to lll_timedlock, lll_robust_timedlock, lll_unlock and
340         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
341         of mutex->__data.__kind directly.
342         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
343         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
344         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
345         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
346         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
347         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
348         and lll_futex_wake.
349         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
350         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
351         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
352         directly.
353         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
354         Take mutex as argument instead of its __data.__lock field, pass
355         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
356         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
357         __data.__lock field.
358         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
359         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
360         to lll_robust_cond_lock.
361         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
362         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
363         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
364         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
365         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
366         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
367         lll_futex_wait.
368         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
369         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
370         lll_futex_wake.
371         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
372         pshared variable, pass it to lll_lock, lll_unlock,
373         lll_futex_timedwait and lll_futex_wake.
374         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
375         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
376         and lll_futex_wake.
377         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
378         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
379         macro.
380         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
381         lll_futex_wake_unlock): Likewise.
382         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
383         Likewise.
384         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
385         lll_futex_wake_unlock): Likewise.
386         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
387         Likewise.
388         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
389         lll_futex_wake_unlock): Likewise.
390         (lll_futex_wake): Fix a typo.
391         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
392         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
393         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
394         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
395         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
396         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
397         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
398         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
400         (__pthread_cond_timedwait): Likewise.
401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
402         (__condvar_cleanup, __pthread_cond_wait): Likewise.
404 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
406         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
407         Don't use CGOTSETUP and CGOTRESTORE macros.
408         (CGOTSETUP, CGOTRESTORE): Remove.
409         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
410         @local symbol.
412 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
414         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
415         definitions for private futexes.
416         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
417         kernel-features.h and lowlevellock.h.  Use private futexes if
418         they are available.
419         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
420         (__lll_mutex_lock_wait): Rename to
421         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
422         (__lll_mutex_timedlock_wait): Rename to ...
423         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
424         Don't compile in for libc.so.
425         (__lll_mutex_unlock_wake): Rename to ...
426         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
427         (__lll_timedwait_tid): Use __NR_gettimeofday.
428         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
429         the header from assembler.  Renamed all lll_mutex_* resp.
430         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
431         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
432         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
433         Define.
434         (__lll_lock_wait_private): Add prototype.
435         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
436         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
437         __lll_unlock_wake): Likewise.
438         (lll_lock): Add private argument.  Call __lll_lock_wait_private
439         if private is constant LLL_PRIVATE.
440         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
441         lll_timedlock, lll_robust_timedlock): Add private argument.
442         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
443         if private is constant LLL_PRIVATE.
444         (lll_robust_unlock, lll_robust_dead): Add private argument.
445         (lll_lock_t): Remove.
446         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
447         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
448         lll_cond_wake, lll_cond_broadcast): Remove.
449         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
450         kernel-features.h and lowlevellock.h.
451         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
452         (LOAD_FUTEX_WAIT): Define.
453         (__lll_robust_mutex_lock_wait): Rename to ...
454         (__lll_robust_lock_wait): ... this.  Add private argument.
455         Use LOAD_FUTEX_WAIT macro.
456         (__lll_robust_mutex_timedlock_wait): Rename to ...
457         (__lll_robust_timedlock_wait): ... this.    Add private argument.
458         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
459         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
460         lowlevellock.h.
461         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
462         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
463         __lll_mutex_{lock,unlock}_*.
464         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
465         lowlevellock.h and pthread-errnos.h.
466         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
467         FUTEX_CMP_REQUEUE, EINVAL): Remove.
468         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
469         __lll_mutex_{lock,unlock}_*.
470         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
471         lowlevellock.h and pthread-errnos.h.
472         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
473         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
474         __lll_mutex_{lock,unlock}_*.
475         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
476         lowlevellock.h.
477         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
478         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
479         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
480         (__condvar_tw_cleanup): Likewise.
481         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
482         lowlevellock.h.
483         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
484         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
485         __lll_mutex_{lock,unlock}_*.
486         ( __condvar_w_cleanup): Likewise.
487         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
488         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
489         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
490         lowlevellock.h.
491         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
492         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
493         __lll_mutex_{lock,unlock}_*.
494         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
495         lowlevellock.h.
496         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
497         FUTEX_PRIVATE_FLAG): Remove.
498         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
499         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
501         lowlevellock.h.
502         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
503         FUTEX_PRIVATE_FLAG): Remove.
504         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
505         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
506         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
507         lowlevellock.h.
508         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
509         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
510         __lll_mutex_{lock,unlock}_*.
511         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
512         lowlevellock.h.
513         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
514         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
515         __lll_mutex_{lock,unlock}_*.
516         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
517         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
518         (__new_sem_post): Use standard initial exec code sequences.
519         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
520         lowlevellock.h.
521         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
522         FUTEX_PRIVATE_FLAG): Remove.
523         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
524         exec code sequences.
525         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
526         (__new_sem_trywait): Use standard initial exec code sequences.
527         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
528         (__new_sem_wait): Use standard initial exec code sequences.
530 2007-07-31  Anton Blanchard  <anton@samba.org>
532         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
533         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
534         atomic_full_barrier.
536 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
538         * allocatestack.c (stack_cache_lock): Change type to int.
539         (get_cached_stack, allocate_stack, __deallocate_stack,
540         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
541         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
542         as second argument to lll_lock and lll_unlock macros on
543         stack_cache_lock.
544         * pthread_create.c (__find_in_stack_list): Likewise.
545         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
546         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
547         as second argument.
548         * descr.h (struct pthread): Change lock and setxid_futex field
549         type to int.
550         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
551         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
552         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
553         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
554         Likewise.
555         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
556         * pthread_cond_init.c (__pthread_cond_init): Likewise.
557         * pthreadP.h (__attr_list_lock): Change type to int.
558         * pthread_attr_init.c (__attr_list_lock): Likewise.
559         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
560         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
561         lll_{,un}lock.
562         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
563         also for lll_futex_{wake,wait}.
564         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
565         a pointer to const.
566         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
567         LLL_SHARED as second argument to lll_{,un}lock.
568         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
569         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
570         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
571         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
572         Likewise.
573         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
574         as second argument to lll_{,un}lock macros on pd->lock.
575         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
576         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
577         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
578         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
579         Likewise.
580         * sysdeps/pthread/createthread.c (do_clone, create_thread):
581         Likewise.
582         * pthread_once.c (once_lock): Change type to int.
583         (__pthread_once): Pass LLL_PRIVATE as second argument to
584         lll_{,un}lock macros on once_lock.
585         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
586         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
587         rwlock->__data.__shared as second argument to them and similarly
588         for lll_futex_w*.
589         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
590         Likewise.
591         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
592         Likewise.
593         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
594         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
595         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
596         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
597         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
598         to lll_{,un}lock macros on __sem_mappings_lock.
599         * sem_open.c (check_add_mapping): Likewise.
600         (__sem_mappings_lock): Change type to int.
601         * semaphoreP.h (__sem_mappings_lock): Likewise.
602         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
603         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
604         instead of lll_*mutex_*, pass LLL_SHARED as last
605         argument.
606         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
607         pass LLL_SHARED as last argument.
608         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
609         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
610         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
611         pass LLL_SHARED as last argument.
612         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
613         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
614         LLL_SHARED as last argument.
615         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
616         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
617         Similarly.
618         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
619         __libc_lock_lock_recursive, __libc_lock_unlock,
620         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
621         argument to lll_{,un}lock.
622         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
623         _IO_lock_unlock): Likewise.
624         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
625         compound literal.
626         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
627         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
628         __fork_lock.
629         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
630         free_mem): Likewise.
631         (__fork_lock): Change type to int.
632         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
633         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
634         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
635         lll_futex_wake.
636         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
637         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
638         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
639         New function.
640         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
641         pass it through to lll_futex_*wait, only compile in when
642         IS_IN_libpthread.
643         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
644         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
645         argument and pass it through to lll_futex_*wait.
646         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
647         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
648         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
649         inline functions to __lll_* resp. __lll_robust_*.
650         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
651         (lll_mutex_dead): Add private argument.
652         (__lll_lock_wait_private): New prototype.
653         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
654         __lll_robust_lock_timedwait): Add private argument to prototypes.
655         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
656         call __lll_lock_wait_private, otherwise pass private to
657         __lll_lock_wait.
658         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
659         __lll_robust_timedlock): Add private argument, pass it to
660         __lll_*wait functions.
661         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
662         call __lll_unlock_wake_private, otherwise pass private to
663         __lll_unlock_wake.
664         (__lll_robust_unlock): Add private argument, pass it to
665         __lll_robust_unlock_wake.
666         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
667         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
668         argument, pass it through to __lll_* inline function.
669         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
670         (lll_lock_t): Remove.
671         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
672         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
673         lll_cond_wake, lll_cond_broadcast): Remove.
674         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
675         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
676         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
677         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
678         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
679         the header from assembler.  Renamed all lll_mutex_* resp.
680         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
681         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
682         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
683         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
684         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
685         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
686         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
687         Remove prototype.
688         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
689         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
690         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
691         (lll_trylock): Likewise, use __lll_trylock_asm, pass
692         MULTIPLE_THREADS_OFFSET as another asm operand.
693         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
694         MULTIPLE_THREADS_OFFSET as last asm operand, call
695         __lll_lock_wait_private if private is constant LLL_PRIVATE,
696         otherwise pass private as another argument to __lll_lock_wait.
697         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
698         lll_timedlock, lll_robust_timedlock): Add private argument, pass
699         private as another argument to __lll_*lock_wait call.
700         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
701         MULTIPLE_THREADS_OFFSET as another asm operand, call
702         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
703         otherwise pass private as another argument to __lll_unlock_wake.
704         (lll_robust_unlock): Add private argument, pass private as another
705         argument to __lll_unlock_wake.
706         (lll_robust_dead): Add private argument, use __lll_private_flag
707         macro.
708         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
709         LLL_MUTEX_LOCK_INITIALIZER.
710         (lll_lock_t): Remove.
711         (LLL_LOCK_INITIALIZER_WAITERS): Define.
712         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
713         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
714         lll_cond_wake, lll_cond_broadcast): Remove.
715         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
716         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
717         2007-05-2{3,9} changes.
718         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
719         kernel-features.h and lowlevellock.h.
720         (LOAD_PRIVATE_FUTEX_WAIT): Define.
721         (LOAD_FUTEX_WAIT): Rewritten.
722         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
723         define.
724         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
725         (__lll_mutex_lock_wait): Rename to ...
726         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
727         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
728         (__lll_mutex_timedlock_wait): Rename to ...
729         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
730         contains private argument.  Don't compile in for libc.so.
731         (__lll_mutex_unlock_wake): Rename to ...
732         (__lll_unlock_wake): ... this.  %ecx contains private argument.
733         Don't compile in for libc.so.
734         (__lll_timedwait_tid): Use __NR_gettimeofday.
735         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
736         kernel-features.h and lowlevellock.h.
737         (LOAD_FUTEX_WAIT): Define.
738         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
739         define.
740         (__lll_robust_mutex_lock_wait): Rename to ...
741         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
742         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
743         macro.
744         (__lll_robust_mutex_timedlock_wait): Rename to ...
745         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
746         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
747         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
748         lowlevellock.h.
749         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
750         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
751         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
752         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
753         to __lll_lock_wait in %edx.
754         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
755         Include lowlevellock.h and pthread-errnos.h.
756         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
757         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
758         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
759         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
760         pass LLL_SHARED in %ecx to both __lll_lock_wait and
761         __lll_unlock_wake.
762         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
763         Include lowlevellock.h and pthread-errnos.h.
764         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
765         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
766         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
767         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
768         pass LLL_SHARED in %ecx to both __lll_lock_wait and
769         __lll_unlock_wake.
770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
771         Include lowlevellock.h.
772         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
773         Don't define.
774         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
775         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
776         pass LLL_SHARED in %ecx to both __lll_lock_wait and
777         __lll_unlock_wake.  Use __NR_gettimeofday.
778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
779         Include lowlevellock.h.
780         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
781         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
782         to __lll_*, pass cond_lock address in %edx rather than %ecx to
783         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
784         and __lll_unlock_wake.
785         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
786         Include lowlevellock.h.
787         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
788         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
789         MUTEX(%ebx) address in %edx rather than %ecx to
790         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
791         and __lll_unlock_wake.  Move return value from %ecx to %edx
792         register.
793         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
794         Include lowlevellock.h.
795         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
796         Don't define.
797         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
798         MUTEX(%ebp) address in %edx rather than %ecx to
799         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
800         and __lll_unlock_wake.  Move return value from %ecx to %edx
801         register.  Use __NR_gettimeofday.
802         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
803         Include lowlevellock.h.
804         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
805         Don't define.
806         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
807         MUTEX(%ebp) address in %edx rather than %ecx to
808         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
809         and __lll_unlock_wake.  Move return value from %ecx to %edx
810         register.  Use __NR_gettimeofday.
811         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
812         Include lowlevellock.h.
813         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
814         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
815         MUTEX(%edi) address in %edx rather than %ecx to
816         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
817         and __lll_unlock_wake.
818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
819         Include lowlevellock.h.
820         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
821         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
822         MUTEX(%ebx) address in %edx rather than %ecx to
823         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
824         and __lll_unlock_wake.  Move return value from %ecx to %edx
825         register.
826         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
827         lowlevellock.h.
828         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
829         define.
830         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
831         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
832         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
833         lowlevellock.h.
834         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
835         (sem_timedwait): Use __NR_gettimeofday.
836         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
837         lowlevellock.h.
838         (LOCK): Don't define.
839         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
840         lowlevellock.h.
841         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
842         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
843         are waiters.
844         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
845         2007-05-2{3,9} changes.
846         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
847         kernel-features.h and lowlevellock.h.
848         (LOAD_PRIVATE_FUTEX_WAIT): Define.
849         (LOAD_FUTEX_WAIT): Rewritten.
850         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
851         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
852         (__lll_mutex_lock_wait): Rename to ...
853         (__lll_lock_wait): ... this.  %esi is now private argument.
854         Don't compile in for libc.so.
855         (__lll_mutex_timedlock_wait): Rename to ...
856         (__lll_timedlock_wait): ... this.  %esi contains private argument.
857         Don't compile in for libc.so.
858         (__lll_mutex_unlock_wake): Rename to ...
859         (__lll_unlock_wake): ... this.  %esi contains private argument.
860         Don't compile in for libc.so.
861         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
862         kernel-features.h and lowlevellock.h.
863         (LOAD_FUTEX_WAIT): Define.
864         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
865         (__lll_robust_mutex_lock_wait): Rename to ...
866         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
867         Use LOAD_FUTEX_WAIT macro.
868         (__lll_robust_mutex_timedlock_wait): Rename to ...
869         (__lll_robust_timedlock_wait): ... this. %esi argument contains
870         private, use LOAD_FUTEX_WAIT macro.
871         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
872         lowlevellock.h.
873         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
874         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
875         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
876         __lll_lock_wait and __lll_unlock_wake.
877         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
878         Include lowlevellock.h and pthread-errnos.h.
879         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
880         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
881         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
882         pass LLL_SHARED in %esi to both __lll_lock_wait and
883         __lll_unlock_wake.
884         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
885         Include lowlevellock.h and pthread-errnos.h.
886         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
887         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
888         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
889         pass LLL_SHARED in %esi to both __lll_lock_wait and
890         __lll_unlock_wake.
891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
892         Include lowlevellock.h.
893         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
894         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
895         pass LLL_SHARED in %esi to both __lll_lock_wait and
896         __lll_unlock_wake.
897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
898         Include lowlevellock.h.
899         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
900         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
901         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
902         and __lll_unlock_wake.
903         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
904         Include lowlevellock.h.
905         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
906         Don't define.
907         (__pthread_rwlock_rdlock): 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_timedrdlock.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 %esi to both __lll_lock_wait
916         and __lll_unlock_wake.
917         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
918         Include lowlevellock.h.
919         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
920         Don't define.
921         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
922         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
923         and __lll_unlock_wake.
924         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
925         Include lowlevellock.h.
926         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
927         Don't define.
928         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
929         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
930         and __lll_unlock_wake.
931         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
932         Include lowlevellock.h.
933         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
934         Don't define.
935         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
936         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
937         and __lll_unlock_wake.
938         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
939         lowlevellock.h.
940         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
941         define.
942         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
943         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
944         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
945         lowlevellock.h.
946         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
947         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
948         lowlevellock.h.
949         (LOCK): Don't define.
950         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
951         lowlevellock.h.
952         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
953         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
954         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
955         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
956         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
957         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
958         (__lll_lock_wait_private): New function.
959         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
960         it to lll_futex_*wait.  Don't compile in for libc.so.
961         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
962         Remove.
963         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
964         (struct sparc_pthread_barrier): Remove.
965         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
966         struct sparc_pthread_barrier.  Pass
967         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
968         and lll_futex_wait macros.
969         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
970         Remove.
971         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
972         Include sparc pthread_barrier_wait.c instead of generic one.
974 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
976         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
978         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
979         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
980         %ecx.
981         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
982         (pthread_rwlock_timedwrlock): Likewise.
983         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
984         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
986 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
988         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
990 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
992         * tst-locale2.c (useless): Add return statement.
994 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
996         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
997         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
998         * pthread_create.c (start_thread): Likewise.
999         * init.c (sighandler_setxid): Likewise.
1000         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1001         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1002         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1003         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1004         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1005         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1006         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1007         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1008         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1009         Likewise.
1010         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1011         Likewise.
1012         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1013         Likewise.
1014         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1015         __rtld_notify): Likewise.
1016         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1017         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1018         __pthread_once): Likewise.
1019         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1020         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1021         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1022         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1023         (lll_futex_wait): Add private argument, define as wrapper around
1024         lll_futex_timed_wait.
1025         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1026         use __lll_private_flag macro.
1027         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1028         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1029         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1030         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1031         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1032         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1033         (lll_futex_wait): Add private argument, define as wrapper around
1034         lll_futex_timed_wait.
1035         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1036         use __lll_private_flag macro.
1037         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1038         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1039         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1040         Define.
1041         (lll_futex_timed_wait, lll_futex_wake): Use it.
1042         (lll_private_futex_wait, lll_private_futex_timed_wait,
1043         lll_private_futex_wake): Removed.
1044         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1045         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1046         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1047         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1048         (lll_futex_wait): Add private argument, define as wrapper around
1049         lll_futex_timed_wait.
1050         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1051         use __lll_private_flag macro.
1052         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1053         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1054         to lll_futex_*.
1055         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1056         (lll_private_futex_wait, lll_private_futex_timed_wait,
1057         lll_private_futex_wake): Removed.
1058         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1059         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1060         (lll_private_futex_wait, lll_private_futex_timed_wait,
1061         lll_private_futex_wake): Removed.
1062         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1063         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1064         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1065         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1066         (lll_futex_wait): Add private argument, define as wrapper around
1067         lll_futex_timed_wait.
1068         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1069         use __lll_private_flag macro.
1070         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1071         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1072         to lll_futex_*.
1073         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1074         Define.
1075         (lll_futex_timed_wait, lll_futex_wake): Use it.
1076         (lll_private_futex_wait, lll_private_futex_timed_wait,
1077         lll_private_futex_wake): Removed.
1079 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1081         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1082         of the structure for sparc32.
1084 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1086         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1088 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1090         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1091         code used when private futexes are assumed.
1092         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1093         Likewise.
1095 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1097         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1098         (__lll_private_flag): Define.
1099         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1100         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1101         __lll_private_flag.
1102         (lll_private_futex_wait, lll_private_futex_timedwait,
1103         lll_private_futex_wake): Define as wrapper around non-_private
1104         macros.
1105         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1106         (__lll_private_flag): Define.
1107         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1108         (lll_private_futex_wait, lll_private_futex_timedwait,
1109         lll_private_futex_wake): Define as wrapper around non-_private
1110         macros.
1112 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1114         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1115         parameter to lll_futex_wait call.
1116         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1118         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1119         Replace lll_futex_wait with lll_private_futex_wait.
1120         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1121         Add LLL_SHARED parameter to lll_futex_wake().
1123         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1124         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1125         lll_private_futex_wake.
1126         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1127         bit from private parm before syscall.
1128         (lll_futex_timed_wait): Likewise.
1129         (lll_futex_wake): Likewise.
1130         (lll_futex_wake_unlock): Likewise.
1131         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1132         (lll_robust_mutex_unlock): Likewise.
1133         (lll_mutex_unlock_force): Likewise.
1134         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1136 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1138         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1139         compilation when unconditionally using private futexes.
1140         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1141         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1142         Likewise.
1143         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1144         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1146 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1148         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1149         Define.
1151 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1153         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1154         kernel-features.h.
1156 2007-05-16  Roland McGrath  <roland@redhat.com>
1158         * init.c (__nptl_initial_report_events): New variable.
1159         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1160         to that.
1162 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1164         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1165         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1167 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1169         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1170         implementation.
1172 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1174         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1175         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1176         * pthread_mutex_timedlock.c: Likewise.
1177         * pthread_mutex_trylock.c: Likewise.
1178         * pthread_mutex_unlock.c: Likewise.
1180 2007-06-17  Andreas Schwab  <schwab@suse.de>
1182         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1183         sections.
1185 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1187         * allocatestack.c (allocate_stack): Make code compile if
1188         __ASSUME_PRIVATE_FUTEX is set.
1190 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1192         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1193         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1194         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1195         (__pthread_rwlock_wrlock): Likewise.
1196         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1197         (pthread_rwlock_timedrdlock): Likewise.
1198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1199         (pthread_rwlock_timedwrlock): Likewise.
1200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1201         (__pthread_rwlock_unlock): Likewise.
1203 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1205         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1206         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1207         Split __flags into __flags, __shared, __pad1 and __pad2.
1208         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1209         futexes if they are available.
1210         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1211         in libc-lowlevellock.S allow using private futexes.
1212         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1213         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1214         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1215         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1216         lll_private_futex_timed_wait and lll_private_futex_wake.
1217         (lll_robust_mutex_unlock): Fix typo.
1218         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1219         field in futex command setup.
1220         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1221         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1222         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1223         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1224         if they are available.  Remove clear_once_control.
1225         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1226         futexes if they are available.
1227         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1228         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1229         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1230         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1231         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1232         Wake only when there are waiters.
1233         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1234         support.  Indicate that there are waiters.  Remove unnecessary
1235         extra cancellation test.
1236         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1237         left-over duplication of __sem_wait_cleanup.
1239 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1241         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1242         parameter to lll_futex_wait, lll_futex_timed_wait, and
1243         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1244         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1245         lll_private_futex_wake.
1246         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1247         * allocatestack.c: Adjust use of lll_futex_* macros.
1248         * init.c: Likewise.
1249         * lowlevellock.h: Likewise.
1250         * pthread_barrier_wait.c: Likewise.
1251         * pthread_cond_broadcast.c: Likewise.
1252         * pthread_cond_destroy.c: Likewise.
1253         * pthread_cond_signal.c: Likewise.
1254         * pthread_cond_timedwait.c: Likewise.
1255         * pthread_cond_wait.c: Likewise.
1256         * pthread_create.c: Likewise.
1257         * pthread_mutex_lock.c: Likewise.
1258         * pthread_mutex_setprioceiling.c: Likewise.
1259         * pthread_mutex_timedlock.c: Likewise.
1260         * pthread_mutex_unlock.c: Likewise.
1261         * pthread_rwlock_timedrdlock.c: Likewise.
1262         * pthread_rwlock_timedwrlock.c: Likewise.
1263         * pthread_rwlock_unlock.c: Likewise.
1264         * sysdeps/alpha/tls.h: Likewise.
1265         * sysdeps/i386/tls.h: Likewise.
1266         * sysdeps/ia64/tls.h: Likewise.
1267         * sysdeps/powerpc/tls.h: Likewise.
1268         * sysdeps/pthread/aio_misc.h: Likewise.
1269         * sysdeps/pthread/gai_misc.h: Likewise.
1270         * sysdeps/s390/tls.h: Likewise.
1271         * sysdeps/sh/tls.h: Likewise.
1272         * sysdeps/sparc/tls.h: Likewise.
1273         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1274         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1275         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1276         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1277         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1278         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1279         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1280         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1281         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1282         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1283         Likewise.
1284         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1285         * sysdeps/x86_64/tls.h: Likewise.
1287 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1289         * pthread_getattr_np.c: No need to install a cancellation handler,
1290         this is no cancellation point.
1291         * pthread_getschedparam.c: Likewise.
1292         * pthread_setschedparam.c: Likewise.
1293         * pthread_setschedprio.c: Likewise.
1294         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1295         lll_unlock_wake_cb.
1296         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1297         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1298         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1299         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1300         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1301         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1302         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1303         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1304         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1305         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1306         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1307         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1309         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1310         whether there are more than one thread makes no sense here since
1311         we only call the slow path if the locks are taken.
1312         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1314         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1315         COND_NWAITERS_SHIFT.
1316         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1317         COND_CLOCK_BITS.
1318         * pthread_cond_init.c: Likewise.
1319         * pthread_cond_timedwait.c: Likewise.
1320         * pthread_cond_wait.c: Likewise.
1321         * pthread_condattr_getclock.c: Likewise.
1322         * pthread_condattr_setclock.c: Likewise.
1323         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1326         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1329 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1331         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1332         unistd.h.
1334         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1335         insn suffix.
1336         (THREAD_GSCOPE_GET_FLAG): Remove.
1337         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1338         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1339         changes.
1340         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1341         (THREAD_GSCOPE_GET_FLAG): Remove.
1342         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1343         instead of THREAD_GSCOPE_GET_FLAG.
1344         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1345         it.
1346         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1347         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1348         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1349         THREAD_GSCOPE_WAIT): Define.
1350         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1351         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1352         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1353         THREAD_GSCOPE_WAIT): Define.
1354         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1355         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1356         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1357         THREAD_GSCOPE_WAIT): Define.
1358         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1359         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1360         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1361         THREAD_GSCOPE_WAIT): Define.
1363 2007-05-24  Richard Henderson  <rth@redhat.com>
1365         * descr.h (struct pthread): Add header.gscope_flag.
1366         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1367         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1368         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1369         THREAD_GSCOPE_WAIT): Define.
1371 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1373         * init.c: Make it compile with older kernel headers.
1375         * tst-initializers1.c: Show through exit code which test failed.
1377         * pthread_rwlock_init.c: Also initialize __shared field.
1378         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1379         element in rwlock structure into four byte elements.  One of them is
1380         the new __shared element.
1381         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1382         Likewise.
1383         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1384         __shared, adjust names of other padding elements.
1385         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1386         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1387         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1388         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1389         FUTEX_PRIVATE_FLAG.
1390         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1391         futex to use private operations if possible.
1392         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1393         Likewise.
1394         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1395         Likewise.
1396         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1397         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1398         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1399         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1400         Likewise.
1401         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1402         Likewise.
1403         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1404         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1406 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1408         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1409         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1410         * pthread_rwlock_timedrdlock.c: Likewise.
1411         * pthread_rwlock_tryrdlock.c: Likewise.
1413         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1414         optimization.
1416         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1417         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1418         duplication of __sem_wait_cleanup.
1420         * allocatestack.c: Revert last change.
1421         * init.c: Likewise.
1422         * sysdeps/i386/tls.h: Likewise.
1423         * sysdeps/x86_64/tls.h: Likewise.
1424         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1425         header structure.
1426         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1428         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1429         Add private field.
1430         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1431         * pthread_barrier_init.c: Set private flag if pshared and private
1432         futexes are supported.
1433         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1434         private field in futex command setup.
1435         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1437 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1439         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1440         support.
1441         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1442         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1443         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1444         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1445         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1447         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1448         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1449         fields in the structure.
1450         (__old_sem_init): New function.
1451         * sem_open.c: Initialize all fields of the structure.
1452         * sem_getvalue.c: Adjust for renamed element.
1453         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1454         (gen-as-const-headers): Add structsem.sym.
1455         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1456         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1457         struct new_sem.  Add struct old_sem.
1458         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1459         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1460         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1461         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1462         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1463         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1464         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1465         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1466         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1467         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1468         * tst-sem10.c: New file.
1469         * tst-sem11.c: New file.
1470         * tst-sem12.c: New file.
1471         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1472         of struct sem.
1474 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1475             Jakub Jelinek  <jakub@redhat.com>
1477         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1478         Move __pthread_enable_asynccancel right before futex syscall.
1479         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1480         Likewise.
1482 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1484         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1485         THREAD_COPY_PRIVATE_FUTEX): Define.
1486         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1487         THREAD_COPY_PRIVATE_FUTEX): Define.
1488         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1489         * init.c (__pthread_initialize_minimal_internal): Use
1490         THREAD_SET_PRIVATE_FUTEX.
1492         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1493         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1494         THREAD_GSCOPE_FLAG_WAIT): Define.
1495         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1496         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1497         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1498         PTR_DEMANGLE.
1499         (THREAD_GSCOPE_GET_FLAG): Define.
1500         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1501         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1502         instead of ->header.gscope_flag directly.
1504 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1506         * init.c (__pthread_initialize_minimal_internal): Check whether
1507         private futexes are available.
1508         * allocatestack.c (allocate_stack): Copy private_futex field from
1509         current thread into the new stack.
1510         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1511         futexes if they are available.
1512         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1513         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1514         in libc-lowlevellock.S allow using private futexes.
1515         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1516         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1517         FUTEX_PRIVATE_FLAG.
1518         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1519         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1520         if they are available.
1521         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1522         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1523         * sysdeps/i386/tcb-offsets.sym: Likewise.
1524         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1525         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1527 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1529         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1530         Remove ptr_wait_lookup_done again.
1531         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1532         (__pthread_initialize_minimal_internal): Initialize
1533         _dl_wait_lookup_done pointer in _rtld_global directly.
1534         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1535         Remove code to code _dl_wait_lookup_done.
1536         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1537         encrypted for now.
1539 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1541         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1542         pthread_mutex_init failed with ENOTSUP.
1544 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1546         * allocatestack.c (__wait_lookup_done): New function.
1547         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1548         Add ptr_wait_lookup_done.
1549         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1550         * pthreadP.h: Declare __wait_lookup_done.
1551         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1552         Define macros to implement reference handling of global scope.
1553         * sysdeps/x86_64/tls.h: Likewise.
1554         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1555         Initialize GL(dl_wait_lookup_done).
1557 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1559         [BZ #4512]
1560         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1561         is detected.
1562         * pthread_mutex_timedlock.c: Likewise.
1563         * pthread_mutex_trylock.c: Likewise.
1564         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1566         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1567         * tst-robust9.c: New file.
1568         * tst-robustpi9.c: New file.
1570         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1571         unnecessary extra cancellation test.
1573 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1575         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1576         extra cancellation test.
1577         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1579 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1581         * descr.h (struct pthread): Rearrange members to fill hole in
1582         64-bit layout.
1584         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1585         (__pthread_setaffinity_new): If syscall was successful and
1586         RESET_VGETCPU_CACHE is defined, use it before returning.
1587         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1589 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1591         [BZ #4455]
1592         * tst-align2.c: Include stackinfo.h.
1593         * tst-getpid1.c: Likewise.
1595 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1597         [BZ #4455]
1598         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1599         * tst-getpid1.c (do_test): Likewise.
1601         [BZ #4456]
1602         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1603         (allocate_stack): Likewise.
1605 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1607         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1608         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1609         (__lll_robust_timedlock_wait): Likewise.
1610         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1612 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1614         [BZ #4465]
1615         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1616         * tst-cancel4.c (tf_fdatasync): New test.
1618 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1620         [BZ #4392]
1621         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1622         check mutexes like normal mutexes.
1624         [BZ #4306]
1625         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1626         Initialize the whole sigevent structure to appease valgrind.
1628 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1630         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1631         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1633 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1635         * tst-locale1.c: Avoid warnings.
1636         * tst-locale2.c: Likewise.
1638 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1640         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1641         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1643 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1645         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1646         __extern_always_inline where appropriate.
1647         * sysdeps/pthread/pthread.h: Likewise.
1649 2007-03-13  Richard Henderson  <rth@redhat.com>
1651         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1652         separate cfi regions for the two subsections.
1654 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1656         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1657         new thread, don't just decrement it.
1658         Patch by Suzuki K P <suzuki@in.ibm.com>.
1660 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1662         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1663         PTHFCT_CALL definition.
1665 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1667         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1668         available, don't use it.
1670 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1672         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1673         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1674         call into the kernel to delay.
1676 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1678         * tst-initializers1.c: We want to test the initializers as seen
1679         outside of libc, so undefined _LIBC.
1681         * pthread_join.c (cleanup): Avoid warning.
1683 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1685         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1686         (__lll_timedwait_tid): Add unwind info.
1688         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1689         function table, mangle the pointers.
1690         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1691         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1692         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1693         demangle pointers before use.
1694         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1695         demangle pointer.
1696         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1697         * sysdeps/pthread/setxid.h: Likewise.
1699 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1701         * tst-rwlock7.c: Show some more information in case of correct
1702         behavior.
1704 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1706         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1707         (lll_futex_timed_wait): Undo part of last change, don't negate
1708         return value.
1710 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1712         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1713         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1715 2006-12-28  David S. Miller  <davem@davemloft.net>
1717         * shlib-versions: Fix sparc64 linux target specification.
1719 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1721         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1722         Adjust include path for pthread_barrier_wait.c move.
1724 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1726         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1727         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1729 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1731         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1732         6 argument cancellable syscalls.
1733         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1734         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1735         6 argument cancellable syscalls.
1736         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1738 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1740         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1741         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1743 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1745         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1746         __sync_lock_release instead of __sync_lock_release_si.
1748 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1750         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1751         Define.
1752         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1753         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1754         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1755         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1756         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1757         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1758         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1759         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1760         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1761         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1762         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1764 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1766         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1767         * pthread_barrier_wait.c: ...here.
1768         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1769         * pthread_cond_broadcast.c: ...here.
1770         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1771         * pthread_cond_signal.c: ...here.
1772         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1773         * pthread_cond_timedwait.c: ...here.
1774         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1775         * pthread_cond_wait.c: ...here.
1776         * sysdeps/pthread/pthread_once.c: Move to...
1777         * pthread_once.c: ...here.
1778         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1779         * pthread_rwlock_rdlock.c: ...here.
1780         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1781         * pthread_rwlock_timedrdlock.c: ...here.
1782         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1783         * pthread_rwlock_timedwrlock.c: ...here.
1784         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1785         * pthread_rwlock_unlock.c: ...here.
1786         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1787         * pthread_rwlock_wrlock.c: ...here.
1788         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1789         * pthread_spin_destroy.c: ...here.
1790         * sysdeps/pthread/pthread_spin_init.c: Move to...
1791         * pthread_spin_init.c: ...here.
1792         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1793         * pthread_spin_unlock.c: ...here.
1794         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1795         * pthread_getcpuclockid.c: ...here.
1797         * init.c: USE_TLS support is now always enabled.
1798         * tst-tls5.h: Likewise.
1799         * sysdeps/alpha/tls.h: Likewise.
1800         * sysdeps/i386/tls.h: Likewise.
1801         * sysdeps/ia64/tls.h: Likewise.
1802         * sysdeps/powerpc/tls.h: Likewise.
1803         * sysdeps/s390/tls.h: Likewise.
1804         * sysdeps/sh/tls.h: Likewise.
1805         * sysdeps/sparc/tls.h: Likewise.
1806         * sysdeps/x86_64/tls.h: Likewise.
1808 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1810         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1811         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1812         failed.
1814         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1815         Define to THREAD_SELF->header.multiple_threads.
1816         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1817         Likewise.
1818         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1819         Likewise.
1820         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1821         (SINGLE_THREAD_P): Likewise.
1822         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1823         (SINGLE_THREAD_P): Likewise.
1824         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1825         (SINGLE_THREAD_P): Likewise.
1826         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1827         (SINGLE_THREAD_P): Likewise.
1828         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1829         Likewise.
1830         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1831         (SINGLE_THREAD_P): Likewise.
1832         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1833         (SINGLE_THREAD_P): Likewise.
1834         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1835         Likewise.
1837 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1839         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1840         by default rather than 2_3_3.
1842 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1844         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1845         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1846         atomic_* instead of catomic_* macros.
1848 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1850         [BZ #3285]
1851         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1852         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1853         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1854         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1855         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1856         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1857         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1858         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1859         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1860         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1861         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1862         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1863         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1865 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1867         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1868         cancelable syscalls with six parameters.
1870         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1871         operations instead of atomic_*.
1873 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1875         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1877 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1879         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1880         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1881         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1882         New file.
1883         * pthread_attr_setstack.c: Allow overwriting the version number of the
1884         new symbol.
1885         * pthread_attr_setstacksize.c: Likewise.
1886         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1887         it.
1888         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1889         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1891 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1893         [BZ #3251]
1894         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1895         Patch by Petr Baudis.
1897 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1899         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1901         * tst-cancel2.c (tf): Loop as long as something was written.
1903 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1905         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1906         mutexes wake all mutexes.
1907         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1908         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1909         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1911 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1913         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1914         to guarantee the thread is always canceled.
1916 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1918         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1919         Include stdlib.h.
1920         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1921         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1922         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1924         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1926 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1928         [BZ #3123]
1929         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1930         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1933         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1934         * Makefile (tests): Add tst-cond22.
1935         * tst-cond22.c: New file.
1937 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1939         [BZ #3124]
1940         * descr.h (struct pthread): Add parent_cancelhandling.
1941         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1942         cancelhandling value to child.
1943         * pthread_create.c (start_thread): If parent thread was canceled
1944         reset the SIGCANCEL mask.
1945         * Makefile (tests): Add tst-cancel25.
1946         * tst-cancel25.c: New file.
1948 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1949             Ulrich Drepper  <drepper@redhat.com>
1951         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1952         counterp if it is already zero.
1953         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1955 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1956             Roland McGrath  <roland@redhat.com>
1958         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1959         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1960         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1961         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1962         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1963         lll_robust_mutex_timedlock, lll_mutex_unlock,
1964         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1965         Add _L_*_ symbols around the subsection.
1966         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1967         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1969 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1970             Roland McGrath  <roland@redhat.com>
1972         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1973         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1974         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1975         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1976         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1977         lll_robust_mutex_timedlock, lll_mutex_unlock,
1978         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1979         Add _L_*_ symbols around the subsection.
1980         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1981         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1983 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1985         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1986         change because it can disturb too much existing code.  If real hard
1987         reader preference is needed we'll introduce another type.
1988         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1989         (pthread_rwlock_timedwrlock): Likewise.
1990         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1991         Likewise.
1993 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1995         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1996         reader preference.
1997         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1998         (pthread_rwlock_timedwrlock): Likewise.
1999         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2000         Likewise.
2002 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2004         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2005         Only define ifdef SHARED.
2007 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2009         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2010         (free_stacks): ...here.
2011         (__free_stack_cache): New function.
2012         * pthreadP.h: Declare __free_stack_cache.
2013         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2014         ptr_freeres.
2015         * init.c (pthread_functions): Initialize ptr_freeres.
2016         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2017         New freeres function.
2019 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2021         [BZ #3018]
2022         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2024 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2026         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2027         _XOPEN_REALTIME_THREADS.
2029 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2031         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2032         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2033         HAVE_CLOCK_GETTIME_VSYSCALL.
2034         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2036 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2038         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2039         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2040         * descr.h (struct priority_protection_data): New type.
2041         (struct pthread): Add tpp field.
2042         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2043         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2044         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2045         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2046         TPP mutexes.
2047         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2048         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2049         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2050         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2051         * tpp.c: New file.
2052         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2053         boosted by TPP.
2054         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2055         * pthread_mutexattr_getprioceiling.c
2056         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2057         in the SCHED_FIFO priority range.
2058         * pthread_mutexattr_setprioceiling.c
2059         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2060         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2061         if mutex is not TPP.  Ceiling is now in __data.__lock.
2062         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2063         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2064         is now in __data.__lock.  Add locking.
2065         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2066         * Makefile (libpthread-routines): Add tpp.
2067         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2068         * tst-tpp.h: New file.
2069         * tst-mutexpp1.c: New file.
2070         * tst-mutexpp6.c: New file.
2071         * tst-mutexpp10.c: New file.
2072         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2073         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2075 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2077         [BZ #2843]
2078         * pthread_join.c (pthread_join): Account for self being canceled
2079         when checking for deadlocks.
2080         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2081         (tf1): Don't print anything after pthread_join returns, this would be
2082         another cancellation point.
2083         (tf2): Likewise.
2084         * tst-join6.c: New file.
2085         * Makefile (tests): Add tst-join6.
2087 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2089         [BZ #2892]
2090         * pthread_setspecific.c (__pthread_setspecific): Check
2091         out-of-range index before checking for unused key.
2093         * sysdeps/pthread/gai_misc.h: New file.
2095 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2097         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2098         file.  Don't use sysctl.
2099         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2100         overwrite the file if this is likely not true.
2102 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2104         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2105         * Makefile (tests): Add tst-getpid3.
2106         * tst-getpid3.c: New file.
2108 2006-07-30  Roland McGrath  <roland@redhat.com>
2110         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2112         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2113         (pause_not_cancel): New macro.
2114         (nanosleep_not_cancel): New macro.
2115         (sigsuspend_not_cancel): New macro.
2116         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2117         nanosleep_not_cancel macro from <not-cancel.h>.
2118         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2119         macro from <not-cancel.h>.
2121 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2122             Jakub Jelinek  <jakub@redhat.com>
2124         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2125         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2126         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2127         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2128         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2129         * pthread_mutex_lock.c: Likewise.
2130         * pthread_mutex_timedlock.c: Likewise.
2131         * pthread_mutex_trylock.c: Likewise.
2132         * pthread_mutex_unlock.c: Likewise.
2133         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2134         all mutexes.
2135         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2137         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2138         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2139         pthread-pi-defines.sym.
2140         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2141         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2142         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2143         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2144         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2145         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2146         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2147         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2148         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2149         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2150         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2151         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2152         * tst-mutex2.c: Likewise.
2153         * tst-mutex3.c: Likewise.
2154         * tst-mutex4.c: Likewise.
2155         * tst-mutex5.c: Likewise.
2156         * tst-mutex6.c: Likewise.
2157         * tst-mutex7.c: Likewise.
2158         * tst-mutex7a.c: Likewise.
2159         * tst-mutex8.c: Likewise.
2160         * tst-mutex9.c: Likewise.
2161         * tst-robust1.c: Likewise.
2162         * tst-robust7.c: Likewise.
2163         * tst-robust8.c: Likewise.
2164         * tst-mutexpi1.c: New file.
2165         * tst-mutexpi2.c: New file.
2166         * tst-mutexpi3.c: New file.
2167         * tst-mutexpi4.c: New file.
2168         * tst-mutexpi5.c: New file.
2169         * tst-mutexpi6.c: New file.
2170         * tst-mutexpi7.c: New file.
2171         * tst-mutexpi7a.c: New file.
2172         * tst-mutexpi8.c: New file.
2173         * tst-mutexpi9.c: New file.
2174         * tst-robust1.c: New file.
2175         * tst-robust2.c: New file.
2176         * tst-robust3.c: New file.
2177         * tst-robust4.c: New file.
2178         * tst-robust5.c: New file.
2179         * tst-robust6.c: New file.
2180         * tst-robust7.c: New file.
2181         * tst-robust8.c: New file.
2182         * Makefile (tests): Add the new tests.
2184         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2185         * pthread_mutex_destroy.c: Remove unneeded label.
2187 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2189         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2190         computations to compile time.
2192 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2194         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2196 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2198         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2200 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2202         * pthread_key_create.c (__pthread_key_create): Do away with
2203         __pthread_keys_lock.
2205         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2206         (__kernel_cpumask_size): Mark as hidden.
2207         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2209         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2210         * semaphoreP.h (__sem_mappings_lock): Likewise.
2212 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2214         * pthread_atfork.c: Mark __dso_handle as hidden.
2216 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2218         [BZ #2644]
2219         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2220         the reload problem.  Change the one path in pthread_cancel_init
2221         which causes the problem.  Force gcc to reload.  Simplify callers.
2222         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2223         (_Unwind_GetBSP): Undo last patch.
2225 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2227         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2228         function pointer is reloaded after pthread_cancel_init calls.
2230         [BZ #2644]
2231         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2232         pointers are reloaded after pthread_cancel_init calls.
2234 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2236         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2237         __always_inline.
2239 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2241         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2242         Allocate new object which is passed to timer_sigev_thread so that
2243         the timer can be deleted before the new thread is scheduled.
2245 2006-04-26  Roland McGrath  <roland@redhat.com>
2247         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2249 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2251         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2252         suffix for conditional jumps.
2253         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2254         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2255         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2256         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2257         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2258         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2260         * init.c (sigcancel_handler): Compare with correct PID even if the
2261         thread is in the middle of a fork call.
2262         (sighandler_setxid): Likewise.
2263         Reported by Suzuki K P <suzuki@in.ibm.com> .
2265 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2267         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2269 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2271         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2272         fails [Coverity CID 105].
2274 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2276         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2278 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2280         [BZ #2505]
2281         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2282         Define __lll_rel_instr using lwsync.
2284 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2286         * allocatestack.c (allocate_stack): Always initialize robust_head.
2287         * descr.h: Define struct robust_list_head.
2288         (struct pthread): Use robust_list_head in robust mutex list definition.
2289         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2290         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2291         (__pthread_initialize_minimal_internal): Register robust_list with
2292         the kernel.
2293         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2294         Declare __set_robust_list_avail.
2295         * pthread_create.c (start_thread): Register robust_list of new thread.
2296         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2297         waiters.
2298         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2299         number of users, it's unreliable.
2300         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2301         set_robust_list syscall is available.
2302         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2303         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2304         Set robust_head.list_op_pending before trying to lock a robust mutex.
2305         * pthread_mutex_timedlock.c: Likewise.
2306         * pthread_mutex_trylock.c: Likewise.
2307         * pthread_mutex_unlock.c: Likewise for unlocking.
2308         * Makefile (tests): Add tst-robust8.
2309         * tst-robust8.c: New file.
2311 2006-03-08  Andreas Schwab  <schwab@suse.de>
2313         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2314         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2316 2006-03-05  Roland McGrath  <roland@redhat.com>
2318         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2319         and $config_os doesn't match *linux*.
2321 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2323         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2324         Use __syscall_error.
2325         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2326         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2327         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2328         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2329         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2330         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2332 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2334         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2336 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2338         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2339         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2340         mutex.
2341         (__lll_robust_timedlock_wait): Likewise.
2342         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2343         (__lll_robust_lock_wait): Likewise.
2344         (__lll_robust_timedlock_wait): Likewise.
2345         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2346         (__lll_robust_lock_wait): Likewise.
2347         (__lll_robust_timedlock_wait): Likewise.
2349 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2351         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2352         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2353         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2354         lll_robust_mutex_unlock): Define.
2355         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2357 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2359         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2360         instead of <clone.S>.
2362 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2364         * Makefile (libpthread-routines): Add
2365         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2366         and pthread_mutex_[sg]etprioceiling.
2367         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2368         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2369         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2370         pthread_mutex_setprioceiling.
2371         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2372         PTHREAD_PRIO_PROTECT): New enum values.
2373         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2374         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2375         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2376         prototypes.
2377         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2378         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2379         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2380         Define.
2381         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2382         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2383         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2384         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2385         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2386         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2387         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2388         protocol mutexes.
2389         * pthread_mutex_getprioceiling.c: New file.
2390         * pthread_mutex_setprioceiling.c: New file.
2391         * pthread_mutexattr_getprioceiling.c: New file.
2392         * pthread_mutexattr_setprioceiling.c: New file.
2393         * pthread_mutexattr_getprotocol.c: New file.
2394         * pthread_mutexattr_setprotocol.c: New file.
2396 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2398         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2400 2006-02-27  Roland McGrath  <roland@redhat.com>
2402         * sysdeps/pthread/Subdirs: List nptl here too.
2403         * configure (libc_add_on_canonical): New variable.
2405         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2407         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2408         self to get main source tree's file.
2409         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2410         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2411         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2412         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2413         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2414         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2415         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2416         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2417         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2418         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2419         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2420         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2421         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2423         * Makefile: Use $(sysdirs) in vpath directive.
2425         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2426         (CPPFLAGS-timer_routines.c): Likewise.
2428         * Makeconfig (includes): Variable removed.
2430 2006-02-26  Roland McGrath  <roland@redhat.com>
2432         * sysdeps/generic/pt-raise.c: Moved to ...
2433         * pt-raise.c: ... here.
2434         * sysdeps/generic/lowlevellock.h: Moved to ...
2435         * lowlevellock.h: ... here.
2437 2006-02-23  Roland McGrath  <roland@redhat.com>
2439         * descr.h (struct pthread): Add final member `end_padding'.
2440         (PTHREAD_STRUCT_END_PADDING): Use it.
2442 2006-02-20  Roland McGrath  <roland@redhat.com>
2444         * sysdeps/mips: Directory removed, saved in ports repository.
2445         * sysdeps/unix/sysv/linux/mips: Likewise.
2447 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2449         * tst-robust1.c: Add second mutex to check that the mutex list is
2450         handled correctly.
2452 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2454         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2455         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2456         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2457         lll_robust_mutex_unlock): New macros.
2458         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2459         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2460         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2461         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2462         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2464 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2466         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2467         definitions.
2468         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2470 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2472         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2473         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2474         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2475         (lll_robust_mutex_unlock): Likewise.
2477 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2479         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2480         Set robust_list.__next rather than robust_list.
2481         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2482         (__pthread_list_t): New typedef.
2483         (pthread_mutex_t): Replace __next and __prev fields with __list.
2484         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2485         (__pthread_list_t): New typedef.
2486         (pthread_mutex_t): Replace __next and __prev fields with __list.
2487         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2488         (__pthread_list_t, __pthread_slist_t): New typedefs.
2489         (pthread_mutex_t): Replace __next and __prev fields with __list.
2490         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2491         (__pthread_list_t, __pthread_slist_t): New typedefs.
2492         (pthread_mutex_t): Replace __next and __prev fields with __list.
2493         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2494         (__pthread_list_t, __pthread_slist_t): New typedefs.
2495         (pthread_mutex_t): Replace __next and __prev fields with __list.
2496         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2497         (__pthread_slist_t): New typedef.
2498         (pthread_mutex_t): Replace __next field with __list.
2500 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2502         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2503         PTHREAD_MUTEX_OWNERDEAD.
2504         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2505         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2506         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2507         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2508         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2509         to PTHREAD_MUTEX_INCONSISTENT.
2510         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2511         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2512         * pthread_mutex_trylock.c: Likewise.
2513         * pthread_mutex_timedlock.c: Likewise.
2514         * pthread_mutex_unlock.c: Likewise.
2515         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2516         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2517         lowlevelrobustlock.sym.
2518         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2519         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2520         definitions.
2521         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2522         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2523         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2524         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2525         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2527 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2529         * allocatestack.c (allocate_stack): Initialize robust_list.
2530         * init.c (__pthread_initialize_minimal_internal): Likewise.
2531         * descr.h (struct xid_command): Pretty printing.
2532         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2533         robust_list.  Adjust macros.
2534         * pthread_create.c (start_thread): Adjust robust_list handling.
2535         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2536         but the owner for all robust mutex types.
2537         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2538         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2539         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2540         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2542         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2543         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2545 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2547         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2548         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2550 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2552         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2553         Return status.
2554         (lll_futex_timed_wait): Define.
2556 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2558         * tst-cancel4.c: Test ppoll.
2560 2006-01-18  Andreas Jaeger  <aj@suse.de>
2562         [BZ #2167]
2563         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2564         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2565         by Jim Gifford <patches@jg555.com>.
2567 2006-01-13  Richard Henderson  <rth@redhat.com>
2569         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2571 2006-01-10  Roland McGrath  <roland@redhat.com>
2573         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2574         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2575         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2576         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2577         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2578         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2579         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2580         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2581         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2582         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2584 2006-01-09  Roland McGrath  <roland@redhat.com>
2586         * tst-initializers1-c89.c: New file.
2587         * tst-initializers1-c99.c: New file.
2588         * tst-initializers1-gnu89.c: New file.
2589         * tst-initializers1-gnu99.c: New file.
2590         * Makefile (tests): Add them.
2591         (CFLAGS-tst-initializers1-c89.c): New variable.
2592         (CFLAGS-tst-initializers1-c99.c): New variable.
2593         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2594         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2596         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2597         Use __extension__ on anonymous union definition.
2598         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2599         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2600         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2601         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2602         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2604 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2606         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2607         Don't give the union a name because it changes the mangled name.
2608         Instead name the struct for __data.
2609         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2610         Likewise.
2611         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2612         Likewise.
2614 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2616         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2617         stack bias to mc_ftp field.
2619 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2621         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2622         being too clever and reloading the futex value where it shouldn't.
2624 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2626         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2627         correct type.
2629 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2631         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2632         Add cfi directives.
2634 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2636         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2637         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2638         rename in tcbhead_t.
2640         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2641         Don't give the union a name because it changes the mangled name.
2642         Instead name the struct for __data.
2643         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2644         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2645         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2646         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2647         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2648         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2650 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2652         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2653         Return status.
2654         (lll_futex_timed_wait): Define.
2655         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2656         * sysdeps/pthread/aio_misc.h: New file.
2658 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2660         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2662 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2664         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2665         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2666         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2668 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2670         * tst-cancel24.cc: Use C headers instead of C++ headers.
2672 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2674         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2675         sparc-linux configured glibc.
2676         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2677         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2678         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2679         atomic_compare_and_exchange_val_24_acq instead of
2680         atomic_compare_and_exchange_val_acq.
2681         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2682         instead of atomic_exchange_rel.
2683         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2684         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2685         file.
2686         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2687         file.
2688         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2689         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2690         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2691         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2692         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2693         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2694         New file.
2695         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2696         New file.
2697         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2698         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2699         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2700         file.
2701         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2702         file.
2703         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2705 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2707         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2708         mutex initializers.
2710 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2712         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2713         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2714         THREAD_COPY_POINTER_GUARD): Define.
2715         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2716         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2718 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2720         * version.c: Update copyright year.
2722 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2724         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2725         .eh_frame section, use cfi_* directives.
2726         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2728 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2730         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2731         now.
2733 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2735         * sysdeps/pthread/sigaction.c: Removed.
2736         * sigaction.c: New file.
2737         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2739 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2741         * Makefile (tests): Add tst-signal7.
2742         * tst-signal7.c: New file.
2744 2005-12-27  Roland McGrath  <roland@redhat.com>
2746         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2747         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2748         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2749         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2750         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2751         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2752         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2753         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2754         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2755         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2756         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2758 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2760         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2761         and __prev field to pthread_mutex_t.
2762         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2763         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2764         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2765         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2766         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2767         to pthread_mutex_t.
2769 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2771         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2772         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2773         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2774         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2775         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2776         and PTHREAD_MUTEXATTR_FLAG_BITS.
2777         * descr.h (struct pthread): Add robust_list field and define
2778         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2779         * pthread_mutexattr_getrobust.c: New file.
2780         * pthread_mutexattr_setrobust.c: New file.
2781         * pthread_mutex_consistent.c: New file.
2782         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2783         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2784         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2785         Adjust pthread_mutex_t initializers.
2786         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2787         field to pthread_mutex_t.
2788         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2789         and __prev field to pthread_mutex_t.
2790         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2791         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2792         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2793         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2794         * pthread_mutexattr_gettype.c: Likewise.
2795         * pthread_mutexattr_setpshared.c: Likewise.
2796         * pthread_mutexattr_settype.c: Likewise.
2797         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2798         Initialize mutex kind according to robust flag.
2799         * pthread_mutex_lock.c: Implement local robust mutex.
2800         * pthread_mutex_timedlock.c: Likewise.
2801         * pthread_mutex_trylock.c: Likewise.
2802         * pthread_mutex_unlock.c: Likewise.
2803         * pthread_create.c (start_thread): Mark robust mutexes which remained
2804         locked as dead.
2805         * tst-robust1.c: New file.
2806         * tst-robust2.c: New file.
2807         * tst-robust3.c: New file.
2808         * tst-robust4.c: New file.
2809         * tst-robust5.c: New file.
2810         * tst-robust6.c: New file.
2811         * tst-robust7.c: New file.
2812         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2813         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2814         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2815         tst-robust5, tst-robust6, and tst-robust7.
2817         * tst-typesizes.c: New file.
2818         * Makefile (tests): Add tst-typesizes.
2820         * tst-once3.c: More debug output.
2822 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2824         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2825         missing after last change.
2827         * version.c: Update copyright year.
2829 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2831         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2832         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2833         * pthread_mutex_trylock.c: Likewise.
2834         * pthread_mutex_timedlock.c: Likewise.
2835         * pthread_mutex_unlock.c: Likewise.
2837 2005-12-22  Roland McGrath  <roland@redhat.com>
2839         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2840         so that #include_next's search location is not reset to the -I..
2841         directory where <nptl/...> can be found.
2843 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2845         [BZ #1913]
2846         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2847         Fix unwind info.  Remove useless branch prediction prefix.
2848         * tst-cancel24.cc: New file.
2849         * Makefile: Add rules to build and run tst-cancel24.
2851 2005-12-21  Roland McGrath  <roland@redhat.com>
2853         * libc-cancellation.c: Use <> rather than "" #includes.
2854         * pt-cleanup.c: Likewise.
2855         * pthread_create.c: Likewise.
2856         * pthread_join.c: Likewise.
2857         * pthread_timedjoin.c: Likewise.
2858         * pthread_tryjoin.c: Likewise.
2859         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2860         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2861         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2862         * unwind.c: Likewise.
2864 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2866         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2867         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2868         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2869         THREAD_COPY_POINTER_GUARD): Define.
2871 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2873         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2874         rather than one.
2875         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2876         THREAD_COPY_POINTER_GUARD): Define.
2877         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2878         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2879         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2880         THREAD_COPY_POINTER_GUARD): Define.
2881         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2882         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2883         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2884         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2885         Use PTR_DEMANGLE for B0 if defined.
2887 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2889         * pthread_create.c (__pthread_create_2_1): Use
2890         THREAD_COPY_POINTER_GUARD if available.
2891         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2892         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2893         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2894         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2895         * sysdeps/x86_64/tls.h: Likewise.
2897 2005-12-15  Roland McGrath  <roland@redhat.com>
2899         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2901 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2903         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2904         sysdeps/generic.
2905         * errno-loc.c: New file.
2907 2005-12-12  Roland McGrath  <roland@redhat.com>
2909         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2910         adjustments before choosing stack size.  Update minimum stack size
2911         calculation to match allocate_stack change.
2913 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2915         * allocatestack.c (allocate_stack): Don't demand that there is an
2916         additional full page available on the stack beside guard, TLS, the
2917         minimum stack.
2919 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2921         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2922         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2924         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2925         compiling 32-bit code we must define __cleanup_fct_attribute.
2927 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2929         [BZ #1920]
2930         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2931         __attribute__ instead of __attribute.
2932         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2933         (__cleanup_fct_attribute): Likewise.
2935 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2937         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2938         a write barrier before writing libgcc_s_getcfa.
2940 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2942         * sysdeps/unix/sysv/linux/configure: Removed.
2944 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2946         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2947         optional init_array/fini_array support.
2949 2005-10-24  Roland McGrath  <roland@redhat.com>
2951         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2952         versioned_symbol use.
2954 2005-10-16  Roland McGrath  <roland@redhat.com>
2956         * init.c (__pthread_initialize_minimal_internal): Even when using a
2957         compile-time default stack size, apply the minimum that allocate_stack
2958         will require, and round up to page size.
2960 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2962         * Makefile ($(test-modules)): Remove static pattern rule.
2964 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2965             Ulrich Drepper  <drepper@redhat.com>
2967         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2968         alignment in callback function.
2969         * Makefile: Add rules to build and run tst-align3.
2970         * tst-align3.c: New file.
2972 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2974         * allocatestack.c (setxid_signal_thread): Add
2975         INTERNAL_SYSCALL_DECL (err).
2977 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2979         * allocatestack.c (setxid_signal_thread): Need to use
2980         atomic_compare_and_exchange_bool_acq.
2982 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2983             Jakub Jelinek  <jakub@redhat.com>
2985         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2986         CANCEL_RESTMASK.
2987         (struct pthread): Move specific_used field to avoid padding.
2988         Add setxid_futex field.
2989         * init.c (sighandler_setxid): Reset setxid flag and release the
2990         setxid futex.
2991         * allocatestack.c (setxid_signal_thread): New function.  Broken
2992         out of the bodies of the two loops in __nptl_setxid.  For undetached
2993         threads check whether they are exiting and if yes, don't send a signal.
2994         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2995         * pthread_create.c (start_thread): For undetached threads, check
2996         whether setxid bit is set.  If yes, wait until signal has been
2997         processed.
2999         * allocatestack.c (STACK_VARIABLES): Initialize them.
3000         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3002 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3004         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3005         waiters, awake all waiters on the associated mutex.
3007 2005-09-22  Roland McGrath  <roland@redhat.com>
3009         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3010         ../sysdeps/x86_64/hp-timing.h).
3012 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3014         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3015         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3016         (lll_futex_wake_unlock): Define.
3017         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3018         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3019         (lll_futex_wake_unlock): Define.
3020         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3021         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3022         (lll_futex_wake_unlock): Define.
3023         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3024         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3025         (lll_futex_wake_unlock): Define.
3026         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3027         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3028         (lll_futex_wake_unlock): Define.
3029         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3030         lll_futex_wake_unlock.
3031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3032         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3033         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3035         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3036         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3038 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3040         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3041         Fix typo in register name.
3043 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3045         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3046         Use __sigfillset.  Document that sigfillset does the right thing wrt
3047         to SIGSETXID.
3049 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3051         [BZ #1102]
3052         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3053         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3054         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3055         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3056         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3057         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3058         in the structure.
3059         * Makefile (tests): Add tst-initializers1.
3060         (CFLAGS-tst-initializers1.c): Set.
3061         * tst-initializers1.c: New test.
3063 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3065         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3066         Make sure __flags are located at offset 48 from the start of the
3067         structure.
3069 2005-07-02  Roland McGrath  <roland@redhat.com>
3071         * Makeconfig: Comment fix.
3073 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3075         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3076         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3077         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3078         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3079         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3080         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3081         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3082         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3083         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3084         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3086 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3088         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3089         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3090         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3091         fields.
3092         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3093         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3094         field.  Put in sysinfo field unconditionally.
3095         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3096         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3097         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3098         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3099         fields.
3100         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3101         * pthread_create.c (__pthread_create_2_1): Use
3102         THREAD_COPY_STACK_GUARD macro.
3103         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3104         tests.
3105         * tst-stackguard1.c: New file.
3106         * tst-stackguard1-static.c: New file.
3108 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3110         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3111         Invoke CGOTSETUP and CGOTRESTORE.
3112         (CGOTSETUP, CGOTRESTORE): Define.
3114 2005-05-29  Richard Henderson  <rth@redhat.com>
3116         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3117         (tf_write, tf_writev): Use it.
3118         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3119         the system minimum.
3121 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3123         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3124         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3125         __librt_*_asynccancel@local.
3127 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3129         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3130         all occurrences of JUMPTARGET.  Instead append @local to labels.
3132 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3134         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3135         size/alignment of struct pthread rather than tcbhead_t.
3136         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3137         Likewise.
3138         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3139         Likewise.
3140         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3141         Likewise.
3143 2005-05-19  Richard Henderson  <rth@redhat.com>
3145         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3146         __sync_val_compare_and_swap, not explicit _si variant.
3147         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3149 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3151         [BZ #915]
3152         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3154 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3156         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3157         .eh_frame section, use cfi_* directives.
3159 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3161         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3162         of "" includes.
3164 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3166         [BZ #1075]
3167         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3168         aio_write blocks.
3170 2005-04-27  Roland McGrath  <roland@redhat.com>
3172         * Makefile (tests): Remove tst-clock2.
3174         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3175         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3176         translating to the kernel clockid_t for our own process/thread clock.
3178         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3180 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3182         * old_pthread_cond_init.c: Include <errno.h>.
3183         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3184         process shared or uses clock other than CLOCK_REALTIME.
3185         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3187 2005-04-13  David S. Miller  <davem@davemloft.net>
3189         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3190         * sysdeps/sparc/sparc64/clone.S: New file.
3192 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3194         [BZ #1102]
3195         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3196         __inline instead of inline.
3197         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3199 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3201         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3202         functionally equivalent, but shorter instructions.
3203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3204         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3205         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3206         Likewise.
3207         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3208         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3209         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3210         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3212         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3213         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3214         Likewise.
3215         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3216         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3218         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3219         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3221 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3223         * sysdeps/mips/Makefile: New file.
3224         * sysdeps/mips/nptl-sysdep.S: New file.
3225         * sysdeps/mips/tcb-offsets.sym: New file.
3226         * sysdeps/mips/pthread_spin_lock.S: New file.
3227         * sysdeps/mips/pthread_spin_trylock.S: New file.
3228         * sysdeps/mips/pthreaddef.h: New file.
3229         * sysdeps/mips/tls.h: New file.
3230         * sysdeps/mips/jmpbuf-unwind.h: New file.
3231         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3232         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3233         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3234         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3235         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3236         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3237         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3238         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3239         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3240         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3242 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3244         [BZ #1112]
3245         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3246         variable to scerr.
3248 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3250         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3252 2005-02-25  Roland McGrath  <roland@redhat.com>
3254         * alloca_cutoff.c: Correct license text.
3255         * tst-unload.c: Likewise.
3256         * sysdeps/pthread/allocalim.h: Likewise.
3257         * sysdeps/pthread/pt-initfini.c: Likewise.
3258         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3259         * sysdeps/pthread/bits/sigthread.h: Likewise.
3260         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3261         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3263 2005-02-16  Roland McGrath  <roland@redhat.com>
3265         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3266         Use unsigned int * for ptr_nthreads.
3268 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3270         [BZ #721]
3271         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3272         gcc4.
3274 2005-02-07  Richard Henderson  <rth@redhat.com>
3276         [BZ #787]
3277         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3278         argument.
3280 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3282         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3283         order of arguments in invocation of atomic_add_zero.
3285 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3287         [BZ #737]
3288         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3289         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3290         at least gotntpoff relocation and addition.
3291         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3292         Likewise.
3293         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3294         Likewise.
3295         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3296         Likewise.
3298 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3300         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3301         entry for static tls deallocation fix.
3302         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3303         also contains information whether the memory pointed to is static
3304         TLS or not.
3305         * sysdeps/i386/tls.h: Likewise.
3306         * sysdeps/ia64/tls.h: Likewise.
3307         * sysdeps/powerpc/tls.h: Likewise.
3308         * sysdeps/s390/tls.h: Likewise.
3309         * sysdeps/sh/tls.h: Likewise.
3310         * sysdeps/sparc/tls.h: Likewise.
3311         * sysdeps/x86_64/tls.h: Likewise.
3313 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3315         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3317 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3319         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3320         %esp.
3321         * Makefile (tests): Add tst-align2.
3322         * tst-align2.c: New test.
3323         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3324         -mpreferred-stack-boundary=4.
3326 2004-12-18  Roland McGrath  <roland@redhat.com>
3328         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3329         New file removed withdrawn for the moment.
3331 2004-12-17  Richard Henderson  <rth@redhat.com>
3333         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3334         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3336 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3338         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3339         Increased PTHREAD_STACK_MIN.
3341         * tst-context1.c (stacks): Use bigger stack size.
3343 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3345         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3346         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3348 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3350         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3351         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3352         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3354 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3356         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3358 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3360         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3361         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3363         * tst-getpid1.c: If child crashes, report this first.  Print which
3364         signal.
3366 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3368         * init.c (__pthread_initialize_minimal_internal): Also unblock
3369         SIGSETXID.
3371 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3373         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3374         _POSIX_THREAD_CPUTIME): Define to 0.
3375         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3376         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3377         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3378         __timer_signal_thread_tclk): Remove.
3379         (init_module): Remove their initialization.
3380         (thread_cleanup): Remove their cleanup assertions.
3381         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3382         __timer_signal_thread_tclk): Remove.
3383         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3384         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3385         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3387 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3389         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3390         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3392         * Makefile (tests): Add tst-getpid2.
3393         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3394         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3395         * tst-getpid2.c: New test.
3397 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3399         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3401 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3403         * Makefile (tests): Add tst-getpid1.
3404         * tst-getpid1.c: New file.
3405         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3406         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3408 2004-12-02  Roland McGrath  <roland@redhat.com>
3410         * Makefile (libpthread-nonshared): Variable removed.
3411         ($(objpfx)libpthread_nonshared.a): Target removed.
3412         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3413         These are now handled by generic magic from
3414         libpthread-static-only-routines being set.
3416 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3418         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3419         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3420         _POSIX_THREAD_PRIO_PROTECT): Define.
3421         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3422         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3423         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3425 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3427         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3428         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3429         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3430         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3431         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3432         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3433         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3435 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3437         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3439         * Makefile (libpthread-routines): Add pthread_setschedprio.
3440         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3441         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3442         * pthread_setschedprio.c: New file.
3444 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3446         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3447         * pthread_cancel.c (pthread_create): Likewise.
3449         * Makefile (libpthread-routines): Add vars.
3450         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3451         * init.c (__default_stacksize, __is_smp): Remove.
3452         * vars.c: New file.
3453         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3454         and define a wrapper macro.
3455         (PTHREAD_STATIC_FN_REQUIRE): Define.
3456         * allocatestack.c (__find_thread_by_id): Undefine.
3457         * pthread_create (__pthread_keys): Remove.
3458         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3459         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3460         PTHREAD_STATIC_FN_REQUIRE.
3462 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3464         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3465         parameter to REGISTER macro.
3467 2004-11-17  Roland McGrath  <roland@redhat.com>
3469         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3470         Make sure SIGCANCEL is blocked as well.
3472 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3474         * sysdeps/pthread/setxid.h: New file.
3475         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3476         (struct xid_command): Add forward decl.
3477         (struct pthread_functions): Change return type of __nptl_setxid hook
3478         to int.
3479         * pthreadP.h (__nptl_setxid): Change return type to int.
3480         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3481         calling thread, return its return value and set errno on failure.
3482         * descr.h (struct xid_command): Change id type to long array.
3484         * Makefile: Add rules to build and test tst-setuid1 and
3485         tst-setuid1-static.
3486         * tst-setuid1.c: New test.
3487         * tst-setuid1-static.c: New test.
3489 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3491         * Makefile (tests): Add tst-exit3.
3492         * tst-exit3.c: New test.
3494 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3496         * Makefile (tests): Add tst-exit2.
3497         * tst-exit2.c: New file.
3499 2004-11-09  Roland McGrath  <roland@redhat.com>
3501         [BZ #530]
3502         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3503         here, before calling clone.
3504         * pthread_create.c (start_thread): Don't do it here.
3506 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3508         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3510 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3512         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3513         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3514         assembler warning.
3516 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3518         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3519         if sched_priority is not between minprio and maxprio.
3521 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3523         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3524         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3526         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3527         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3529 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3531         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3532         not-cancelable I/O functions.
3534 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3536         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3537         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3538         make sure 2 is stored in the futex and we looked at the old value.
3539         Fix a few other problems to return the correct value.
3541 2004-10-14  Richard Henderson  <rth@redhat.com>
3543         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3544         make gcc4 happy.
3546 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3548         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3549         of pthread-functions.h and pthreaddef.h.
3550         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3552         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3553         Change __data.__nwaiters from int to unsigned int.
3555         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3556         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3558         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3559         before return type.
3561         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3562         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3564 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3566         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3567         test fails, remove message queue.
3568         (tf_msgsnd): Likewise.
3570 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3572         * tst-clock1.c: Change #ifdef to #if defined.
3573         * tst-clock2.c: Likewise.
3574         * tst-cond11.c: Likewise.
3576         * sysdeps/pthread/timer_create.c (timer_create): Use
3577         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3578         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3579         THREAD_CPUTIME.
3581 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3583         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3584         _POSIX_THREAD_CPUTIME): Define to 0.
3586 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3588         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3589         and _POSIX_THREAD_CPUTIME to zero.
3590         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3591         * tst-barrier2.c: Fix testing for POSIX feature.
3592         * tst-clock1.c: Likewise.
3593         * tst-clock2.c: Likewise.
3594         * tst-cond11.c: Likewise.
3595         * tst-cond4.c: Likewise.
3596         * tst-cond6.c: Likewise.
3597         * tst-flock2.c: Likewise.
3598         * tst-mutex4.c: Likewise.
3599         * tst-mutex9.c: Likewise.
3600         * tst-rwlock12.c: Likewise.
3601         * tst-rwlock4.c: Likewise.
3602         * tst-signal1.c: Likewise.
3603         * tst-spin2.c: Likewise.
3604         * sysdeps/pthread/posix-timer.h: Likewise.
3605         * sysdeps/pthread/timer_create.c: Likewise.
3606         * sysdeps/pthread/timer_routines.c: Likewise.
3608 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3610         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3611         (__lll_mutex_timedlock_wait): Address futex correctly.
3613         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3614         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3615         make sure 2 is stored in the futex and we looked at the old value.
3616         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3617         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3618         which might very well made the code not working at all before.
3619         [BZ #417]
3621 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3623         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3624         allow SIGSETXID to be sent.
3625         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3626         for SIGSETXID to be defined.
3627         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3628         SIGSETXID cannot be blocked.
3630         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3631         Add __extension__ to long long types.
3632         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3633         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3634         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3635         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3636         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3637         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3638         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3640 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3642         * descr.h (struct pthread): Add stopped_start field.
3643         * sysdeps/pthread/createthread.c (create_thread): Set
3644         start_stopped flag in descriptor for new thread appropriately.
3645         * pthread_create.c (start_thread): Only take lock to be stopped on
3646         startup if stopped_start flag says so.
3648 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3650         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3651         is created detached and if yes, do not try to free the stack in case
3652         the thread creation failed.
3653         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3654         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3655         case there has been no error.  [BZ #405]
3657         * pthread_create.c (start_thread): Don't wait for scheduler data
3658         etc to be set at the beginning of the function.  The cancellation
3659         infrastructure must have been set up.  And enable async
3660         cancellation before potentially going to sleep.  [BZ #401]
3662 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3664         * Versions: Remove exports for pthread_set*id_np functions.
3665         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3666         for now.
3667         * Makefile: Don't build pthread_set*id code for now.
3669 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3671         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3672         internal use.
3673         * allocatestack.c (__nptl_setxid): New function.
3674         * descr.h (struct xid_command): Define type.
3675         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3676         (sighandler_setxid): New function.
3677         (__pthread_initialize_minimal): Register sighandler_setxid for
3678         SIGCANCEL.
3679         * pt-allocrtsig.c: Update comment.
3680         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3681         Declare __nptl_setxid.
3682         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3683         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3684         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3685         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3686         and pthread_setresuid_np.
3687         * pthread_setgid_np.c: New file.
3688         * pthread_setuid_np.c: New file.
3689         * pthread_setegid_np.c: New file.
3690         * pthread_seteuid_np.c: New file.
3691         * pthread_setregid_np.c: New file.
3692         * pthread_setreuid_np.c: New file.
3693         * pthread_setresgid_np.c: New file.
3694         * pthread_setresuid_np.c: New file.
3695         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3696         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3697         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3698         and pthread_setresuid_np.
3699         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3700         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3701         pthread_setregid, and pthread_setresgid.
3703 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3705         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3706         ENOMEM when out of memory.
3708 2004-09-10  Roland McGrath  <roland@redhat.com>
3710         [BZ #379]
3711         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3712         code, since we don't try to use the broken CLONE_STOPPED any more.
3713         * pthread_create.c (start_thread): Likewise.
3715 2004-09-15  Richard Henderson  <rth@redhat.com>
3717         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3719 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3721         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3722         (__libc_unwind_longjmp): Delete macro and declare as function.
3723         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3724         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3725         nptl directory.
3726         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3727         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3728         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3730 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3732         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3733         for __USE_XOPEN2K.
3734         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3735         types also for __USE_XOPEN2K.
3736         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3737         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3738         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3739         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3740         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3741         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3742         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3743         [BZ #320]
3745 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3747         * sysdeps/pthread/pthread.h
3748         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3749         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3750         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3751         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3752         [BZ #375]
3754 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3756         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3757         PSEUDO to be used with . prefix.
3759         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3760         Use atomic_increment instead of atomic_exchange_and_add.
3761         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3762         Likewise.
3763         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3764         Likewise.
3765         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3766         Likewise.
3768         * allocatestack.c (allocate_stack): Use atomic_increment_val
3769         instead of atomic_exchange_and_add.
3770         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3771         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3772         Likewise.
3773         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3774         Likewise.
3776         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3777         the initialization function might throw.
3779 2005-09-05  Richard Henderson  <rth@redhat.com>
3781         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3782         Move definition inside libpthread, libc, librt check.  Provide
3783         definition for rtld.
3785 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3787         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3788         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3789         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3790         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3791         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3792         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3793         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3794         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3795         * unwind.c: Use it.
3797         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3798         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3799         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3800         Likewise.
3801         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3802         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3803         this is the last waiter, signal pthread_cond_destroy caller and
3804         avoid using the pthread_cond_t structure after unlock.
3805         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3807         Read clock type from the least significant bits of __nwaiters instead
3808         of __clock.
3809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3810         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3812 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3814         [BZ #342]
3815         * Makefile (tests): Add tst-cond20 and tst-cond21.
3816         * tst-cond20.c: New test.
3817         * tst-cond21.c: New test.
3818         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3819         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3820         it unsigned int.
3821         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3822         Likewise.
3823         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3824         (pthread_cond_t): Likewise.
3825         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3826         Likewise.
3827         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3828         Likewise.
3829         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3830         Likewise.
3831         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3832         (cond_nwaiters): New.
3833         (clock_bits): New.
3834         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3835         if there are waiters not signalled yet.
3836         Wait until all already signalled waiters wake up.
3837         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3838         __nwaiters.  If pthread_cond_destroy has been called and this is the
3839         last waiter, signal pthread_cond_destroy caller and avoid using
3840         the pthread_cond_t structure after unlock.
3841         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3842         decrement it when leaving.  If pthread_cond_destroy has been called
3843         and this is the last waiter, signal pthread_cond_destroy caller.
3844         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3845         Likewise.  Read clock type from the least significant bits of
3846         __nwaiters instead of __clock.
3847         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3848         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3849         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3850         clock type just from the last COND_CLOCK_BITS bits of value.
3851         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3852         instead of __clock, just from second bit of condattr's value.
3854 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3856         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3857         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3858         != 64.
3859         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3861 2004-08-15  Roland McGrath  <roland@frob.com>
3863         * pthread_atfork.c: Update copyright terms including special exception
3864         for these trivial files, which are statically linked into executables
3865         that use dynamic linking for the significant library code.
3867 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3869         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3870         pthread_rwlock_rdlock.
3871         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3872         Decrease __nr_readers_queued after reacquiring lock.
3873         * sysdeps/pthread/pthread_rwlock_timedrdlock
3874         (pthread_rwlock_timedrdlock): Likewise.
3875         Reported by Bob Cook <bobcook47@hotmail.com>.
3877 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3879         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3880         before pthread_barrier_wait.
3882 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3884         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3885         Remove unnecessary exception handling data.
3887 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3889         [BZ #284]
3890         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3891         instead of clockid_t.
3893 2004-07-21  Roland McGrath  <roland@redhat.com>
3895         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3897 2004-07-19  Roland McGrath  <roland@redhat.com>
3899         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3901 2004-07-02  Roland McGrath  <roland@redhat.com>
3903         * configure: Don't exit.
3905 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3907         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3908         (__pthread_cond_timedwait): Check for invalid nanosecond in
3909         timeout value.
3911 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3913         * Makefile: Add rules to build and run tst-fini1.
3914         * tst-fini1.c: New file.
3915         * tst-fini1mod.c: New file.
3917 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3919         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3920         if no cancellation support is needed.
3921         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3922         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3923         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3924         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3925         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3926         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3927         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3928         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3929         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3931         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3932         only if not already defined.
3934 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3936         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3937         constraint "m" instead of "0" for futex.
3939         * shlib-versions: Add powerpc64-.*-linux.*.
3941 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3943         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3944         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3945         for valid tv_nsec.
3946         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3947         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3948         bits.
3950 2004-06-29  Roland McGrath  <roland@redhat.com>
3952         * Banner: NPTL no longer has its own version number.
3953         * Makefile (nptl-version): Variable removed.
3954         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3955         using $(version), the glibc version number.
3957 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3959         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3960         Fix branch offset for a PLT entry.
3961         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3962         Likewise.
3963         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3964         Likewise.
3965         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3966         Likewise.
3967         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3968         Likewise.
3970 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3972         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3973         unconditionally.
3975 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3977         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3978         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3979         instead of tv_sec.
3980         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3981         (pthread_rwlock_timedrdlock): Likewise.
3983 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3985         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3986         Set __r7 to val, not mutex.
3988 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3990         * Makefile: Add rules to build tst-rwlock14.
3991         * tst-rwlock14.c: New file.
3993 2004-06-24  Boris Hu  <boris.hu@intel.com>
3995         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3996         check.
3997         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3999 2004-06-19  Andreas Jaeger  <aj@suse.de>
4001         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4002         assembler in last patch.
4004 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4006         * sysdeps/pthread/pthread_cond_timedwait.c
4007         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4008         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4009         (__pthread_cond_timedwait): Check for invalid nanosecond in
4010         timeout value.
4011         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4012         * tst-cond19.c: New file.
4013         * Makefile: Add rules to build and run tst-cond19.
4015 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4017         * tst-context1.c (GUARD_PATTERN): Defined.
4018         (tst_context_t): Define struct containing ucontext_t & guard words.
4019         (ctx): Declare as an array of tst_context_t.
4020         (fct): Verify uc_link & guard words are still valid.
4021         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4023 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4025         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4026         Add __data.__futex field, reshuffle __data.__clock.
4027         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4028         (__pthread_cond_signal): Increment __futex at the same time as
4029         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4030         address of low 32-bits of __wakeup_seq to futex syscall.
4031         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4032         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4033         releasing internal lock to FUTEX_WAIT.
4034         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4035         (__pthread_cond_timedwait): Likewise.
4036         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4037         (FUTEX_CMP_REQUEUE): Define.
4038         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4039         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4040         Pass __futex value from before the unlock and __futex address instead
4041         of address of low 32-bits of __wakeup_seq to futex syscall.
4042         Fallback to FUTEX_WAKE all on any errors.
4044 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4046         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4047         comment typo.
4048         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4049         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4050         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4051         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4052         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4054 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4056         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4057         Add memory clobber to inline assembly.
4058         (__lll_mutex_trylock): Likewise.
4059         (__lll_mutex_cond_trylock): Likewise.
4061 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4063         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4064         Pass val argument as 6th system call argument in %r7.
4066 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4068         * Makefile (tests): Add tst-cond16.
4069         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4070         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4071         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4072         Add __data.__futex field, reshuffle __data.__clock.
4073         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4074         (__pthread_cond_signal): Increment __futex at the same time as
4075         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4076         address of low 32-bits of __wakeup_seq to futex syscall.
4077         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4078         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4079         releasing internal lock to FUTEX_WAIT.
4080         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4081         (__pthread_cond_timedwait): Likewise.
4082         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4083         (FUTEX_CMP_REQUEUE): Define.
4084         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4085         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4086         Pass __futex value from before the unlock and __futex address instead
4087         of address of low 32-bits of __wakeup_seq to futex syscall.
4088         Fallback to FUTEX_WAKE all on any errors.
4089         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4090         Define.
4091         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4092         internally.  Return non-zero if error, zero if success.
4093         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4094         Add __data.__futex field, reshuffle __data.__clock.
4095         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4096         Define.
4097         (lll_futex_requeue): Add val argument, return 1 unconditionally
4098         for the time being.
4099         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4100         Add __data.__futex field, reshuffle __data.__clock.
4101         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4102         Define.
4103         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4104         internally.  Return non-zero if error, zero if success.
4105         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4106         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4107         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4108         Define.
4109         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4110         internally.  Return non-zero if error, zero if success.
4111         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4112         Add __data.__futex field, reshuffle __data.__clock.
4113         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4114         Define.
4115         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4116         internally.  Return non-zero if error, zero if success.
4117         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4118         Add __data.__futex field, reshuffle __data.__clock.
4119         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4120         Add __data.__futex field, reshuffle __data.__clock.
4121         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4122         Increment __futex at the same time as __wakeup_seq or __total_seq.
4123         Pass address of __futex instead of address of low 32-bits of
4124         __wakeup_seq to futex syscall.
4125         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4126         Pass __futex value from before releasing internal lock
4127         to FUTEX_WAIT.
4128         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4129         Likewise.  Avoid unnecessary shadowing of variables.
4130         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4131         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4132         unlock and __futex address instead of address of low 32-bits of
4133         __wakeup_seq to futex_requeue macro, adjust for new return value
4134         meaning.
4135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4136         (__pthread_cond_signal): Increment __futex at the same time as
4137         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4138         address of low 32-bits of __wakeup_seq to futex syscall.
4139         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4140         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4141         releasing internal lock to FUTEX_WAIT.
4142         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4143         (__pthread_cond_timedwait): Likewise.
4144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4145         (FUTEX_CMP_REQUEUE): Define.
4146         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4147         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4148         Pass __futex value from before the unlock and __futex address instead
4149         of address of low 32-bits of __wakeup_seq to futex syscall.
4150         Fallback to FUTEX_WAKE all on any errors.
4152 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4154         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4155         Add nop to align the end of critical section.
4156         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4158 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4160         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4161         Add __broadcast_seq field.
4162         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4163         all waiters as woken with woken_seq and bump broadcast counter.
4164         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4165         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4166         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4167         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4169 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4171         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4172         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4173         Reported by Kaz Kojima.
4175 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4177         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4179 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4181         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4182         __broadcast_seq with bc_seq after acquiring internal lock instead of
4183         before it.
4185 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4187         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4188         compilation.
4189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4190         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4192         (pthread_cond_t): Add __data.__broadcast_seq field.
4193         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4194         (FRAME_SIZE): Define.
4195         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4196         Comment typo fixes.
4197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4198         Define.
4199         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4200         typo fixes.
4201         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4202         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4203         fixes.
4205 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4207         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4208         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4209         Add __broadcast_seq field.
4210         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4211         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4212         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4213         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4214         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4215         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4216         all waiters as woken with woken_seq and bump broadcast counter.
4217         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4219         __broadcast_seq field.
4220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4221         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4222         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4223         * pthread_cond_init.c: Initialize __broadcast_seq field.
4224         * Makefile (tests): Add tst-cond17 and tst-cond18.
4225         Add .NOTPARALLEL goal.
4226         * tst-cond16.c: New file.  From Jakub.
4227         * tst-cond17.c: New file.  From Jakub.
4228         * tst-cond18.c: New file.  From Jakub.
4230 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4232         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4233         unwind info.
4235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4236         Parametrize frame size.  Correct some unwind info.
4237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4239 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4241         * tst-stack3.c: Note testing functionality beyond POSIX.
4243 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4245         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4246         Change conditional from ifdef to if.
4248 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4250         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4251         SYSDEP_CANCEL_ERROR): Define.
4252         (PSEUDO): Use it.
4254 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4256         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4258 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4260         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4262 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4264         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4265         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4266         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4267         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4269 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4271         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4272         thread has all signals blocked.
4274 2004-04-18  Andreas Jaeger  <aj@suse.de>
4276         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4277         (SEM_VALUE_MAX): Add missing brace.
4279 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4281         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4282         in rt subdir.
4283         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4284         * sysdeps/pthread/tst-mqueue8x.c: New test.
4285         * tst-cancel4.c: Update comment about message queues.
4287         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4288         return it_value { 0, 0 }.
4289         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4290         like SIGEV_SIGNAL.
4291         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4292         assertion for SIGEV_NONE.
4293         (thread_attr_compare): Compare all attributes, not just a partial
4294         subset.
4296 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4298         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4300 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4302         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4303         Just use a plain number.
4304         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4305         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4306         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4307         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4308         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4309         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4310         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4312 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4314         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4315         frame info.
4316         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4318 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4320         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4321         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4322         of calling sigwaitinfo.
4324 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4326         * allocatestack.c (allocate_stack): Set reported_guardsize
4327         unconditionally.
4328         * pthread_getattr_np.c (pthread_getattr_np): Use
4329         reported_guardsize instead of guardsize.
4330         * descr.h (struct pthread): Add reported_guardsize field.
4332 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4334         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4336 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4338         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4340 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4342         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4343         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4344         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4345         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4346         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4347         Define.
4348         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4349         (_POSIX_MESSAGE_PASSING): Define.
4350         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4351         (_POSIX_MESSAGE_PASSING): Define.
4352         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4353         (_POSIX_MESSAGE_PASSING): Define.
4355 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4357         * tst-context1.c (fct): Check whether correct stack is used.
4359 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4361         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4362         matching constraints for asm mem parameters.
4364         * tst-clock2.c (tf): Don't define unless needed.
4366 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4368         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4369         $(gnulib).
4371 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4373         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4374         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4375         * pthreadP.h: Declare __nptl_deallocate_tsd.
4376         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4377         Adjust caller.
4379         * Makefile (tests): Add tst-tsd5.
4380         * tst-tsd5.c: New file.
4382 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4384         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4385         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4386         is SHLIB_COMPAT check.
4387         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4388         (__pthread_attr_getaffinity_old): Likewise.
4389         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4390         (__pthread_getaffinity_old): Likewise.
4391         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4392         (__pthread_setaffinity_old): Likewise.
4394 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4396         * allocatestack.c (_make_stacks_executable): Call
4397         _dl_make_stack_executable first.
4399 2004-03-24  Roland McGrath  <roland@redhat.com>
4401         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4402         constraint instead of "0".
4404 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4406         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4407         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4409         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4410         code to avoid warning.
4412 2004-03-24  Andreas Jaeger  <aj@suse.de>
4414         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4415         (__pthread_attr_setaffinity_old): Remove const.
4417 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4419         * sysdeps/unix/sysv/linux/smp.h: New file.
4420         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4421         * init.c: Define __is_smp.
4422         (__pthread_initialize_minimal_internal): Call is_smp_system to
4423         initialize __is_smp.
4424         * pthreadP.h: Declare __is_smp.
4425         Define MAX_ADAPTIVE_COUNT is necessary.
4426         * pthread_mutex_init.c: Add comment regarding __spins field.
4427         * pthread_mutex_lock.c: Implement adaptive mutex type.
4428         * pthread_mutex_timedlock.c: Likewise.
4429         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4430         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4431         Add __spins field.
4432         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4433         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4434         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4435         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4436         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4437         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4438         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4439         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4440         lll_mutex_cond_trylock.
4441         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4442         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4443         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4444         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4445         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4446         Define BUSY_WAIT_NOP.
4447         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4448         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4450         * tst-mutex5.c: Add support for testing adaptive mutexes.
4451         * tst-mutex7.c: Likewise.
4452         * tst-mutex5a.c: New file.
4453         * tst-mutex7a.c: New file.
4454         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4456         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4457         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4458         vgettimeofday call might destroy the content.
4460         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4461         @pause in the loop.
4463         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4464         No need to restrict type of ret.  Make it int.  Add comment.
4466         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4467         Remove unnecessary setne instruction.
4469 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4471         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4472         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4473         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4474         If realloc fails, break out of the loop.
4476 2004-03-20  Andreas Jaeger  <aj@suse.de>
4478         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4479         (__pthread_setaffinity_old): Fix interface.
4480         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4481         (__pthread_getaffinity_old): Likewise.
4483         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4484         (__pthread_setaffinity_new): Remove duplicate declaration.
4486 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4488         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4489         the return value to a safe register.
4490         (CDISABLE): Set the function argument correctly.
4492 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4494         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4495         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4496         Rewrite so that only one locked memory operation per round is needed.
4497         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4498         (pthread_barrier_wait): After wakeup, release lock only when the
4499         last thread stopped using the barrier object.
4500         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4501         (__pthread_cond_wait): Don't store mutex address if the current
4502         value is ~0l.  Add correct cleanup support and unwind info.
4503         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4504         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4505         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4506         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4507         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4508         Add correct cleanup support and unwind info.
4509         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4510         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4511         information for syscall wrappers.
4513 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4515         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4516         cpusetsize field, remove next.
4517         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4518         parameter for size of the CPU set.
4519         (pthread_setaffinity_np): Likewise.
4520         (pthread_attr_getaffinity_np): Likewise.
4521         (pthread_attr_setaffinity_np): Likewise.
4522         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4523         interface change, keep compatibility code.
4524         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4525         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4526         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4527         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4528         __pthread_getaffinity_np.
4529         * Versions: Add version for changed interfaces.
4530         * tst-attr3.c: Adjust test for interface change.
4531         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4532         increasing buffer sizes.
4533         * pthread_attr_destroy.c: Remove unused list handling.
4534         * pthread_attr_init.c: Likewise.
4536 2004-03-17  Roland McGrath  <roland@redhat.com>
4538         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4539         first argument to clock_getres so we ever enable kernel timers.
4541 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4543         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4545 2004-03-12  Richard Henderson  <rth@redhat.com>
4547         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4548         oldvalue from CENABLE to CDISABLE.
4550 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4552         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4553         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4554         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4555         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4557 2004-03-11  Richard Henderson  <rth@redhat.com>
4559         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4560         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4561         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4563 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4565         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4566         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4567         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4569 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4571         * forward.c (__pthread_cond_broadcast_2_0,
4572         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4573         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4574         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4576 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4578         * sysdeps/sh/tcb-offsets.sym: Add PID.
4579         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4580         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4582 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4584         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4585         include <sysdep-cancel.h>, vfork is no cancellation point.
4586         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4587         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4588         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4590 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4592         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4593         libc_hidden_def.
4594         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4595         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4596         Likewise.
4597         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4598         Likewise.
4599         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4600         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4601         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4602         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4603         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4605         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4606         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4607         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4608         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4609         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4610         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4612         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4613         a local register for saving old PID.  Negate PID in parent upon exit.
4615         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4616         tcb-offsets.h.
4617         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4618         before syscall, set to the old value in the parent afterwards.
4619         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4620         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4621         tcb-offsets.h.
4622         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4623         before syscall, set to the old value in the parent afterwards.
4624         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4625         * sysdeps/s390/tcb-offsets.sym: Add PID.
4627         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4628         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4629         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4630         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4631         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4632         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4634 2004-03-10  Andreas Schwab  <schwab@suse.de>
4636         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4637         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4638         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4640 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4642         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4643         * tst-cancel21.c (do_one_test): Likewise.
4644         Reported by Gordon Jin <gordon.jin@intel.com>.
4646 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4648         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4649         if non-zero and set to INT_MIN if zero.
4650         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4651         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4652         (SAVE_PID, RESTORE_PID): Define.
4653         (__vfork): Use it.
4654         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4655         Use relative path to avoid including NPTL i386/vfork.S.
4656         (SAVE_PID, RESTORE_PID): Define.
4657         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4658         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4659         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4660         tst-vfork2x.
4661         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4662         * tst-vfork1.c: New test.
4663         * tst-vfork2.c: New test.
4664         * tst-vfork1x.c: New test.
4665         * tst-vfork2x.c: New test.
4667 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4669         * sysdeps/i386/tcb-offsets.sym: Add PID.
4670         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4671         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4672         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4674 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4676         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4678 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4680         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4681         _rtld_global_ro.
4683 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4685         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4686         _rtld_global_ro.
4688         * tst-once4.c: Remove unnecessary macro definition.
4690         * tst-mutex7.c (do_test): Limit thread stack size.
4691         * tst-once2.c (do_test): Likewise.
4692         * tst-tls3.c (do_test): Likewise.
4693         * tst-tls1.c (do_test): Likewise.
4694         * tst-signal3.c (do_test): Likewise.
4695         * tst-kill6.c (do_test): Likewise.
4696         * tst-key4.c (do_test): Likewise.
4697         * tst-join4.c (do_test): Likewise.
4698         * tst-fork1.c (do_test): Likewise.
4699         * tst-context1.c (do_test): Likewise.
4700         * tst-cond2.c (do_test): Likewise.
4701         * tst-cond10.c (do_test): Likewise.
4702         * tst-clock2.c (do_test): Likewise.
4703         * tst-cancel10.c (do_test): Likewise.
4704         * tst-basic2.c (do_test): Likewise.
4705         * tst-barrier4.c (do_test): Likewise.
4707 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4709         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4711 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4713         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4714         (__pthread_cond_timedwait): Optimize wakeup test.
4715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4716         (__pthread_cond_wait): Likewise.
4717         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4718         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4719         Likewise.
4721 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4723         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4724         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4725         the atomic instruction needed.
4726         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4727         (__lll_mutex_lock_wait): Likewise.
4729 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4731         * Makefile (tests): Add tst-cond14 and tst-cond15.
4732         * tst-cond14.c: New file.
4733         * tst-cond15.c: New file.
4735 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4737         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4738         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4739         needs to be implemented differently to be useful.
4741 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4743         * pthread_attr_setschedparam.c: Don't test priority against limits
4744         here.  Set ATTR_FLAG_SCHED_SET flag.
4745         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4746         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4747         from parent thread to child.  If attribute is used and scheduling
4748         parameters are not inherited, copy parameters from attribute or
4749         compute them.  Check priority value.
4750         * pthread_getschedparam.c: If the parameters aren't known yet get
4751         them from the kernel.
4752         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4753         ATTR_FLAG_POLICY_SET flag for thread.
4754         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4755         and ATTR_FLAG_POLICY_SET.
4757         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4759         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4760         fail if stack address hasn't been set.  Just return 0.
4762 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4764         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4765         libpthread for the files in this list.
4766         (CFLAGS-tst-unload): Removed.
4767         * tst-unload.c (do_test): Don't use complete path for
4768         LIBPHREAD_SO.
4770         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4771         tst-_res1mod2.
4773 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4775         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4776         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4777         operation per round is needed.
4778         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4779         (__lll_mutex_lock_wait): Likewise.
4781 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4783         * tst-cancel9.c (cleanup): Don't print to stderr.
4785 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4787         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4789 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4791         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4792         (__syscall_error_handler2): Call CDISABLE.
4793         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4794         (__syscall_error_handler2): Call CDISABLE.
4796         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4797         Release lock before the loop, don't reacquire it.
4799         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4801 2004-02-19  Andreas Schwab  <schwab@suse.de>
4803         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4804         Fix last change.
4806 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4808         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4809         (pthread_barrier_wait): After wakeup, release lock only when the
4810         last thread stopped using the barrier object.
4811         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4812         (pthread_barrier_wait): Likewise.
4813         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4814         Likewise.
4815         * Makefile (tests): Add tst-barrier4.
4816         * tst-barrier4.c: New file.
4818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4819         (__pthread_cond_timedwait): Perform timeout test while holding
4820         internal lock to prevent wakeup race.
4821         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4822         * sysdeps/pthread/pthread_cond_timedwait.c
4823         (__pthread_cond_timedwait): Likewise.
4824         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4825         (__pthread_cond_timedwait): Likewise.
4827 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4829         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4830         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4831         * Makefile (tests): Add tst-rwlock13.
4832         * tst-rwlock13.c: New test.
4834 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4837         (__condvar_tw_cleanup): Little optimization.
4838         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4840 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4842         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4843         libpthread as "lib" parameter to SHLIB_COMPAT.
4844         (__novmx_siglongjmp): Fix typo in function name.
4845         (__novmx_longjmp): Fix typo in function name.
4847 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4849         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4850         __builtin_expect.
4852         * sysdeps/generic/pt-longjmp.c: Moved to...
4853         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4855 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4857         * Makefile (libpthread-routines): Add pt-cleanup.
4858         * pt-longjmp.c: Removed.
4859         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4860         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4861         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4862         Version longjmp, siglongjmp for GLIBC_2.3.4.
4863         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4865 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4867         * sysdeps/pthread/pthread_cond_timedwait.c
4868         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4869         Reuse code.  Add __builtin_expects.
4871         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4872         (__pthread_cond_timedwait): Get internal lock in case timeout has
4873         passed before the futex syscall.
4874         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4876 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4878         * allocatestack.c: Pretty printing.
4880         * sysdeps/pthread/createthread.c (create_thread): Don't add
4881         CLONE_DETACHED bit if it is not necessary.
4883 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4885         * pthread_getattr_np.c: Include ldsodefs.h.
4887 2004-01-16  Richard Henderson  <rth@redhat.com>
4889         * allocatestack.c: Don't declare __libc_stack_end.
4890         * init.c (__pthread_initialize_minimal_internal): Likewise.
4891         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4893 2004-01-15  Richard Henderson  <rth@redhat.com>
4895         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4896         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4897         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4898         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4899         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4900         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4901         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4902         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4904 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4906         * init.c (pthread_functions): Make array const.
4908 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4910         * allocatestack.c (__make_stacks_executable): Change interface.
4911         Check parameters.  Pass parameter on to libc counterpart.
4912         * pthreadP.h: Change declaration.
4914 2004-01-13  Richard Henderson  <rth@redhat.com>
4916         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4917         prototype form.
4918         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4919         Likewise.
4921         * sysdeps/alpha/Makefile: New file.
4922         * sysdeps/alpha/tcb-offsets.sym: New file.
4923         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4924         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4926         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4927         on powerpc version.
4929 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4931         * Makefile (tests): Add tst-backtrace1.
4932         * tst-backtrace1.c: New test.
4934 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4936         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4937         register as second parameter to the REGISTER macro.
4938         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4939         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4940         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4941         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4942         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4943         of thread register as second parameter to REGISTER macro in 64 case.
4945 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4947         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4948         (CFLAGS-getpid.o): Defined.
4949         (CFLAGS-getpid.os): Defined.
4951 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4953         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4954         returned for main thread does not overlap with any other VMA.
4955         Patch by Jakub Jelinek.
4957 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4959         * tst-raise1.c: Include stdio.h.
4961 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4963         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4964         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4965         If pid is 0, set it to selftid.
4966         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4967         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4968         != 0, return self->tid without doing a syscall.
4969         * descr.h (struct pthread): Move pid field after tid.
4971         * Makefile (tests): Add tst-raise1.
4972         * tst-raise1.c: New file.
4974 2003-12-23  Roland McGrath  <roland@redhat.com>
4976         * tst-oddstacklimit.c: New file.
4977         * Makefile (tests): Add it.
4978         (tst-oddstacklimit-ENV): New variable.
4980         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4981         value up to page size for __default_stacksize.
4983 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4985         * Makefile (tests): Add tst-eintr5.
4986         * tst-eintr5.c: New file.
4988         * eintr.c (eintr_source): Prevent sending signal to self.
4990         * tst-eintr2.c (tf1): Improve error message.
4992 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4994         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4995         * sysdeps/unix/sysv/linux/getpid.c: New file.
4996         * pthread_cancel.c: Add comment explaining use of PID field.
4997         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4998         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4999         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5000         temporarily to signal the field must not be relied on and updated
5001         by getpid().
5002         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5003         temporarily negative.
5004         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5006 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5008         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5009         (eintr_source): If ARG != NULL, use pthread_kill.
5010         * tst-eintr1.c: Adjust for this change.
5011         * tst-eintr2.c: Likewise.
5012         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5013         * tst-eintr3.c: New file.
5014         * tst-eintr4.c: New file.
5016 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5018         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5019         if CANCELSTATE_BITMASK is set.
5020         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5021         Likewise.
5023         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5024         (tests-reverse): Add tst-cancel23.
5025         * tst-cancel22.c: New test.
5026         * tst-cancel23.c: New test.
5028 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5030         * tst-eintr1.c: Better error messages.
5032         * Makefile (tests): Add tst-eintr2.
5033         * tst-eintr2.c: New file.
5035 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5037         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5038         (CFLAGS-tst-cancelx21.c): Set.
5039         * tst-cancel21.c: New test.
5040         * tst-cancelx21.c: New test.
5042         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5043         comparison operand.
5044         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5045         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5046         * pt-longjmp.c: Include jmpbuf-unwind.h.
5047         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5048         _JMPBUF_UNWINDS.  Adjust compared pointers.
5049         * init.c (__pthread_initialize_minimal_internal): Initialize
5050         pd->stackblock_size.
5051         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5052         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5053         * sysdeps/i386/jmpbuf-unwind.h: New file.
5054         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5055         * sysdeps/s390/jmpbuf-unwind.h: New file.
5056         * sysdeps/sh/jmpbuf-unwind.h: New file.
5057         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5058         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5059         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5060         (_JMPBUF_CFA_UNWINDS): Remove.
5061         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5063 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5065         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5066         (CFLAGS-tst-cancelx20.c): Set.
5067         * tst-cancel20.c: New test.
5068         * tst-cancelx20.c: New test.
5070 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5072         * init.c (__pthread_initialize_minimal_internal): Don't treat
5073         architectures with separate register stack special here when
5074         computing default stack size.
5076 2003-12-17  Roland McGrath  <roland@redhat.com>
5078         * Makefile (tst-cancelx7-ARGS): New variable.
5079         Reportd by Greg Schafer <gschafer@zip.com.au>.
5081 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5083         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5084         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5085         (tst-stack3-ENV): Set.
5086         ($(objpfx)tst-stack3-mem): New.
5087         * tst-stack3.c: New test.
5089 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5091         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5092         Add unwind directives.  Drop unused .regstk directive.
5093         (_fini_EPILOG_BEGINS): Add unwind directives.
5095 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5097         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5098         Assume parameter is a pointer.
5099         (lll_futex_wake): Likewise.
5100         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5101         Likewise.
5102         (lll_futex_wake): Likewise.
5103         Reported by Boris Hu.
5104         * sysdeps/unix/sysv/linux/unregister-atfork.c
5105         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5107         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5109 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5111         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5112         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5113         __rtld_lock_initialize for ld.so lock.
5114         Patch in part by Adam Li <adam.li@intel.com>.
5116 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5118         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5119         in $(gnulib).  Also, remove stale comment.
5121 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5123         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5124         advantage of new syscall stub and optimize accordingly.
5126         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5127         from SYS_futex, to match expectations of
5128         sysdep.h:DO_INLINE_SYSCALL.
5129         (lll_futex_clobbers): Remove.
5130         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5131         (lll_futex_wake): Likewise.
5132         (lll_futex_requeue): Likewise.
5133         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5134         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5135         Jelinek).
5136         (__lll_mutex_lock): Likewise.
5137         (__lll_mutex_cond_lock): Likewise.
5138         (__lll_mutex_timed_lock): Likewise.
5139         (__lll_mutex_unlock): Likewise.
5140         (__lll_mutex_unlock_force): Likewise.
5142         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5143         comes before the include of <sysdep.h>.
5144         (THREAD_SELF_SYSINFO): New macro.
5145         (THREAD_SYSINFO): Likewise.
5146         (INIT_SYSINFO): New macro.
5147         (TLS_INIT_TP): Call INIT_SYSINFO.
5149         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5151         * sysdeps/pthread/createthread.c (create_thread): Use
5152         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5153         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5154         THREAD_SELF_SYSINFO instead of open code.
5155         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5156         (THREAD_SYSINFO): Likewise.
5158         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5160         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5162 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5164         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5165         instead of .init.  Patch by David Mosberger.
5167 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5169         * sysdeps/pthread/configure.in: Remove broken declaration in C
5170         cleanup handling check.
5172 2003-11-30  Andreas Jaeger  <aj@suse.de>
5174         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5175         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5176         Likewise.
5178 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5180         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5181         * pthread_attr_destroy.c: Include shlib-compat.h.
5182         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5183         is set in iattr->flags.
5184         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5186 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5188         * Makefile (distribute): Add tst-cleanup4aux.c.
5190         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5191         include.
5193 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5195         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5196         pthread_cond_signal.
5198         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5199         store mutex address if the current value is ~0l.
5200         * sysdeps/pthread/pthread_cond_timedwait.c
5201         (__pthread_cond_timedwait): Likewise.
5202         * sysdeps/pthread/pthread_cond_broadcast.c
5203         (__pthread_cond_broadcast): Don't use requeue for pshared
5204         condvars.
5206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5207         (__pthread_cond_wait): Don't store mutex address if the current
5208         value is ~0l.
5209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5210         (__pthread_cond_timedwait): Likewise.
5211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5212         (__pthread_cond_broadcast): Don't use requeue for pshared
5213         condvars.
5215         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5216         element with ~0l for pshared condvars, with NULL otherwise.
5218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5219         (__pthread_cond_wait): Don't store mutex address if the current
5220         value is ~0l.
5221         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5222         (__pthread_cond_timedwait): Likewise.
5223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5224         (__pthread_cond_broadcast): Don't use requeue for pshared
5225         condvars.
5227         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5228         * tst-cond12.c: New file.
5229         * tst-cond13.c: New file.
5231 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5233         * sysdeps/pthread/configure.in: Make missing forced unwind support
5234         fatal.
5236 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5238         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5240 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5242         * Makefile: Add magic to clean up correctly.
5244 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5246         * unwind.c (FRAME_LEFT): Define.
5247         (unwind_stop): Handle old style cleanups here.
5248         (__pthread_unwind): Handle old style cleanups only if
5249         !HAVE_FORCED_UNWIND.
5250         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5251         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5252         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5253         ($(objpfx)tst-cleanupx4): Likewise.
5254         * tst-cleanup4.c: New test.
5255         * tst-cleanup4aux.c: New.
5256         * tst-cleanupx4.c: New test.
5258 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5260         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5261         lll_mutex_*lock macros to skip atomic operations on some archs.
5263 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5265         * sysdeps/pthread/tst-timer.c (main): Initialize
5266         sigev2.sigev_value as well.
5268 2003-10-15  Roland McGrath  <roland@redhat.com>
5270         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5271         is missing.
5272         * sysdeps/pthread/configure: Regenerated.
5274 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5276         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5277         locking macros.  No distinction between normal and mutex locking
5278         anymore.
5279         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5280         Merge bits from lowlevelmutex.S we still need.
5281         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5282         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5283         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5284         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5285         new mutex implementation.
5286         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5287         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5288         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5289         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5290         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5291         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5292         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5293         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5294         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5295         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5296         symbol for entry point to avoid cancellation.
5298 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5300         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5301         changes.
5302         (SAVE_OLDTYPE_0): Fix a typo.
5304 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5306         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5307         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5309 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5311         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5312         correct offset.
5314 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5316         * Makefile (tests): Add tst-cancel19.
5317         * tst-cancel19.c: New test.
5319 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5321         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5322         restoring of the old cancellation type.
5324 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5326         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5328 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5330         * sysdeps/pthread/malloc-machine.h: New file
5332 2003-09-24  Roland McGrath  <roland@redhat.com>
5334         * allocatestack.c (__make_stacks_executable): Don't ignore return
5335         value from _dl_make_stack_executable.
5337 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5339         * allocatestack.c (__make_stacks_executable): Also change
5340         permission of the currently unused stacks.
5342         * allocatestack.c (change_stack_perm): Split out from
5343         __make_stacks_executable.
5344         (allocate_stack): If the required permission changed between the time
5345         we started preparing the stack and queueing it, change the permission.
5346         (__make_stacks_executable): Call change_stack_perm.
5348         * Makefile: Build tst-execstack-mod locally.
5349         * tst-execstack-mod.c: New file.
5351 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5353         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5355 2003-09-23  Roland McGrath  <roland@redhat.com>
5357         * tst-execstack.c: New file.
5358         * Makefile (tests): Add it.
5359         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5360         (LDFLAGS-tst-execstack): New variable.
5362         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5363         whether to use PROT_EXEC for stack mmap.
5364         (__make_stacks_executable): New function.
5365         * pthreadP.h: Declare it.
5366         * init.c (__pthread_initialize_minimal_internal): Set
5367         GL(dl_make_stack_executable_hook) to that.
5369 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5371         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5372         recommendation from AMD re avoidance of lock prefix.
5374 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5376         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5377         lll_futex_timed_wait instead of lll_futex_wait.
5378         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5379         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5380         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5381         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5382         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5383         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5384         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5385         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5386         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5387         Completely revamp the locking macros.  No distinction between
5388         normal and mutex locking anymore.
5389         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5390         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5391         __lll_lock_timedwait): Fix prototypes.
5392         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5393         __lll_lock_timedwait): Likewise.
5394         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5395         macros, add __builtin_expect.
5396         (lll_mutex_timedlock): Likewise.  Fix return value.
5397         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5398         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5399         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5400         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5401         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5402         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5403         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5404         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5406 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5408         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5409         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5410         operation if possible.
5412         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5413         like jumping over the lock prefix.
5415 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5417         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5418         locking macros.  No distinction between normal and mutex locking
5419         anymore.
5420         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5421         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5422         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5423         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5424         locking.  Merge bits from lowlevelmutex.S we still need.
5425         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5426         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5427         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5428         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5429         * Makefile (routines): Remove libc-lowlevelmutex.
5430         (libpthread-rountines): Remove lowlevelmutex.
5431         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5432         for new mutex implementation.
5433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5434         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5436         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5437         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5438         Likewise.
5439         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5440         Likewise.
5441         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5442         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5443         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5445         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5446         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5447         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5448         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5449         Likewise.
5450         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5451         Likewise.
5452         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5453         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5455         Don't use requeue.
5456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5457         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5459 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5461         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5462         in parameters of asm with output parameters.
5464         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5465         type of DECR parameter to int.
5466         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5468 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5470         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5471         guardsize for each thread.
5473 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5475         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5476         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5477         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5479         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5480         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5481         NULL.
5482         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5483         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5484         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5485         (pthread_getaffinity_np): Add hidden_def.
5487         * Makefile (tests): Add tst-attr3.
5488         * tst-attr3.c: New test.
5490         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5492 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5494         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5495         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5497 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5499         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5500         * tst-align.c: Include tst-stack-align.h.
5501         (tf, do_test): Use TEST_STACK_ALIGN macro.
5503 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5505         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5506         variable.
5508 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5510         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5511         stack-related values for the initial thread.
5513 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5515         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5517 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5519         * pthread_mutex_lock.c: Minor code rearrangements.
5521 2003-09-05  Roland McGrath  <roland@redhat.com>
5523         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5524         Instead, include ../nptl_db/db_info.c to do its magic.
5525         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5526         (__pthread_pthread_key_2ndlevel_size): Likewise.
5527         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5528         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5529         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5530         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5531         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5532         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5533         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5534         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5535         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5536         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5537         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5538         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5539         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5540         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5541         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5542         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5543         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5545 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5547         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5548         of pthread_t to be compatible with LT.
5549         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5550         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5551         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5552         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5553         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5554         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5555         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5557 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5559         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5561 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5563         * unwind-forcedunwind.c: Move to...
5564         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5565         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5566         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5567         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5568         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5569         * unwind.c: Include jmpbuf-unwind.h.
5570         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5572 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5574         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5575         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5576         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5577         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5578         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5579         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5580         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5581         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5582         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5583         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5584         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5585         function.
5586         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5587         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5588         * Makefile (tests): Add tst-stack2.
5589         * tst-stack2.c: New test.
5590         * tst-stack1.c: Include limits.h and sys/param.h.
5591         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5593         * pthread_condattr_setpshared.c: Include errno.h.
5594         (pthread_condattr_setpshared): Return EINVAL if pshared
5595         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5597         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5598         defined symbol for entry point to avoid cancellation.
5599         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5600         Likewise.
5601         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5602         Likewise.
5603         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5604         Likewise.
5605         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5606         Likewise.
5607         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5608         Likewise.
5609         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5610         __close_nocancel, __read_nocancel, __write_nocancel,
5611         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5612         libpthread.so or librt.so, define to corresponding function
5613         without _nocancel suffix.
5614         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5615         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5616         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5618         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5620 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5622         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5623         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5625         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5626         in subsections has a symbol associated with it.
5628         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5629         defined symbol for entry point to avoid cancellation.
5630         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5632 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5634         * Makefile (tests): Add tst-tls5.
5635         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5636         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5637         ($(objpfx)tst-tls5): New.
5638         ($(objpfx)tst-tls6.out): Likewise.
5639         (tests): Depend on $(objpfx)tst-tls6.out.
5640         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5641         (do_test): Check pthread_self () return value alignment.
5642         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5643         (tf): Check pthread_self () return value alignment.
5644         * tst-tls5.c: New test.
5645         * tst-tls5.h: New.
5646         * tst-tls5mod.c: New.
5647         * tst-tls5moda.c: New.
5648         * tst-tls5modb.c: New.
5649         * tst-tls5modc.c: New.
5650         * tst-tls5modd.c: New.
5651         * tst-tls5mode.c: New.
5652         * tst-tls5modf.c: New.
5653         * tst-tls6.sh: New test.
5655         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5656         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5657         * init.c (pthread_functions): Initialize them.
5658         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5659         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5660         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5661         pthread_cond_timedwait@@GLIBC_2.3.2.
5663 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5665         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5666         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5667         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5668         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5669         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5670         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5672         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5674         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5675         _POSIX_THREAD_PRIORITY_SCHEDULING.
5676         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5678 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5680         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5681         nested function, use static inline function from libio.h.
5682         Code by Richard Henderson.
5684         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5685         weak.
5687 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5689         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5690         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5691         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5692         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5693         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5694         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5695         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5696         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5697         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5698         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5699         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5700         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5701         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5702         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5703         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5704         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5705         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5706         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5707         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5708         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5709         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5710         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5711         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5712         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5713         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5714         * sysdeps/sparc/tls.h: New file.
5715         * sysdeps/sparc/tcb-offsets.sym: New file.
5716         * sysdeps/sparc/Makefile: New file.
5717         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5718         * init.c [__sparc__] (__NR_set_tid_address): Define.
5720 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5722         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5723         _IO_release_lock): Define.
5725 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5727         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5728         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5730 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5732         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5733         (__pthread_cleanup_class): Add missing return types of member
5734         functions.
5736 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5738         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5739         (lll_mutex_unlock_force): Add memory barrier between store and futex
5740         syscall.
5742 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5744         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5745         tempmsg in first loop.
5747 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5749         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5750         _POSIX_THREAD_PRIORITY_SCHEDULING.
5751         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5753 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5755         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5756         (__rtld_lock_default_lock_recursive,
5757         __rtld_lock_default_unlock_recursive): Define.
5758         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5759         __rtld_lock_unlock_recursive): Define using
5760         GL(_dl_rtld_*lock_recursive).
5761         * init.c (__pthread_initialize_minimal_internal): Initialize
5762         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5763         Lock GL(_dl_load_lock) the same number of times as
5764         GL(_dl_load_lock) using non-mt implementation was nested.
5766         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5767         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5769 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5771         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5772         PIPE_BUF.
5774 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5776         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5778 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5780         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5781         to first syscall error check.  Move syscall error check for tkill
5782         into __ASSUME_CLONE_STOPPED #ifdef.
5784 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5786         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5787         is not defined, do explicit synchronization.
5788         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5789         is not defined also unlock pd->lock for non-debugging case in case
5790         it is necessary.
5791         * pthread_create.c (start_thread): Always get and release pd->lock
5792         if __ASSUME_CLONE_STOPPED is not defined.
5793         (start_thread_debug): Removed.  Adjust users.
5794         * allocatestack.c (allocate_stack): Always initialize lock if
5795         __ASSUME_CLONE_STOPPED is not defined.
5796         * Makefile (tests): Add tst-sched1.
5797         * tst-sched1.c: New file.
5799         * sysdeps/pthread/createthread.c (do_clone): Only use
5800         sched_setschduler and pass correct parameters.
5802 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5804         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5805         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5806         PTHREAD_STACK_MIN in comments.
5808 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5810         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5811         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5812         argument.
5813         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5814         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5815         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5816         (__pthread_cleanup_upto): Fix prototype.
5817         (_longjmp_unwind): Adjust caller.
5818         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5819         Change second argument to const struct pointer.
5820         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5821         * tst-sem9.c (main): Likewise.
5822         * unwind.c: Include string.h for strlen prototype.
5824 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5827         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5828         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5829         Define HAVE_CMOV.
5830         Patch by Nicholas Miell <nmiell@attbi.com>.
5832 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5834         * init.c (__pthread_initialize_minimal_internal): Initialize
5835         GL(dl_init_static_tls).
5836         * pthreadP.h (__pthread_init_static_tls): New prototype.
5837         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5838         New functions.
5839         * Makefile (tests): Add tst-tls4.
5840         (modules-names): Add tst-tls4moda and tst-tls4modb.
5841         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5842         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5843         tst-tls4modb.so.
5844         * tst-tls4.c: New file.
5845         * tst-tls4moda.c: New file.
5846         * tst-tls4modb.c: New file.
5848 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5850         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5851         before __timer_dealloc.
5852         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5853         Don't call list_unlink.
5855 2003-07-29  Roland McGrath  <roland@redhat.com>
5857         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5859 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5861         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5862         Don't reuse struct aiocb A if it failed.
5863         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5864         not just one byte, as that does not block.
5866 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5868         * sysdeps/pthread/unwind-resume.c: New file.
5869         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5870         unwind-resume in csu subdir.
5871         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5872         exceptions.
5873         (librt-sysdep_routines, librt-shared-only-routines): Add
5874         rt-unwind-resume.
5875         * sysdeps/pthread/rt-unwind-resume.c: New file.
5876         * unwind-forcedunwind.c: New file.
5877         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5878         (libpthread-shared-only-routines): Likewise.
5879         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5880         * pthreadP.h (pthread_cancel_init): New prototype.
5881         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5883         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5884         attr argument const struct pthread_attr *.
5886         * res.c (__res_state): Return __resp.
5887         * descr.h: Include resolv.h.
5888         (struct pthread): Add res field.
5889         * pthread_create.c: Include resolv.h.
5890         (start_thread): Initialize __resp.
5891         * Makefile (tests): Add tst-_res1.
5892         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5893         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5894         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5895         libpthread.
5896         * tst-_res1.c: New file.
5897         * tst-_res1mod1.c: New file.
5898         * tst-_res1mod2.c: New file.
5900 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5902         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5904         * Makefile: Define various *-no-z-defs variables for test DSOs
5905         which has undefined symbols.
5907 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5909         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5910         Retry if the stwcx fails to store once_control.
5912 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5914         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5915         pthread_attr_setaffinity.
5916         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5917         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5918         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5919         * pthread_attr_destroy.c: Free cpuset element if allocated.
5920         * pthread_create.c: Pass iattr as additional parameter to
5921         create_thread.
5922         * sysdeps/pthread/createthread.c: If attribute is provided and
5923         a new thread is created with affinity set or scheduling parameters,
5924         start thread with CLONE_STOPPED.
5925         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5926         pthread_attr_setaffinity.
5927         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5928         cpuset element.
5930 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5932         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5934 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5936         * sysdeps/pthread/configure.in: Require CFI directives also for
5937         ppc and s390.
5939 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5941         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5942         Add cfi directives.
5944 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5946         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5947         CLEANUP_JMP_BUF.
5948         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5949         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5950         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5951         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5952         not self pointer in __writer.  Compare with TID to determine
5953         deadlocks.
5954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5956         Likewise.
5957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5958         Likewise.
5959         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5960         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5961         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5962         macros also when compiling librt.
5964 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5966         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5967         -fasynchronous-unwind-tables.
5968         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5969         (PSEUDO): Add cfi directives.
5970         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5971         Likewise.
5972         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5973         Likewise.
5975 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5977         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5978         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5979         * unwind.c (__pthread_unwind_next): Add hidden_def.
5980         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5981         Likewise.
5982         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5983         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5984         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5985         Likewise.
5986         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5987         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5988         Likewise.
5989         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5990         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5991         __pthread_unregister_cancel and __pthread_unwind_next.
5993 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5995         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5996         different symbol for the cancellation syscall wrapper and
5997         non-cancellation syscall wrapper.
5998         (PSEUDO_END): Define.
6000 2003-07-05  Richard Henderson  <rth@redhat.com>
6002         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6003         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6004         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6005         return actual return value from the syscall, not 0.
6007 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6009         * descr.h (struct pthread): Add pid field.
6010         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6011         (__reclaim_stacks): Likewise.
6012         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6013         also check for PID of the signal source.
6014         (__pthread_initialize_minimal_internal): Also initialize pid field
6015         of initial thread's descriptor.
6016         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6017         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6018         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6019         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6020         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6022 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6024         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6025         Fix use of parameter.
6026         (__libc_cleanup_pop): Likewise.
6028 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6030         * init.c (sigcancel_handler): Change parameters to match handler
6031         for SA_SIGACTION.  Check signal number and code to recognize
6032         invalid invocations.
6034 2003-07-03  Roland McGrath  <roland@redhat.com>
6036         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6037         Apply sizeof (struct pthread) bias to r13 value.
6039 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6041         * sysdeps/pthread/configure.in: Require CFI directives.
6043         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6044         definition.
6045         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6046         libpthread compilation.
6047         * unwind.c (__pthread_unwind): Add hidden_def.
6048         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6050 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6052         * libc-cancellation.c (__libc_cleanup_routine): Define.
6053         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6054         (__pthread_cleanup_pop): Define.
6056 2003-07-01  Richard Henderson  <rth@redhat.com>
6058         * sysdeps/alpha/elf/pt-initfini.c: New file.
6059         * sysdeps/alpha/pthread_spin_lock.S: New file.
6060         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6061         * sysdeps/alpha/pthreaddef.h: New file.
6062         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6063         * sysdeps/alpha/tls.h: New file.
6064         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6065         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6066         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6067         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6068         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6069         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6070         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6071         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6072         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6073         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6075 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6077         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6078         cleanup support and unwind info.
6080 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6082         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6083         Use correct cleanup handler registration.  Add unwind info.
6084         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6085         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6086         * tst-once3.c: Add cleanup handler and check it is called.
6087         * tst-once4.c: Likewise.
6088         * tst-oncex3.c: New file.
6089         * tst-oncex4.c: New file.
6090         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6092 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6094         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6096 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6098         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6099         (tf_msgsnd): Likewise.
6101         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6102         premature returns a bit more.
6104 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6106         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6107         definition to the front.
6109         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6110         the cleanup functions to make the names unique.  Fix dwarf opcode
6111         un unwind table.
6112         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6113         functions to make the names unique.  Fix CFA offset for two blocks.
6115 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6117         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6118         missing closing braces.
6119         Patch by Christophe Saout <christophe@saout.de>.
6121 2003-06-24  Roland McGrath  <roland@redhat.com>
6123         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6125 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6127         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6128         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6130         * pthreadP.h: Declare __find_thread_by_id.
6131         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6132         * pthread_clock_gettime.c: Allow using other thread's clock.
6133         * pthread_clock_settime.c: Likewise.
6134         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6135         * Makefile: Add rules to build and run tst-clock2.
6136         * tst-clock2.c: New file.
6138 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6140         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6141         to use exception-based cleanup handler.
6142         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6144         * tst-cond8.c (ch): Announce that we are done.
6146         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6148         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6149         Also test aio_suspend with timeout value.
6151 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6153         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6154         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6155         attribute_hidden.
6157         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6158         (__pthread_mutex_lock_internal): Likewise.
6159         (__pthread_mutex_unlock_internal): Likewise.
6160         (__pthread_mutex_unlock_usercnt): Declare.
6161         * pthread_mutex_destroy.c: Always fail if used in any way.
6162         * pthread_mutex_init.c: Update comment.
6163         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6164         * pthread_mutex_timedlock.c: Adjust __nusers.
6165         * pthread_mutex_trylock.c: Adjust __nusers.
6166         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6167         and public interfaces are wrapper with pass additional parameter.
6168         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6169         parameter zero.
6170         * tst-mutex8.c: New file.
6171         * Makefile (tests): Add tst-mutex8.
6172         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6173         __pthread_mutex_unlock_usercnt.
6174         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6175         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6176         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6177         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6179         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6180         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6181         Add __nusers.
6182         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6183         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6184         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6185         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6186         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6188         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6189         * pthread_mutex_timedlock.c: Likewise.
6190         * pthread_mutex_trylock.c: Adjust __nusers.
6191         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6192         * tst-mutex9.c: New file.
6193         * Makefile (tests): Add tst-mutex9.
6194         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6195         * sysdeps/ia64/tls.h: Likewise.
6196         * sysdeps/powerpc/tls.h: Likewise.
6197         * sysdeps/s390/tls.h: Likewise.
6198         * sysdeps/sh/tls.h: Likewise.
6199         * sysdeps/x86_64/tls.h: Likewise.
6200         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6201         Change type of __owner.
6202         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6203         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6204         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6205         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6206         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6208 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6210         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6211         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6213         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6214         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6215         instead of nr to lll_futex_wake.  Only set errno and return -1
6216         if err < 0.
6218         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6219         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6220         return actual return value from the syscall, not 0.
6222 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6224         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6225         find a random value.
6226         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6227         errno==EIDRM.
6229         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6230         compat_timer_settime.
6231         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6232         compat_timer_gettime.
6233         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6234         compat_timer_getoverrun.
6235         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6236         compat_timer_delete.
6238         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6239         error-checking mutex detect busy mutexes.
6241 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6243         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6244         Add ax to clobber list.
6245         (lll_mutex_cond_lock): Likewise.
6246         (lll_mutex_unlock): Likewise.
6247         (lll_lock): Likewise.
6248         (lll_unlock): Likewise.
6250         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6251         * tst-cancel18.c: New file.
6252         * tst-cancelx18.c: New file.
6254         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6255         and tcdrain.
6257         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6258         * tst-cancel17.c: New file.
6259         * tst-cancelx17.c: New file.
6261         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6262         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6263         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6265         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6267 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6269         * sysdeps/pthread/createthread.c (create_thread): Set
6270         header.multiple_threads unconditionally.
6271         * allocatestack.c (allocate_stack): Likewise.
6272         * descr.h (struct pthread): Add header.multiple_threads
6273         unconditionally.
6274         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6275         Define for librt.  #error if neither libpthread, libc nor librt.
6276         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6277         Likewise.
6278         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6279         CDISABLE): Likewise.
6280         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6281         CDISABLE): Likewise.
6282         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6283         CDISABLE): Likewise.
6284         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6285         CDISABLE): Likewise.  Access header.multiple_threads outside of
6286         libc and libpthread.
6287         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6288         Likewise.
6289         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6290         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6292 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6294         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6295         Also test early cancellation before the thread reaches the cancellation
6296         point.
6298         * Makefile: Compile forward.c with exceptions.
6300         * sysdeps/unix/sysv/linux/sleep.c: New file.
6302 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6304         * Makefile: Add CFLAGS definition to compile function wrappers
6305         duplicated from libc with exceptions.
6306         * tst-cancel4.c: Also check cancellation handlers.
6308         * Makefile: Add rules to build and run tst-cancel16 and
6309         tst-cancelx16.  Add missing CFLAGS definitions.
6310         * tst-cancel16.c: New file.
6311         * tst-cancelx16.c: New file.
6313 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6315         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6316         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6317         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6318         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6320         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6321         (LIBC_CANCEL_RESET): Likewise.
6322         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6323         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6324         librt-cancellation.
6325         (CFLAGS-libcrt-cancellation.c): Define.
6326         * sysdeps/pthread/librt-cancellation.c: New file.
6327         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6328         macros also when compiling librt.
6329         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6330         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6331         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6332         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6333         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6334         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6335         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6337         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6338         compat_timer_create.
6340 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6342         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6344         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6345         __register_atfork.
6346         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6347         Add libc_hidden_def.
6349 2003-06-13  Roland McGrath  <roland@redhat.com>
6351         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6352         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6354 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6356         * allocatestack.c (queue_stack): Always inline.
6357         * ptreadhP.h (__do_cancel): Likewise.
6359 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6361         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6362         a typo.
6364 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6366         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6367         (__pthread_cond_signal): Remove incorrect second addition for
6368         cond_lock!=0.
6370 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6373         (__pthread_cond_signal): Use correct futex pointer in
6374         __lll_mutex_lock_wait call.
6376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6377         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6379 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6381         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6382         cancelable.
6383         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6384         Likewise.
6386         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6387         hand-written CFI generation code.  Since ENTRY/END also initiated
6388         CFI frames this caused two CFI sets to be generated.
6390 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6392         * cleanup_routine.c: New file.
6393         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6394         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6395         cleanup handling.
6396         * Makefile (libpthread-routines): Add cleanup_routine.
6397         Add more CFLAGS variables to compile with exceptions.  Add comments
6398         why which file needs unwind tables.
6399         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6400         tests.
6401         * tst-cancelx1.c: New file.
6402         * tst-cancelx2.c: New file.
6403         * tst-cancelx3.c: New file.
6404         * tst-cancelx4.c: New file.
6405         * tst-cancelx5.c: New file.
6406         * tst-cancelx6.c: New file.
6407         * tst-cancelx7.c: New file.
6408         * tst-cancelx8.c: New file.
6409         * tst-cancelx9.c: New file.
6410         * tst-cancelx10.c: New file.
6411         * tst-cancelx11.c: New file.
6412         * tst-cancelx12.c: New file.
6413         * tst-cancelx13.c: New file.
6414         * tst-cancelx14.c: New file.
6415         * tst-cancelx15.c: New file.
6416         * tst-cleanupx0.c: New file.
6417         * tst-cleanupx0.expect: New file.
6418         * tst-cleanupx1.c: New file.
6419         * tst-cleanupx2.c: New file.
6420         * tst-cleanupx3.c: New file.
6422         * tst-cleanup0.c: Make standard compliant.
6423         * tst-cleanup1.c: Likewise.
6425         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6426         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6427         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6428         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6429         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6430         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6431         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6432         CLEANUP_JMP_BUF.
6433         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6434         * tst-cancel12.c: New file.
6435         * tst-cancel13.c: New file.
6436         * tst-cancel14.c: New file.
6437         * tst-cancel15.c: New file.
6438         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6439         and tst-cancel15.
6441         * tst-cancel1.c: Add some comments.
6443         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6444         timeout correctly.
6446 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6448         * Makefile (CFLAGS-pthread_cancel.c): Define.
6450 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6452         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6453         Change type of __writer element to int.
6454         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6455         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6456         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6457         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6459         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6460         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6461         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6462         Compare with TID to determine deadlocks.
6463         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6464         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6465         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6466         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6467         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6468         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6469         Likewise.
6470         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6471         Likewise.
6472         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6473         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6474         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6475         Likewise.
6476         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6477         Likewise.
6478         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6479         * Makefile (tests): Add tst-rwlock12.
6480         * tst-rwlock12.c: New file.
6482 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6484         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6485         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6486         Remove bogus hidden_proto.
6487         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6488         Likewise.
6489         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6490         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6491         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6492         ___lll_mutex_timedlock): Likewise.
6494 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6497         (__pthread_cond_signal): Add some code to eventually handle
6498         cond_lock!=0.
6500 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6502         * Makefile (tests): Add tst-exec4.
6503         (tst-exec4-ARGS): Define.
6504         * tst-exec4.c: New file.
6506 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6508         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6509         Also fail if tv_nsec < 0.
6510         (__lll_timedwait_tid): Likewise.
6511         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6512         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6513         Likewise.
6514         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6515         Likewise.
6516         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6517         Likewise.
6518         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6519         Likewise.
6520         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6521         Likewise.
6522         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6523         Likewise.
6525         * Makefile (tests): Add tst-sem8 and tst-sem9.
6526         * tst-sem8.c: New file.
6527         * tst-sem9.c: New file.
6528         * sem_open.c: Fix creation of in_use record if the file exists but
6529         no internal record.
6531         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6532         definitions.
6534         * sysdeps/pthread/timer_create.c (timer_create): In case
6535         evp==NULL, assign timer ID to sival_ptr.
6537         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6538         struct pthread_unwind_buf *.
6539         (struct pthread): Likewise for cleanup_jmp_buf element.
6541         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6542         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6543         * unwind.c (__pthread_unwind_next): Likewise.
6545 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6547         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6548         (lll_futex_timed_wait): Use int for futex value parameter.
6549         (lll_futex_wake): Likewise.
6550         (lll_futex_requeue): Likewise.
6552         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6553         Replace one memory operation with one register operation.
6555         * tst-join4.c (do_test): Fix error message.
6557         * tst-rwlock6.c (do_test): Use correct format specifier.
6559         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6560         (__lll_mutex_lock_wait): Replace one memory operation with one
6561         register operation.
6562         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6563         (__lll_mutex_lock_wait): Likewise.
6565         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6566         (__lll_mutex_cond_lock): Add one to value parameter of
6567         __lll_lock_wait to reflect reality in the futex syscall.
6568         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6569         (lll_mutex_cond_lock): Likewise.
6571 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6573         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6574         New function.
6575         (lll_mutex_cond_lock): Define.
6577 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6579         * Makefile (tests): Add tst-signal6.
6580         * tst-signal6.c: New file.
6582         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6583         (__lll_mutex_unlock_force): New function
6584         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6586         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6587         (__lll_mutex_unlock_force): New function.
6588         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6590         * tst-rwlock7.c (do_test): Use correct format specifier.
6592         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6593         Find break parameter in correct asm argument.
6595 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6597         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6598         Remove out4.
6599         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6600         error occured.
6601         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6602         Add __mutex.
6603         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6604         lll_futex_requeue, lll_mutex_unlock_force): Define.
6606 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6608         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6609         (pthread_cond_t): Add __mutex.
6610         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6611         lll_futex_requeue, lll_mutex_unlock_force): Define.
6613 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6615         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6616         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6617         Add __mutex field.
6618         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6619         Define.
6620         (lll_futex_wait, lll_futex_wake): Define.
6621         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6622         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6623         FUTEX_REQUEUE instead of FUTEX_WAIT.
6624         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6625         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6626         mutex which was used in condvar structure.  Call
6627         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6628         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6630         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6631         include tcb-offsets.h.  Read wakeup value in locked region.
6632         Use the value of gbr register as THREAD_ID.
6633         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6634         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6635         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6637         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6638         macros.
6640 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6642         * sysdeps/pthread/pthread_cond_broadcast.c
6643         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6645 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6647         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6648         typo in register name.
6649         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6650         correctly.  Actually use requeue.  Little optimization.
6651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6652         mutex address early.  Handle cancellation state as 32-bit value.
6653         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6654         Remove unnecessary label.
6656 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6658         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6659         instead of FUTEX_WAIT.
6660         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6663         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6665         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6666         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6667         of __pthread_mutex_lock_internal.
6668         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6670         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6671         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6674         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6675         Add pthread_mutex_cond_lock.
6676         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6677         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6678         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6679         lll_mutex_cond_lock.
6680         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6681         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6682         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6683         Add __mutex field.
6684         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6685         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6687         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6688         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6690         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6691         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6692         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6693         macro don't define aliases.
6695         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6696         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6697         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6698         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6699         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6701         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6703         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6705 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6707         * sem_open.c: Fix one endless loop.  Implement correct semantics
6708         wrt opening the same semaphore more then once.
6709         * sem_close.c: Adjust for sem_open change.
6710         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6711         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6712         * Makefile (tests): Add tst-sem7.
6713         * tst-sem7.c: New file.
6715 2003-05-16  Roland McGrath  <roland@redhat.com>
6717         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6718         uninitialized variable braino.
6720 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6722         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6723         test for syscall availability.
6725         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6726         __no_posix_timers to -1 if the syscalls don't exist.
6728         * pthread_join.c (pthread_join): Set tid field of the joined
6729         thread to -1.  This isn't necessary but helps to recognize some
6730         error conditions with almost no cost.
6732         * allocatestack.c (FREE_P): Also negative values indicate an
6733         unused stack.
6735         * unwind.c: Include <unistd.h>.
6737 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6739         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6741 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6743         * Makefile (crti-objs, crtn-objs): New variables.
6744         (omit-deps, extra-objs): Add crtn.
6745         ($(objpfx)libpthread.so): Depend on both crti and crtn
6746         and links to them in multidir.
6747         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6749 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6751         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6752         (lll_mutex_unlock): Use atomic_exchange_rel.
6754 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6756         * cond-perf.c (cons): Add missing locking around setting of alldone.
6758 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6760         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6761         related macros.
6762         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6764 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6766         * tst-sem6.c: New file.
6767         * Makefile (tests): Add tst-sem6.
6769         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6770         Use atomic_exchange_rel instead of atomic_exchange.
6771         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6772         Likewise.
6774         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6775         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6776         vsyscall is possible.
6778         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6779         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6780         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6781         pthread_setaffinity_np.
6782         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6783         and pthread_setaffinity_np.
6784         * Makefile (libpthread-routines): Add pthread_getaffinity and
6785         pthread_setaffinity.
6787         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6788         use it in case mmap to allocate the stack fails.
6789         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6790         ARCH_MAP_FLAGS here.
6791         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6792         ARCH_RETRY_MMAP.
6794 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6796         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6797         handler implementation.  It is now lockless in fork().
6798         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6799         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6800         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6801         declare the __fork_*_lists.
6802         (struct fork_handler): Include pointers to all three functions.
6803         Add next, refcntr and need_signal elements.
6804         (__fork_handlers): New declaration.
6805         (__register_atfork_malloc): Remove declaration.
6806         (HAVE_register_atfork_malloc): Remove definition.
6807         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6808         __pthread_child_handler variable.
6809         (__libc_pthread_init): Use __register_atfork instead of explicitly
6810         adding to the list.
6811         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6812         and lll_futex_wake.
6813         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6815         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6816         function must never be reached.
6818         * cond-perf.c: New file.
6820 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6822         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6824 2003-05-04  Roland McGrath  <roland@redhat.com>
6826         * Makefile ($(objpfx)../libc.so): New target.
6828 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6830         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6831         (pthread_condattr_t): Size is only an int, don't use long for
6832         alignment.
6833         (pthread_mutexattr_t): Likewise.
6834         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6835         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6836         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6838 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6840         * sysdeps/i386/tls.h: Define THREAD_ID.
6841         * sysdeps/ia64/tls.h: Likewise.
6842         * sysdeps/powerpc/tls.h: Likewise.
6843         * sysdeps/s390/tls.h: Likewise.
6844         * sysdeps/sh/tls.h: Likewise.
6845         * sysdeps/x86_64/tls.h: Likewise.
6846         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6847         record ownership.
6848         * pthread_mutex_timedlock.c: Likewise.
6849         * pthread_mutex_trylock.c: Likewise.
6850         * pthread_mutex_unlock.c: Likewise.
6851         * pthread_rwlock_trywrlock.c: Likewise.
6852         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6853         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6854         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6855         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6857         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6858         flag.
6860 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6862         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6863         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6864         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6865         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6866         Make __align long long instead of long.
6867         (pthread_rwlock_t): Formatting.
6868         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6869         (pthread_rwlock_t): Formatting.
6870         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6871         (pthread_cond_t): Make __align long long instead of long.
6872         (pthread_rwlock_t): Move __flags field to the same position as in
6873         linuxthreads.
6875 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6877         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6878         * tst-rwlock7.c (do_test): Likewise.
6880 2003-04-26  Roland McGrath  <roland@redhat.com>
6882         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6884 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6886         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6887         sizeof (struct pthread).
6888         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6889         1 struct pthread.
6890         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6891         to 0.
6892         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6893         struct pthread.
6894         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6895         to 32-bit bytes.
6896         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6897         tcbp.
6898         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6899         unneccessarily.
6900         (NO_TLS_OFFSET): Define.
6901         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6902         add TLS_TCB_SIZE unnecessarily.
6904 2003-04-22  Roland McGrath  <roland@redhat.com>
6906         * Makeconfig (shared-thread-library): Reverse link order to work
6907         around linker bug.
6909 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6911         * semaphore.h: Fix typo in comment.
6913 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6915         * sysdeps/pthread/sigfillset.c: New file.
6917         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6918         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6919         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6920         * sysdeps/pthread/sigaction.c: Likewise.
6921         * sysdeps/pthread/sigprocmask.c: New file.
6922         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6923         __SIGRTMIN+1.
6924         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6925         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6926         in this case.
6928 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6930         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6931         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6933         * sysdeps/unix/sysv/linux/unregister-atfork.c
6934         (__unregister_atfork): Don't free memory not allocated dynamically.
6936         * semaphore.h: Remove __THROW marker from cancellation points.
6937         * nptl/sysdeps/pthread/pthread.h: Likewise.
6939 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6941         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6942         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6943         __THROW.
6945 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6947         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6949 2003-04-15  Roland McGrath  <roland@redhat.com>
6951         * forward.c (__pthread_unwind): Tweak to avoid warning.
6953 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6955         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6957 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6959         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6960         overflow CFA advance instructions.
6961         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6963 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6965         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6966         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6967         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6968         defined.
6970         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6971         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6973         DW_CFA_advance_loc for .Laddl-.Lsubl.
6975 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6977         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6978         position-independent unwind data for static libraries.
6979         Add missing unwind info.  Add comments.
6981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6982         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6986 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6988         * Makefile: Make sure all cancellation points are compiled with
6989         exception and asynchronous unwind tables.
6991         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6992         which mishandles loading of global object addresses in PIC.
6993         (THREAD_SETMEM_NC): Likewise.
6995 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6997         * pthread.h: Define new data structure for cleanup buffer.  Declare
6998         new cleanup handler interfaces.
6999         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7000         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7001         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7002         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7003         it.  Declare old cleanup handler installation functions.
7004         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7005         handling.
7006         * cleanup_defer.c: Likewise.
7007         * cleanup_compat.c: New file.  Old cleanup code.
7008         * cleanup_def_compat.c: New file.  Old cleanup code.
7009         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7010         if own thread descriptor.
7011         * unwind.c: New file.
7012         * forward.c: Add __pthread_unwind.
7013         * init.c (pthread_functions): Add __pthread_unwind.
7014         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7015         Add ptr___pthread_unwind.
7016         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7017         and unwind function.
7018         * Makefile (libpthread-routines): Add cleanup_compat,
7019         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7020         table generation if necessary.
7021         * version.c: Record whether unwind support is compiled in.
7022         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7023         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7024         handler interfaces.
7025         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7026         complication to generate unwind information for syscall wrappers.
7027         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7028         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7029         __cleanup_fct_attribute.
7031         * Makefile: Add rules to build and run tst-cleanup0.
7032         * tst-cleanup0.c: New file.
7033         * tst-cleanup0.expect: New file.
7035         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7036         caller.  Optimize to avoid often unecessary local variable.
7038 2003-04-11  Roland McGrath  <roland@redhat.com>
7040         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7041         sets variable `multidir'; include that.
7042         (generated): Add it.
7043         ($(objpfx)$(multidir)/crti.o): New target.
7044         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7046 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7048         * tst-attr2.c (do_test): Add cast to avoid warning.
7049         * tst-mutex4.c (do_test): Likewise.
7051 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7053         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7054         in child.
7056 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7058         * Makefile (tests): Add tst-detach1.
7059         * tst-detach1.c: New file.
7061 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7063         * sysdeps/pthread/pthread.h: Remove duplicate
7064         pthread_cleanup_{push,pop} definitions.
7066         * tst-barrier2.c: Eliminate warnings.
7067         * tst-cancel4.c: Likewise.
7068         * tst-cond4.c: Likewise.
7069         * tst-cond6.c: Likewise.
7070         * tst-detach1.c: Likewise.
7071         * tst-rwlock4.c: Likewise.
7072         * tst-rwlock6.c: Likewise.
7073         * tst-rwlock7.c: Likewise.
7074         * tst-sem3.c: Likewise.
7075         * tst-spin2.c: Likewise.
7076         * tst-umask1.c: Likewise.
7078 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7080         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7082 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7084         * descr.h (struct pthread): Move cancelhandling member to the front.
7086 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7088         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7089         malloc_parent, and malloc_child statically.
7090         (__register_atfork_malloc): New function.
7091         (free_mem): Don't free any of the malloc_* variables on the list.
7092         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7093         Define HAVE_register_atfork_malloc.
7095 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7097         * sysdeps/pthread/createthread.c (create_thread): Add some more
7098         comments explaining when to set multiple_threads and when not.
7100         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7101         THREAD_ATOMIC_BIT_SET if not already defined.
7102         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7103         THREAD_ATOMIC_BIT_SET:
7104         * sysdeps/x86_64/tls.h: Likewise.
7105         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7106         THREAD_ATOMIC_CMPXCHG_VAL.
7107         (_pthread_cleanup_pop_restore): Likewise.
7108         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7109         (__pthread_enable_asynccancel_2): Likewise.
7110         (__pthread_disable_asynccancel): Likewise.
7111         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7112         (__libc_disable_asynccancel): Likewise.
7113         * init.c (sigcancel_handler): Likewise.
7114         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7115         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7117 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7119         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7120         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7121         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7122         * Makefile (tests): Add tst-cancel11.
7123         * tst-cancel11.c: New file.
7125 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7127         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7128         round, not the first.  Use specific_used flag instead of local
7129         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7130         (__free_tcb): Don't call deallocate_tsd here.
7131         (start_thread): Call deallocate_tsd here.
7132         * pthread_setspecific.c: Set specific_used flag really only when
7133         needed.
7134         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7135         * tst-tsd3.c: New file.
7136         * tst-tsd4.c: New file.
7138 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7140         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7141         Use atomic_exchange_and_add instead of __lll_add.
7142         (__lll_mutex_timedlock): Likewise.
7143         Patch by Ian Wienand.
7145 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7147         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7148         (SINGLE_THREAD_P): Fix typo.
7149         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7151 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7153         * Makefile (tests): Add tst-align.
7154         * tst-align.c: New file.
7155         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7157         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7158         function correctly.
7160         * tst-tsd2.c: Add casts to avoid warnings.
7162 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7164         * descr.h (struct pthread): Move most often used elements to the front.
7166 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7168         * Makefile (libpthread-routines): Add pthread_atfork.
7169         (libpthread-static-only-routines): Add pthread_atfork.
7171 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7173         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7174         of TLS_DTV_AT_TP.
7175         (INSTALL_DTV): Add parens.
7176         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7177         Use passed descr instead of THREAD_SELF.
7178         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7179         (__lll_mutex_timedlock_wait): Correct expected value after
7180         spurious wakeup.
7181         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7182         Release lock before waking up the waiters.
7183         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7184         criteria.  Reorderstruct passed to cleanup handler.  Fix
7185         handling of cancellation and failung pthread_mutex_unlock call.
7186         Use __pthread_enable_asynccancel_2 instead of
7187         __pthread_enable_asynccancel.
7188         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7189         Return result of lock re-get if it fails.
7190         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7191         for __pthread_cleanup_push.
7192         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7193         completely broken rwlock implementation.
7194         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7195         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7196         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7197         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7199         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7200         versioned_symbol macro.
7201         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7202         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7204 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7206         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7207         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7208         and __helper_tid.
7209         (struct timer): Remove th and bar field.
7210         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7211         debugging code.  Create only one helper thread.
7212         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7213         helper thread.
7214         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7215         Renamed.  Define statically.  Use thread info from siginfo.
7216         (__helper_once): New variable.
7217         (__helper_tid): New variable.
7218         (__reset_helper_control): New function.
7219         (__start_helper_thread): New function.
7221         * pthread_create.c (start_thread): Don't use setjmp inside
7222         __builtin_expect to work around gcc bug.
7224         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7225         timer_delete syscall fails, but not with ENOSYS, set
7226         __no_posix_timers.
7228         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7229         (timer_settime): Fix typo.
7230         * sysdeps/unix/sysv/linux/timer_getoverr.c
7231         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7233 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7236         offset of cleanupbuf.__prev.
7238 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7240         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7241         of included file.
7243 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7245         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7246         NULL provide default definition to syscall.
7248 2003-03-25  Roland McGrath  <roland@redhat.com>
7250         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7251         (timer_id2ptr): Fix typo.
7253 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7255         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7256         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7257         * sysdeps/ia64/pthreaddef.h: Likewise.
7258         * sysdeps/powerpc/pthreaddef.h: Likewise.
7259         * sysdeps/s390/pthreaddef.h: Likewise.
7260         * sysdeps/sh/pthreaddef.h: Likewise.
7261         * sysdeps/x86_64/pthreaddef.h: Likewise.
7262         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7263         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7264         being changed.
7265         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7266         SIGTIMER is not unblocked.
7267         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7268         RT signal taken.
7269         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7270         be send.
7271         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7272         pass pointer through as ID.
7273         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7274         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7275         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7276         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7277         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7278         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7279         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7280         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7281         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7282         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7283         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7284         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7285         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7286         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7287         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7288         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7289         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7290         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7291         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7292         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7293         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7294         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7295         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7296         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7297         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7298         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7299         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7300         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7301         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7302         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7303         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7304         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7305         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7307         * pthreadP.h: Remove FRAME_LEFT definition.
7308         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7309         already left frame.  Programs which have this problem are not POSIX
7310         compliant.
7311         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7313 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7315         * sysdeps/pthread/tst-timer.c: Check return values of the
7316         functions we test.
7318 2003-03-23  Roland McGrath  <roland@redhat.com>
7320         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7321         * tst-tls3mod.c: Likewise.
7322         * tst-tls1.c: Likewise.
7323         * tst-tls2.c: Likewise.
7325         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7326         undefined behavior.
7328         * tst-join5.c (tf1, tf2): Add a cast.
7330         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7332         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7333         Don't test anything.
7334         * tst-cond4.c: Likewise.
7335         * tst-cond6.c: Likewise.
7336         * tst-flock2.c: Likewise.
7337         * tst-mutex4.c: Likewise.
7338         * tst-rwlock4.c: Likewise.
7339         * tst-signal1.c: Likewise.
7340         * tst-spin2.c: Likewise.
7341         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7343         * tst-mutex4.c: Use test-skeleton.c.
7344         * tst-spin2.c: Likewise.
7345         * tst-sysconf.c: Likewise.
7346         * tst-barrier2.c: Likewise.
7347         * tst-cond4.c: Likewise.
7348         * tst-cond6.c: Likewise.
7349         * tst-rwlock4.c: Likewise.
7350         * tst-unload.c: Likewise.
7351         * tst-flock2.c (do_test): Use return instead of exit.
7353 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7355         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7357 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7359         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7360         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7361         instead of __lll_compare_and_swap.
7362         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7363         Likewise.
7364         Removed definition if __lll_compare_and_swap.
7366         * cancellation.c: Adjust for new form of compare&exchange macros.
7367         * cleanup_defer.c: Likewise.
7368         * init.c: Likewise.
7369         * libc-cancellation.c: Likewise.
7370         * old_pthread_cond_broadcast.c: Likewise.
7371         * old_pthread_cond_signal.c: Likewise.
7372         * old_pthread_cond_timedwait.c: Likewise.
7373         * old_pthread_cond_wait.c: Likewise.
7374         * pthread_cancel.c: Likewise.
7375         * pthread_create.c: Likewise.
7376         * pthread_detach.c: Likewise.
7377         * pthread_join.c: Likewise.
7378         * pthread_key_delete.c: Likewise.
7379         * pthread_setcancelstate.c: Likewise.
7380         * pthread_setcanceltype.c: Likewise.
7381         * pthread_timedjoin.c: Likewise.
7382         * pthread_tryjoin.c: Likewise.
7383         * sysdeps/pthread/createthread.c: Likewise.
7385 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7387         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7388         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7389         definitions.  Replace uses with calls to atomic_* functions.
7390         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7391         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7392         __lll_test_and_set calls with atomic_exchange_and_add and
7393         atomic_exchange calls respectively.
7394         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7395         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7396         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7397         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7398         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7399         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7400         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7402         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7403         returns the old value.
7405 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7407         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7408         int for variable OLDVAL and correct inline assembler contraint.
7409         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7410         type int for variable OLD.
7412         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7413         only for s390-32.
7414         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7415         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7416         instead of multiple_threads field in the TCB.
7418 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7420         * sysdeps/i386/i686/bits/atomic.h: Removed.
7421         * sysdeps/i386/i586/bits/atomic.h: Removed.
7422         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7423         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7424         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7425         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7426         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7427         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7428         * atomic.h: Removed.  Moved to glibc.
7430         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7431         support for clock selection.
7433         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7434         signalling waiters.
7436 2003-03-18  Roland McGrath  <roland@redhat.com>
7438         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7439         Add __lll_rel_instr first.  Add memory clobber.
7440         (lll_mutex_unlock): Use __lll_test_and_set.
7441         From Paul Mackerras <paulus@samba.org>.
7443         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7444         unconditionally.
7445         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7446         (SINGLE_THREAD_P):  Add `header.' prefix.
7447         From Paul Mackerras <paulus@samba.org>.
7449         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7450         pthread_timedjoin_np to ...
7451         (libpthread: GLIBC_2.3.3): ... here.
7452         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7454         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7455         Avoid shadowing VAL variable.
7457         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7458         New macro.
7460 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7462         * Makefile (tests): Add tst-cond11.
7463         * tst-cond11.c: New file.
7465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7466         struct passed to cleanup handler to eliminate one more
7467         instruction.
7468         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7470         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7471         (pthrad_cond_t): Replace __unused field with __clock.
7473         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7474         waken all waiters in cleanup handler.
7475         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7478         * pthread_condattr_getclock.c: New file.
7479         * pthread_condattr_setclock.c: New file.
7480         * sysdeps/pthread/pthread.h: Declare these new functions.
7481         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7482         * Makefile (libpthread-routines): Add the new functions.
7483         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7484         Renamed field to value.  Document use of the bits.
7485         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7486         change.
7487         * pthread_condattr_setpshared.c: Likewise.
7488         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7489         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7490         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7491         Add __clock field.
7492         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7493         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7494         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7495         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7497         Implement clock selection.
7498         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7499         * pthread-errnos.sym: Add ENOSYS.
7500         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7501         _POSIX_CLOCK_SELECTION.
7502         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7504         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7505         invalid .size directive.
7507 2003-03-17  Roland McGrath  <roland@redhat.com>
7509         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7510         Formatting tweaks.
7512 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7514         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7515         Use __lll_add instead of spelling it out.  Use protected symbol names.
7516         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7517         Use __lll_add.
7518         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7519         Renamed from lll_compare_and_swap.  Use new name where necessary.
7520         (__lll_add): Defined.
7521         (__lll_dec_if_positive): Defined.
7522         (__lll_test_and_set): Defined.
7523         * sysdeps/ia64/pthread_spin_init.c: Removed.
7524         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7525         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7526         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7527         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7528         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7529         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7530         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7531         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7532         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7533         __sync_lock_release_si.
7534         Patch by Jakub Jelinek.
7536         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7537         Fix timeout handling.
7538         (__lll_timedwait_tid): Likewise.
7539         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7540         Patch by Jakub Jelinek.
7542         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7544 2003-03-17  Roland McGrath  <roland@redhat.com>
7546         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7547         * sysdeps/pthread/pthread_spin_init.c: New file.
7548         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7549         * sysdeps/powerpc/Makefile: New file.
7550         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7551         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7552         * sysdeps/powerpc/pthreaddef.h: New file.
7553         * sysdeps/powerpc/tcb-offsets.sym: New file.
7554         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7555         * sysdeps/powerpc/tls.h: New file.
7556         * sysdeps/powerpc/bits/atomic.h: New file.
7557         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7558         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7559         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7561         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7562         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7563         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7564         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7565         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7566         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7567         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7568         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7569         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7570         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7571         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7572         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7573         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7574         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7575         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7577         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7578         not gettimeofday.
7579         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7580         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7581         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7582         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7583         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7585 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7587         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7588         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7589         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7591         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7593 2003-03-16  Roland McGrath  <roland@redhat.com>
7595         * tst-fork4.c: Include <string.h>.
7596         * tst-signal2.c: Likewise.
7597         * tst-mutex5.c (do_test): exit -> return.
7598         * tst-mutex2.c: Include <stdlib.h>.
7600 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7602         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7603         (__lll_mutex_timedlock_wait): Correct expected value after
7604         spurious wakeup.  Otherwise we would never wait again.
7606         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7607         zone versus inline asm stupidity.  Use correct instructions.
7609         * tst-rwlock6.c: Add some more status output.
7611 2003-03-15  Roland McGrath  <roland@redhat.com>
7613         * sysdeps/pthread/configure.in: New file.
7614         * sysdeps/pthread/configure: New file (generated).
7616 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7618         * allocatestack.c (allocate_stack): Store the exact stack size of
7619         user allocated stacks.
7621 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7623         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7624         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7625         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7626         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7627         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7628         Use `header.' prefix.
7629         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7631 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7633         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7634         __builtin_frame_address, use stack pointer.
7636         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7637         instead of __builtin_frame_pointer.
7639 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7641         * tst-basic1.c (do_test): Add cast to avoid warning.
7642         * tst-basic2.c (do_test): Likewise.
7644         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7645         amount of stack correction.
7647         * tst-fork4.c: Use test-skeleton.c.
7649 2003-03-14  Roland McGrath  <roland@redhat.com>
7651         * init.c: Fix typo "#eli" for "#else".
7653 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7655         * allocatestack.c (__stack_user): Use hidden_data_def.
7656         * pthread_create.c (__pthread_keys): Likewise.
7658         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7660 2003-03-14  Roland McGrath  <roland@redhat.com>
7662         * tst-fork4.c: New file.
7663         * Makefile (tests): Add it.
7665         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7666         we always define the padding space.
7667         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7668         stopped supporting its own extensions fully.
7669         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7670         struct also called `header', so `header.multiple_threads' is the field
7671         name to use on all machines.
7672         * allocatestack.c (allocate_stack): Use `header.' prefix.
7673         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7674         * pthread_create.c (__pthread_create_2_1): Likewise.
7675         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7676         (THREAD_SELF): Likewise.
7677         * sysdeps/x86_64/tls.h: Likewise.
7678         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7679         (SINGLE_THREAD_P): Likewise.
7680         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7681         (SINGLE_THREAD_P): Likewise.
7682         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7683         (SINGLE_THREAD_P): Likewise.
7685         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7686         value directly.
7688 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7690         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7691         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7693         * pthread_create.c (start_thread): setjmp is expected to return 0.
7695         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7696         (THREAD_GETMEM_NC): Likewise.
7698 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7700         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7701         and the size of the stack which must be allocated is a multiple,
7702         allocate one more page.
7703         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7704         MULTI_PAGE_ALIASING.
7706 2003-03-13  Roland McGrath  <roland@redhat.com>
7708         * pthread_create.c (start_thread): Set EXITING_BIT after the
7709         event-reporting (and destructors), not before.
7711 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7713         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7714         lll_futex_wake): Declare register variables as long int instead of
7715         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7716         Make syscall arguments clobbered by the syscall.
7717         (lll_futex_wait): Define using lll_futex_timed_wait.
7719         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7720         to void *.
7722         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7723         PPID if [! NDEBUG].
7725         * allocatestack.c (nptl_ncreated): Only declare if
7726         COLORING_INCREMENT != 0.
7728         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7729         (__libc_enable_asynccancel_2): Remove prototype.
7731         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7732         ctid to match kernel.
7734 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7736         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7737         libc_multiple_threads.
7738         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7739         __libc_multiple_threads to...
7740         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7742         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7743         versioning.
7744         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7745         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7747         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7748         (__pthread_once_internal): Define.
7750         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7751         macros instead of .symver directly.
7752         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7753         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7755         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7756         * sysdeps/x86_64/tcb-offsets.sym: New file.
7757         * sysdeps/x86_64/Makefile: New file.
7759         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7760         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7761         to access own pthread_t in TCB.
7762         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7763         Likewise.
7764         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7765         Likewise.
7766         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7768 2003-03-12  Roland McGrath  <roland@redhat.com>
7770         * pthread-errnos.sym: New file.
7771         * Makefile (gen-as-const-headers): New variable, list that file.
7772         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7773         header <pthread-errnos.h> instead of defining errno values here.
7774         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7775         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7776         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7777         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7778         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7779         Likewise.
7780         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7781         Likewise.
7782         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7784         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7785         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7786         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7787         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7788         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7789         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7791         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7792         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7793         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7794         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7795         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7796         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7797         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7798         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7799         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7800         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7801         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7802         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7803         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7804         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7805         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7806         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7807         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7808         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7810         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7811         CLONE_CHILD_SETTID worked.
7813 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7815         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7816         file.
7817         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7818         file.
7820         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7821         (pthread_cond_t): Add padding.
7823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7824         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7825         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7828         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7829         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7830         (__pthread_rwlock_timedrdlock): Likewise.
7831         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7832         (__pthread_rwlock_wrlock): Likewise.
7833         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7834         (__pthread_rwlock_rdlock): Likewise.
7836         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7839         result of lock re-get if it fails.
7841 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7843         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7844         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7845         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7848         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7849         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7850         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7851         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7852         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7854         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7855         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7857         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7858         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7859         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7860         (create_thread): Likewise.
7861         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7862         * init.c (__pthread_initialize_minimal_internal): Initialize
7863         __libc_multiple_threads_ptr if necessary.
7864         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7865         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7866         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7867         __libc_multiple_threads.
7868         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7869         necessary.
7871         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7872         (THREAD_SETMEM_NC): Likewise.
7874         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7875         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7876         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7877         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7879         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7880         Eliminate one entire instruction.
7882         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7883         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7884         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7885         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7886         instead of __pthread_enable_asynccancel.
7887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7888         (__pthread_cond_wait): Likewise.
7889         * sysdeps/pthread/pthread_cond_timedwait.c
7890         (__pthread_cond_timedwait): Likewise.
7891         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7894         (__condvar_cleanup): Wake up all waiters in case we got signaled
7895         after being woken up but before disabling asynchronous
7896         cancellation.
7897         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7898         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7899         (__condvar_cleanup): Likewise.
7901         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7902         Make it an error if architecture has no #if case.  Add x86-64.
7904         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7905         pt-initfini.s generation.
7907         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7908         (TLS_INIT_TP): Fix typo.
7910 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7912         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7913         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7915         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7916         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7917         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7918         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7919         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7920         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7921         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7922         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7924 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7926         * sysdeps/pthread/pthread_cond_timedwait.c
7927         (__pthread_cond_timedwait): Return the result of the final
7928         locking.  If it succeeds, the regular function return value.
7930         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7931         Return result of the final locking.
7932         * version.c (__nptl_main): Work around problems with the strange
7933         INTERNAL_SYSCALL macro on ppc32.
7934         * init.c (__pthread_initialize_minimal_internal): Unblock
7935         SIGCANCEL in case the parent blocked it.
7936         Reported by Paul Mackerras <paulus@samba.org>.
7938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7942 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7944         * sysdeps/pthread/pthread_cond_timedwait.c
7945         (__pthread_cond_timedwait): Unlock and fail if
7946         __pthread_mutex_unlock_internal failed.
7948         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7949         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7950         Use ARCH_CLONE.
7951         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7952         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7953         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7954         ALLOCATE_STACK): New macros.
7955         (TLS_TPADJ): New macro.
7956         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7957         (allocate_stack): Handle TLS_DTV_AT_TP and
7958         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7959         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7960         Don't set PD->self.
7961         * init.c [__ia64__] (__NR_set_tid_address): Define.
7963         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7964         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7965         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7966         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7967         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7968         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7969         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7970         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7971         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7972         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7973         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7974         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7975         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7976         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7977         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7978         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7979         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7980         * sysdeps/ia64/bits/atomic.h: New file.
7981         * sysdeps/ia64/Makefile: New file.
7982         * sysdeps/ia64/pthread_spin_init.c: New file.
7983         * sysdeps/ia64/pthread_spin_lock.c: New file.
7984         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7985         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7986         * sysdeps/ia64/pthreaddef.h: New file.
7987         * sysdeps/ia64/tcb-offsets.sym: New file.
7988         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7989         * sysdeps/ia64/tls.h: New file.
7991         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7992         to syscall instead of no arguments.
7994 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7996         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7997         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7998         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7999         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8001         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8002         unused code.
8004         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8006         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8007         lowlevelbarrier.sym.
8008         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8009         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8010         Include lowlevelbarrier.h and don't define offsets locally.
8011         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8013         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8014         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8015         (__lll_mutex_timedlock_wait): Likewise.
8016         (lll_mutex_lock): Adjust asm for that.
8017         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8018         (lll_lock): Adjust asm for operand order change.
8019         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8020         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8022         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8023         Reverse order of parameters.
8024         (__lll_timedwait_tid): Remove regparms attribute.
8025         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8026         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8028         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8029         (__lll_timedwait_tid): Remove one unnecessary instruction.
8031         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8032         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8033         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8034         lowlevelmutex.S.
8036         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8037         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8038         for NOT_IN_libc.
8039         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8040         lowlevellock.S.
8042         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8043         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8044         for libc.so.
8045         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8046         define LOCK here (if UP is not defined).  The actual code is in
8047         lowlevelmutex.S.
8049         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8050         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8051         __lll_timedwait_tid for libc.so.
8052         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8053         define LOCK here (if UP is not defined).  The actual code is in
8054         lowlevellock.S.
8056         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8057         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8058         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8059         instead of lowlevelsem.h.
8060         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8061         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8062         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8064         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8065         lowlevelrwlock.sym.
8066         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8067         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8068         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8070         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8071         register loading.
8072         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8073         last changed.  D'oh.
8075         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8077         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8078         of __libc_locking_needed.
8079         (lll_trylock): Initialize %eax to zero.
8081         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8082         pthread_cond_t definition.
8084 2003-03-10  Roland McGrath  <roland@redhat.com>
8086         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8087         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8088         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8089         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8090         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8092         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8093         Instead of setting PD->multiple_threads, set globals
8094         __pthread_multiple_threads and __libc_multiple_threads.
8095         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8096         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8097         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8099         * descr.h (struct pthread): Conditionalize first member on
8100         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8101         containing an anonymous tcbhead_t.  Move `list' member out.
8102         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8103         * allocatestack.c: Remove use of `header.data.' prefix.
8104         * pthread_create.c: Likewise.
8105         * init.c (__pthread_initialize_minimal_internal): Likewise.
8106         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8107         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8108         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8109         * sysdeps/x86_64/tls.h: Likewise.
8110         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8111         (SINGLE_THREAD_P): Likewise.
8112         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8113         (SINGLE_THREAD_P): Likewise.
8114         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8115         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8117 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8119         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8121         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8122         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8124         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8125         leftovers from the ia32 code.
8127         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8128         memory load.
8129         (clear_once_control): Don't load %esi.
8131         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8132         handling.
8134         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8136         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8137         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8139         * Makefile (tests): Add tst-cond10.
8140         * tst-cond10.c: New file.
8142 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8144         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8145         * tst-signal3.c (do_test): Likewise.
8146         * tst-sem5.c (do_test): Likewise.
8147         * tst-kill6.c (do_test): Likewise.
8148         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8150         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8151         of inc/dec.
8152         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8153         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8154         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8155         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8157         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8159         Likewise.
8160         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8161         Likewise.
8162         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8163         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8167         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8168         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8169         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8171         * allocatestack.c (allocate_stack): If mprotect() fails free the
8172         TLS memory.
8174 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8176         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8178         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8179         lll_wake_tid.  This was used only to work around kernel limits in
8180         the early days.
8181         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8182         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8183         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8184         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8186         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8187         (__pthread_initialize_minimal_internal): Change initialization of
8188         __static_tls_align_m1 appropriately.
8189         * pthreadP.h (__static_tls_align_m1): Renamed from
8190         __static_tls_align.
8191         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8192         instead of __static_tls_align-1.
8194 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8196         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8198         * pthread_create.c: Define __pthread_keys using nocommon
8199         attribute, not by placing it explicitly in bss.
8200         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8202         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8203         Use it in mmap call to allocate stacks.
8205         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8207         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8208         result of the thread function.
8210 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8212         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8213         version is just fine.
8215         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8216         (__pthread_child_handler): Renamed from pthread_child_handler,
8217         exported, and marked hidden.  Change all users.
8218         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8219         free __pthread_child_handler from child list.
8221 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8223         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8225         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8226         Fix handling of cancellation and failing pthread_mutex_unlock call.
8227         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8228         (__pthread_cond_wait): Likewise.
8230         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8231         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8232         lll_futex_timed_wait call.
8233         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8234         (pthread_rwlock_timedwrlock): Likewise.
8236         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8237         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8238         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8240         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8241         check of lll_futex_wake return value.
8243 2003-03-03  Roland McGrath  <roland@redhat.com>
8245         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8247         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8248         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8249         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8251 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8253         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8254         error for CPU clocks.
8256         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8257         _POSIX_MONOTONIC_CLOCK.
8258         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8260         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8261         recent kernels.
8263 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8265         * descr.h (struct pthread): Move cleanup field to the front.
8267 2003-03-01  Roland McGrath  <roland@redhat.com>
8269         * sem_open.c (sem_open): Braino fix.
8271 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8273         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8274         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8275         __pthread_cleanup_pop functionality.
8276         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8278         * descr.h (struct pthread): Move tid field to the front now that
8279         it is often used.
8281         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8282         (__lll_mutex_timedlock_wait): Remove.
8283         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8284         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8285         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8286         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8287         (lll_unlock_wake_cb): Don't save and restore %esi.
8288         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8289         %esi.
8290         (__lll_timedwait_tid): Add alignment.
8291         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8292         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8293         %esi.
8294         (__lll_timedwait_tid): Removed.
8295         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8296         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8297         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8298         (pthread_barrier_wait): Don't save, load, and restore %esi for
8299         last thread.
8300         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8301         (__pthread_cond_signal): Don't save, load, and restore %esi.
8302         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8303         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8304         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8305         Don't save, load, and restore %esi.
8307 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8309         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8310         Release lock before waking up the waiters.
8312         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8314         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8315         (reader_thread): Likewise.
8317         * sysdeps/pthread/pthread_rwlock_unlock.c
8318         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8319         to wake up readers if there are none.
8321         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8322         Release internal lock before wake threads.
8324 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8326         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8327         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8328         predefined.
8329         * tst-rwlock9.c: Likewise.
8330         * tst-rwlock10.c: New file.
8331         * tst-rwlock11.c: New file.
8333         * Makefile (tests): Add tst-dlsym1.
8334         * tst-dlsym1.c: New file.
8336         * init.c (__pthread_initialize_minimal_internal): Set
8337         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8338         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8340 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8342         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8344         * tst-cond2.c: Fix sychronization with child.
8346         * tst-rwlock8.c (reader_thread): Remove unused variable.
8348         * Makefile: Add rules to build and run tst-tls3.
8349         * tst-tls3.c: New file.
8350         * tst-tls3mod.c: New file.
8352         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8353         * tst-rwlock8.c: New file.
8354         * tst-rwlock9.c: New file.
8355         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8356         complete broken rwlock implementation.
8357         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8358         Likewise.
8359         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8360         Likewise.
8361         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8362         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8363         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8364         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8365         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8366         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8367         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8369 2003-02-23  Roland McGrath  <roland@redhat.com>
8371         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8373 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8375         * Makefile (tests): Add tst-context1.
8376         * tst-context1.c: New file.
8378         * Makefile (tests): Add tst-tls1 and tst-tls2.
8379         * tst-tls1.c: New file.
8380         * tst-tls2.c: New file.
8382         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8383         for failed cmpxchg.
8385         * pthread_create.c (start_thread): Set EXITING_BIT early.
8387         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8388         (THREAD_GETMEM_NC): Likewise.
8390 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8392         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8393         off 3 more bytes by using offset-less instructions when possible.
8395         * Makefile: Add dependency for $(objpfx)version.d.
8397         * eintr.c (eintr_source): Add unnecessary return but the compiler
8398         insists.
8400         * tst-kill3.c: Include <unistd.h>.
8402 2003-02-21  Roland McGrath  <roland@redhat.com>
8404         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8406 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8408         * Makefile (tests): Add tst-eintr1.
8409         (distribute): Add eintr.c.
8410         * tst-eintr1.c: New file.
8411         * eintr.c: New file.
8413         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8415         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8416         Disallow sending SIGCANCEL.
8418         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8419         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8420         * tst-kill1.c: New file.
8421         * tst-kill2.c: New file.
8422         * tst-kill3.c: New file.
8423         * tst-kill5.c: New file.
8424         * tst-kill6.c: New file.
8425         * tst-basic7.c: Renamed to...
8426         * tst-kill4.c: ...this.
8428 2003-02-21  Roland McGrath  <roland@redhat.com>
8430         * Makefile (install-lib-ldscripts): New variable.
8432 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8434         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8435         * pthread_cancel.c: Use INVALID_TD_P.
8436         * pthread_detach.c: Likewise.
8437         * pthread_getschedparam.c: Likewise.
8438         * pthread_setschedparam.c: Likewise.
8439         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8440         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8441         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8442         * pthread_timedjoin.c: Likewise.
8444         * tst-basic7.c: Include <signal.h>.
8446         * pthread_join.c (pthread_join): Limited checking for invalid
8447         descriptors.
8448         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8450 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8452         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8453         beginning of the loop.  Clear the entire first block of TSD.
8454         * Makefile (tests): Add tst-key4.
8455         * tst-key4.c: New file.
8457 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8459         * Makefile (tests): Add tst-basic7.
8460         * tst-basic7.c: New file.
8462         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8463         Add some more __builtin_expect.
8465         * pthreadP.h: Define dummy version of DEBUGGING_P.
8467 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8469         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8470         _POSIX_THREAD_PRIORITY_SCHEDULING.
8471         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8472         _XOPEN_REALTIME_THREADS.
8473         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8475         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8476         kernel returns EINVAL for PID <= 0, work around it.
8478         * Makefile (tests): Add tst-signal5.
8479         * tst-signal5.c: New file.
8481         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8482         and LOGIN_NAME_MAX.
8484         * tst-cancel1.c (tf): Block all signals.
8486         * Makefile (tests): Add tst-basic6.
8487         * tst-basic6.c: New file.
8489         * tst-basic1.c: Add test for process ID.
8491         * Makefile (tests): Add tst-cancel10.
8492         * tst-cancel10.c: New file.
8494         * Makefile (tests): Add tst-signal4.
8495         * tst-signal4.c: New file.
8497         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8498         __sigismember instead of sigismember.  Add __builtin_expect.
8500 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8502         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8503         pthread_setcancelstate, and pthread_rwlock_setpshared.
8505         * tst-cancel7.c (do_test): Make sure the pid file exists before
8506         canceling the thread.
8508         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8509         pthread_rwlock_timedrdlock tests.
8510         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8512         Check for invalid tv_nsec field.
8513         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8514         Likewise.
8516         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8517         recursive mutex of overflow.
8519         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8521         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8522         going into an endless loop.
8523         * Makefile (tests): Add tst-cancel9.
8524         * tst-cancel9.c: New file.
8526         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8528 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8530         * tst-mutex5.c (do_test): Add more timedlock tests.
8532         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8533         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8535         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8536         use INLINE_SYSCALL.  Error number is returned, not -1.
8538         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8539         and __deallocate_stack with internal_function.
8540         * pthread_create.c: Adjust definitions appropriately.
8541         * allocatestack.c: Likewise.
8543         * pthread_join.c: Add one more __builtin_expect.
8544         * pthread_timedjoin.c: Likewise.
8546         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8547         not data of sequence number does not match.
8548         Add one __builtin_expect.
8550         * Makefile (tests): Add tst-clock1.
8551         * tst-clock1.c: New file.
8553         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8554         negative arguments.
8555         * Makefile (tests): Add tst-basic5.
8556         * tst-basic5.c: New file.
8558 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8560         * Makefile (tests): Add tst-basic4.
8561         * tst-basic4.c: New file.
8563         * pthreadP.h: Add declaraction for __nptl_nthreads.
8564         * pthread_create.c: Define __nptl_nthreads
8565         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8566         after thread is done.  If then zero, call exit(0).
8567         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8568         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8569         * init.c (pthread_functions): Initialize ptr_nthreads.
8570         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8571         (__reclaim_stacks): Decrement __nptl_nthreads.
8572         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8573         Define.
8574         * Makefile (tests): Add tst-basic3.
8575         * tst-basic3.c: New file.
8577         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8578         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8579         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8580         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8581         if asynchronous canceling is enabled.
8582         * pthread_join.c (pthread_join): When recognizing circular joins,
8583         take into account the other thread might be already canceled.
8584         * Makefile (tests): Add tst-join5.
8585         * tst-join5.c: New file.
8587         * Makefile (tests): Add tst-join4.
8588         * tst-join4.c: New file.
8590 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8592         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8594 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8596         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8597         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8598         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8599         warning.
8600         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8601         to avoid warning.
8602         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8603         error if lll_futex_wake failed.
8605 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8608         handling of cancellation and failung pthread_mutex_unlock call.
8609         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8610         * Makefile (tests): Add tst-cond8 and tst-cond9.
8611         * tst-cond8.c: New file.
8612         * tst-cond9.c: New file.
8614         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8616         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8617         non-standard initializers with __USE_GNU.
8619         * Makefile (tests): Add tst-cleanup3.
8620         * tst-cleanup3.c: New file.
8622 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8624         * Makefile (tests): Add tst-attr1 and tst-attr2.
8625         * tst-attr1.c: New file.
8626         * tst-attr2.c: New file.
8628         * Makefile: Add rules to build and run tst-atfork2 test.
8629         * tst-atfork2.c: New file.
8630         * tst-atfork2mod.c: New file.
8632         * sysdeps/unix/sysv/linux/unregister-atfork.c
8633         (__unregister_atfork): Free the memory allocated for the handlers
8634         after removing them from the lists.
8636         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8637         cleanup function.
8639         * tst-atfork1.c (do_test): Wait for the child we forked.
8640         Report error in child.
8642         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8644         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8646 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8648         * Makefile (tests): Add tst-cancel8.
8649         * tst-cancel8.c: New file.
8651         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8652         clearing of control variable.
8653         * Makefile (tests): Add tst-once3 and tst-once4.
8654         * tst-once3.c: New file.
8655         * tst-once4.c: New file.
8657 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8659         * sysdeps/sh/Makefile: New file.
8660         * sysdeps/sh/bits/atomic.h: New file.
8661         * sysdeps/sh/pthread_spin_init.c: New file.
8662         * sysdeps/sh/pthread_spin_lock.c: New file.
8663         * sysdeps/sh/pthread_spin_trylock.S: New file.
8664         * sysdeps/sh/pthread_spin_unlock.S: New file.
8665         * sysdeps/sh/pthreaddef.h: New file.
8666         * sysdeps/sh/tcb-offsets.sym: New file.
8667         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8668         * sysdeps/sh/tls.h: New file.
8669         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8670         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8671         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8672         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8673         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8674         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8675         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8676         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8677         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8678         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8679         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8680         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8681         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8682         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8683         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8684         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8685         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8686         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8687         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8688         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8689         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8690         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8691         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8692         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8693         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8694         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8695         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8696         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8697         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8698         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8700 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8702         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8703         according to POSIX.
8705         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8707 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8709         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8710         (TLS_GET_FS): New #define.
8711         (TLS_SET_FS): New #define.
8712         Correct value of __NR_set_thread_area.
8714         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8716 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8718         * Makefile (tests): Add tst-popen1.
8719         * tst-popen1.c: New file.
8721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8722         but inactive generalization.
8723         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8725         Minor optimization, remove one instruction.
8726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8728 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8730         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8732 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8734         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8735         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8736         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8737         * sysdeps/pthread/pthread_cond_signal.c: New file.
8738         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8739         * sysdeps/pthread/pthread_cond_wait.c: New file.
8740         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8741         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8742         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8743         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8744         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8745         * sysdeps/s390/Makefile: New file.
8746         * sysdeps/s390/bits/atomic.h: New file.
8747         * sysdeps/s390/pthread_spin_init.c: New file.
8748         * sysdeps/s390/pthread_spin_lock.c: New file.
8749         * sysdeps/s390/pthread_spin_trylock.c: New file.
8750         * sysdeps/s390/pthread_spin_unlock.c: New file.
8751         * sysdeps/s390/pthreaddef.h: New file.
8752         * sysdeps/s390/tcb-offsets.sym: New file.
8753         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8754         * sysdeps/s390/tls.h: New file.
8755         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8756         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8757         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8758         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8759         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8760         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8761         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8762         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8763         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8764         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8765         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8766         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8767         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8768         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8769         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8770         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8771         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8772         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8773         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8774         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8775         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8776         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8777         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8779 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8781         * atomic.h: Add a couple more default implementations.
8782         (atomic_compare_and_exchange_acq): Use
8783         __arch_compare_and_exchange_32_acq in return value definition.  It
8784         always exists.
8785         (atomic_bit_set): Renamed from atomic_set_bit.
8786         Add missing atomic_ prefixes.
8788         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8789         thread library is available, use correct value to mark initialized
8790         once variable.
8792 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8794         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8795         __sysconf to determine pagesize.
8797         * pthread_create.c: Include <atomic.h>.
8798         * allocatestack.c (allocate_stack): Implement coloring of the
8799         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8800         size minus one.  Adjust users.
8801         * sysdeps/i386/i686/Makefile: New file.
8803 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8805         * allocatestack.c: Improve comment throughout the file.
8807         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8808         (__lll_lock_wait): Add branch prediction.
8809         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8810         (__lll_lock_wait): Likewise.
8811         (lll_unlock_wake_cb): Removed.
8813 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8815         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8816         _POSIX_THREAD_PRIORITY_SCHEDULING.
8818 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8820         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8821         Fix return type of ptr___pthread_getspecific.
8823 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8825         * Makefile (tests): Add tst-umask1.
8826         (tst-umask1-ARGS): Define.
8827         * tst-umask1.c: New file.
8829 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8831         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8832         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8833         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8834         pthread_rwlock_unlock.
8835         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8836         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8837         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8838         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8839         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8840         New file.
8841         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8842         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8843         New file.
8844         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8845         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8846         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8847         New file.
8848         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8849         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8850         New file.
8851         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8852         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8853         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8854         New file.
8855         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8856         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8857         New file.
8858         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8860         * Makefile (libpthread-routines): Remove lowlevelcond and
8861         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8862         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8863         and pthread_cond_broadcast.
8864         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8865         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8866         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8867         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8868         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8869         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8870         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8871         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8872         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8873         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8875         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8878         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8879         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8880         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8881         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8882         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8883         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8884         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8885         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8886         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8887         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8888         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8889         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8890         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8891         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8892         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8893         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8894         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8896         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8897         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8898         of the code is moved to ...
8899         * sysdeps/pthread/createthread.c: ...here.  New file.
8901 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8903         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8904         (__new_sem_post): Clear %eax before returning.
8905         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8907         * Makefile (tests): Add tst-cleanup2.
8908         * tst-cleanup2.c: New file.
8910         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8911         Interpret first parameter correctly.
8913 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8915         * Makefile (headers): Add bits/semaphore.h.
8917 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8919         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8920         if not SHARED.
8922 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8924         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8925         must be used and mapping failed.
8926         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8928         * Makefile (CFLAGS-pthread_self.os): Define this, not
8929         CFLAGS-pthread_self.c.
8931 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8933         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8934         lll_unlock_wake_cb.
8936         * Makefile (libpthread-routines): Add version.  Add rules to build
8937         version.os and banner.h.
8938         * version.c: New file.
8940 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8942         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8943         the alias unconditional.
8944         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8946 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8948         * Makefile (CFLAGS-pthread_self.c): New definition.
8950 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8952         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8953         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8954         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8955         * init.c (__pthread_initialize_minimal_internal): Likewise.
8957 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8959         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8961         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8962         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8963         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8964         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8965         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8966         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8968 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8970         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8971         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8972         * tst-cancel-wrappers.sh: Remove all exceptions.
8974 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8976         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8977         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8979         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8980         Use __libc_pthread_functions array if SHARED.
8982         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8983         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8985         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8986         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8987         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8988         __libc_ptf_call instead of __libc_maybe_call.
8989         (PTF): New #define.
8990         (__libc_cleanup_region_start): Wrap function name with PTF call.
8991         (__libc_cleanup_region_end): Likewise.
8992         (__libc_cleanup_end): Likewise.
8994         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8995         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8996         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8997         * pthreadP.h: Add prototypes.
8999         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9000         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9001         __pthread_rwlock_unlock aliases.
9002         * pthreadP.h: Add prototypes for new aliases.
9004         * pthreadP.h (struct pthead_functions): Moved to...
9005         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9006         * init.c (pthread_functions): Add initializers for new elements.
9008         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9009         __pthread_cleanup_pop_restore aliases.
9010         * pthreadP.h: Add prototypes.
9012         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9013         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9014         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9015         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9016         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9017         * pthreadP.h: Adjust prototypes and callers.
9019 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9021         * Makefile (tests): Add tst-cancel7.
9022         (tst-cancel7-ARGS): New variable.
9023         * tst-cancel7.c: New file.
9025         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9026         around gcc defficiencies.
9027         * old_pthread_cond_signal.c: Likewise.
9028         * old_pthread_cond_timedwait.c: Likewise.
9029         * old_pthread_cond_wait.c: Likewise.
9031         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9033 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9035         * Makefile (tests): Add tst-cond7.
9036         * tst-cond7.c: New file.
9038         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9039         (condvar_cleanup): Get condvar address from the right place.
9041         * atomic.h: Correct definitions of atomic_full_barrier,
9042         atomic_read_barrier, atomic_write_barrier.
9044         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9045         race-free.
9046         * old_pthread_cond_signal.c: Likewise.
9047         * old_pthread_cond_timedwait.c: Likewise.
9048         * old_pthread_cond_wait.c: Likewise.
9050 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9052         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9054 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9056         * pthreadP.h (pthread_cond_2_0_t): New type.
9057         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9058         Use new type for the 2.0 condvar function prototypes.
9059         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9060         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9061         parameter.
9062         * old_pthread_cond_destroy.c: Likewise.
9063         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9064         * old_pthread_cond_signal.c: Likewise.
9065         * old_pthread_cond_timedwait.c: Likewise.
9066         * old_pthread_cond_wait.c: Likewise.
9068         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9069         (__pthread_cond_wait): Don't save cancellation mode and seq value
9070         in same location.
9072         * herrno.c (__h_errno_location): Don't define as weak.
9074 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9076         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9077         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9078         and pthread_cond_wait.
9079         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9080         Renamed to...
9081         (__pthread_cond_broadcast_2_0): ... this.
9082         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9083         Renamed to...
9084         (__pthread_cond_destroy_2_0): ... this.
9085         * old_pthread_cond_init.c (__old_pthread_cond_init):
9086         Renamed to...
9087         (__pthread_cond_init_2_0): ... this.
9088         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9089         Renamed to...
9090         (__pthread_cond_signal_2_0): ... this.
9091         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9092         Renamed to...
9093         (__pthread_cond_wait_2_0): ... this.
9094         * pthread_cond_destroy.c: Include shlib-compat.h.
9095         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9096         * pthread_cond_init.c: Include shlib-compat.h.
9097         (pthread_cond_init): Change strong_alias into versioned_symbol.
9098         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9099         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9100         fields.
9101         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9102         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9103         __pthread_cond_wait_2_0): New prototypes.
9104         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9105         __old_pthread_cond_init, __old_pthread_cond_signal,
9106         __old_pthread_cond_wait): Removed.
9107         * init.c: Include shlib-compat.h.
9108         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9109         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9110         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9111         ptr___pthread_cond_*_2_0 fields.
9112         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9113         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9115         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9116         LIBC_SIGACTION was not yet defined.
9117         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9118         [!defined LIBC_SIGACTION] (__sigaction): New function and
9119         libc_hidden_weak.
9120         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9121         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9123 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9125         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9127 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9129         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9130         New, larger type definition.
9131         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9132         implementation.
9133         * Versions [libpthread]: Add definitions for new pthread_cond_*
9134         interfaces for version GLIBC_2.3.2.
9135         * pthread_cond_init.c: Update initialization for new type definition.
9136         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9137         pthread_cond_timedwait, pthread_cond_signal, and
9138         pthread_cond_broadcast.  Add old_pthread_cond_init,
9139         old_pthread_cond_destroy, old_pthread_cond_wait,
9140         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9141         old_pthread_cond_broadcast.
9142         * old_pthread_cond_broadcast.c: New file.
9143         * old_pthread_cond_destroy.c: New file.
9144         * old_pthread_cond_init.c: New file.
9145         * old_pthread_cond_signal.c: New file.
9146         * old_pthread_cond_timedwait.c: New file.
9147         * old_pthread_cond_wait.c: New file.
9148         * pthreadP.h: Add prototypes for the compatibility interfaces.
9150         * pthread_cond_destroy.c: Don't include <errno.h>.
9152 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9154         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9155         unnecessary zero offset when addressing MUTEX.
9157 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9159         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9160         __register_atfork.
9161         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9162         for __register_atfork.
9164 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9166         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9167         instead of ASSEMBLER test macro.
9169         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9170         __libc_current_sigrtmax): Add libc_hidden_def.
9172         * sysdeps/pthread/list.h: Remove assert.h include.
9174 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9176         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9177         __pthread_initialize_minimal_internal not
9178         __pthread_initialize_minimal.
9180 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9182         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9183         __pthread_initialize_minimal as hidden.
9185         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9186         constructor.
9188 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9190         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9191         $(common-objpfx)format.lds, include that into the output script.
9192         Fix comment.
9193         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9195 2002-12-28  Andreas Jaeger  <aj@suse.de>
9197         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9198         nsec resolution changes.
9199         (xstat64_conv): Likewise.
9200         (xstat32_conv): Likewise.
9201         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9202         struct kernel_stat.
9203         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9204         structs stat and stat64.
9205         * time/time.h (__timespec_defined): Define for __USE_MISC.
9206         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9208 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9210         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9211         argument.
9212         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9213         (pthread_exit): Use strong_alias to avoid warnings.
9214         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9215         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9216         ptr___pthread_attr_init_2_*.
9217         * init.c (pthread_functions): Adjust.
9219 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9221         * forward.c: Make all functions available by default again.  It
9222         caused too much trouble.
9224         * pt-siglongjmp.c: Removed.
9226 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9228         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9229         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9230         * sysdeps/i386/Makefile: New file.
9231         * sysdeps/i386/tcb-offsets.sym: New file.
9232         * sysdeps/pthread/tcb-offsets.h: New file.
9233         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9234         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9236         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9237         __register_atfork...
9238         (GLIBC_2.3.2): ...here.
9240 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9242         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9243         pthread_attr_setstackaddr with __attribute_deprecated__.
9245 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9247         * pt-system.c (system): Remove cancellation handling.
9248         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9249         cancellation routines.
9251 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9253         * descr.h: Include <dl-sysdep.h>.
9254         (struct pthread): Move header.data.list to the back of the struct.
9255         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9256         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9257         (SYSINFO_OFFSEET): Likewise.
9259 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9261         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9262         Define.
9263         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9264         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9265         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9266         (USE_DL_SYSINFO): Undef.
9268 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9270         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9271         $(common-objpfx)libc.so.
9272         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9273         it is bigger than pipe buffer size even on arches with bigger
9274         page size.
9275         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9277 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9279         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9280         correct errno access for case that USE___THREAD is not defined.
9282 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9284         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9285         Patch by Marijn Ros <marijn@mad.scientist.com>.
9287 2002-12-22  Roland McGrath  <roland@redhat.com>
9289         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9291 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9293         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9295 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9297         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9298         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9299         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9301         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9302         of int $0x80.
9303         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9304         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9305         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9306         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9307         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9308         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9309         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9310         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9312         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9313         sysenter.
9314         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9316         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9318         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9319         in new TCB.
9320         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9321         that sysinfo is properly initialized.
9322         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9323         to 1 only for ld.so.
9325         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9326         RTLD_CORRECT_DYNAMIC_WEAK.
9328 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9330         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9331         Use return 0 as 6th argument to FORWARD4.
9332         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9334 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9336         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9337         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9338         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9339         (INIT_SYSINFO): New #define.
9340         (TLS_TP_INIT): Use INIT_SYSINFO.
9341         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9342         At test to make sure SYSINFO_OFFSET value is correct.
9343         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9345 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9347         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9348         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9349         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9350         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9351         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9352         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9353         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9355 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9357         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9358         macro instead of using int $0x80 directly.
9360         * sysdeps/pthread/bits/stdio-lock.h: New file.
9361         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9362         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9363         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9364         * Makefile (routines): Add libc-lowlevelmutex.
9366         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9367         __i686.get_pc_thunk.dx.
9369 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9371         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9372         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9373         ($(objpfx)tst-cancel-wrappers.out): New rule.
9374         * tst-cancel-wrappers.sh: New test.
9375         * tst-locale1.c: Include signal.h.
9376         (uselocale): Test static linking of __libc_current_sigrt*.
9378 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9380         * Makefile (tests): Add tst-cancel6.
9381         * tst-cancel6.c: New file
9383 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9385         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9386         Define meaningfully for assembler as well.
9387         * pthreadP.h (struct pthread_functions): Remove
9388         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9389         and ptr_pthread_attr_init_2_1 fields.
9390         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9391         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9392         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9393         (FORWARD3): Define using FORWARD4.
9394         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9395         versions.
9396         * pt-system.c: Remove duplicate stdlib.h include.
9398 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9400         * sem_init.c: Define sem_init@GLIBC_2.0.
9401         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9402         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9404         * flockfile.c: Moved to...
9405         * sysdeps/pthread/flockfile.c: ...here.  New file.
9406         * funlockfile.c: Moved to...
9407         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9408         * ftrylockfile.c: Moved to...
9409         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9411 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9413         * libc-cancellation.c: Guard both function with
9414         #if !defined NOT_IN_libc.
9415         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9416         automatically provided pthread wrappers.
9417         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9418         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9419         nor in libpthread.
9420         * pt-open.c: Removed.
9421         * pt-fcntl.c: Removed.
9422         * pt-fsync.c: Removed.
9423         * pt-lseek.c: Removed.
9424         * pt-msgrcv.c: Removed.
9425         * pt-msgsnd.c: Removed.
9426         * pt-msync.c: Removed.
9427         * pt-nanosleep.c: Removed.
9428         * pt-open64.c: Removed.
9429         * pt-pause.c: Removed.
9430         * pt-pread.c: Removed.
9431         * pt-pread64.c: Removed.
9432         * pt-pwrite.c: Removed.
9433         * pt-pwrite64.c: Removed.
9434         * pt-read.c: Removed.
9435         * pt-recv.c: Removed.
9436         * pt-recvfrom.c: Removed.
9437         * pt-recvmsg.c: Removed.
9438         * pt-send.c: Removed.
9439         * pt-sendto.c: Removed.
9440         * pt-sigtimedwait.c: Removed.
9441         * pt-sigwait.c: Removed.
9442         * pt-wait.c: Removed.
9443         * pt-waitpid.c: Removed.
9444         * pt-write.c: Removed.
9445         * pt-accept.c: Removed.
9446         * pt-close.c: Removed.
9447         * pt-connect.c: Removed.
9448         * pt-lseek64.c: Removed.
9449         * pt-sendmsg.c: Removed.
9450         * pt-tcdrain.c: Removed.
9452 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9454         * init.c (__pthread_initialize_minimal_internal): Renamed from
9455         __pthread_initialize_minimal.  Make old name an alias.  This
9456         converts a normal relocation into a relative relocation.
9458         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9460         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9461         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9462         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9463         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9464         pt-sigwaitinfo, pt-waitid, and pt-writev.
9465         * pt-creat.c: Removed.
9466         * pt-poll.c: Removed.
9467         * pt-pselect.c: Removed.
9468         * pt-readv.c: Removed.
9469         * pt-select.c: Removed.
9470         * pt-sigpause.c: Removed.
9471         * pt-sigsuspend.c: Removed.
9472         * pt-sigwaitinfo.c: Removed.
9473         * pt-waitid.c: Removed.
9474         * pt-writev.c: Removed.
9476         * init.c (pthread_functions): New variable.
9477         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9478         (or NULL) to __libc_pthread_init.
9479         * forward.c: Rewrite to use __libc:pthread_functions array to get
9480         function addresses.
9481         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9482         prototype.
9483         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9484         Take new parameter.  Copy content of variable pointed to by it
9485         to __libc_pthread_init.
9487         * pthreadP.h (struct pthread_functions): New type.
9488         (__libc_pthread_init): Declare.
9490         * pthread_attr_destroy.c: Add namespace protected alias.
9491         * pthread_attr_getdetachstate.c: Likewise.
9492         * pthread_attr_getinheritsched.c: Likewise.
9493         * pthread_attr_getschedparam.c: Likewise.
9494         * pthread_attr_getschedpolicy.c: Likewise.
9495         * pthread_attr_getscope.c: Likewise.
9496         * pthread_attr_setdetachstate.c: Likewise.
9497         * pthread_attr_setinheritsched.c: Likewise.
9498         * pthread_attr_setschedparam.c: Likewise.
9499         * pthread_attr_setschedpolicy.c: Likewise.
9500         * pthread_attr_setscope.c: Likewise.
9501         * pthread_cond_broadcast.c: Likewise.
9502         * pthread_cond_destroy.c: Likewise.
9503         * pthread_cond_init.c: Likewise.
9504         * pthread_cond_signal.c: Likewise.
9505         * pthread_cond_wait.c: Likewise.
9506         * pthread_condattr_destroy.c: Likewise.
9507         * pthread_condattr_init.c: Likewise.
9508         * pthread_equal.c: Likewise.
9509         * pthread_exit.c: Likewise.
9510         * pthread_getschedparam.c: Likewise.
9511         * pthread_self.c: Likewise.
9512         * pthread_setcancelstate.c: Likewise.
9513         * pthread_setschedparam.c: Likewise.
9514         * pthread_mutex_destroy.c: Likewise.
9515         * pthread_mutex_init.c: Likewise.
9516         * pthreadP.h: Add prototypes for the aliases.
9518         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9519         multiple_threads member in correct TCB to 1.
9521         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9522         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9523         member of thread decriptor, otherwise return unconditionally 1.
9525 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9527         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9528         regular Linux version.  Remove file.
9529         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9530         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9531         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9532         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9533         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9534         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9535         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9536         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9537         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9538         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9539         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9540         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9541         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9542         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9543         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9544         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9545         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9546         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9547         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9548         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9549         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9550         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9551         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9552         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9553         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9554         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9555         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9556         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9557         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9558         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9560 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9562         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9563         * sysdeps/unix/sysv/linux/open.c: Removed.
9564         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9565         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9566         * sysdeps/unix/sysv/linux/msync.c: Removed.
9567         * sysdeps/unix/sysv/linux/read.c: Removed.
9568         * sysdeps/unix/sysv/linux/close.c: Removed.
9569         * sysdeps/unix/sysv/linux/creat.c: Removed.
9570         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9571         * sysdeps/unix/sysv/linux/pause.c: Removed.
9572         * sysdeps/unix/sysv/linux/select.c: Removed.
9573         * sysdeps/unix/sysv/linux/write.c: Removed.
9575 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9577         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9578         element in TCB to see whether locking is needed.
9580         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9581         MULTIPLE_THREADS_OFFSET value is correct.
9583         * sysdeps/unix/sysv/linux/close.c: New file.
9584         * sysdeps/unix/sysv/linux/connect.S: New file.
9585         * sysdeps/unix/sysv/linux/creat.c: New file.
9586         * sysdeps/unix/sysv/linux/fsync.c: New file.
9587         * sysdeps/unix/sysv/linux/llseek.c: New file.
9588         * sysdeps/unix/sysv/linux/lseek.c: New file.
9589         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9590         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9591         * sysdeps/unix/sysv/linux/msync.c: New file.
9592         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9593         * sysdeps/unix/sysv/linux/open.c: New file.
9594         * sysdeps/unix/sysv/linux/open64.c: New file.
9595         * sysdeps/unix/sysv/linux/pause.c: New file.
9596         * sysdeps/unix/sysv/linux/poll.c: New file.
9597         * sysdeps/unix/sysv/linux/pread.c: New file.
9598         * sysdeps/unix/sysv/linux/pread64.c: New file.
9599         * sysdeps/unix/sysv/linux/pselect.c: New file.
9600         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9601         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9602         * sysdeps/unix/sysv/linux/readv.c: New file.
9603         * sysdeps/unix/sysv/linux/recv.S: New file.
9604         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9605         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9606         * sysdeps/unix/sysv/linux/select.c: New file.
9607         * sysdeps/unix/sysv/linux/send.S: New file.
9608         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9609         * sysdeps/unix/sysv/linux/sendto.S: New file.
9610         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9611         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9612         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9613         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9614         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9615         * sysdeps/unix/sysv/linux/system.c: New file.
9616         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9617         * sysdeps/unix/sysv/linux/wait.c: New file.
9618         * sysdeps/unix/sysv/linux/waitid.c: New file.
9619         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9620         * sysdeps/unix/sysv/linux/writev.c: New file.
9621         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9623         * pt-readv.c: Fix comment.
9625 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9627         * tst-cleanup1.c: Include stdlib.h.
9629         * tst-cancel5.c: New test.
9630         * Makefile (tests): Add tst-cancel5.
9631         (tst-cancel5): Link against libc.so libpthread.so in that order.
9633 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9635         * forward.c (test_loaded): Prevent recursive calls.
9637         * Makefile (routines): Add libc-cancellation.
9638         * libc-cancellation.c: New file.
9639         * descr.h (struct pthread): Add multiple_threads field.
9640         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9641         new thread descriptor to 1.
9642         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9643         Initialize multiple_thread field after successful thread creation.
9644         * cancellation.c (__do_cancel): Move to pthreadP.h.
9645         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9646         (__pthread_disable_asynccancel): Add internal_function attribute.
9647         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9648         * pthread_setcancelstate.c: Likewise.
9649         * pthread_setcanceltype.c: Likewise.
9650         * pthread_exit.c: Likewise.
9651         * pthreadP.h (CANCELLATION_P): Likewise.
9652         (__do_cancel): Define as static inline.
9653         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9654         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9655         declarations.
9656         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9657         fields.  Define MULTIPLE_THREADS_OFFSET.
9658         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9659         declaration.
9660         * sysdeps/unix/sysv/linux/accept.S: New file.
9661         * sysdeps/unix/sysv/linux/read.c: New file.
9662         * sysdeps/unix/sysv/linux/write.c: New file.
9663         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9664         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9665         initialization of __libc_locking_needed.
9666         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9667         __libc_locking_needed, use multiple_threads field in TCB.
9668         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9670 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9672         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9673         version.
9674         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9676         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9677         access to __libc_locking_needed for PIC.
9679 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9681         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9682         declare for libc.so.
9683         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9684         expression.
9685         (__libc_lock_lock): Put into statement expression.
9686         (__libc_lock_unlock): Remove trailing semicolon.
9687         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9689 2002-12-12  Roland McGrath  <roland@redhat.com>
9691         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9692         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9694 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9696         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9697         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9698         Initialize __libc_locking_needed.
9699         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9700         instead of __register_pthread_fork_handler.
9701         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9702         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9703         fork-gen with libc_pthread_init.
9704         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9705         of __register_pthread_fork_handler.
9706         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9707         of __register_pthread_fork_handler.
9708         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9709         __libc_locking_needed to determine whether lock prefix can be avoided.
9710         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9712 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9714         * Makefile (tests): Add tst-cleanup1.
9715         * tst-cleanup1.c: New file.
9716         * cancellation.c (__cleanup_thread): Removed.
9717         (__do_cancel): Remove call to __cleanup_thread.
9718         * pthreadP.h: Remove __cleanup_thread prorotype.
9720         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9721         Remember function and argument even if cancellation handler
9722         function is not available.
9723         (__libc_cleanup_region_end): Execute registered function directly if
9724         pthread functions are not available.
9725         (__libc_cleanup_end): Likewise.
9727         * init.c (__pthread_initialize_minimal): Fix initialization in
9728         static lib by preventing gcc from being too clever.
9730 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9732         * init.c (__pthread_initialize_minimal): Remove unneccesary
9733         sigaddset call.
9735         * Makefile (tests): We can run tst-locale2 now.
9737 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9739         * Versions: Remove duplicated sigwait entry.
9741 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9743         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9744         inside libpthread.
9746         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9748         * pthreadP.h: Declare __pthread_enable_asynccancel and
9749         __pthread_disable_asynccancel.
9750         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9751         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9752         * cancellation.c (__pthread_enable_asynccancel): New function.
9753         (__pthread_disable_asynccancel): New function.
9754         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9755         * pt-close.c: Likewise.
9756         * pt-connect.c: Likewise.
9757         * pt-creat.c: Likewise.
9758         * pt-fcntl.c: Likewise.
9759         * pt-fsync.c: Likewise.
9760         * pt-lseek.c: Likewise.
9761         * pt-lseek64.c: Likewise.
9762         * pt-msgrcv.c: Likewise.
9763         * pt-msgsnd.c: Likewise.
9764         * pt-msync.c: Likewise.
9765         * pt-nanosleep.c: Likewise.
9766         * pt-open.c: Likewise.
9767         * pt-open64.c: Likewise.
9768         * pt-pause.c: Likewise.
9769         * pt-poll.c: Likewise.
9770         * pt-pread.c: Likewise.
9771         * pt-pread64.c: Likewise.
9772         * pt-pselect.c: Likewise.
9773         * pt-pwrite.c: Likewise.
9774         * pt-pwrite64.c: Likewise.
9775         * pt-read.c: Likewise.
9776         * pt-readv.c: Likewise.
9777         * pt-recv.c: Likewise.
9778         * pt-recvfrom.c: Likewise.
9779         * pt-recvmsg.c: Likewise.
9780         * pt-select.c: Likewise.
9781         * pt-send.c: Likewise.
9782         * pt-sendmsg.c: Likewise.
9783         * pt-sendto.c: Likewise.
9784         * pt-sigpause.c: Likewise.
9785         * pt-sigsuspend.c: Likewise.
9786         * pt-sigtimedwait.c: Likewise.
9787         * pt-sigwait.c: Likewise.
9788         * pt-sigwaitinfo.c: Likewise.
9789         * pt-system.c: Likewise.
9790         * pt-tcdrain.c: Likewise.
9791         * pt-wait.c: Likewise.
9792         * pt-waitid.c: Likewise.
9793         * pt-waitpid.c: Likewise.
9794         * pt-write.c: Likewise.
9795         * pt-writev.c: Likewise.
9796         * pthread_join.c: Likewise.
9797         * pthread_timedjoin.c: Likewise.
9799         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9800         (__xpg_sigpause): New function.
9801         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9803 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9805         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9807         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9808         _GI_pthread_cleanup_pop to pthreadP.h.
9810         * ftrylockfile.c: Use _IO_lock_trylock instead of
9811         pthread_mutex_trylock.
9813         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9814         (CANCEL_RESET): Likewise.
9815         (__pthread_setcanceltype_): Declare.
9816         (__pthread_mutex_lock_internal): Declare.
9817         (__pthread_mutex_unlock_internal): Declare.
9818         (__pthread_once_internal): Declare.
9819         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9820         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9822         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9823         and pthread_mutex_unlock.
9824         * pthread_cond_wait.c: Likewise.
9825         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9826         * pthread_mutex_unlock.c: Likewise.
9828         * pthread_setcanceltype.c: Add additional alias
9829         __pthread_setcanceltype.
9831         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9832         * sem_open.c (sem_open): Likewise.
9833         Use __libc_open, __libc_write, and __libc_close instead of
9834         open, write, and close respectively.
9836         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9837         Rewrite as statement expression since it must return a value.
9839         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9840         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9841         __pthread_kill.
9843         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9844         alias __pthread_once_internal.
9846         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9848 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9850         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9851         * tst-stdio1.c: New file.
9852         * tst-stdio2.c: New file.
9854         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9856         * Makefile (tests): Comment out tst-locale2 for now.
9857         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9859         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9860         -D_IO_MTSAFE_IO.
9861         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9862         Use _IO_lock_init instead of explicit assignment.
9864         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9865         Define __libc_lock_* and __libc_lock_recursive macros with
9866         lowlevellock macros, not pthread mutexes.
9868         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9869         of pthread_mutex_lock.
9870         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9871         instead of pthread_mutex_unlock.
9873 2002-12-06  Roland McGrath  <roland@redhat.com>
9875         * allocatestack.c (__stack_user): Use uninitialized defn.
9876         * init.c (__pthread_initialize_minimal): Initialize it here.
9878 2002-12-05  Roland McGrath  <roland@redhat.com>
9880         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9881         string.
9882         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9884         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9885         missing & here too.
9887 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9889         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9890         lowlevellock.
9891         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9892         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9893         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9894         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9895         for __libc_lock_* macros.
9896         * Makefile (routines): Add libc-lowlevellock.
9898 2002-10-09  Roland McGrath  <roland@redhat.com>
9900         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9901         Under [__PIC__], call the function via the pointer fetched for
9902         comparison rather than a call by name that uses the PLT.
9903         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9904         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9905         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9906         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9907         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9909 2002-12-04  Roland McGrath  <roland@redhat.com>
9911         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9913         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9914         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9916         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9918 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9920         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9921         a completely opaque, non-integer type.
9922         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9924 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9926         * sysdeps/i386/tls.h: Include stdlib.h.
9927         * sysdeps/x86_64/tls.h: Likewise.
9929 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9931         * Makefile (tests): Add tst-locale2.
9932         (tests-static): Likewise.
9933         * tst-locale2.c: New file.
9935         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9936         volatile and add memory clobbers to lock operations.
9938 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9940         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9941         * sysdeps/i386/i486/bits/atomic.h: New file.
9942         * sysdeps/i386/i586/bits/atomic.h: New file.
9943         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9944         include i486 version.
9945         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9946         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9947         Patch by Marijn Ros <marijn@mad.scientist.com>.
9949         * allocatestack.c (get_cached_stack): Don't crash if we first
9950         found a stack with a larger size then needed.
9951         Reported by Hui Huang <hui.huang@sun.com>.
9953         * Makefile (tests): Add tst-sysconf.
9954         * tst-sysconf.c: New file.
9956         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9957         PTHREAD_THREADS_MAX.
9959 2002-12-02  Roland McGrath  <roland@redhat.com>
9961         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9962         Declare using hidden_proto instead of attribute_hidden, so there are
9963         non-.hidden static symbols for gdb to find.
9964         (__pthread_keys): Likewise.
9965         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9966         * allocatestack.c (__stack_user): Likewise.
9967         * pthread_create.c (__pthread_keys): Likewise.
9968         (__nptl_threads_events, __nptl_last_event): Make these static instead
9969         of hidden.
9970         * pthread_key_create.c (__pthread_pthread_keys_max,
9971         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9973 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9975         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9976         statically.
9977         * tst-locale1.c: New file.
9979         * pthread_cond_timedwait.c: Include <stdlib.h>.
9981         * Makefile (tests): Add tst-fork2 and tst-fork3.
9982         * tst-fork2.c: New file.
9983         * tst-fork3.c: New file.
9985 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9987         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9989         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9990         require it to 200112L.
9992         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9993         instruction only if HAVE_CMOV is defined.
9994         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9996         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9998         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10000         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10002         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10004 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10006         * sysdeps/x86_64/bits/atomic.h: New file.
10008         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10009         16-bit operations.
10011         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10012         possible since gettid cannot fail.
10014         * sysdeps/x86_64/pthreaddef.h: New file.
10016         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10018         * sysdeps/x86_64/pthread_spin_init.c: New file.
10019         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10020         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10021         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10023         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10024         Add missing lock prefix.  Minute optimization.
10026         * tst-spin2.c (main): Also check successful trylock call.
10028         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10029         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10031         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10032         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10034         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10035         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10036         value in case of an error.  Add support for INTERNAL_SYSCALL.
10038         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10039         value in case of an error.
10041         * sysdeps/x86_64/tls.h: New file.
10043 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10045         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10046         takes the array member name and the index as parameters.
10047         (THREAD_SETMEM_NC): Likewise.
10048         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10049         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10050         interfaces.
10052         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10053         to decide which code to use.
10054         (THREAD_SETMEM_NC): Likewise.
10056         * allocatestack.c (queue_stack): Don't remove stack from list here.
10057         Do it in the caller.  Correct condition to prematurely terminate
10058         loop to free stacks.
10059         (__deallocate_stack): Remove stack from list here.
10061 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10063         * Makefile (tests): Add tst-stack1.
10064         * tst-stack1.c: New file.
10066         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10067         provided stack.
10069         * pthread_attr_getstack.c: Return bottom of the thread area.
10071 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10073         * Makefile (libpthread-routines): Add pt-allocrtsig and
10074         pthread_kill_other_threads.
10075         * pt-allocrtsig.c: New file.
10076         * pthread_kill_other_threads.c: New file.
10077         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10078         all three functions.
10079         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10080         allocrtsig.
10081         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10082         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10083         and __libc_allocate_rtsig_private.
10084         * Versions (libpthread): Export pthread_kill_other_threads_np,
10085         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10087 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10089         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10090         the end of the stack.  Adjust computations.
10091         When mprotect call fails dequeue stack and free it.
10092         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10093         attribute.
10094         * pthread_getattr_np.c: Likewise.
10096         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10097         surprises.
10099 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10101         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10102         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10104 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10106         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10107         * pthread_setspecific.c: Likewise.
10109 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10111         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10112         definitions.  Get them from the official place.
10113         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10115         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10116         Use new CLONE_ flags in clone() calls.
10118         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10119         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10121         * Versions: Add pthread_* functions for libc.
10122         * forward.c: New file.
10124         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10125         errno-loc.
10126         * herrno.c: New file.
10127         * res.c: New file.
10129         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10130         sem_trywait, and sem_timedwait.  Add herrno and res.
10131         * sem_init.c: Don't initialize lock and waiters members.
10132         * sem_open.c: Likewise.
10133         * sem_post.c: Removed.
10134         * sem_wait.c: Removed.
10135         * sem_trywait.c: Removed.
10136         * sem_timedwait.c: Removed.
10137         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10138         Includes full implementations of sem_post, sem_wait, sem_trywait,
10139         and sem_timedwait.
10140         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10141         for new implementation.
10142         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10143         and waiters fields.
10145         * tst-sem3.c: Improve error message.
10146         * tst-signal3.c: Likewise.
10148         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10149         to tell the kernel about the termination futex and to initialize tid
10150         member.  Don't initialize main_thread.
10151         * descr.h (struct pthread): Remove main_thread member.
10152         * cancelllation.c (__do_cancel): Remove code handling main thread.
10153         The main thread is not special anymore.
10155         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10156         size of the stacks to stack_cache_actsize.
10158         * pt-readv.c: Add missing "defined".
10159         * pt-sigwait.c: Likewise.
10160         * pt-writev.c: Likewise.
10162 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10164         * Versions: Export __connect from libpthread.
10165         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10167         * Makefile (libpthread-routines): Add pt-raise.
10168         * sysdeps/unix/sysv/linux/raise.c: New file.
10169         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10170         * sysdeps/generic/pt-raise.c: New file.
10172         * pthread_cond_init.c: Initialize all data elements of the condvar
10173         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10175         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10176         * pthread_create.c: Likewise.
10178         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10179         * tst-key1.c: New file.
10180         * tst-key2.c: New file.
10181         * tst-key3.c: New file.
10183         * Versions: Export pthread_detach for version GLIBC_2.0.
10184         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10186 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10188         * pthread_key_create.c: Terminate search after an unused key was found.
10189         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10191         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10192         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10194 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10196         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10197         dynamic lookup for errno in PIC.
10199         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10200         release the stack lock as soon as possible.
10201         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10202         the static TLS block.
10203         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10205         * cancellation.c: Renamed from cancelation.c.
10206         * Makefile: Adjust accordingly.
10207         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10208         * cleanup_defer.c: Use CANCELLATION_P.
10209         * pthread_testcancel.c: Likewise.
10210         * descr.h: Fix spelling in comments.
10211         * init.c: Likewise.
10212         * pthread_getattr_np.c: Likewise.
10213         * pthread_getschedparam.c: Likewise.
10214         * pthread_setschedparam.c: Likewise.
10215         * Versions: Likewise.
10217         * pt-pselect.c: New file.
10218         * Makefile (libpthread-routines): Add pt-pselect.
10219         * Versions: Add pselect.
10221         * tst-cancel4.c: New file.
10222         * Makefile (tests): Add tst-cancel4.
10224 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10226         * pthread_mutex_lock.c: Always record lock ownership.
10227         * pthread_mutex_timedlock.c: Likewise.
10228         * pthread_mutex_trylock.c: Likewise.
10230         * pt-readv.c: New file.
10231         * pt-writev.c: New file.
10232         * pt-creat.c: New file.
10233         * pt-msgrcv.c: New file.
10234         * pt-msgsnd.c: New file.
10235         * pt-poll.c: New file.
10236         * pt-select.c: New file.
10237         * pt-sigpause.c: New file.
10238         * pt-sigsuspend.c: New file.
10239         * pt-sigwait.c: New file.
10240         * pt-sigwaitinfo.c: New file.
10241         * pt-waitid.c: New file.
10242         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10243         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10244         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10245         * Versions: Add all the new functions.
10247         * tst-exit1.c: New file.
10248         * Makefile (tests): Add tst-exit1.
10250         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10252 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10254         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10256         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10257         call.  pthread_join is an official cancellation point.
10258         * pthread_timedjoin.c: Likewise.
10260         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10261         and the condvar's mutex are retrieved.
10262         * pthread_cond_timedwait.c: Likewise.
10263         Reported by dice@saros.East.Sun.COM.
10265 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10267         * pthreadP.h: Cut out all type definitions and move them...
10268         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10269         * pthreadP.h: Include <internaltypes.h>.
10271         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10272         performance tweaks.
10274         * sem_trywait.c: Shuffle #includes around to get right order.
10275         * sem_timedwait.c: Likewise.
10276         * sem_post.c: Likewise.
10277         * sem_wait.c: Likewise.
10279         * nptl 0.3 released.
10281         * Makefile (tests): Add tst-signal3.
10282         * tst-signal3.c: New file.
10284 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10286         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10287         the asms modify the sem object.
10288         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10290         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10291         the actual members.
10292         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10293         * semaphoreP.h: Include pthreadP.h.
10294         * sem_getvalue.c: Adjust to sem_t change.
10295         * sem_init.c: Likewise.
10296         * sem_open.c: Likewise.
10297         * sem_post.c: Likewise.
10298         * sem_timedwait.c: Likewise.
10299         * sem_trywait.c: Likewise.
10300         * sem_wait.c: Likewise.
10302 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10304         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10305         * tst-basic2.c: New file.
10306         * tst-exec1.c: New file.
10307         * tst-exec2.c: New file.
10308         * tst-exec3.c: New file.
10310         * tst-fork1.c: Remove extra */.
10312         * nptl 0.2 released.  The API for IA-32 is complete.