* sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
[glibc.git] / nptl / ChangeLog
blobec834340dcc246a928571deb38c302ae6d5874ae
1 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
4         parameter.  Passed it as permission to mmap.
5         * allocatestack.c (allocate_stack): Pass prot as second parameter
6         to ARCH_RETRY_MMAP.
8 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
10         * tst-basic7.c: Allocate memory for the stack.
12         [BZ #5465]
13         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
14         (__pthread_cond_timedwait): Don't use VDSO.
15         Patch by Michal Januszewski.
17 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
19         [BZ #5455]
20         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
21         Allow label before pthread_cleanup_pop.
22         (pthread_cleanup_pop_restore_np): Likewise.
24 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
26         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
27         Store 2 before returning ETIMEDOUT.
29 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
31         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
32         Store 2 before returning ETIMEDOUT.
33         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
34         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
35         (__lll_lock_wait_private): Optimize.
36         (__lll_lock_wait): Likewise.
38 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
40         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
41         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
42         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
44 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
46         [BZ #5240]
47         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
48         If we time out, try one last time to lock the futex to avoid
49         losing a wakeup signal.
50         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
51         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
53         [BZ #5245]
54         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
55         if necessary.
57 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
59         [BZ #5245]
60         * allocatestack.c (allocate_stack): Change ENOMEM error in case
61         mmap failed to EAGAIN.
62         * Makefile (tests): Add tst-basic7.
63         * tst-basic7.c: New file.
65 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
67         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
68         Use __linkin_atfork.
70 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
72         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
73         missing line continuations.
74         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
75         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
77 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
79         [BZ #5220]
80         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
81         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
82         (struct timer): Add next element.
83         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
84         enqueue timer structure into __active_timer_sigev_thread list.
85         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
86         remove timer struct from __active_timer_sigev_thread.
87         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
88         Before using timer structure make sure it is still on the
89         __active_timer_sigev_thread list.  Keep lock until done.
90         Define __active_timer_sigev_thread and
91         __active_timer_sigev_thread_lock.
93 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
95         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
96         Redefine thread_atfork for use of ATFORK_MEM.
97         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
98         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
99         function.
100         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
101         Use atomic operation when removing first element of list.
103 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
105         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
106         routine instead of an alias to __new_sem_post.
108 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
110         * init.c (__pthread_initialize_minimal): Initialize word to appease
111         valgrind.
113 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
115         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
116         libc.so just clear NAME.
117         (__libc_rwlock_fini): Nop inside of libc.so.
118         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
119         all zeros.
121 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
124         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
125         unlocking failed.
126         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
128 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
130         [BZ #4938]
131         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
132         reclaimed stack if necessary.
133         * Makefile (tests): Add tst-tsd6.
134         * tst-tsd6.c: New file.
136 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
138         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
139         Add private argument.
141 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
143         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
144         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
146 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
148         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
149         (__lll_robust_timedlock): Pass private as last argument to
150         __lll_robust_timedlock_wait.
151         (__lll_unlock): Fix a pasto.
153 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
155         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
156         sparc_old_sem): New structs.
157         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
158         (__sem_wait_cleanup): New function.
159         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
160         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
161         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
162         lll_futex_wait.
163         (__old_sem_wait): New function.
164         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
165         nptl/sysdeps/unix/sysv/linux/sparc version.
166         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
167         Likewise.
168         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
169         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
170         (__new_sem_trywait): Use sparc_old_sem structure.
171         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
172         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
173         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
174         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
175         lll_futex_timed_wait.
176         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
177         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
178         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
179         lll_futex_wake.
180         (__old_sem_post): New function.
181         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
182         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
183         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
184         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
185         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
186         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
188 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
190         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
191         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
192         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
193         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
194         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
195         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
196         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
197         Use FUTEX_WAKE_OP.
198         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
199         kernel-features.h and tcb-offsets.h.
200         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
201         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
202         process private.
203         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
204         tcb-offsets.h.
205         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
206         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
207         process private.
208         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
209         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
210         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
211         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
213         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
216 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
218         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
219         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
220         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
221         lll_futex_timed_wait.
223         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
224         __lll_robust_unlock): Rewrite as macros instead of inline functions.
225         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
226         __lll_robust_unlock, __lll_wait_tid): Likewise.
228 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
230         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
231         Fix a pasto.
232         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
233         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
234         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
235         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
237         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
238         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
239         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
240         kernel-features.h.
241         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
242         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
243         process private.  Switch DW_CFA_advance_loc1 and some
244         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
246         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
247         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
248         process private.  Switch DW_CFA_advance_loc{1,2} and some
249         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
251         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
252         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
253         Likewise.
254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
255         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
257         Likewise.
258         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
259         (__pthread_cond_broadcast): Compare %r8 instead of
260         dep_mutex-cond_*(%rdi) with $-1.
261         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
262         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
263         of oring.
265 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
267         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
269 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
271         * allocatestack.c: Include kernel-features.h.
272         * pthread_create.c: Likewise.
273         * pthread_mutex_init.c: Likewise.
274         * init.c: Likewise.
275         * pthread_cond_timedwait.c: Likewise.
276         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
277         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
278         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
279         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
280         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
282         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
283         Likewise.
284         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
285         Likewise.
286         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
287         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
288         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
289         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
291 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
293         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
294         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
295         byte elements.  One of them is the new __shared element.
296         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
297         adjust names of other padding elements.
298         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
299         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
300         byte elements.  One of them is the new __shared element.
301         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
302         adjust names of other padding elements.
303         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
304         Renamed __pad1 element to __shared, adjust names of other padding
305         elements.
306         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
307         (pthread_rwlock_t): Likewise.
308         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
309         typo.
311 2007-08-09  Anton Blanchard  <anton@samba.org>
313         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
315 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
317         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
318         <kernel-features.h>.
319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
321 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
323         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
324         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
325         dealing with robust mutexes.
326         * pthread_mutex_timedlock.c: Likewise.
327         * pthread_mutex_trylock.c: Likewise.
328         * pthread_mutex_unlock.c: Likewise.
329         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
331 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
333         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
334         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
335         (PTHREAD_MUTEX_PSHARED): Define.
336         * pthread_mutex_init.c (__pthread_mutex_init): Set
337         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
338         mutexes.
339         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
340         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
341         as second argument to lll_lock.
342         (LLL_MUTEX_TRYLOCK): Take mutex as argument
343         instead of its __data.__lock field.
344         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
345         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
346         to lll_robust_lock.
347         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
348         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
349         instead of mutex->__data.__kind directly, pass
350         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
351         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
352         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
353         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
354         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
355         to lll_timedlock, lll_robust_timedlock, lll_unlock and
356         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
357         of mutex->__data.__kind directly.
358         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
359         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
360         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
361         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
362         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
363         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
364         and lll_futex_wake.
365         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
366         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
367         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
368         directly.
369         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
370         Take mutex as argument instead of its __data.__lock field, pass
371         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
372         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
373         __data.__lock field.
374         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
375         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
376         to lll_robust_cond_lock.
377         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
378         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
379         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
380         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
381         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
382         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
383         lll_futex_wait.
384         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
385         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
386         lll_futex_wake.
387         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
388         pshared variable, pass it to lll_lock, lll_unlock,
389         lll_futex_timedwait and lll_futex_wake.
390         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
391         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
392         and lll_futex_wake.
393         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
394         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
395         macro.
396         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
397         lll_futex_wake_unlock): Likewise.
398         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
399         Likewise.
400         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
401         lll_futex_wake_unlock): Likewise.
402         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
403         Likewise.
404         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
405         lll_futex_wake_unlock): Likewise.
406         (lll_futex_wake): Fix a typo.
407         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
409         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
410         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
411         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
413         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
414         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
415         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
416         (__pthread_cond_timedwait): Likewise.
417         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
418         (__condvar_cleanup, __pthread_cond_wait): Likewise.
420 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
422         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
423         Don't use CGOTSETUP and CGOTRESTORE macros.
424         (CGOTSETUP, CGOTRESTORE): Remove.
425         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
426         @local symbol.
428 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
430         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
431         definitions for private futexes.
432         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
433         kernel-features.h and lowlevellock.h.  Use private futexes if
434         they are available.
435         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
436         (__lll_mutex_lock_wait): Rename to
437         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
438         (__lll_mutex_timedlock_wait): Rename to ...
439         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
440         Don't compile in for libc.so.
441         (__lll_mutex_unlock_wake): Rename to ...
442         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
443         (__lll_timedwait_tid): Use __NR_gettimeofday.
444         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
445         the header from assembler.  Renamed all lll_mutex_* resp.
446         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
447         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
448         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
449         Define.
450         (__lll_lock_wait_private): Add prototype.
451         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
452         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
453         __lll_unlock_wake): Likewise.
454         (lll_lock): Add private argument.  Call __lll_lock_wait_private
455         if private is constant LLL_PRIVATE.
456         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
457         lll_timedlock, lll_robust_timedlock): Add private argument.
458         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
459         if private is constant LLL_PRIVATE.
460         (lll_robust_unlock, lll_robust_dead): Add private argument.
461         (lll_lock_t): Remove.
462         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
463         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
464         lll_cond_wake, lll_cond_broadcast): Remove.
465         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
466         kernel-features.h and lowlevellock.h.
467         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
468         (LOAD_FUTEX_WAIT): Define.
469         (__lll_robust_mutex_lock_wait): Rename to ...
470         (__lll_robust_lock_wait): ... this.  Add private argument.
471         Use LOAD_FUTEX_WAIT macro.
472         (__lll_robust_mutex_timedlock_wait): Rename to ...
473         (__lll_robust_timedlock_wait): ... this.    Add private argument.
474         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
475         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
476         lowlevellock.h.
477         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
478         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
479         __lll_mutex_{lock,unlock}_*.
480         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
481         lowlevellock.h and pthread-errnos.h.
482         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
483         FUTEX_CMP_REQUEUE, EINVAL): Remove.
484         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
485         __lll_mutex_{lock,unlock}_*.
486         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
487         lowlevellock.h and pthread-errnos.h.
488         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
489         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
490         __lll_mutex_{lock,unlock}_*.
491         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
492         lowlevellock.h.
493         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
494         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
495         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
496         (__condvar_tw_cleanup): Likewise.
497         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
498         lowlevellock.h.
499         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
500         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
501         __lll_mutex_{lock,unlock}_*.
502         ( __condvar_w_cleanup): Likewise.
503         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
504         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
505         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
506         lowlevellock.h.
507         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
508         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
509         __lll_mutex_{lock,unlock}_*.
510         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
511         lowlevellock.h.
512         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
513         FUTEX_PRIVATE_FLAG): Remove.
514         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
515         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
516         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
517         lowlevellock.h.
518         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
519         FUTEX_PRIVATE_FLAG): Remove.
520         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
521         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
522         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
523         lowlevellock.h.
524         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
525         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
526         __lll_mutex_{lock,unlock}_*.
527         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
528         lowlevellock.h.
529         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
530         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
531         __lll_mutex_{lock,unlock}_*.
532         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
533         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
534         (__new_sem_post): Use standard initial exec code sequences.
535         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
536         lowlevellock.h.
537         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
538         FUTEX_PRIVATE_FLAG): Remove.
539         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
540         exec code sequences.
541         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
542         (__new_sem_trywait): Use standard initial exec code sequences.
543         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
544         (__new_sem_wait): Use standard initial exec code sequences.
546 2007-07-31  Anton Blanchard  <anton@samba.org>
548         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
549         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
550         atomic_full_barrier.
552 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
554         * allocatestack.c (stack_cache_lock): Change type to int.
555         (get_cached_stack, allocate_stack, __deallocate_stack,
556         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
557         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
558         as second argument to lll_lock and lll_unlock macros on
559         stack_cache_lock.
560         * pthread_create.c (__find_in_stack_list): Likewise.
561         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
562         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
563         as second argument.
564         * descr.h (struct pthread): Change lock and setxid_futex field
565         type to int.
566         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
567         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
568         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
569         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
570         Likewise.
571         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
572         * pthread_cond_init.c (__pthread_cond_init): Likewise.
573         * pthreadP.h (__attr_list_lock): Change type to int.
574         * pthread_attr_init.c (__attr_list_lock): Likewise.
575         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
576         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
577         lll_{,un}lock.
578         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
579         also for lll_futex_{wake,wait}.
580         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
581         a pointer to const.
582         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
583         LLL_SHARED as second argument to lll_{,un}lock.
584         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
585         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
586         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
587         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
588         Likewise.
589         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
590         as second argument to lll_{,un}lock macros on pd->lock.
591         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
592         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
593         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
594         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
595         Likewise.
596         * sysdeps/pthread/createthread.c (do_clone, create_thread):
597         Likewise.
598         * pthread_once.c (once_lock): Change type to int.
599         (__pthread_once): Pass LLL_PRIVATE as second argument to
600         lll_{,un}lock macros on once_lock.
601         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
602         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
603         rwlock->__data.__shared as second argument to them and similarly
604         for lll_futex_w*.
605         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
606         Likewise.
607         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
608         Likewise.
609         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
610         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
611         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
612         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
613         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
614         to lll_{,un}lock macros on __sem_mappings_lock.
615         * sem_open.c (check_add_mapping): Likewise.
616         (__sem_mappings_lock): Change type to int.
617         * semaphoreP.h (__sem_mappings_lock): Likewise.
618         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
619         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
620         instead of lll_*mutex_*, pass LLL_SHARED as last
621         argument.
622         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
623         pass LLL_SHARED as last argument.
624         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
625         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
626         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
627         pass LLL_SHARED as last argument.
628         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
629         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
630         LLL_SHARED as last argument.
631         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
632         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
633         Similarly.
634         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
635         __libc_lock_lock_recursive, __libc_lock_unlock,
636         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
637         argument to lll_{,un}lock.
638         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
639         _IO_lock_unlock): Likewise.
640         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
641         compound literal.
642         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
643         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
644         __fork_lock.
645         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
646         free_mem): Likewise.
647         (__fork_lock): Change type to int.
648         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
649         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
650         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
651         lll_futex_wake.
652         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
653         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
654         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
655         New function.
656         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
657         pass it through to lll_futex_*wait, only compile in when
658         IS_IN_libpthread.
659         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
660         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
661         argument and pass it through to lll_futex_*wait.
662         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
663         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
664         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
665         inline functions to __lll_* resp. __lll_robust_*.
666         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
667         (lll_mutex_dead): Add private argument.
668         (__lll_lock_wait_private): New prototype.
669         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
670         __lll_robust_lock_timedwait): Add private argument to prototypes.
671         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
672         call __lll_lock_wait_private, otherwise pass private to
673         __lll_lock_wait.
674         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
675         __lll_robust_timedlock): Add private argument, pass it to
676         __lll_*wait functions.
677         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
678         call __lll_unlock_wake_private, otherwise pass private to
679         __lll_unlock_wake.
680         (__lll_robust_unlock): Add private argument, pass it to
681         __lll_robust_unlock_wake.
682         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
683         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
684         argument, pass it through to __lll_* inline function.
685         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
686         (lll_lock_t): Remove.
687         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
688         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
689         lll_cond_wake, lll_cond_broadcast): Remove.
690         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
691         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
692         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
693         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
694         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
695         the header from assembler.  Renamed all lll_mutex_* resp.
696         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
697         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
698         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
699         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
700         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
701         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
702         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
703         Remove prototype.
704         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
705         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
706         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
707         (lll_trylock): Likewise, use __lll_trylock_asm, pass
708         MULTIPLE_THREADS_OFFSET as another asm operand.
709         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
710         MULTIPLE_THREADS_OFFSET as last asm operand, call
711         __lll_lock_wait_private if private is constant LLL_PRIVATE,
712         otherwise pass private as another argument to __lll_lock_wait.
713         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
714         lll_timedlock, lll_robust_timedlock): Add private argument, pass
715         private as another argument to __lll_*lock_wait call.
716         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
717         MULTIPLE_THREADS_OFFSET as another asm operand, call
718         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
719         otherwise pass private as another argument to __lll_unlock_wake.
720         (lll_robust_unlock): Add private argument, pass private as another
721         argument to __lll_unlock_wake.
722         (lll_robust_dead): Add private argument, use __lll_private_flag
723         macro.
724         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
725         LLL_MUTEX_LOCK_INITIALIZER.
726         (lll_lock_t): Remove.
727         (LLL_LOCK_INITIALIZER_WAITERS): Define.
728         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
729         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
730         lll_cond_wake, lll_cond_broadcast): Remove.
731         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
732         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
733         2007-05-2{3,9} changes.
734         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
735         kernel-features.h and lowlevellock.h.
736         (LOAD_PRIVATE_FUTEX_WAIT): Define.
737         (LOAD_FUTEX_WAIT): Rewritten.
738         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
739         define.
740         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
741         (__lll_mutex_lock_wait): Rename to ...
742         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
743         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
744         (__lll_mutex_timedlock_wait): Rename to ...
745         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
746         contains private argument.  Don't compile in for libc.so.
747         (__lll_mutex_unlock_wake): Rename to ...
748         (__lll_unlock_wake): ... this.  %ecx contains private argument.
749         Don't compile in for libc.so.
750         (__lll_timedwait_tid): Use __NR_gettimeofday.
751         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
752         kernel-features.h and lowlevellock.h.
753         (LOAD_FUTEX_WAIT): Define.
754         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
755         define.
756         (__lll_robust_mutex_lock_wait): Rename to ...
757         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
758         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
759         macro.
760         (__lll_robust_mutex_timedlock_wait): Rename to ...
761         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
762         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
763         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
764         lowlevellock.h.
765         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
766         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
767         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
768         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
769         to __lll_lock_wait in %edx.
770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
771         Include lowlevellock.h and pthread-errnos.h.
772         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
773         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
774         (__pthread_cond_broadcast): 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.
778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
779         Include lowlevellock.h and pthread-errnos.h.
780         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
781         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
782         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
783         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
784         pass LLL_SHARED in %ecx to both __lll_lock_wait and
785         __lll_unlock_wake.
786         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
787         Include lowlevellock.h.
788         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
789         Don't define.
790         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
791         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
792         pass LLL_SHARED in %ecx to both __lll_lock_wait and
793         __lll_unlock_wake.  Use __NR_gettimeofday.
794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
795         Include lowlevellock.h.
796         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
797         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
798         to __lll_*, pass cond_lock address in %edx rather than %ecx to
799         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
800         and __lll_unlock_wake.
801         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
802         Include lowlevellock.h.
803         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
804         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
805         MUTEX(%ebx) address in %edx rather than %ecx to
806         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
807         and __lll_unlock_wake.  Move return value from %ecx to %edx
808         register.
809         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
810         Include lowlevellock.h.
811         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
812         Don't define.
813         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
814         MUTEX(%ebp) address in %edx rather than %ecx to
815         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
816         and __lll_unlock_wake.  Move return value from %ecx to %edx
817         register.  Use __NR_gettimeofday.
818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
819         Include lowlevellock.h.
820         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
821         Don't define.
822         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
823         MUTEX(%ebp) address in %edx rather than %ecx to
824         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
825         and __lll_unlock_wake.  Move return value from %ecx to %edx
826         register.  Use __NR_gettimeofday.
827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
828         Include lowlevellock.h.
829         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
830         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
831         MUTEX(%edi) address in %edx rather than %ecx to
832         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
833         and __lll_unlock_wake.
834         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
835         Include lowlevellock.h.
836         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
837         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
838         MUTEX(%ebx) address in %edx rather than %ecx to
839         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
840         and __lll_unlock_wake.  Move return value from %ecx to %edx
841         register.
842         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
843         lowlevellock.h.
844         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
845         define.
846         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
847         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
848         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
849         lowlevellock.h.
850         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
851         (sem_timedwait): Use __NR_gettimeofday.
852         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
853         lowlevellock.h.
854         (LOCK): Don't define.
855         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
856         lowlevellock.h.
857         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
858         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
859         are waiters.
860         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
861         2007-05-2{3,9} changes.
862         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
863         kernel-features.h and lowlevellock.h.
864         (LOAD_PRIVATE_FUTEX_WAIT): Define.
865         (LOAD_FUTEX_WAIT): Rewritten.
866         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
867         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
868         (__lll_mutex_lock_wait): Rename to ...
869         (__lll_lock_wait): ... this.  %esi is now private argument.
870         Don't compile in for libc.so.
871         (__lll_mutex_timedlock_wait): Rename to ...
872         (__lll_timedlock_wait): ... this.  %esi contains private argument.
873         Don't compile in for libc.so.
874         (__lll_mutex_unlock_wake): Rename to ...
875         (__lll_unlock_wake): ... this.  %esi contains private argument.
876         Don't compile in for libc.so.
877         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
878         kernel-features.h and lowlevellock.h.
879         (LOAD_FUTEX_WAIT): Define.
880         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
881         (__lll_robust_mutex_lock_wait): Rename to ...
882         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
883         Use LOAD_FUTEX_WAIT macro.
884         (__lll_robust_mutex_timedlock_wait): Rename to ...
885         (__lll_robust_timedlock_wait): ... this. %esi argument contains
886         private, use LOAD_FUTEX_WAIT macro.
887         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
888         lowlevellock.h.
889         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
890         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
891         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
892         __lll_lock_wait and __lll_unlock_wake.
893         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
894         Include lowlevellock.h and pthread-errnos.h.
895         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
896         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
897         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
898         pass LLL_SHARED in %esi to both __lll_lock_wait and
899         __lll_unlock_wake.
900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
901         Include lowlevellock.h and pthread-errnos.h.
902         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
903         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
904         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
905         pass LLL_SHARED in %esi to both __lll_lock_wait and
906         __lll_unlock_wake.
907         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
908         Include lowlevellock.h.
909         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
910         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
911         pass LLL_SHARED in %esi to both __lll_lock_wait and
912         __lll_unlock_wake.
913         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
914         Include lowlevellock.h.
915         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
916         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
917         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
918         and __lll_unlock_wake.
919         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
920         Include lowlevellock.h.
921         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
922         Don't define.
923         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
924         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
925         and __lll_unlock_wake.
926         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
927         Include lowlevellock.h.
928         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
929         Don't define.
930         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
931         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
932         and __lll_unlock_wake.
933         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
934         Include lowlevellock.h.
935         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
936         Don't define.
937         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
938         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
939         and __lll_unlock_wake.
940         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
941         Include lowlevellock.h.
942         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
943         Don't define.
944         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
945         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
946         and __lll_unlock_wake.
947         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
948         Include lowlevellock.h.
949         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
950         Don't define.
951         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
952         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
953         and __lll_unlock_wake.
954         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
955         lowlevellock.h.
956         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
957         define.
958         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
959         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
960         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
961         lowlevellock.h.
962         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
963         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
964         lowlevellock.h.
965         (LOCK): Don't define.
966         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
967         lowlevellock.h.
968         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
969         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
970         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
971         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
972         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
973         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
974         (__lll_lock_wait_private): New function.
975         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
976         it to lll_futex_*wait.  Don't compile in for libc.so.
977         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
978         Remove.
979         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
980         (struct sparc_pthread_barrier): Remove.
981         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
982         struct sparc_pthread_barrier.  Pass
983         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
984         and lll_futex_wait macros.
985         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
986         Remove.
987         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
988         Include sparc pthread_barrier_wait.c instead of generic one.
990 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
992         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
995         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
996         %ecx.
997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
998         (pthread_rwlock_timedwrlock): Likewise.
999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1000         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1002 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1004         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1006 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1008         * tst-locale2.c (useless): Add return statement.
1010 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1012         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1013         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1014         * pthread_create.c (start_thread): Likewise.
1015         * init.c (sighandler_setxid): Likewise.
1016         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1017         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1018         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1019         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1020         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1021         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1022         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1023         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1024         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1025         Likewise.
1026         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1027         Likewise.
1028         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1029         Likewise.
1030         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1031         __rtld_notify): Likewise.
1032         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1033         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1034         __pthread_once): Likewise.
1035         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1036         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1037         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1038         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1039         (lll_futex_wait): Add private argument, define as wrapper around
1040         lll_futex_timed_wait.
1041         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1042         use __lll_private_flag macro.
1043         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1044         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1045         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1046         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1047         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1048         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1049         (lll_futex_wait): Add private argument, define as wrapper around
1050         lll_futex_timed_wait.
1051         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1052         use __lll_private_flag macro.
1053         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1054         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1055         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1056         Define.
1057         (lll_futex_timed_wait, lll_futex_wake): Use it.
1058         (lll_private_futex_wait, lll_private_futex_timed_wait,
1059         lll_private_futex_wake): Removed.
1060         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1061         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1062         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1063         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1064         (lll_futex_wait): Add private argument, define as wrapper around
1065         lll_futex_timed_wait.
1066         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1067         use __lll_private_flag macro.
1068         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1069         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1070         to lll_futex_*.
1071         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1072         (lll_private_futex_wait, lll_private_futex_timed_wait,
1073         lll_private_futex_wake): Removed.
1074         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1075         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1076         (lll_private_futex_wait, lll_private_futex_timed_wait,
1077         lll_private_futex_wake): Removed.
1078         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1079         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1080         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1081         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1082         (lll_futex_wait): Add private argument, define as wrapper around
1083         lll_futex_timed_wait.
1084         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1085         use __lll_private_flag macro.
1086         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1087         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1088         to lll_futex_*.
1089         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1090         Define.
1091         (lll_futex_timed_wait, lll_futex_wake): Use it.
1092         (lll_private_futex_wait, lll_private_futex_timed_wait,
1093         lll_private_futex_wake): Removed.
1095 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1097         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1098         of the structure for sparc32.
1100 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1102         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1104 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1106         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1107         code used when private futexes are assumed.
1108         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1109         Likewise.
1111 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1113         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1114         (__lll_private_flag): Define.
1115         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1116         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1117         __lll_private_flag.
1118         (lll_private_futex_wait, lll_private_futex_timedwait,
1119         lll_private_futex_wake): Define as wrapper around non-_private
1120         macros.
1121         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1122         (__lll_private_flag): Define.
1123         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1124         (lll_private_futex_wait, lll_private_futex_timedwait,
1125         lll_private_futex_wake): Define as wrapper around non-_private
1126         macros.
1128 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1130         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1131         parameter to lll_futex_wait call.
1132         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1134         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1135         Replace lll_futex_wait with lll_private_futex_wait.
1136         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1137         Add LLL_SHARED parameter to lll_futex_wake().
1139         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1140         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1141         lll_private_futex_wake.
1142         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1143         bit from private parm before syscall.
1144         (lll_futex_timed_wait): Likewise.
1145         (lll_futex_wake): Likewise.
1146         (lll_futex_wake_unlock): Likewise.
1147         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1148         (lll_robust_mutex_unlock): Likewise.
1149         (lll_mutex_unlock_force): Likewise.
1150         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1152 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1154         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1155         compilation when unconditionally using private futexes.
1156         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1157         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1158         Likewise.
1159         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1160         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1162 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1164         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1165         Define.
1167 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1169         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1170         kernel-features.h.
1172 2007-05-16  Roland McGrath  <roland@redhat.com>
1174         * init.c (__nptl_initial_report_events): New variable.
1175         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1176         to that.
1178 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1180         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1181         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1183 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1185         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1186         implementation.
1188 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1190         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1191         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1192         * pthread_mutex_timedlock.c: Likewise.
1193         * pthread_mutex_trylock.c: Likewise.
1194         * pthread_mutex_unlock.c: Likewise.
1196 2007-06-17  Andreas Schwab  <schwab@suse.de>
1198         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1199         sections.
1201 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1203         * allocatestack.c (allocate_stack): Make code compile if
1204         __ASSUME_PRIVATE_FUTEX is set.
1206 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1208         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1209         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1210         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1211         (__pthread_rwlock_wrlock): Likewise.
1212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1213         (pthread_rwlock_timedrdlock): Likewise.
1214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1215         (pthread_rwlock_timedwrlock): Likewise.
1216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1217         (__pthread_rwlock_unlock): Likewise.
1219 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1221         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1222         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1223         Split __flags into __flags, __shared, __pad1 and __pad2.
1224         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1225         futexes if they are available.
1226         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1227         in libc-lowlevellock.S allow using private futexes.
1228         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1229         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1230         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1231         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1232         lll_private_futex_timed_wait and lll_private_futex_wake.
1233         (lll_robust_mutex_unlock): Fix typo.
1234         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1235         field in futex command setup.
1236         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1237         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1238         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1239         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1240         if they are available.  Remove clear_once_control.
1241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1242         futexes if they are available.
1243         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1245         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1247         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1248         Wake only when there are waiters.
1249         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1250         support.  Indicate that there are waiters.  Remove unnecessary
1251         extra cancellation test.
1252         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1253         left-over duplication of __sem_wait_cleanup.
1255 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1257         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1258         parameter to lll_futex_wait, lll_futex_timed_wait, and
1259         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1260         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1261         lll_private_futex_wake.
1262         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1263         * allocatestack.c: Adjust use of lll_futex_* macros.
1264         * init.c: Likewise.
1265         * lowlevellock.h: Likewise.
1266         * pthread_barrier_wait.c: Likewise.
1267         * pthread_cond_broadcast.c: Likewise.
1268         * pthread_cond_destroy.c: Likewise.
1269         * pthread_cond_signal.c: Likewise.
1270         * pthread_cond_timedwait.c: Likewise.
1271         * pthread_cond_wait.c: Likewise.
1272         * pthread_create.c: Likewise.
1273         * pthread_mutex_lock.c: Likewise.
1274         * pthread_mutex_setprioceiling.c: Likewise.
1275         * pthread_mutex_timedlock.c: Likewise.
1276         * pthread_mutex_unlock.c: Likewise.
1277         * pthread_rwlock_timedrdlock.c: Likewise.
1278         * pthread_rwlock_timedwrlock.c: Likewise.
1279         * pthread_rwlock_unlock.c: Likewise.
1280         * sysdeps/alpha/tls.h: Likewise.
1281         * sysdeps/i386/tls.h: Likewise.
1282         * sysdeps/ia64/tls.h: Likewise.
1283         * sysdeps/powerpc/tls.h: Likewise.
1284         * sysdeps/pthread/aio_misc.h: Likewise.
1285         * sysdeps/pthread/gai_misc.h: Likewise.
1286         * sysdeps/s390/tls.h: Likewise.
1287         * sysdeps/sh/tls.h: Likewise.
1288         * sysdeps/sparc/tls.h: Likewise.
1289         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1290         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1291         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1292         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1293         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1294         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1295         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1296         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1297         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1298         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1299         Likewise.
1300         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1301         * sysdeps/x86_64/tls.h: Likewise.
1303 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1305         * pthread_getattr_np.c: No need to install a cancellation handler,
1306         this is no cancellation point.
1307         * pthread_getschedparam.c: Likewise.
1308         * pthread_setschedparam.c: Likewise.
1309         * pthread_setschedprio.c: Likewise.
1310         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1311         lll_unlock_wake_cb.
1312         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1313         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1314         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1315         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1316         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1317         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1318         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1319         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1320         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1321         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1322         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1323         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1325         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1326         whether there are more than one thread makes no sense here since
1327         we only call the slow path if the locks are taken.
1328         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1330         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1331         COND_NWAITERS_SHIFT.
1332         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1333         COND_CLOCK_BITS.
1334         * pthread_cond_init.c: Likewise.
1335         * pthread_cond_timedwait.c: Likewise.
1336         * pthread_cond_wait.c: Likewise.
1337         * pthread_condattr_getclock.c: Likewise.
1338         * pthread_condattr_setclock.c: Likewise.
1339         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1340         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1343         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1345 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1347         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1348         unistd.h.
1350         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1351         insn suffix.
1352         (THREAD_GSCOPE_GET_FLAG): Remove.
1353         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1354         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1355         changes.
1356         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1357         (THREAD_GSCOPE_GET_FLAG): Remove.
1358         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1359         instead of THREAD_GSCOPE_GET_FLAG.
1360         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1361         it.
1362         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1363         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1364         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1365         THREAD_GSCOPE_WAIT): Define.
1366         * sysdeps/sparc/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.
1370         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1371         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1372         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1373         THREAD_GSCOPE_WAIT): Define.
1374         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1375         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1376         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1377         THREAD_GSCOPE_WAIT): Define.
1379 2007-05-24  Richard Henderson  <rth@redhat.com>
1381         * descr.h (struct pthread): Add header.gscope_flag.
1382         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1383         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1384         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1385         THREAD_GSCOPE_WAIT): Define.
1387 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1389         * init.c: Make it compile with older kernel headers.
1391         * tst-initializers1.c: Show through exit code which test failed.
1393         * pthread_rwlock_init.c: Also initialize __shared field.
1394         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1395         element in rwlock structure into four byte elements.  One of them is
1396         the new __shared element.
1397         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1398         Likewise.
1399         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1400         __shared, adjust names of other padding elements.
1401         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1402         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1403         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1404         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1405         FUTEX_PRIVATE_FLAG.
1406         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1407         futex to use private operations if possible.
1408         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1409         Likewise.
1410         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1411         Likewise.
1412         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1413         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1414         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1415         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1416         Likewise.
1417         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1418         Likewise.
1419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1420         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1422 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1424         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1425         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1426         * pthread_rwlock_timedrdlock.c: Likewise.
1427         * pthread_rwlock_tryrdlock.c: Likewise.
1429         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1430         optimization.
1432         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1433         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1434         duplication of __sem_wait_cleanup.
1436         * allocatestack.c: Revert last change.
1437         * init.c: Likewise.
1438         * sysdeps/i386/tls.h: Likewise.
1439         * sysdeps/x86_64/tls.h: Likewise.
1440         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1441         header structure.
1442         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1444         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1445         Add private field.
1446         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1447         * pthread_barrier_init.c: Set private flag if pshared and private
1448         futexes are supported.
1449         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1450         private field in futex command setup.
1451         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1453 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1455         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1456         support.
1457         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1458         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1459         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1460         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1461         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1463         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1464         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1465         fields in the structure.
1466         (__old_sem_init): New function.
1467         * sem_open.c: Initialize all fields of the structure.
1468         * sem_getvalue.c: Adjust for renamed element.
1469         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1470         (gen-as-const-headers): Add structsem.sym.
1471         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1472         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1473         struct new_sem.  Add struct old_sem.
1474         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1475         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1476         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1477         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1478         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1479         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1480         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1481         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1482         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1483         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1484         * tst-sem10.c: New file.
1485         * tst-sem11.c: New file.
1486         * tst-sem12.c: New file.
1487         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1488         of struct sem.
1490 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1491             Jakub Jelinek  <jakub@redhat.com>
1493         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1494         Move __pthread_enable_asynccancel right before futex syscall.
1495         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1496         Likewise.
1498 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1500         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1501         THREAD_COPY_PRIVATE_FUTEX): Define.
1502         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1503         THREAD_COPY_PRIVATE_FUTEX): Define.
1504         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1505         * init.c (__pthread_initialize_minimal_internal): Use
1506         THREAD_SET_PRIVATE_FUTEX.
1508         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1509         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1510         THREAD_GSCOPE_FLAG_WAIT): Define.
1511         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1512         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1513         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1514         PTR_DEMANGLE.
1515         (THREAD_GSCOPE_GET_FLAG): Define.
1516         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1517         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1518         instead of ->header.gscope_flag directly.
1520 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1522         * init.c (__pthread_initialize_minimal_internal): Check whether
1523         private futexes are available.
1524         * allocatestack.c (allocate_stack): Copy private_futex field from
1525         current thread into the new stack.
1526         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1527         futexes if they are available.
1528         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1529         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1530         in libc-lowlevellock.S allow using private futexes.
1531         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1532         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1533         FUTEX_PRIVATE_FLAG.
1534         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1535         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1536         if they are available.
1537         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1538         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1539         * sysdeps/i386/tcb-offsets.sym: Likewise.
1540         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1541         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1543 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1545         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1546         Remove ptr_wait_lookup_done again.
1547         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1548         (__pthread_initialize_minimal_internal): Initialize
1549         _dl_wait_lookup_done pointer in _rtld_global directly.
1550         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1551         Remove code to code _dl_wait_lookup_done.
1552         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1553         encrypted for now.
1555 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1557         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1558         pthread_mutex_init failed with ENOTSUP.
1560 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1562         * allocatestack.c (__wait_lookup_done): New function.
1563         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1564         Add ptr_wait_lookup_done.
1565         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1566         * pthreadP.h: Declare __wait_lookup_done.
1567         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1568         Define macros to implement reference handling of global scope.
1569         * sysdeps/x86_64/tls.h: Likewise.
1570         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1571         Initialize GL(dl_wait_lookup_done).
1573 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1575         [BZ #4512]
1576         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1577         is detected.
1578         * pthread_mutex_timedlock.c: Likewise.
1579         * pthread_mutex_trylock.c: Likewise.
1580         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1582         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1583         * tst-robust9.c: New file.
1584         * tst-robustpi9.c: New file.
1586         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1587         unnecessary extra cancellation test.
1589 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1591         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1592         extra cancellation test.
1593         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1595 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1597         * descr.h (struct pthread): Rearrange members to fill hole in
1598         64-bit layout.
1600         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1601         (__pthread_setaffinity_new): If syscall was successful and
1602         RESET_VGETCPU_CACHE is defined, use it before returning.
1603         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1605 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1607         [BZ #4455]
1608         * tst-align2.c: Include stackinfo.h.
1609         * tst-getpid1.c: Likewise.
1611 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1613         [BZ #4455]
1614         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1615         * tst-getpid1.c (do_test): Likewise.
1617         [BZ #4456]
1618         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1619         (allocate_stack): Likewise.
1621 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1623         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1624         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1625         (__lll_robust_timedlock_wait): Likewise.
1626         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1628 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1630         [BZ #4465]
1631         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1632         * tst-cancel4.c (tf_fdatasync): New test.
1634 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1636         [BZ #4392]
1637         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1638         check mutexes like normal mutexes.
1640         [BZ #4306]
1641         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1642         Initialize the whole sigevent structure to appease valgrind.
1644 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1646         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1647         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1649 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1651         * tst-locale1.c: Avoid warnings.
1652         * tst-locale2.c: Likewise.
1654 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1656         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1657         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1659 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1661         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1662         __extern_always_inline where appropriate.
1663         * sysdeps/pthread/pthread.h: Likewise.
1665 2007-03-13  Richard Henderson  <rth@redhat.com>
1667         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1668         separate cfi regions for the two subsections.
1670 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1672         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1673         new thread, don't just decrement it.
1674         Patch by Suzuki K P <suzuki@in.ibm.com>.
1676 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1678         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1679         PTHFCT_CALL definition.
1681 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1683         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1684         available, don't use it.
1686 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1688         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1689         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1690         call into the kernel to delay.
1692 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1694         * tst-initializers1.c: We want to test the initializers as seen
1695         outside of libc, so undefined _LIBC.
1697         * pthread_join.c (cleanup): Avoid warning.
1699 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1701         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1702         (__lll_timedwait_tid): Add unwind info.
1704         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1705         function table, mangle the pointers.
1706         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1707         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1708         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1709         demangle pointers before use.
1710         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1711         demangle pointer.
1712         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1713         * sysdeps/pthread/setxid.h: Likewise.
1715 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1717         * tst-rwlock7.c: Show some more information in case of correct
1718         behavior.
1720 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1722         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1723         (lll_futex_timed_wait): Undo part of last change, don't negate
1724         return value.
1726 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1728         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1729         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1731 2006-12-28  David S. Miller  <davem@davemloft.net>
1733         * shlib-versions: Fix sparc64 linux target specification.
1735 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1737         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1738         Adjust include path for pthread_barrier_wait.c move.
1740 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1742         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1743         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1745 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1747         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1748         6 argument cancellable syscalls.
1749         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1750         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1751         6 argument cancellable syscalls.
1752         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1754 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1756         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1757         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1759 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1761         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1762         __sync_lock_release instead of __sync_lock_release_si.
1764 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1766         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1767         Define.
1768         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1769         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1770         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1771         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1772         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1773         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1774         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1775         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1776         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1777         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1778         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1780 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1782         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1783         * pthread_barrier_wait.c: ...here.
1784         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1785         * pthread_cond_broadcast.c: ...here.
1786         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1787         * pthread_cond_signal.c: ...here.
1788         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1789         * pthread_cond_timedwait.c: ...here.
1790         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1791         * pthread_cond_wait.c: ...here.
1792         * sysdeps/pthread/pthread_once.c: Move to...
1793         * pthread_once.c: ...here.
1794         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1795         * pthread_rwlock_rdlock.c: ...here.
1796         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1797         * pthread_rwlock_timedrdlock.c: ...here.
1798         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1799         * pthread_rwlock_timedwrlock.c: ...here.
1800         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1801         * pthread_rwlock_unlock.c: ...here.
1802         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1803         * pthread_rwlock_wrlock.c: ...here.
1804         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1805         * pthread_spin_destroy.c: ...here.
1806         * sysdeps/pthread/pthread_spin_init.c: Move to...
1807         * pthread_spin_init.c: ...here.
1808         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1809         * pthread_spin_unlock.c: ...here.
1810         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1811         * pthread_getcpuclockid.c: ...here.
1813         * init.c: USE_TLS support is now always enabled.
1814         * tst-tls5.h: Likewise.
1815         * sysdeps/alpha/tls.h: Likewise.
1816         * sysdeps/i386/tls.h: Likewise.
1817         * sysdeps/ia64/tls.h: Likewise.
1818         * sysdeps/powerpc/tls.h: Likewise.
1819         * sysdeps/s390/tls.h: Likewise.
1820         * sysdeps/sh/tls.h: Likewise.
1821         * sysdeps/sparc/tls.h: Likewise.
1822         * sysdeps/x86_64/tls.h: Likewise.
1824 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1826         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1827         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1828         failed.
1830         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1831         Define to THREAD_SELF->header.multiple_threads.
1832         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1833         Likewise.
1834         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1835         Likewise.
1836         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1837         (SINGLE_THREAD_P): Likewise.
1838         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1839         (SINGLE_THREAD_P): Likewise.
1840         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1841         (SINGLE_THREAD_P): Likewise.
1842         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1843         (SINGLE_THREAD_P): Likewise.
1844         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1845         Likewise.
1846         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1847         (SINGLE_THREAD_P): Likewise.
1848         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1849         (SINGLE_THREAD_P): Likewise.
1850         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1851         Likewise.
1853 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1855         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1856         by default rather than 2_3_3.
1858 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1860         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1861         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1862         atomic_* instead of catomic_* macros.
1864 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1866         [BZ #3285]
1867         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1868         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1869         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1870         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1871         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1872         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1873         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1874         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1875         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1876         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1877         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1878         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1879         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1881 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1883         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1884         cancelable syscalls with six parameters.
1886         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1887         operations instead of atomic_*.
1889 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1891         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1893 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1895         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1896         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1897         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1898         New file.
1899         * pthread_attr_setstack.c: Allow overwriting the version number of the
1900         new symbol.
1901         * pthread_attr_setstacksize.c: Likewise.
1902         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1903         it.
1904         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1905         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1907 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1909         [BZ #3251]
1910         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1911         Patch by Petr Baudis.
1913 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1915         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1917         * tst-cancel2.c (tf): Loop as long as something was written.
1919 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1921         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1922         mutexes wake all mutexes.
1923         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1924         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1925         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1927 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1929         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1930         to guarantee the thread is always canceled.
1932 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1934         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1935         Include stdlib.h.
1936         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1937         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1938         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1939         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1942 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1944         [BZ #3123]
1945         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1946         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1947         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1949         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1950         * Makefile (tests): Add tst-cond22.
1951         * tst-cond22.c: New file.
1953 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1955         [BZ #3124]
1956         * descr.h (struct pthread): Add parent_cancelhandling.
1957         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1958         cancelhandling value to child.
1959         * pthread_create.c (start_thread): If parent thread was canceled
1960         reset the SIGCANCEL mask.
1961         * Makefile (tests): Add tst-cancel25.
1962         * tst-cancel25.c: New file.
1964 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1965             Ulrich Drepper  <drepper@redhat.com>
1967         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1968         counterp if it is already zero.
1969         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1971 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1972             Roland McGrath  <roland@redhat.com>
1974         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1975         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1976         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1977         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1978         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1979         lll_robust_mutex_timedlock, lll_mutex_unlock,
1980         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1981         Add _L_*_ symbols around the subsection.
1982         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1983         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1985 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1986             Roland McGrath  <roland@redhat.com>
1988         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1989         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1990         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1991         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1992         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1993         lll_robust_mutex_timedlock, lll_mutex_unlock,
1994         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1995         Add _L_*_ symbols around the subsection.
1996         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1997         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1999 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2001         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2002         change because it can disturb too much existing code.  If real hard
2003         reader preference is needed we'll introduce another type.
2004         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2005         (pthread_rwlock_timedwrlock): Likewise.
2006         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2007         Likewise.
2009 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2011         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2012         reader preference.
2013         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2014         (pthread_rwlock_timedwrlock): Likewise.
2015         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2016         Likewise.
2018 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2020         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2021         Only define ifdef SHARED.
2023 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2025         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2026         (free_stacks): ...here.
2027         (__free_stack_cache): New function.
2028         * pthreadP.h: Declare __free_stack_cache.
2029         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2030         ptr_freeres.
2031         * init.c (pthread_functions): Initialize ptr_freeres.
2032         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2033         New freeres function.
2035 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2037         [BZ #3018]
2038         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2040 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2042         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2043         _XOPEN_REALTIME_THREADS.
2045 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2047         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2048         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2049         HAVE_CLOCK_GETTIME_VSYSCALL.
2050         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2052 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2054         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2055         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2056         * descr.h (struct priority_protection_data): New type.
2057         (struct pthread): Add tpp field.
2058         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2059         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2060         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2061         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2062         TPP mutexes.
2063         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2064         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2065         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2066         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2067         * tpp.c: New file.
2068         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2069         boosted by TPP.
2070         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2071         * pthread_mutexattr_getprioceiling.c
2072         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2073         in the SCHED_FIFO priority range.
2074         * pthread_mutexattr_setprioceiling.c
2075         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2076         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2077         if mutex is not TPP.  Ceiling is now in __data.__lock.
2078         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2079         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2080         is now in __data.__lock.  Add locking.
2081         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2082         * Makefile (libpthread-routines): Add tpp.
2083         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2084         * tst-tpp.h: New file.
2085         * tst-mutexpp1.c: New file.
2086         * tst-mutexpp6.c: New file.
2087         * tst-mutexpp10.c: New file.
2088         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2089         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2091 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2093         [BZ #2843]
2094         * pthread_join.c (pthread_join): Account for self being canceled
2095         when checking for deadlocks.
2096         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2097         (tf1): Don't print anything after pthread_join returns, this would be
2098         another cancellation point.
2099         (tf2): Likewise.
2100         * tst-join6.c: New file.
2101         * Makefile (tests): Add tst-join6.
2103 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2105         [BZ #2892]
2106         * pthread_setspecific.c (__pthread_setspecific): Check
2107         out-of-range index before checking for unused key.
2109         * sysdeps/pthread/gai_misc.h: New file.
2111 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2113         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2114         file.  Don't use sysctl.
2115         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2116         overwrite the file if this is likely not true.
2118 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2120         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2121         * Makefile (tests): Add tst-getpid3.
2122         * tst-getpid3.c: New file.
2124 2006-07-30  Roland McGrath  <roland@redhat.com>
2126         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2128         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2129         (pause_not_cancel): New macro.
2130         (nanosleep_not_cancel): New macro.
2131         (sigsuspend_not_cancel): New macro.
2132         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2133         nanosleep_not_cancel macro from <not-cancel.h>.
2134         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2135         macro from <not-cancel.h>.
2137 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2138             Jakub Jelinek  <jakub@redhat.com>
2140         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2141         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2142         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2143         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2144         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2145         * pthread_mutex_lock.c: Likewise.
2146         * pthread_mutex_timedlock.c: Likewise.
2147         * pthread_mutex_trylock.c: Likewise.
2148         * pthread_mutex_unlock.c: Likewise.
2149         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2150         all mutexes.
2151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2152         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2153         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2154         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2155         pthread-pi-defines.sym.
2156         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2157         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2158         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2159         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2160         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2161         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2162         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2163         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2164         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2165         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2166         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2167         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2168         * tst-mutex2.c: Likewise.
2169         * tst-mutex3.c: Likewise.
2170         * tst-mutex4.c: Likewise.
2171         * tst-mutex5.c: Likewise.
2172         * tst-mutex6.c: Likewise.
2173         * tst-mutex7.c: Likewise.
2174         * tst-mutex7a.c: Likewise.
2175         * tst-mutex8.c: Likewise.
2176         * tst-mutex9.c: Likewise.
2177         * tst-robust1.c: Likewise.
2178         * tst-robust7.c: Likewise.
2179         * tst-robust8.c: Likewise.
2180         * tst-mutexpi1.c: New file.
2181         * tst-mutexpi2.c: New file.
2182         * tst-mutexpi3.c: New file.
2183         * tst-mutexpi4.c: New file.
2184         * tst-mutexpi5.c: New file.
2185         * tst-mutexpi6.c: New file.
2186         * tst-mutexpi7.c: New file.
2187         * tst-mutexpi7a.c: New file.
2188         * tst-mutexpi8.c: New file.
2189         * tst-mutexpi9.c: New file.
2190         * tst-robust1.c: New file.
2191         * tst-robust2.c: New file.
2192         * tst-robust3.c: New file.
2193         * tst-robust4.c: New file.
2194         * tst-robust5.c: New file.
2195         * tst-robust6.c: New file.
2196         * tst-robust7.c: New file.
2197         * tst-robust8.c: New file.
2198         * Makefile (tests): Add the new tests.
2200         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2201         * pthread_mutex_destroy.c: Remove unneeded label.
2203 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2205         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2206         computations to compile time.
2208 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2210         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2212 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2214         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2216 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2218         * pthread_key_create.c (__pthread_key_create): Do away with
2219         __pthread_keys_lock.
2221         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2222         (__kernel_cpumask_size): Mark as hidden.
2223         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2225         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2226         * semaphoreP.h (__sem_mappings_lock): Likewise.
2228 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2230         * pthread_atfork.c: Mark __dso_handle as hidden.
2232 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2234         [BZ #2644]
2235         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2236         the reload problem.  Change the one path in pthread_cancel_init
2237         which causes the problem.  Force gcc to reload.  Simplify callers.
2238         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2239         (_Unwind_GetBSP): Undo last patch.
2241 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2243         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2244         function pointer is reloaded after pthread_cancel_init calls.
2246         [BZ #2644]
2247         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2248         pointers are reloaded after pthread_cancel_init calls.
2250 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2252         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2253         __always_inline.
2255 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2257         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2258         Allocate new object which is passed to timer_sigev_thread so that
2259         the timer can be deleted before the new thread is scheduled.
2261 2006-04-26  Roland McGrath  <roland@redhat.com>
2263         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2265 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2267         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2268         suffix for conditional jumps.
2269         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2270         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2271         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2272         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2273         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2274         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2276         * init.c (sigcancel_handler): Compare with correct PID even if the
2277         thread is in the middle of a fork call.
2278         (sighandler_setxid): Likewise.
2279         Reported by Suzuki K P <suzuki@in.ibm.com> .
2281 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2283         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2285 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2287         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2288         fails [Coverity CID 105].
2290 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2292         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2294 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2296         [BZ #2505]
2297         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2298         Define __lll_rel_instr using lwsync.
2300 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2302         * allocatestack.c (allocate_stack): Always initialize robust_head.
2303         * descr.h: Define struct robust_list_head.
2304         (struct pthread): Use robust_list_head in robust mutex list definition.
2305         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2306         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2307         (__pthread_initialize_minimal_internal): Register robust_list with
2308         the kernel.
2309         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2310         Declare __set_robust_list_avail.
2311         * pthread_create.c (start_thread): Register robust_list of new thread.
2312         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2313         waiters.
2314         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2315         number of users, it's unreliable.
2316         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2317         set_robust_list syscall is available.
2318         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2319         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2320         Set robust_head.list_op_pending before trying to lock a robust mutex.
2321         * pthread_mutex_timedlock.c: Likewise.
2322         * pthread_mutex_trylock.c: Likewise.
2323         * pthread_mutex_unlock.c: Likewise for unlocking.
2324         * Makefile (tests): Add tst-robust8.
2325         * tst-robust8.c: New file.
2327 2006-03-08  Andreas Schwab  <schwab@suse.de>
2329         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2330         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2332 2006-03-05  Roland McGrath  <roland@redhat.com>
2334         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2335         and $config_os doesn't match *linux*.
2337 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2339         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2340         Use __syscall_error.
2341         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2342         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2343         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2344         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2345         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2346         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2348 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2350         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2352 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2354         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2355         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2356         mutex.
2357         (__lll_robust_timedlock_wait): Likewise.
2358         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2359         (__lll_robust_lock_wait): Likewise.
2360         (__lll_robust_timedlock_wait): Likewise.
2361         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2362         (__lll_robust_lock_wait): Likewise.
2363         (__lll_robust_timedlock_wait): Likewise.
2365 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2367         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2368         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2369         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2370         lll_robust_mutex_unlock): Define.
2371         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2373 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2375         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2376         instead of <clone.S>.
2378 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2380         * Makefile (libpthread-routines): Add
2381         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2382         and pthread_mutex_[sg]etprioceiling.
2383         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2384         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2385         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2386         pthread_mutex_setprioceiling.
2387         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2388         PTHREAD_PRIO_PROTECT): New enum values.
2389         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2390         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2391         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2392         prototypes.
2393         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2394         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2395         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2396         Define.
2397         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2398         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2399         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2400         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2401         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2402         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2403         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2404         protocol mutexes.
2405         * pthread_mutex_getprioceiling.c: New file.
2406         * pthread_mutex_setprioceiling.c: New file.
2407         * pthread_mutexattr_getprioceiling.c: New file.
2408         * pthread_mutexattr_setprioceiling.c: New file.
2409         * pthread_mutexattr_getprotocol.c: New file.
2410         * pthread_mutexattr_setprotocol.c: New file.
2412 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2414         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2416 2006-02-27  Roland McGrath  <roland@redhat.com>
2418         * sysdeps/pthread/Subdirs: List nptl here too.
2419         * configure (libc_add_on_canonical): New variable.
2421         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2423         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2424         self to get main source tree's file.
2425         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2426         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2427         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2428         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2429         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2430         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2431         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2432         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2433         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2434         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2435         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2436         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2437         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2439         * Makefile: Use $(sysdirs) in vpath directive.
2441         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2442         (CPPFLAGS-timer_routines.c): Likewise.
2444         * Makeconfig (includes): Variable removed.
2446 2006-02-26  Roland McGrath  <roland@redhat.com>
2448         * sysdeps/generic/pt-raise.c: Moved to ...
2449         * pt-raise.c: ... here.
2450         * sysdeps/generic/lowlevellock.h: Moved to ...
2451         * lowlevellock.h: ... here.
2453 2006-02-23  Roland McGrath  <roland@redhat.com>
2455         * descr.h (struct pthread): Add final member `end_padding'.
2456         (PTHREAD_STRUCT_END_PADDING): Use it.
2458 2006-02-20  Roland McGrath  <roland@redhat.com>
2460         * sysdeps/mips: Directory removed, saved in ports repository.
2461         * sysdeps/unix/sysv/linux/mips: Likewise.
2463 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2465         * tst-robust1.c: Add second mutex to check that the mutex list is
2466         handled correctly.
2468 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2470         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2471         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2472         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2473         lll_robust_mutex_unlock): New macros.
2474         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2475         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2476         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2477         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2478         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2480 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2482         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2483         definitions.
2484         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2486 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2488         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2489         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2490         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2491         (lll_robust_mutex_unlock): Likewise.
2493 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2495         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2496         Set robust_list.__next rather than robust_list.
2497         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2498         (__pthread_list_t): New typedef.
2499         (pthread_mutex_t): Replace __next and __prev fields with __list.
2500         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2501         (__pthread_list_t): New typedef.
2502         (pthread_mutex_t): Replace __next and __prev fields with __list.
2503         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2504         (__pthread_list_t, __pthread_slist_t): New typedefs.
2505         (pthread_mutex_t): Replace __next and __prev fields with __list.
2506         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2507         (__pthread_list_t, __pthread_slist_t): New typedefs.
2508         (pthread_mutex_t): Replace __next and __prev fields with __list.
2509         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2510         (__pthread_list_t, __pthread_slist_t): New typedefs.
2511         (pthread_mutex_t): Replace __next and __prev fields with __list.
2512         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2513         (__pthread_slist_t): New typedef.
2514         (pthread_mutex_t): Replace __next field with __list.
2516 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2518         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2519         PTHREAD_MUTEX_OWNERDEAD.
2520         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2521         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2522         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2523         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2524         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2525         to PTHREAD_MUTEX_INCONSISTENT.
2526         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2527         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2528         * pthread_mutex_trylock.c: Likewise.
2529         * pthread_mutex_timedlock.c: Likewise.
2530         * pthread_mutex_unlock.c: Likewise.
2531         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2532         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2533         lowlevelrobustlock.sym.
2534         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2535         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2536         definitions.
2537         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2538         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2539         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2540         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2541         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2543 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2545         * allocatestack.c (allocate_stack): Initialize robust_list.
2546         * init.c (__pthread_initialize_minimal_internal): Likewise.
2547         * descr.h (struct xid_command): Pretty printing.
2548         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2549         robust_list.  Adjust macros.
2550         * pthread_create.c (start_thread): Adjust robust_list handling.
2551         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2552         but the owner for all robust mutex types.
2553         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2554         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2555         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2556         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2558         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2559         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2561 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2563         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2564         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2566 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2568         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2569         Return status.
2570         (lll_futex_timed_wait): Define.
2572 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2574         * tst-cancel4.c: Test ppoll.
2576 2006-01-18  Andreas Jaeger  <aj@suse.de>
2578         [BZ #2167]
2579         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2580         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2581         by Jim Gifford <patches@jg555.com>.
2583 2006-01-13  Richard Henderson  <rth@redhat.com>
2585         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2587 2006-01-10  Roland McGrath  <roland@redhat.com>
2589         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2590         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2591         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2592         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2593         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2594         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2595         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2596         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2597         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2598         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2600 2006-01-09  Roland McGrath  <roland@redhat.com>
2602         * tst-initializers1-c89.c: New file.
2603         * tst-initializers1-c99.c: New file.
2604         * tst-initializers1-gnu89.c: New file.
2605         * tst-initializers1-gnu99.c: New file.
2606         * Makefile (tests): Add them.
2607         (CFLAGS-tst-initializers1-c89.c): New variable.
2608         (CFLAGS-tst-initializers1-c99.c): New variable.
2609         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2610         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2612         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2613         Use __extension__ on anonymous union definition.
2614         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2615         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2616         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2617         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2618         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2620 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2622         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2623         Don't give the union a name because it changes the mangled name.
2624         Instead name the struct for __data.
2625         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2626         Likewise.
2627         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2628         Likewise.
2630 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2632         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2633         stack bias to mc_ftp field.
2635 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2637         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2638         being too clever and reloading the futex value where it shouldn't.
2640 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2642         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2643         correct type.
2645 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2647         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2648         Add cfi directives.
2650 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2652         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2653         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2654         rename in tcbhead_t.
2656         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2657         Don't give the union a name because it changes the mangled name.
2658         Instead name the struct for __data.
2659         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2660         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2661         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2662         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2663         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2664         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2666 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2668         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2669         Return status.
2670         (lll_futex_timed_wait): Define.
2671         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2672         * sysdeps/pthread/aio_misc.h: New file.
2674 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2676         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2678 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2680         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2681         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2682         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2684 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2686         * tst-cancel24.cc: Use C headers instead of C++ headers.
2688 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2690         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2691         sparc-linux configured glibc.
2692         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2693         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2694         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2695         atomic_compare_and_exchange_val_24_acq instead of
2696         atomic_compare_and_exchange_val_acq.
2697         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2698         instead of atomic_exchange_rel.
2699         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2700         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2701         file.
2702         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2703         file.
2704         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2705         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2706         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2707         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2708         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2709         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2710         New file.
2711         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2712         New file.
2713         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2714         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2715         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2716         file.
2717         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2718         file.
2719         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2721 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2723         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2724         mutex initializers.
2726 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2728         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2729         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2730         THREAD_COPY_POINTER_GUARD): Define.
2731         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2732         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2734 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2736         * version.c: Update copyright year.
2738 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2740         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2741         .eh_frame section, use cfi_* directives.
2742         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2744 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2746         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2747         now.
2749 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2751         * sysdeps/pthread/sigaction.c: Removed.
2752         * sigaction.c: New file.
2753         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2755 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2757         * Makefile (tests): Add tst-signal7.
2758         * tst-signal7.c: New file.
2760 2005-12-27  Roland McGrath  <roland@redhat.com>
2762         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2763         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2764         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2765         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2766         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2767         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2768         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2769         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2770         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2771         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2772         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2774 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2776         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2777         and __prev field to pthread_mutex_t.
2778         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2779         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2780         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2781         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2782         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2783         to pthread_mutex_t.
2785 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2787         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2788         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2789         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2790         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2791         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2792         and PTHREAD_MUTEXATTR_FLAG_BITS.
2793         * descr.h (struct pthread): Add robust_list field and define
2794         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2795         * pthread_mutexattr_getrobust.c: New file.
2796         * pthread_mutexattr_setrobust.c: New file.
2797         * pthread_mutex_consistent.c: New file.
2798         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2799         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2800         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2801         Adjust pthread_mutex_t initializers.
2802         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2803         field to pthread_mutex_t.
2804         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2805         and __prev field to pthread_mutex_t.
2806         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2807         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2808         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2809         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2810         * pthread_mutexattr_gettype.c: Likewise.
2811         * pthread_mutexattr_setpshared.c: Likewise.
2812         * pthread_mutexattr_settype.c: Likewise.
2813         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2814         Initialize mutex kind according to robust flag.
2815         * pthread_mutex_lock.c: Implement local robust mutex.
2816         * pthread_mutex_timedlock.c: Likewise.
2817         * pthread_mutex_trylock.c: Likewise.
2818         * pthread_mutex_unlock.c: Likewise.
2819         * pthread_create.c (start_thread): Mark robust mutexes which remained
2820         locked as dead.
2821         * tst-robust1.c: New file.
2822         * tst-robust2.c: New file.
2823         * tst-robust3.c: New file.
2824         * tst-robust4.c: New file.
2825         * tst-robust5.c: New file.
2826         * tst-robust6.c: New file.
2827         * tst-robust7.c: New file.
2828         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2829         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2830         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2831         tst-robust5, tst-robust6, and tst-robust7.
2833         * tst-typesizes.c: New file.
2834         * Makefile (tests): Add tst-typesizes.
2836         * tst-once3.c: More debug output.
2838 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2840         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2841         missing after last change.
2843         * version.c: Update copyright year.
2845 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2847         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2848         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2849         * pthread_mutex_trylock.c: Likewise.
2850         * pthread_mutex_timedlock.c: Likewise.
2851         * pthread_mutex_unlock.c: Likewise.
2853 2005-12-22  Roland McGrath  <roland@redhat.com>
2855         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2856         so that #include_next's search location is not reset to the -I..
2857         directory where <nptl/...> can be found.
2859 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2861         [BZ #1913]
2862         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2863         Fix unwind info.  Remove useless branch prediction prefix.
2864         * tst-cancel24.cc: New file.
2865         * Makefile: Add rules to build and run tst-cancel24.
2867 2005-12-21  Roland McGrath  <roland@redhat.com>
2869         * libc-cancellation.c: Use <> rather than "" #includes.
2870         * pt-cleanup.c: Likewise.
2871         * pthread_create.c: Likewise.
2872         * pthread_join.c: Likewise.
2873         * pthread_timedjoin.c: Likewise.
2874         * pthread_tryjoin.c: Likewise.
2875         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2876         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2877         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2878         * unwind.c: Likewise.
2880 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2882         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2883         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2884         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2885         THREAD_COPY_POINTER_GUARD): Define.
2887 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2889         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2890         rather than one.
2891         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2892         THREAD_COPY_POINTER_GUARD): Define.
2893         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2894         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2895         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2896         THREAD_COPY_POINTER_GUARD): Define.
2897         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2898         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2899         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2900         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2901         Use PTR_DEMANGLE for B0 if defined.
2903 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2905         * pthread_create.c (__pthread_create_2_1): Use
2906         THREAD_COPY_POINTER_GUARD if available.
2907         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2908         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2909         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2910         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2911         * sysdeps/x86_64/tls.h: Likewise.
2913 2005-12-15  Roland McGrath  <roland@redhat.com>
2915         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2917 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2919         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2920         sysdeps/generic.
2921         * errno-loc.c: New file.
2923 2005-12-12  Roland McGrath  <roland@redhat.com>
2925         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2926         adjustments before choosing stack size.  Update minimum stack size
2927         calculation to match allocate_stack change.
2929 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2931         * allocatestack.c (allocate_stack): Don't demand that there is an
2932         additional full page available on the stack beside guard, TLS, the
2933         minimum stack.
2935 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2937         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2938         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2940         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2941         compiling 32-bit code we must define __cleanup_fct_attribute.
2943 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2945         [BZ #1920]
2946         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2947         __attribute__ instead of __attribute.
2948         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2949         (__cleanup_fct_attribute): Likewise.
2951 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2953         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2954         a write barrier before writing libgcc_s_getcfa.
2956 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2958         * sysdeps/unix/sysv/linux/configure: Removed.
2960 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2962         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2963         optional init_array/fini_array support.
2965 2005-10-24  Roland McGrath  <roland@redhat.com>
2967         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2968         versioned_symbol use.
2970 2005-10-16  Roland McGrath  <roland@redhat.com>
2972         * init.c (__pthread_initialize_minimal_internal): Even when using a
2973         compile-time default stack size, apply the minimum that allocate_stack
2974         will require, and round up to page size.
2976 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2978         * Makefile ($(test-modules)): Remove static pattern rule.
2980 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2981             Ulrich Drepper  <drepper@redhat.com>
2983         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2984         alignment in callback function.
2985         * Makefile: Add rules to build and run tst-align3.
2986         * tst-align3.c: New file.
2988 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2990         * allocatestack.c (setxid_signal_thread): Add
2991         INTERNAL_SYSCALL_DECL (err).
2993 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2995         * allocatestack.c (setxid_signal_thread): Need to use
2996         atomic_compare_and_exchange_bool_acq.
2998 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2999             Jakub Jelinek  <jakub@redhat.com>
3001         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3002         CANCEL_RESTMASK.
3003         (struct pthread): Move specific_used field to avoid padding.
3004         Add setxid_futex field.
3005         * init.c (sighandler_setxid): Reset setxid flag and release the
3006         setxid futex.
3007         * allocatestack.c (setxid_signal_thread): New function.  Broken
3008         out of the bodies of the two loops in __nptl_setxid.  For undetached
3009         threads check whether they are exiting and if yes, don't send a signal.
3010         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3011         * pthread_create.c (start_thread): For undetached threads, check
3012         whether setxid bit is set.  If yes, wait until signal has been
3013         processed.
3015         * allocatestack.c (STACK_VARIABLES): Initialize them.
3016         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3018 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3020         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3021         waiters, awake all waiters on the associated mutex.
3023 2005-09-22  Roland McGrath  <roland@redhat.com>
3025         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3026         ../sysdeps/x86_64/hp-timing.h).
3028 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3030         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3031         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3032         (lll_futex_wake_unlock): Define.
3033         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3034         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3035         (lll_futex_wake_unlock): Define.
3036         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3037         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3038         (lll_futex_wake_unlock): Define.
3039         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3040         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3041         (lll_futex_wake_unlock): Define.
3042         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3043         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3044         (lll_futex_wake_unlock): Define.
3045         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3046         lll_futex_wake_unlock.
3047         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3048         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3049         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3051         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3052         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3054 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3056         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3057         Fix typo in register name.
3059 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3061         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3062         Use __sigfillset.  Document that sigfillset does the right thing wrt
3063         to SIGSETXID.
3065 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3067         [BZ #1102]
3068         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3069         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3070         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3071         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3072         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3073         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3074         in the structure.
3075         * Makefile (tests): Add tst-initializers1.
3076         (CFLAGS-tst-initializers1.c): Set.
3077         * tst-initializers1.c: New test.
3079 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3081         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3082         Make sure __flags are located at offset 48 from the start of the
3083         structure.
3085 2005-07-02  Roland McGrath  <roland@redhat.com>
3087         * Makeconfig: Comment fix.
3089 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3091         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3092         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3093         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3094         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3095         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3096         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3097         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3098         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3099         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3100         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3102 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3104         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3105         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3106         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3107         fields.
3108         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3109         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3110         field.  Put in sysinfo field unconditionally.
3111         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3112         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3113         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3114         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3115         fields.
3116         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3117         * pthread_create.c (__pthread_create_2_1): Use
3118         THREAD_COPY_STACK_GUARD macro.
3119         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3120         tests.
3121         * tst-stackguard1.c: New file.
3122         * tst-stackguard1-static.c: New file.
3124 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3126         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3127         Invoke CGOTSETUP and CGOTRESTORE.
3128         (CGOTSETUP, CGOTRESTORE): Define.
3130 2005-05-29  Richard Henderson  <rth@redhat.com>
3132         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3133         (tf_write, tf_writev): Use it.
3134         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3135         the system minimum.
3137 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3140         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3141         __librt_*_asynccancel@local.
3143 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3145         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3146         all occurrences of JUMPTARGET.  Instead append @local to labels.
3148 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3150         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3151         size/alignment of struct pthread rather than tcbhead_t.
3152         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3153         Likewise.
3154         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3155         Likewise.
3156         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3157         Likewise.
3159 2005-05-19  Richard Henderson  <rth@redhat.com>
3161         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3162         __sync_val_compare_and_swap, not explicit _si variant.
3163         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3165 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3167         [BZ #915]
3168         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3170 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3172         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3173         .eh_frame section, use cfi_* directives.
3175 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3177         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3178         of "" includes.
3180 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3182         [BZ #1075]
3183         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3184         aio_write blocks.
3186 2005-04-27  Roland McGrath  <roland@redhat.com>
3188         * Makefile (tests): Remove tst-clock2.
3190         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3191         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3192         translating to the kernel clockid_t for our own process/thread clock.
3194         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3196 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3198         * old_pthread_cond_init.c: Include <errno.h>.
3199         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3200         process shared or uses clock other than CLOCK_REALTIME.
3201         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3203 2005-04-13  David S. Miller  <davem@davemloft.net>
3205         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3206         * sysdeps/sparc/sparc64/clone.S: New file.
3208 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3210         [BZ #1102]
3211         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3212         __inline instead of inline.
3213         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3215 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3217         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3218         functionally equivalent, but shorter instructions.
3219         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3220         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3221         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3222         Likewise.
3223         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3224         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3225         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3226         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3228         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3229         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3230         Likewise.
3231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3232         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3234         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3235         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3237 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3239         * sysdeps/mips/Makefile: New file.
3240         * sysdeps/mips/nptl-sysdep.S: New file.
3241         * sysdeps/mips/tcb-offsets.sym: New file.
3242         * sysdeps/mips/pthread_spin_lock.S: New file.
3243         * sysdeps/mips/pthread_spin_trylock.S: New file.
3244         * sysdeps/mips/pthreaddef.h: New file.
3245         * sysdeps/mips/tls.h: New file.
3246         * sysdeps/mips/jmpbuf-unwind.h: New file.
3247         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3248         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3249         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3250         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3251         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3252         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3253         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3254         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3255         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3256         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3258 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3260         [BZ #1112]
3261         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3262         variable to scerr.
3264 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3266         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3268 2005-02-25  Roland McGrath  <roland@redhat.com>
3270         * alloca_cutoff.c: Correct license text.
3271         * tst-unload.c: Likewise.
3272         * sysdeps/pthread/allocalim.h: Likewise.
3273         * sysdeps/pthread/pt-initfini.c: Likewise.
3274         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3275         * sysdeps/pthread/bits/sigthread.h: Likewise.
3276         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3277         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3279 2005-02-16  Roland McGrath  <roland@redhat.com>
3281         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3282         Use unsigned int * for ptr_nthreads.
3284 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3286         [BZ #721]
3287         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3288         gcc4.
3290 2005-02-07  Richard Henderson  <rth@redhat.com>
3292         [BZ #787]
3293         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3294         argument.
3296 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3298         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3299         order of arguments in invocation of atomic_add_zero.
3301 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3303         [BZ #737]
3304         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3305         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3306         at least gotntpoff relocation and addition.
3307         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3308         Likewise.
3309         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3310         Likewise.
3311         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3312         Likewise.
3314 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3316         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3317         entry for static tls deallocation fix.
3318         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3319         also contains information whether the memory pointed to is static
3320         TLS or not.
3321         * sysdeps/i386/tls.h: Likewise.
3322         * sysdeps/ia64/tls.h: Likewise.
3323         * sysdeps/powerpc/tls.h: Likewise.
3324         * sysdeps/s390/tls.h: Likewise.
3325         * sysdeps/sh/tls.h: Likewise.
3326         * sysdeps/sparc/tls.h: Likewise.
3327         * sysdeps/x86_64/tls.h: Likewise.
3329 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3331         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3333 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3335         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3336         %esp.
3337         * Makefile (tests): Add tst-align2.
3338         * tst-align2.c: New test.
3339         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3340         -mpreferred-stack-boundary=4.
3342 2004-12-18  Roland McGrath  <roland@redhat.com>
3344         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3345         New file removed withdrawn for the moment.
3347 2004-12-17  Richard Henderson  <rth@redhat.com>
3349         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3350         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3352 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3354         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3355         Increased PTHREAD_STACK_MIN.
3357         * tst-context1.c (stacks): Use bigger stack size.
3359 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3361         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3362         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3364 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3366         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3367         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3368         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3370 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3372         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3374 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3376         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3377         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3379         * tst-getpid1.c: If child crashes, report this first.  Print which
3380         signal.
3382 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3384         * init.c (__pthread_initialize_minimal_internal): Also unblock
3385         SIGSETXID.
3387 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3389         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3390         _POSIX_THREAD_CPUTIME): Define to 0.
3391         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3392         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3393         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3394         __timer_signal_thread_tclk): Remove.
3395         (init_module): Remove their initialization.
3396         (thread_cleanup): Remove their cleanup assertions.
3397         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3398         __timer_signal_thread_tclk): Remove.
3399         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3400         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3401         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3403 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3405         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3406         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3408         * Makefile (tests): Add tst-getpid2.
3409         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3410         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3411         * tst-getpid2.c: New test.
3413 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3415         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3417 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3419         * Makefile (tests): Add tst-getpid1.
3420         * tst-getpid1.c: New file.
3421         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3422         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3424 2004-12-02  Roland McGrath  <roland@redhat.com>
3426         * Makefile (libpthread-nonshared): Variable removed.
3427         ($(objpfx)libpthread_nonshared.a): Target removed.
3428         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3429         These are now handled by generic magic from
3430         libpthread-static-only-routines being set.
3432 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3434         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3435         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3436         _POSIX_THREAD_PRIO_PROTECT): Define.
3437         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3438         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3439         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3441 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3443         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3444         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3445         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3446         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3447         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3448         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3449         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3451 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3453         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3455         * Makefile (libpthread-routines): Add pthread_setschedprio.
3456         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3457         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3458         * pthread_setschedprio.c: New file.
3460 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3462         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3463         * pthread_cancel.c (pthread_create): Likewise.
3465         * Makefile (libpthread-routines): Add vars.
3466         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3467         * init.c (__default_stacksize, __is_smp): Remove.
3468         * vars.c: New file.
3469         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3470         and define a wrapper macro.
3471         (PTHREAD_STATIC_FN_REQUIRE): Define.
3472         * allocatestack.c (__find_thread_by_id): Undefine.
3473         * pthread_create (__pthread_keys): Remove.
3474         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3475         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3476         PTHREAD_STATIC_FN_REQUIRE.
3478 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3480         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3481         parameter to REGISTER macro.
3483 2004-11-17  Roland McGrath  <roland@redhat.com>
3485         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3486         Make sure SIGCANCEL is blocked as well.
3488 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3490         * sysdeps/pthread/setxid.h: New file.
3491         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3492         (struct xid_command): Add forward decl.
3493         (struct pthread_functions): Change return type of __nptl_setxid hook
3494         to int.
3495         * pthreadP.h (__nptl_setxid): Change return type to int.
3496         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3497         calling thread, return its return value and set errno on failure.
3498         * descr.h (struct xid_command): Change id type to long array.
3500         * Makefile: Add rules to build and test tst-setuid1 and
3501         tst-setuid1-static.
3502         * tst-setuid1.c: New test.
3503         * tst-setuid1-static.c: New test.
3505 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3507         * Makefile (tests): Add tst-exit3.
3508         * tst-exit3.c: New test.
3510 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3512         * Makefile (tests): Add tst-exit2.
3513         * tst-exit2.c: New file.
3515 2004-11-09  Roland McGrath  <roland@redhat.com>
3517         [BZ #530]
3518         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3519         here, before calling clone.
3520         * pthread_create.c (start_thread): Don't do it here.
3522 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3524         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3526 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3528         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3529         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3530         assembler warning.
3532 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3534         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3535         if sched_priority is not between minprio and maxprio.
3537 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3539         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3540         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3542         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3543         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3545 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3547         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3548         not-cancelable I/O functions.
3550 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3552         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3553         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3554         make sure 2 is stored in the futex and we looked at the old value.
3555         Fix a few other problems to return the correct value.
3557 2004-10-14  Richard Henderson  <rth@redhat.com>
3559         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3560         make gcc4 happy.
3562 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3564         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3565         of pthread-functions.h and pthreaddef.h.
3566         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3568         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3569         Change __data.__nwaiters from int to unsigned int.
3571         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3572         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3574         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3575         before return type.
3577         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3578         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3580 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3582         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3583         test fails, remove message queue.
3584         (tf_msgsnd): Likewise.
3586 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3588         * tst-clock1.c: Change #ifdef to #if defined.
3589         * tst-clock2.c: Likewise.
3590         * tst-cond11.c: Likewise.
3592         * sysdeps/pthread/timer_create.c (timer_create): Use
3593         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3594         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3595         THREAD_CPUTIME.
3597 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3599         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3600         _POSIX_THREAD_CPUTIME): Define to 0.
3602 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3604         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3605         and _POSIX_THREAD_CPUTIME to zero.
3606         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3607         * tst-barrier2.c: Fix testing for POSIX feature.
3608         * tst-clock1.c: Likewise.
3609         * tst-clock2.c: Likewise.
3610         * tst-cond11.c: Likewise.
3611         * tst-cond4.c: Likewise.
3612         * tst-cond6.c: Likewise.
3613         * tst-flock2.c: Likewise.
3614         * tst-mutex4.c: Likewise.
3615         * tst-mutex9.c: Likewise.
3616         * tst-rwlock12.c: Likewise.
3617         * tst-rwlock4.c: Likewise.
3618         * tst-signal1.c: Likewise.
3619         * tst-spin2.c: Likewise.
3620         * sysdeps/pthread/posix-timer.h: Likewise.
3621         * sysdeps/pthread/timer_create.c: Likewise.
3622         * sysdeps/pthread/timer_routines.c: Likewise.
3624 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3626         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3627         (__lll_mutex_timedlock_wait): Address futex correctly.
3629         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3630         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3631         make sure 2 is stored in the futex and we looked at the old value.
3632         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3633         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3634         which might very well made the code not working at all before.
3635         [BZ #417]
3637 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3639         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3640         allow SIGSETXID to be sent.
3641         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3642         for SIGSETXID to be defined.
3643         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3644         SIGSETXID cannot be blocked.
3646         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3647         Add __extension__ to long long types.
3648         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3649         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3650         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3651         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3652         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3653         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3654         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3656 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3658         * descr.h (struct pthread): Add stopped_start field.
3659         * sysdeps/pthread/createthread.c (create_thread): Set
3660         start_stopped flag in descriptor for new thread appropriately.
3661         * pthread_create.c (start_thread): Only take lock to be stopped on
3662         startup if stopped_start flag says so.
3664 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3666         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3667         is created detached and if yes, do not try to free the stack in case
3668         the thread creation failed.
3669         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3670         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3671         case there has been no error.  [BZ #405]
3673         * pthread_create.c (start_thread): Don't wait for scheduler data
3674         etc to be set at the beginning of the function.  The cancellation
3675         infrastructure must have been set up.  And enable async
3676         cancellation before potentially going to sleep.  [BZ #401]
3678 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3680         * Versions: Remove exports for pthread_set*id_np functions.
3681         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3682         for now.
3683         * Makefile: Don't build pthread_set*id code for now.
3685 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3687         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3688         internal use.
3689         * allocatestack.c (__nptl_setxid): New function.
3690         * descr.h (struct xid_command): Define type.
3691         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3692         (sighandler_setxid): New function.
3693         (__pthread_initialize_minimal): Register sighandler_setxid for
3694         SIGCANCEL.
3695         * pt-allocrtsig.c: Update comment.
3696         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3697         Declare __nptl_setxid.
3698         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3699         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3700         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3701         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3702         and pthread_setresuid_np.
3703         * pthread_setgid_np.c: New file.
3704         * pthread_setuid_np.c: New file.
3705         * pthread_setegid_np.c: New file.
3706         * pthread_seteuid_np.c: New file.
3707         * pthread_setregid_np.c: New file.
3708         * pthread_setreuid_np.c: New file.
3709         * pthread_setresgid_np.c: New file.
3710         * pthread_setresuid_np.c: New file.
3711         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3712         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3713         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3714         and pthread_setresuid_np.
3715         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3716         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3717         pthread_setregid, and pthread_setresgid.
3719 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3721         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3722         ENOMEM when out of memory.
3724 2004-09-10  Roland McGrath  <roland@redhat.com>
3726         [BZ #379]
3727         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3728         code, since we don't try to use the broken CLONE_STOPPED any more.
3729         * pthread_create.c (start_thread): Likewise.
3731 2004-09-15  Richard Henderson  <rth@redhat.com>
3733         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3735 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3737         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3738         (__libc_unwind_longjmp): Delete macro and declare as function.
3739         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3740         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3741         nptl directory.
3742         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3743         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3744         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3746 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3748         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3749         for __USE_XOPEN2K.
3750         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3751         types also for __USE_XOPEN2K.
3752         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3753         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3754         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3755         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3756         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3757         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3758         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3759         [BZ #320]
3761 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3763         * sysdeps/pthread/pthread.h
3764         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3765         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3766         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3767         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3768         [BZ #375]
3770 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3772         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3773         PSEUDO to be used with . prefix.
3775         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3776         Use atomic_increment instead of atomic_exchange_and_add.
3777         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3778         Likewise.
3779         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3780         Likewise.
3781         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3782         Likewise.
3784         * allocatestack.c (allocate_stack): Use atomic_increment_val
3785         instead of atomic_exchange_and_add.
3786         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3787         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3788         Likewise.
3789         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3790         Likewise.
3792         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3793         the initialization function might throw.
3795 2005-09-05  Richard Henderson  <rth@redhat.com>
3797         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3798         Move definition inside libpthread, libc, librt check.  Provide
3799         definition for rtld.
3801 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3803         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3804         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3805         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3806         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3807         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3808         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3809         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3810         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3811         * unwind.c: Use it.
3813         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3814         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3815         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3816         Likewise.
3817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3818         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3819         this is the last waiter, signal pthread_cond_destroy caller and
3820         avoid using the pthread_cond_t structure after unlock.
3821         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3823         Read clock type from the least significant bits of __nwaiters instead
3824         of __clock.
3825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3826         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3828 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3830         [BZ #342]
3831         * Makefile (tests): Add tst-cond20 and tst-cond21.
3832         * tst-cond20.c: New test.
3833         * tst-cond21.c: New test.
3834         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3835         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3836         it unsigned int.
3837         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3838         Likewise.
3839         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3840         (pthread_cond_t): Likewise.
3841         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3842         Likewise.
3843         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3844         Likewise.
3845         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3846         Likewise.
3847         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3848         (cond_nwaiters): New.
3849         (clock_bits): New.
3850         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3851         if there are waiters not signalled yet.
3852         Wait until all already signalled waiters wake up.
3853         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3854         __nwaiters.  If pthread_cond_destroy has been called and this is the
3855         last waiter, signal pthread_cond_destroy caller and avoid using
3856         the pthread_cond_t structure after unlock.
3857         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3858         decrement it when leaving.  If pthread_cond_destroy has been called
3859         and this is the last waiter, signal pthread_cond_destroy caller.
3860         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3861         Likewise.  Read clock type from the least significant bits of
3862         __nwaiters instead of __clock.
3863         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3864         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3865         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3866         clock type just from the last COND_CLOCK_BITS bits of value.
3867         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3868         instead of __clock, just from second bit of condattr's value.
3870 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3872         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3873         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3874         != 64.
3875         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3877 2004-08-15  Roland McGrath  <roland@frob.com>
3879         * pthread_atfork.c: Update copyright terms including special exception
3880         for these trivial files, which are statically linked into executables
3881         that use dynamic linking for the significant library code.
3883 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3885         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3886         pthread_rwlock_rdlock.
3887         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3888         Decrease __nr_readers_queued after reacquiring lock.
3889         * sysdeps/pthread/pthread_rwlock_timedrdlock
3890         (pthread_rwlock_timedrdlock): Likewise.
3891         Reported by Bob Cook <bobcook47@hotmail.com>.
3893 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3895         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3896         before pthread_barrier_wait.
3898 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3900         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3901         Remove unnecessary exception handling data.
3903 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3905         [BZ #284]
3906         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3907         instead of clockid_t.
3909 2004-07-21  Roland McGrath  <roland@redhat.com>
3911         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3913 2004-07-19  Roland McGrath  <roland@redhat.com>
3915         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3917 2004-07-02  Roland McGrath  <roland@redhat.com>
3919         * configure: Don't exit.
3921 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3923         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3924         (__pthread_cond_timedwait): Check for invalid nanosecond in
3925         timeout value.
3927 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3929         * Makefile: Add rules to build and run tst-fini1.
3930         * tst-fini1.c: New file.
3931         * tst-fini1mod.c: New file.
3933 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3935         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3936         if no cancellation support is needed.
3937         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3938         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3939         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3940         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3941         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3942         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3943         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3944         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3945         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3947         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3948         only if not already defined.
3950 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3952         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3953         constraint "m" instead of "0" for futex.
3955         * shlib-versions: Add powerpc64-.*-linux.*.
3957 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3959         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3960         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3961         for valid tv_nsec.
3962         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3963         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3964         bits.
3966 2004-06-29  Roland McGrath  <roland@redhat.com>
3968         * Banner: NPTL no longer has its own version number.
3969         * Makefile (nptl-version): Variable removed.
3970         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3971         using $(version), the glibc version number.
3973 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3975         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3976         Fix branch offset for a PLT entry.
3977         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3978         Likewise.
3979         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3980         Likewise.
3981         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3982         Likewise.
3983         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3984         Likewise.
3986 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3988         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3989         unconditionally.
3991 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3993         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3994         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3995         instead of tv_sec.
3996         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3997         (pthread_rwlock_timedrdlock): Likewise.
3999 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4001         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4002         Set __r7 to val, not mutex.
4004 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4006         * Makefile: Add rules to build tst-rwlock14.
4007         * tst-rwlock14.c: New file.
4009 2004-06-24  Boris Hu  <boris.hu@intel.com>
4011         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4012         check.
4013         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4015 2004-06-19  Andreas Jaeger  <aj@suse.de>
4017         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4018         assembler in last patch.
4020 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4022         * sysdeps/pthread/pthread_cond_timedwait.c
4023         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4025         (__pthread_cond_timedwait): Check for invalid nanosecond in
4026         timeout value.
4027         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4028         * tst-cond19.c: New file.
4029         * Makefile: Add rules to build and run tst-cond19.
4031 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4033         * tst-context1.c (GUARD_PATTERN): Defined.
4034         (tst_context_t): Define struct containing ucontext_t & guard words.
4035         (ctx): Declare as an array of tst_context_t.
4036         (fct): Verify uc_link & guard words are still valid.
4037         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4039 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4041         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4042         Add __data.__futex field, reshuffle __data.__clock.
4043         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4044         (__pthread_cond_signal): Increment __futex at the same time as
4045         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4046         address of low 32-bits of __wakeup_seq to futex syscall.
4047         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4048         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4049         releasing internal lock to FUTEX_WAIT.
4050         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4051         (__pthread_cond_timedwait): Likewise.
4052         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4053         (FUTEX_CMP_REQUEUE): Define.
4054         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4055         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4056         Pass __futex value from before the unlock and __futex address instead
4057         of address of low 32-bits of __wakeup_seq to futex syscall.
4058         Fallback to FUTEX_WAKE all on any errors.
4060 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4062         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4063         comment typo.
4064         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4065         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4066         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4067         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4068         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4070 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4072         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4073         Add memory clobber to inline assembly.
4074         (__lll_mutex_trylock): Likewise.
4075         (__lll_mutex_cond_trylock): Likewise.
4077 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4079         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4080         Pass val argument as 6th system call argument in %r7.
4082 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4084         * Makefile (tests): Add tst-cond16.
4085         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4086         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4087         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4088         Add __data.__futex field, reshuffle __data.__clock.
4089         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4090         (__pthread_cond_signal): Increment __futex at the same time as
4091         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4092         address of low 32-bits of __wakeup_seq to futex syscall.
4093         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4094         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4095         releasing internal lock to FUTEX_WAIT.
4096         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4097         (__pthread_cond_timedwait): Likewise.
4098         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4099         (FUTEX_CMP_REQUEUE): Define.
4100         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4101         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4102         Pass __futex value from before the unlock and __futex address instead
4103         of address of low 32-bits of __wakeup_seq to futex syscall.
4104         Fallback to FUTEX_WAKE all on any errors.
4105         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4106         Define.
4107         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4108         internally.  Return non-zero if error, zero if success.
4109         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4110         Add __data.__futex field, reshuffle __data.__clock.
4111         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4112         Define.
4113         (lll_futex_requeue): Add val argument, return 1 unconditionally
4114         for the time being.
4115         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4116         Add __data.__futex field, reshuffle __data.__clock.
4117         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4118         Define.
4119         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4120         internally.  Return non-zero if error, zero if success.
4121         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4122         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4123         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4124         Define.
4125         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4126         internally.  Return non-zero if error, zero if success.
4127         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4128         Add __data.__futex field, reshuffle __data.__clock.
4129         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4130         Define.
4131         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4132         internally.  Return non-zero if error, zero if success.
4133         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4134         Add __data.__futex field, reshuffle __data.__clock.
4135         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4136         Add __data.__futex field, reshuffle __data.__clock.
4137         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4138         Increment __futex at the same time as __wakeup_seq or __total_seq.
4139         Pass address of __futex instead of address of low 32-bits of
4140         __wakeup_seq to futex syscall.
4141         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4142         Pass __futex value from before releasing internal lock
4143         to FUTEX_WAIT.
4144         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4145         Likewise.  Avoid unnecessary shadowing of variables.
4146         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4147         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4148         unlock and __futex address instead of address of low 32-bits of
4149         __wakeup_seq to futex_requeue macro, adjust for new return value
4150         meaning.
4151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4152         (__pthread_cond_signal): Increment __futex at the same time as
4153         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4154         address of low 32-bits of __wakeup_seq to futex syscall.
4155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4156         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4157         releasing internal lock to FUTEX_WAIT.
4158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4159         (__pthread_cond_timedwait): Likewise.
4160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4161         (FUTEX_CMP_REQUEUE): Define.
4162         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4163         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4164         Pass __futex value from before the unlock and __futex address instead
4165         of address of low 32-bits of __wakeup_seq to futex syscall.
4166         Fallback to FUTEX_WAKE all on any errors.
4168 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4170         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4171         Add nop to align the end of critical section.
4172         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4174 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4176         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4177         Add __broadcast_seq field.
4178         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4179         all waiters as woken with woken_seq and bump broadcast counter.
4180         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4181         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4182         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4183         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4185 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4187         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4188         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4189         Reported by Kaz Kojima.
4191 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4193         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4195 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4197         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4198         __broadcast_seq with bc_seq after acquiring internal lock instead of
4199         before it.
4201 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4203         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4204         compilation.
4205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4206         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4207         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4208         (pthread_cond_t): Add __data.__broadcast_seq field.
4209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4210         (FRAME_SIZE): Define.
4211         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4212         Comment typo fixes.
4213         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4214         Define.
4215         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4216         typo fixes.
4217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4218         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4219         fixes.
4221 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4223         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4224         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4225         Add __broadcast_seq field.
4226         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4227         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4228         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4229         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4230         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4231         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4232         all waiters as woken with woken_seq and bump broadcast counter.
4233         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4234         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4235         __broadcast_seq field.
4236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4237         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4238         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4239         * pthread_cond_init.c: Initialize __broadcast_seq field.
4240         * Makefile (tests): Add tst-cond17 and tst-cond18.
4241         Add .NOTPARALLEL goal.
4242         * tst-cond16.c: New file.  From Jakub.
4243         * tst-cond17.c: New file.  From Jakub.
4244         * tst-cond18.c: New file.  From Jakub.
4246 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4248         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4249         unwind info.
4251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4252         Parametrize frame size.  Correct some unwind info.
4253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4255 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4257         * tst-stack3.c: Note testing functionality beyond POSIX.
4259 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4261         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4262         Change conditional from ifdef to if.
4264 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4266         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4267         SYSDEP_CANCEL_ERROR): Define.
4268         (PSEUDO): Use it.
4270 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4272         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4274 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4276         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4278 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4280         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4281         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4282         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4283         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4285 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4287         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4288         thread has all signals blocked.
4290 2004-04-18  Andreas Jaeger  <aj@suse.de>
4292         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4293         (SEM_VALUE_MAX): Add missing brace.
4295 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4297         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4298         in rt subdir.
4299         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4300         * sysdeps/pthread/tst-mqueue8x.c: New test.
4301         * tst-cancel4.c: Update comment about message queues.
4303         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4304         return it_value { 0, 0 }.
4305         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4306         like SIGEV_SIGNAL.
4307         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4308         assertion for SIGEV_NONE.
4309         (thread_attr_compare): Compare all attributes, not just a partial
4310         subset.
4312 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4314         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4316 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4318         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4319         Just use a plain number.
4320         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4321         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4322         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4323         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4324         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4325         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4326         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4328 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4330         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4331         frame info.
4332         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4334 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4336         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4337         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4338         of calling sigwaitinfo.
4340 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4342         * allocatestack.c (allocate_stack): Set reported_guardsize
4343         unconditionally.
4344         * pthread_getattr_np.c (pthread_getattr_np): Use
4345         reported_guardsize instead of guardsize.
4346         * descr.h (struct pthread): Add reported_guardsize field.
4348 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4350         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4352 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4354         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4356 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4358         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4359         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4360         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4361         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4362         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4363         Define.
4364         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4365         (_POSIX_MESSAGE_PASSING): Define.
4366         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4367         (_POSIX_MESSAGE_PASSING): Define.
4368         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4369         (_POSIX_MESSAGE_PASSING): Define.
4371 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4373         * tst-context1.c (fct): Check whether correct stack is used.
4375 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4377         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4378         matching constraints for asm mem parameters.
4380         * tst-clock2.c (tf): Don't define unless needed.
4382 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4384         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4385         $(gnulib).
4387 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4389         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4390         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4391         * pthreadP.h: Declare __nptl_deallocate_tsd.
4392         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4393         Adjust caller.
4395         * Makefile (tests): Add tst-tsd5.
4396         * tst-tsd5.c: New file.
4398 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4400         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4401         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4402         is SHLIB_COMPAT check.
4403         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4404         (__pthread_attr_getaffinity_old): Likewise.
4405         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4406         (__pthread_getaffinity_old): Likewise.
4407         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4408         (__pthread_setaffinity_old): Likewise.
4410 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4412         * allocatestack.c (_make_stacks_executable): Call
4413         _dl_make_stack_executable first.
4415 2004-03-24  Roland McGrath  <roland@redhat.com>
4417         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4418         constraint instead of "0".
4420 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4422         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4423         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4425         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4426         code to avoid warning.
4428 2004-03-24  Andreas Jaeger  <aj@suse.de>
4430         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4431         (__pthread_attr_setaffinity_old): Remove const.
4433 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4435         * sysdeps/unix/sysv/linux/smp.h: New file.
4436         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4437         * init.c: Define __is_smp.
4438         (__pthread_initialize_minimal_internal): Call is_smp_system to
4439         initialize __is_smp.
4440         * pthreadP.h: Declare __is_smp.
4441         Define MAX_ADAPTIVE_COUNT is necessary.
4442         * pthread_mutex_init.c: Add comment regarding __spins field.
4443         * pthread_mutex_lock.c: Implement adaptive mutex type.
4444         * pthread_mutex_timedlock.c: Likewise.
4445         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4446         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4447         Add __spins field.
4448         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4449         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4450         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4451         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4452         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4453         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4454         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4455         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4456         lll_mutex_cond_trylock.
4457         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4458         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4459         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4460         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4461         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4462         Define BUSY_WAIT_NOP.
4463         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4464         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4466         * tst-mutex5.c: Add support for testing adaptive mutexes.
4467         * tst-mutex7.c: Likewise.
4468         * tst-mutex5a.c: New file.
4469         * tst-mutex7a.c: New file.
4470         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4472         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4473         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4474         vgettimeofday call might destroy the content.
4476         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4477         @pause in the loop.
4479         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4480         No need to restrict type of ret.  Make it int.  Add comment.
4482         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4483         Remove unnecessary setne instruction.
4485 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4487         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4488         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4489         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4490         If realloc fails, break out of the loop.
4492 2004-03-20  Andreas Jaeger  <aj@suse.de>
4494         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4495         (__pthread_setaffinity_old): Fix interface.
4496         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4497         (__pthread_getaffinity_old): Likewise.
4499         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4500         (__pthread_setaffinity_new): Remove duplicate declaration.
4502 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4504         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4505         the return value to a safe register.
4506         (CDISABLE): Set the function argument correctly.
4508 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4510         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4511         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4512         Rewrite so that only one locked memory operation per round is needed.
4513         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4514         (pthread_barrier_wait): After wakeup, release lock only when the
4515         last thread stopped using the barrier object.
4516         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4517         (__pthread_cond_wait): Don't store mutex address if the current
4518         value is ~0l.  Add correct cleanup support and unwind info.
4519         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4520         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4521         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4522         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4523         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4524         Add correct cleanup support and unwind info.
4525         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4526         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4527         information for syscall wrappers.
4529 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4531         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4532         cpusetsize field, remove next.
4533         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4534         parameter for size of the CPU set.
4535         (pthread_setaffinity_np): Likewise.
4536         (pthread_attr_getaffinity_np): Likewise.
4537         (pthread_attr_setaffinity_np): Likewise.
4538         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4539         interface change, keep compatibility code.
4540         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4541         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4542         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4543         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4544         __pthread_getaffinity_np.
4545         * Versions: Add version for changed interfaces.
4546         * tst-attr3.c: Adjust test for interface change.
4547         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4548         increasing buffer sizes.
4549         * pthread_attr_destroy.c: Remove unused list handling.
4550         * pthread_attr_init.c: Likewise.
4552 2004-03-17  Roland McGrath  <roland@redhat.com>
4554         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4555         first argument to clock_getres so we ever enable kernel timers.
4557 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4559         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4561 2004-03-12  Richard Henderson  <rth@redhat.com>
4563         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4564         oldvalue from CENABLE to CDISABLE.
4566 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4568         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4569         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4570         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4571         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4573 2004-03-11  Richard Henderson  <rth@redhat.com>
4575         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4576         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4577         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4579 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4581         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4582         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4583         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4585 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4587         * forward.c (__pthread_cond_broadcast_2_0,
4588         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4589         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4590         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4592 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4594         * sysdeps/sh/tcb-offsets.sym: Add PID.
4595         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4596         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4598 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4600         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4601         include <sysdep-cancel.h>, vfork is no cancellation point.
4602         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4603         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4604         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4606 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4608         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4609         libc_hidden_def.
4610         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4611         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4612         Likewise.
4613         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4614         Likewise.
4615         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4616         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4617         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4618         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4619         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4621         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4622         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4623         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4624         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4625         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4626         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4628         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4629         a local register for saving old PID.  Negate PID in parent upon exit.
4631         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4632         tcb-offsets.h.
4633         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4634         before syscall, set to the old value in the parent afterwards.
4635         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4636         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4637         tcb-offsets.h.
4638         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4639         before syscall, set to the old value in the parent afterwards.
4640         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4641         * sysdeps/s390/tcb-offsets.sym: Add PID.
4643         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4644         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4645         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4646         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4647         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4648         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4650 2004-03-10  Andreas Schwab  <schwab@suse.de>
4652         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4653         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4654         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4656 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4658         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4659         * tst-cancel21.c (do_one_test): Likewise.
4660         Reported by Gordon Jin <gordon.jin@intel.com>.
4662 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4664         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4665         if non-zero and set to INT_MIN if zero.
4666         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4667         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4668         (SAVE_PID, RESTORE_PID): Define.
4669         (__vfork): Use it.
4670         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4671         Use relative path to avoid including NPTL i386/vfork.S.
4672         (SAVE_PID, RESTORE_PID): Define.
4673         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4674         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4675         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4676         tst-vfork2x.
4677         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4678         * tst-vfork1.c: New test.
4679         * tst-vfork2.c: New test.
4680         * tst-vfork1x.c: New test.
4681         * tst-vfork2x.c: New test.
4683 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4685         * sysdeps/i386/tcb-offsets.sym: Add PID.
4686         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4687         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4688         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4690 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4692         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4694 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4696         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4697         _rtld_global_ro.
4699 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4701         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4702         _rtld_global_ro.
4704         * tst-once4.c: Remove unnecessary macro definition.
4706         * tst-mutex7.c (do_test): Limit thread stack size.
4707         * tst-once2.c (do_test): Likewise.
4708         * tst-tls3.c (do_test): Likewise.
4709         * tst-tls1.c (do_test): Likewise.
4710         * tst-signal3.c (do_test): Likewise.
4711         * tst-kill6.c (do_test): Likewise.
4712         * tst-key4.c (do_test): Likewise.
4713         * tst-join4.c (do_test): Likewise.
4714         * tst-fork1.c (do_test): Likewise.
4715         * tst-context1.c (do_test): Likewise.
4716         * tst-cond2.c (do_test): Likewise.
4717         * tst-cond10.c (do_test): Likewise.
4718         * tst-clock2.c (do_test): Likewise.
4719         * tst-cancel10.c (do_test): Likewise.
4720         * tst-basic2.c (do_test): Likewise.
4721         * tst-barrier4.c (do_test): Likewise.
4723 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4725         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4727 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4730         (__pthread_cond_timedwait): Optimize wakeup test.
4731         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4732         (__pthread_cond_wait): Likewise.
4733         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4734         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4735         Likewise.
4737 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4739         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4740         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4741         the atomic instruction needed.
4742         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4743         (__lll_mutex_lock_wait): Likewise.
4745 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4747         * Makefile (tests): Add tst-cond14 and tst-cond15.
4748         * tst-cond14.c: New file.
4749         * tst-cond15.c: New file.
4751 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4753         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4754         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4755         needs to be implemented differently to be useful.
4757 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4759         * pthread_attr_setschedparam.c: Don't test priority against limits
4760         here.  Set ATTR_FLAG_SCHED_SET flag.
4761         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4762         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4763         from parent thread to child.  If attribute is used and scheduling
4764         parameters are not inherited, copy parameters from attribute or
4765         compute them.  Check priority value.
4766         * pthread_getschedparam.c: If the parameters aren't known yet get
4767         them from the kernel.
4768         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4769         ATTR_FLAG_POLICY_SET flag for thread.
4770         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4771         and ATTR_FLAG_POLICY_SET.
4773         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4775         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4776         fail if stack address hasn't been set.  Just return 0.
4778 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4780         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4781         libpthread for the files in this list.
4782         (CFLAGS-tst-unload): Removed.
4783         * tst-unload.c (do_test): Don't use complete path for
4784         LIBPHREAD_SO.
4786         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4787         tst-_res1mod2.
4789 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4791         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4792         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4793         operation per round is needed.
4794         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4795         (__lll_mutex_lock_wait): Likewise.
4797 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4799         * tst-cancel9.c (cleanup): Don't print to stderr.
4801 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4803         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4805 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4807         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4808         (__syscall_error_handler2): Call CDISABLE.
4809         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4810         (__syscall_error_handler2): Call CDISABLE.
4812         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4813         Release lock before the loop, don't reacquire it.
4815         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4817 2004-02-19  Andreas Schwab  <schwab@suse.de>
4819         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4820         Fix last change.
4822 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4824         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4825         (pthread_barrier_wait): After wakeup, release lock only when the
4826         last thread stopped using the barrier object.
4827         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4828         (pthread_barrier_wait): Likewise.
4829         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4830         Likewise.
4831         * Makefile (tests): Add tst-barrier4.
4832         * tst-barrier4.c: New file.
4834         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4835         (__pthread_cond_timedwait): Perform timeout test while holding
4836         internal lock to prevent wakeup race.
4837         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4838         * sysdeps/pthread/pthread_cond_timedwait.c
4839         (__pthread_cond_timedwait): Likewise.
4840         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4841         (__pthread_cond_timedwait): Likewise.
4843 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4845         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4846         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4847         * Makefile (tests): Add tst-rwlock13.
4848         * tst-rwlock13.c: New test.
4850 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4852         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4853         (__condvar_tw_cleanup): Little optimization.
4854         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4856 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4858         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4859         libpthread as "lib" parameter to SHLIB_COMPAT.
4860         (__novmx_siglongjmp): Fix typo in function name.
4861         (__novmx_longjmp): Fix typo in function name.
4863 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4865         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4866         __builtin_expect.
4868         * sysdeps/generic/pt-longjmp.c: Moved to...
4869         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4871 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4873         * Makefile (libpthread-routines): Add pt-cleanup.
4874         * pt-longjmp.c: Removed.
4875         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4876         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4877         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4878         Version longjmp, siglongjmp for GLIBC_2.3.4.
4879         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4881 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4883         * sysdeps/pthread/pthread_cond_timedwait.c
4884         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4885         Reuse code.  Add __builtin_expects.
4887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4888         (__pthread_cond_timedwait): Get internal lock in case timeout has
4889         passed before the futex syscall.
4890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4892 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4894         * allocatestack.c: Pretty printing.
4896         * sysdeps/pthread/createthread.c (create_thread): Don't add
4897         CLONE_DETACHED bit if it is not necessary.
4899 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4901         * pthread_getattr_np.c: Include ldsodefs.h.
4903 2004-01-16  Richard Henderson  <rth@redhat.com>
4905         * allocatestack.c: Don't declare __libc_stack_end.
4906         * init.c (__pthread_initialize_minimal_internal): Likewise.
4907         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4909 2004-01-15  Richard Henderson  <rth@redhat.com>
4911         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4912         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4913         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4914         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4915         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4916         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4917         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4918         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4920 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4922         * init.c (pthread_functions): Make array const.
4924 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4926         * allocatestack.c (__make_stacks_executable): Change interface.
4927         Check parameters.  Pass parameter on to libc counterpart.
4928         * pthreadP.h: Change declaration.
4930 2004-01-13  Richard Henderson  <rth@redhat.com>
4932         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4933         prototype form.
4934         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4935         Likewise.
4937         * sysdeps/alpha/Makefile: New file.
4938         * sysdeps/alpha/tcb-offsets.sym: New file.
4939         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4940         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4942         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4943         on powerpc version.
4945 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4947         * Makefile (tests): Add tst-backtrace1.
4948         * tst-backtrace1.c: New test.
4950 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4952         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4953         register as second parameter to the REGISTER macro.
4954         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4955         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4956         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4957         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4958         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4959         of thread register as second parameter to REGISTER macro in 64 case.
4961 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4963         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4964         (CFLAGS-getpid.o): Defined.
4965         (CFLAGS-getpid.os): Defined.
4967 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4969         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4970         returned for main thread does not overlap with any other VMA.
4971         Patch by Jakub Jelinek.
4973 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4975         * tst-raise1.c: Include stdio.h.
4977 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4979         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4980         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4981         If pid is 0, set it to selftid.
4982         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4983         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4984         != 0, return self->tid without doing a syscall.
4985         * descr.h (struct pthread): Move pid field after tid.
4987         * Makefile (tests): Add tst-raise1.
4988         * tst-raise1.c: New file.
4990 2003-12-23  Roland McGrath  <roland@redhat.com>
4992         * tst-oddstacklimit.c: New file.
4993         * Makefile (tests): Add it.
4994         (tst-oddstacklimit-ENV): New variable.
4996         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4997         value up to page size for __default_stacksize.
4999 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5001         * Makefile (tests): Add tst-eintr5.
5002         * tst-eintr5.c: New file.
5004         * eintr.c (eintr_source): Prevent sending signal to self.
5006         * tst-eintr2.c (tf1): Improve error message.
5008 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5010         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5011         * sysdeps/unix/sysv/linux/getpid.c: New file.
5012         * pthread_cancel.c: Add comment explaining use of PID field.
5013         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5014         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5015         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5016         temporarily to signal the field must not be relied on and updated
5017         by getpid().
5018         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5019         temporarily negative.
5020         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5022 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5024         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5025         (eintr_source): If ARG != NULL, use pthread_kill.
5026         * tst-eintr1.c: Adjust for this change.
5027         * tst-eintr2.c: Likewise.
5028         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5029         * tst-eintr3.c: New file.
5030         * tst-eintr4.c: New file.
5032 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5034         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5035         if CANCELSTATE_BITMASK is set.
5036         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5037         Likewise.
5039         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5040         (tests-reverse): Add tst-cancel23.
5041         * tst-cancel22.c: New test.
5042         * tst-cancel23.c: New test.
5044 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5046         * tst-eintr1.c: Better error messages.
5048         * Makefile (tests): Add tst-eintr2.
5049         * tst-eintr2.c: New file.
5051 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5053         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5054         (CFLAGS-tst-cancelx21.c): Set.
5055         * tst-cancel21.c: New test.
5056         * tst-cancelx21.c: New test.
5058         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5059         comparison operand.
5060         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5061         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5062         * pt-longjmp.c: Include jmpbuf-unwind.h.
5063         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5064         _JMPBUF_UNWINDS.  Adjust compared pointers.
5065         * init.c (__pthread_initialize_minimal_internal): Initialize
5066         pd->stackblock_size.
5067         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5068         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5069         * sysdeps/i386/jmpbuf-unwind.h: New file.
5070         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5071         * sysdeps/s390/jmpbuf-unwind.h: New file.
5072         * sysdeps/sh/jmpbuf-unwind.h: New file.
5073         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5074         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5075         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5076         (_JMPBUF_CFA_UNWINDS): Remove.
5077         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5079 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5081         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5082         (CFLAGS-tst-cancelx20.c): Set.
5083         * tst-cancel20.c: New test.
5084         * tst-cancelx20.c: New test.
5086 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5088         * init.c (__pthread_initialize_minimal_internal): Don't treat
5089         architectures with separate register stack special here when
5090         computing default stack size.
5092 2003-12-17  Roland McGrath  <roland@redhat.com>
5094         * Makefile (tst-cancelx7-ARGS): New variable.
5095         Reportd by Greg Schafer <gschafer@zip.com.au>.
5097 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5099         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5100         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5101         (tst-stack3-ENV): Set.
5102         ($(objpfx)tst-stack3-mem): New.
5103         * tst-stack3.c: New test.
5105 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5107         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5108         Add unwind directives.  Drop unused .regstk directive.
5109         (_fini_EPILOG_BEGINS): Add unwind directives.
5111 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5113         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5114         Assume parameter is a pointer.
5115         (lll_futex_wake): Likewise.
5116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5117         Likewise.
5118         (lll_futex_wake): Likewise.
5119         Reported by Boris Hu.
5120         * sysdeps/unix/sysv/linux/unregister-atfork.c
5121         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5123         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5125 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5127         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5128         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5129         __rtld_lock_initialize for ld.so lock.
5130         Patch in part by Adam Li <adam.li@intel.com>.
5132 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5134         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5135         in $(gnulib).  Also, remove stale comment.
5137 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5139         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5140         advantage of new syscall stub and optimize accordingly.
5142         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5143         from SYS_futex, to match expectations of
5144         sysdep.h:DO_INLINE_SYSCALL.
5145         (lll_futex_clobbers): Remove.
5146         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5147         (lll_futex_wake): Likewise.
5148         (lll_futex_requeue): Likewise.
5149         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5150         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5151         Jelinek).
5152         (__lll_mutex_lock): Likewise.
5153         (__lll_mutex_cond_lock): Likewise.
5154         (__lll_mutex_timed_lock): Likewise.
5155         (__lll_mutex_unlock): Likewise.
5156         (__lll_mutex_unlock_force): Likewise.
5158         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5159         comes before the include of <sysdep.h>.
5160         (THREAD_SELF_SYSINFO): New macro.
5161         (THREAD_SYSINFO): Likewise.
5162         (INIT_SYSINFO): New macro.
5163         (TLS_INIT_TP): Call INIT_SYSINFO.
5165         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5167         * sysdeps/pthread/createthread.c (create_thread): Use
5168         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5169         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5170         THREAD_SELF_SYSINFO instead of open code.
5171         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5172         (THREAD_SYSINFO): Likewise.
5174         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5176         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5178 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5180         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5181         instead of .init.  Patch by David Mosberger.
5183 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5185         * sysdeps/pthread/configure.in: Remove broken declaration in C
5186         cleanup handling check.
5188 2003-11-30  Andreas Jaeger  <aj@suse.de>
5190         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5191         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5192         Likewise.
5194 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5196         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5197         * pthread_attr_destroy.c: Include shlib-compat.h.
5198         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5199         is set in iattr->flags.
5200         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5202 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5204         * Makefile (distribute): Add tst-cleanup4aux.c.
5206         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5207         include.
5209 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5211         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5212         pthread_cond_signal.
5214         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5215         store mutex address if the current value is ~0l.
5216         * sysdeps/pthread/pthread_cond_timedwait.c
5217         (__pthread_cond_timedwait): Likewise.
5218         * sysdeps/pthread/pthread_cond_broadcast.c
5219         (__pthread_cond_broadcast): Don't use requeue for pshared
5220         condvars.
5222         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5223         (__pthread_cond_wait): Don't store mutex address if the current
5224         value is ~0l.
5225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5226         (__pthread_cond_timedwait): Likewise.
5227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5228         (__pthread_cond_broadcast): Don't use requeue for pshared
5229         condvars.
5231         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5232         element with ~0l for pshared condvars, with NULL otherwise.
5234         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5235         (__pthread_cond_wait): Don't store mutex address if the current
5236         value is ~0l.
5237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5238         (__pthread_cond_timedwait): Likewise.
5239         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5240         (__pthread_cond_broadcast): Don't use requeue for pshared
5241         condvars.
5243         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5244         * tst-cond12.c: New file.
5245         * tst-cond13.c: New file.
5247 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5249         * sysdeps/pthread/configure.in: Make missing forced unwind support
5250         fatal.
5252 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5254         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5256 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5258         * Makefile: Add magic to clean up correctly.
5260 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5262         * unwind.c (FRAME_LEFT): Define.
5263         (unwind_stop): Handle old style cleanups here.
5264         (__pthread_unwind): Handle old style cleanups only if
5265         !HAVE_FORCED_UNWIND.
5266         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5267         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5268         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5269         ($(objpfx)tst-cleanupx4): Likewise.
5270         * tst-cleanup4.c: New test.
5271         * tst-cleanup4aux.c: New.
5272         * tst-cleanupx4.c: New test.
5274 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5276         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5277         lll_mutex_*lock macros to skip atomic operations on some archs.
5279 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5281         * sysdeps/pthread/tst-timer.c (main): Initialize
5282         sigev2.sigev_value as well.
5284 2003-10-15  Roland McGrath  <roland@redhat.com>
5286         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5287         is missing.
5288         * sysdeps/pthread/configure: Regenerated.
5290 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5292         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5293         locking macros.  No distinction between normal and mutex locking
5294         anymore.
5295         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5296         Merge bits from lowlevelmutex.S we still need.
5297         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5298         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5299         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5300         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5301         new mutex implementation.
5302         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5303         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5304         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5305         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5306         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5307         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5308         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5309         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5310         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5311         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5312         symbol for entry point to avoid cancellation.
5314 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5316         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5317         changes.
5318         (SAVE_OLDTYPE_0): Fix a typo.
5320 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5322         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5323         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5325 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5327         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5328         correct offset.
5330 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5332         * Makefile (tests): Add tst-cancel19.
5333         * tst-cancel19.c: New test.
5335 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5337         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5338         restoring of the old cancellation type.
5340 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5342         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5344 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5346         * sysdeps/pthread/malloc-machine.h: New file
5348 2003-09-24  Roland McGrath  <roland@redhat.com>
5350         * allocatestack.c (__make_stacks_executable): Don't ignore return
5351         value from _dl_make_stack_executable.
5353 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5355         * allocatestack.c (__make_stacks_executable): Also change
5356         permission of the currently unused stacks.
5358         * allocatestack.c (change_stack_perm): Split out from
5359         __make_stacks_executable.
5360         (allocate_stack): If the required permission changed between the time
5361         we started preparing the stack and queueing it, change the permission.
5362         (__make_stacks_executable): Call change_stack_perm.
5364         * Makefile: Build tst-execstack-mod locally.
5365         * tst-execstack-mod.c: New file.
5367 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5369         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5371 2003-09-23  Roland McGrath  <roland@redhat.com>
5373         * tst-execstack.c: New file.
5374         * Makefile (tests): Add it.
5375         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5376         (LDFLAGS-tst-execstack): New variable.
5378         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5379         whether to use PROT_EXEC for stack mmap.
5380         (__make_stacks_executable): New function.
5381         * pthreadP.h: Declare it.
5382         * init.c (__pthread_initialize_minimal_internal): Set
5383         GL(dl_make_stack_executable_hook) to that.
5385 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5387         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5388         recommendation from AMD re avoidance of lock prefix.
5390 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5392         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5393         lll_futex_timed_wait instead of lll_futex_wait.
5394         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5395         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5396         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5397         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5398         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5399         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5400         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5401         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5402         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5403         Completely revamp the locking macros.  No distinction between
5404         normal and mutex locking anymore.
5405         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5406         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5407         __lll_lock_timedwait): Fix prototypes.
5408         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5409         __lll_lock_timedwait): Likewise.
5410         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5411         macros, add __builtin_expect.
5412         (lll_mutex_timedlock): Likewise.  Fix return value.
5413         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5414         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5415         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5416         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5417         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5418         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5419         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5420         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5422 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5424         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5425         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5426         operation if possible.
5428         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5429         like jumping over the lock prefix.
5431 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5433         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5434         locking macros.  No distinction between normal and mutex locking
5435         anymore.
5436         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5437         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5438         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5439         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5440         locking.  Merge bits from lowlevelmutex.S we still need.
5441         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5442         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5443         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5444         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5445         * Makefile (routines): Remove libc-lowlevelmutex.
5446         (libpthread-rountines): Remove lowlevelmutex.
5447         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5448         for new mutex implementation.
5449         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5453         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5454         Likewise.
5455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5456         Likewise.
5457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5458         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5459         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5461         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5463         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5464         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5465         Likewise.
5466         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5467         Likewise.
5468         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5469         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5470         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5471         Don't use requeue.
5472         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5473         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5475 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5477         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5478         in parameters of asm with output parameters.
5480         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5481         type of DECR parameter to int.
5482         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5484 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5486         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5487         guardsize for each thread.
5489 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5491         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5492         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5493         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5495         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5496         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5497         NULL.
5498         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5499         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5500         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5501         (pthread_getaffinity_np): Add hidden_def.
5503         * Makefile (tests): Add tst-attr3.
5504         * tst-attr3.c: New test.
5506         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5508 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5510         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5511         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5513 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5515         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5516         * tst-align.c: Include tst-stack-align.h.
5517         (tf, do_test): Use TEST_STACK_ALIGN macro.
5519 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5521         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5522         variable.
5524 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5526         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5527         stack-related values for the initial thread.
5529 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5531         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5533 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5535         * pthread_mutex_lock.c: Minor code rearrangements.
5537 2003-09-05  Roland McGrath  <roland@redhat.com>
5539         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5540         Instead, include ../nptl_db/db_info.c to do its magic.
5541         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5542         (__pthread_pthread_key_2ndlevel_size): Likewise.
5543         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5544         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5545         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5546         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5547         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5548         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5549         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5550         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5551         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5552         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5553         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5554         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5555         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5556         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5557         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5558         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5559         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5561 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5563         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5564         of pthread_t to be compatible with LT.
5565         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5566         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5567         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5568         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5569         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5570         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5571         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5573 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5575         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5577 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5579         * unwind-forcedunwind.c: Move to...
5580         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5581         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5582         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5583         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5584         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5585         * unwind.c: Include jmpbuf-unwind.h.
5586         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5588 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5590         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5591         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5592         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5593         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5594         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5595         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5596         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5597         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5598         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5599         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5600         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5601         function.
5602         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5603         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5604         * Makefile (tests): Add tst-stack2.
5605         * tst-stack2.c: New test.
5606         * tst-stack1.c: Include limits.h and sys/param.h.
5607         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5609         * pthread_condattr_setpshared.c: Include errno.h.
5610         (pthread_condattr_setpshared): Return EINVAL if pshared
5611         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5613         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5614         defined symbol for entry point to avoid cancellation.
5615         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5616         Likewise.
5617         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5618         Likewise.
5619         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5620         Likewise.
5621         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5622         Likewise.
5623         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5624         Likewise.
5625         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5626         __close_nocancel, __read_nocancel, __write_nocancel,
5627         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5628         libpthread.so or librt.so, define to corresponding function
5629         without _nocancel suffix.
5630         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5631         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5632         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5634         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5636 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5638         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5639         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5641         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5642         in subsections has a symbol associated with it.
5644         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5645         defined symbol for entry point to avoid cancellation.
5646         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5648 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5650         * Makefile (tests): Add tst-tls5.
5651         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5652         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5653         ($(objpfx)tst-tls5): New.
5654         ($(objpfx)tst-tls6.out): Likewise.
5655         (tests): Depend on $(objpfx)tst-tls6.out.
5656         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5657         (do_test): Check pthread_self () return value alignment.
5658         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5659         (tf): Check pthread_self () return value alignment.
5660         * tst-tls5.c: New test.
5661         * tst-tls5.h: New.
5662         * tst-tls5mod.c: New.
5663         * tst-tls5moda.c: New.
5664         * tst-tls5modb.c: New.
5665         * tst-tls5modc.c: New.
5666         * tst-tls5modd.c: New.
5667         * tst-tls5mode.c: New.
5668         * tst-tls5modf.c: New.
5669         * tst-tls6.sh: New test.
5671         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5672         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5673         * init.c (pthread_functions): Initialize them.
5674         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5675         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5676         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5677         pthread_cond_timedwait@@GLIBC_2.3.2.
5679 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5681         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5682         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5683         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5684         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5685         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5686         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5688         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5690         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5691         _POSIX_THREAD_PRIORITY_SCHEDULING.
5692         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5694 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5696         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5697         nested function, use static inline function from libio.h.
5698         Code by Richard Henderson.
5700         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5701         weak.
5703 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5705         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5706         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5707         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5708         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5709         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5710         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5711         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5712         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5713         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5714         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5715         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5716         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5717         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5718         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5719         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5720         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5721         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5722         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5723         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5724         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5725         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5726         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5727         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5728         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5729         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5730         * sysdeps/sparc/tls.h: New file.
5731         * sysdeps/sparc/tcb-offsets.sym: New file.
5732         * sysdeps/sparc/Makefile: New file.
5733         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5734         * init.c [__sparc__] (__NR_set_tid_address): Define.
5736 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5738         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5739         _IO_release_lock): Define.
5741 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5743         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5744         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5746 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5748         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5749         (__pthread_cleanup_class): Add missing return types of member
5750         functions.
5752 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5754         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5755         (lll_mutex_unlock_force): Add memory barrier between store and futex
5756         syscall.
5758 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5760         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5761         tempmsg in first loop.
5763 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5765         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5766         _POSIX_THREAD_PRIORITY_SCHEDULING.
5767         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5769 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5771         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5772         (__rtld_lock_default_lock_recursive,
5773         __rtld_lock_default_unlock_recursive): Define.
5774         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5775         __rtld_lock_unlock_recursive): Define using
5776         GL(_dl_rtld_*lock_recursive).
5777         * init.c (__pthread_initialize_minimal_internal): Initialize
5778         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5779         Lock GL(_dl_load_lock) the same number of times as
5780         GL(_dl_load_lock) using non-mt implementation was nested.
5782         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5783         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5785 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5787         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5788         PIPE_BUF.
5790 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5792         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5794 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5796         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5797         to first syscall error check.  Move syscall error check for tkill
5798         into __ASSUME_CLONE_STOPPED #ifdef.
5800 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5802         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5803         is not defined, do explicit synchronization.
5804         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5805         is not defined also unlock pd->lock for non-debugging case in case
5806         it is necessary.
5807         * pthread_create.c (start_thread): Always get and release pd->lock
5808         if __ASSUME_CLONE_STOPPED is not defined.
5809         (start_thread_debug): Removed.  Adjust users.
5810         * allocatestack.c (allocate_stack): Always initialize lock if
5811         __ASSUME_CLONE_STOPPED is not defined.
5812         * Makefile (tests): Add tst-sched1.
5813         * tst-sched1.c: New file.
5815         * sysdeps/pthread/createthread.c (do_clone): Only use
5816         sched_setschduler and pass correct parameters.
5818 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5820         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5821         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5822         PTHREAD_STACK_MIN in comments.
5824 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5826         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5827         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5828         argument.
5829         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5830         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5831         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5832         (__pthread_cleanup_upto): Fix prototype.
5833         (_longjmp_unwind): Adjust caller.
5834         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5835         Change second argument to const struct pointer.
5836         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5837         * tst-sem9.c (main): Likewise.
5838         * unwind.c: Include string.h for strlen prototype.
5840 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5842         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5843         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5844         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5845         Define HAVE_CMOV.
5846         Patch by Nicholas Miell <nmiell@attbi.com>.
5848 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5850         * init.c (__pthread_initialize_minimal_internal): Initialize
5851         GL(dl_init_static_tls).
5852         * pthreadP.h (__pthread_init_static_tls): New prototype.
5853         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5854         New functions.
5855         * Makefile (tests): Add tst-tls4.
5856         (modules-names): Add tst-tls4moda and tst-tls4modb.
5857         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5858         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5859         tst-tls4modb.so.
5860         * tst-tls4.c: New file.
5861         * tst-tls4moda.c: New file.
5862         * tst-tls4modb.c: New file.
5864 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5866         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5867         before __timer_dealloc.
5868         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5869         Don't call list_unlink.
5871 2003-07-29  Roland McGrath  <roland@redhat.com>
5873         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5875 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5877         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5878         Don't reuse struct aiocb A if it failed.
5879         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5880         not just one byte, as that does not block.
5882 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5884         * sysdeps/pthread/unwind-resume.c: New file.
5885         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5886         unwind-resume in csu subdir.
5887         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5888         exceptions.
5889         (librt-sysdep_routines, librt-shared-only-routines): Add
5890         rt-unwind-resume.
5891         * sysdeps/pthread/rt-unwind-resume.c: New file.
5892         * unwind-forcedunwind.c: New file.
5893         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5894         (libpthread-shared-only-routines): Likewise.
5895         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5896         * pthreadP.h (pthread_cancel_init): New prototype.
5897         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5899         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5900         attr argument const struct pthread_attr *.
5902         * res.c (__res_state): Return __resp.
5903         * descr.h: Include resolv.h.
5904         (struct pthread): Add res field.
5905         * pthread_create.c: Include resolv.h.
5906         (start_thread): Initialize __resp.
5907         * Makefile (tests): Add tst-_res1.
5908         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5909         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5910         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5911         libpthread.
5912         * tst-_res1.c: New file.
5913         * tst-_res1mod1.c: New file.
5914         * tst-_res1mod2.c: New file.
5916 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5918         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5920         * Makefile: Define various *-no-z-defs variables for test DSOs
5921         which has undefined symbols.
5923 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5925         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5926         Retry if the stwcx fails to store once_control.
5928 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5930         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5931         pthread_attr_setaffinity.
5932         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5933         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5934         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5935         * pthread_attr_destroy.c: Free cpuset element if allocated.
5936         * pthread_create.c: Pass iattr as additional parameter to
5937         create_thread.
5938         * sysdeps/pthread/createthread.c: If attribute is provided and
5939         a new thread is created with affinity set or scheduling parameters,
5940         start thread with CLONE_STOPPED.
5941         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5942         pthread_attr_setaffinity.
5943         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5944         cpuset element.
5946 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5948         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5950 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5952         * sysdeps/pthread/configure.in: Require CFI directives also for
5953         ppc and s390.
5955 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5957         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5958         Add cfi directives.
5960 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5962         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5963         CLEANUP_JMP_BUF.
5964         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5965         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5966         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5967         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5968         not self pointer in __writer.  Compare with TID to determine
5969         deadlocks.
5970         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5971         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5972         Likewise.
5973         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5974         Likewise.
5975         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5976         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5977         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5978         macros also when compiling librt.
5980 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5982         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5983         -fasynchronous-unwind-tables.
5984         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5985         (PSEUDO): Add cfi directives.
5986         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5987         Likewise.
5988         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5989         Likewise.
5991 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5993         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5994         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5995         * unwind.c (__pthread_unwind_next): Add hidden_def.
5996         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5997         Likewise.
5998         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5999         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6000         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6001         Likewise.
6002         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6003         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6004         Likewise.
6005         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6006         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6007         __pthread_unregister_cancel and __pthread_unwind_next.
6009 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6011         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6012         different symbol for the cancellation syscall wrapper and
6013         non-cancellation syscall wrapper.
6014         (PSEUDO_END): Define.
6016 2003-07-05  Richard Henderson  <rth@redhat.com>
6018         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6019         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6020         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6021         return actual return value from the syscall, not 0.
6023 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6025         * descr.h (struct pthread): Add pid field.
6026         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6027         (__reclaim_stacks): Likewise.
6028         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6029         also check for PID of the signal source.
6030         (__pthread_initialize_minimal_internal): Also initialize pid field
6031         of initial thread's descriptor.
6032         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6033         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6034         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6035         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6036         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6038 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6040         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6041         Fix use of parameter.
6042         (__libc_cleanup_pop): Likewise.
6044 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6046         * init.c (sigcancel_handler): Change parameters to match handler
6047         for SA_SIGACTION.  Check signal number and code to recognize
6048         invalid invocations.
6050 2003-07-03  Roland McGrath  <roland@redhat.com>
6052         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6053         Apply sizeof (struct pthread) bias to r13 value.
6055 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6057         * sysdeps/pthread/configure.in: Require CFI directives.
6059         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6060         definition.
6061         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6062         libpthread compilation.
6063         * unwind.c (__pthread_unwind): Add hidden_def.
6064         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6066 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6068         * libc-cancellation.c (__libc_cleanup_routine): Define.
6069         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6070         (__pthread_cleanup_pop): Define.
6072 2003-07-01  Richard Henderson  <rth@redhat.com>
6074         * sysdeps/alpha/elf/pt-initfini.c: New file.
6075         * sysdeps/alpha/pthread_spin_lock.S: New file.
6076         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6077         * sysdeps/alpha/pthreaddef.h: New file.
6078         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6079         * sysdeps/alpha/tls.h: New file.
6080         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6081         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6082         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6083         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6084         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6085         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6086         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6087         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6088         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6089         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6091 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6093         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6094         cleanup support and unwind info.
6096 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6098         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6099         Use correct cleanup handler registration.  Add unwind info.
6100         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6101         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6102         * tst-once3.c: Add cleanup handler and check it is called.
6103         * tst-once4.c: Likewise.
6104         * tst-oncex3.c: New file.
6105         * tst-oncex4.c: New file.
6106         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6108 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6110         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6112 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6114         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6115         (tf_msgsnd): Likewise.
6117         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6118         premature returns a bit more.
6120 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6122         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6123         definition to the front.
6125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6126         the cleanup functions to make the names unique.  Fix dwarf opcode
6127         un unwind table.
6128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6129         functions to make the names unique.  Fix CFA offset for two blocks.
6131 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6133         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6134         missing closing braces.
6135         Patch by Christophe Saout <christophe@saout.de>.
6137 2003-06-24  Roland McGrath  <roland@redhat.com>
6139         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6141 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6143         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6144         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6146         * pthreadP.h: Declare __find_thread_by_id.
6147         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6148         * pthread_clock_gettime.c: Allow using other thread's clock.
6149         * pthread_clock_settime.c: Likewise.
6150         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6151         * Makefile: Add rules to build and run tst-clock2.
6152         * tst-clock2.c: New file.
6154 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6156         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6157         to use exception-based cleanup handler.
6158         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6160         * tst-cond8.c (ch): Announce that we are done.
6162         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6164         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6165         Also test aio_suspend with timeout value.
6167 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6169         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6170         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6171         attribute_hidden.
6173         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6174         (__pthread_mutex_lock_internal): Likewise.
6175         (__pthread_mutex_unlock_internal): Likewise.
6176         (__pthread_mutex_unlock_usercnt): Declare.
6177         * pthread_mutex_destroy.c: Always fail if used in any way.
6178         * pthread_mutex_init.c: Update comment.
6179         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6180         * pthread_mutex_timedlock.c: Adjust __nusers.
6181         * pthread_mutex_trylock.c: Adjust __nusers.
6182         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6183         and public interfaces are wrapper with pass additional parameter.
6184         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6185         parameter zero.
6186         * tst-mutex8.c: New file.
6187         * Makefile (tests): Add tst-mutex8.
6188         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6189         __pthread_mutex_unlock_usercnt.
6190         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6192         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6193         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6195         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6196         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6197         Add __nusers.
6198         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6199         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6200         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6201         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6202         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6204         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6205         * pthread_mutex_timedlock.c: Likewise.
6206         * pthread_mutex_trylock.c: Adjust __nusers.
6207         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6208         * tst-mutex9.c: New file.
6209         * Makefile (tests): Add tst-mutex9.
6210         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6211         * sysdeps/ia64/tls.h: Likewise.
6212         * sysdeps/powerpc/tls.h: Likewise.
6213         * sysdeps/s390/tls.h: Likewise.
6214         * sysdeps/sh/tls.h: Likewise.
6215         * sysdeps/x86_64/tls.h: Likewise.
6216         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6217         Change type of __owner.
6218         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6219         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6220         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6221         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6222         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6224 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6226         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6227         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6229         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6230         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6231         instead of nr to lll_futex_wake.  Only set errno and return -1
6232         if err < 0.
6234         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6235         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6236         return actual return value from the syscall, not 0.
6238 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6240         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6241         find a random value.
6242         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6243         errno==EIDRM.
6245         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6246         compat_timer_settime.
6247         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6248         compat_timer_gettime.
6249         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6250         compat_timer_getoverrun.
6251         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6252         compat_timer_delete.
6254         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6255         error-checking mutex detect busy mutexes.
6257 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6259         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6260         Add ax to clobber list.
6261         (lll_mutex_cond_lock): Likewise.
6262         (lll_mutex_unlock): Likewise.
6263         (lll_lock): Likewise.
6264         (lll_unlock): Likewise.
6266         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6267         * tst-cancel18.c: New file.
6268         * tst-cancelx18.c: New file.
6270         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6271         and tcdrain.
6273         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6274         * tst-cancel17.c: New file.
6275         * tst-cancelx17.c: New file.
6277         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6278         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6279         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6281         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6283 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6285         * sysdeps/pthread/createthread.c (create_thread): Set
6286         header.multiple_threads unconditionally.
6287         * allocatestack.c (allocate_stack): Likewise.
6288         * descr.h (struct pthread): Add header.multiple_threads
6289         unconditionally.
6290         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6291         Define for librt.  #error if neither libpthread, libc nor librt.
6292         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6293         Likewise.
6294         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6295         CDISABLE): Likewise.
6296         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6297         CDISABLE): Likewise.
6298         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6299         CDISABLE): Likewise.
6300         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6301         CDISABLE): Likewise.  Access header.multiple_threads outside of
6302         libc and libpthread.
6303         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6304         Likewise.
6305         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6306         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6308 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6310         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6311         Also test early cancellation before the thread reaches the cancellation
6312         point.
6314         * Makefile: Compile forward.c with exceptions.
6316         * sysdeps/unix/sysv/linux/sleep.c: New file.
6318 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6320         * Makefile: Add CFLAGS definition to compile function wrappers
6321         duplicated from libc with exceptions.
6322         * tst-cancel4.c: Also check cancellation handlers.
6324         * Makefile: Add rules to build and run tst-cancel16 and
6325         tst-cancelx16.  Add missing CFLAGS definitions.
6326         * tst-cancel16.c: New file.
6327         * tst-cancelx16.c: New file.
6329 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6331         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6332         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6333         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6334         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6336         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6337         (LIBC_CANCEL_RESET): Likewise.
6338         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6339         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6340         librt-cancellation.
6341         (CFLAGS-libcrt-cancellation.c): Define.
6342         * sysdeps/pthread/librt-cancellation.c: New file.
6343         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6344         macros also when compiling librt.
6345         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6346         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6347         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6348         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6349         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6350         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6351         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6353         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6354         compat_timer_create.
6356 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6358         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6360         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6361         __register_atfork.
6362         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6363         Add libc_hidden_def.
6365 2003-06-13  Roland McGrath  <roland@redhat.com>
6367         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6368         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6370 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6372         * allocatestack.c (queue_stack): Always inline.
6373         * ptreadhP.h (__do_cancel): Likewise.
6375 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6377         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6378         a typo.
6380 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6383         (__pthread_cond_signal): Remove incorrect second addition for
6384         cond_lock!=0.
6386 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6388         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6389         (__pthread_cond_signal): Use correct futex pointer in
6390         __lll_mutex_lock_wait call.
6392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6393         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6395 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6397         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6398         cancelable.
6399         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6400         Likewise.
6402         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6403         hand-written CFI generation code.  Since ENTRY/END also initiated
6404         CFI frames this caused two CFI sets to be generated.
6406 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6408         * cleanup_routine.c: New file.
6409         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6410         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6411         cleanup handling.
6412         * Makefile (libpthread-routines): Add cleanup_routine.
6413         Add more CFLAGS variables to compile with exceptions.  Add comments
6414         why which file needs unwind tables.
6415         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6416         tests.
6417         * tst-cancelx1.c: New file.
6418         * tst-cancelx2.c: New file.
6419         * tst-cancelx3.c: New file.
6420         * tst-cancelx4.c: New file.
6421         * tst-cancelx5.c: New file.
6422         * tst-cancelx6.c: New file.
6423         * tst-cancelx7.c: New file.
6424         * tst-cancelx8.c: New file.
6425         * tst-cancelx9.c: New file.
6426         * tst-cancelx10.c: New file.
6427         * tst-cancelx11.c: New file.
6428         * tst-cancelx12.c: New file.
6429         * tst-cancelx13.c: New file.
6430         * tst-cancelx14.c: New file.
6431         * tst-cancelx15.c: New file.
6432         * tst-cleanupx0.c: New file.
6433         * tst-cleanupx0.expect: New file.
6434         * tst-cleanupx1.c: New file.
6435         * tst-cleanupx2.c: New file.
6436         * tst-cleanupx3.c: New file.
6438         * tst-cleanup0.c: Make standard compliant.
6439         * tst-cleanup1.c: Likewise.
6441         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6442         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6443         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6444         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6445         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6446         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6447         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6448         CLEANUP_JMP_BUF.
6449         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6450         * tst-cancel12.c: New file.
6451         * tst-cancel13.c: New file.
6452         * tst-cancel14.c: New file.
6453         * tst-cancel15.c: New file.
6454         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6455         and tst-cancel15.
6457         * tst-cancel1.c: Add some comments.
6459         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6460         timeout correctly.
6462 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6464         * Makefile (CFLAGS-pthread_cancel.c): Define.
6466 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6468         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6469         Change type of __writer element to int.
6470         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6471         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6472         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6473         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6474         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6475         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6476         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6477         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6478         Compare with TID to determine deadlocks.
6479         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6480         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6481         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6482         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6483         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6484         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6485         Likewise.
6486         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6487         Likewise.
6488         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6489         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6490         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6491         Likewise.
6492         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6493         Likewise.
6494         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6495         * Makefile (tests): Add tst-rwlock12.
6496         * tst-rwlock12.c: New file.
6498 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6500         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6501         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6502         Remove bogus hidden_proto.
6503         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6504         Likewise.
6505         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6506         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6507         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6508         ___lll_mutex_timedlock): Likewise.
6510 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6512         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6513         (__pthread_cond_signal): Add some code to eventually handle
6514         cond_lock!=0.
6516 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6518         * Makefile (tests): Add tst-exec4.
6519         (tst-exec4-ARGS): Define.
6520         * tst-exec4.c: New file.
6522 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6524         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6525         Also fail if tv_nsec < 0.
6526         (__lll_timedwait_tid): Likewise.
6527         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6528         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6529         Likewise.
6530         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6531         Likewise.
6532         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6533         Likewise.
6534         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6535         Likewise.
6536         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6537         Likewise.
6538         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6539         Likewise.
6541         * Makefile (tests): Add tst-sem8 and tst-sem9.
6542         * tst-sem8.c: New file.
6543         * tst-sem9.c: New file.
6544         * sem_open.c: Fix creation of in_use record if the file exists but
6545         no internal record.
6547         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6548         definitions.
6550         * sysdeps/pthread/timer_create.c (timer_create): In case
6551         evp==NULL, assign timer ID to sival_ptr.
6553         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6554         struct pthread_unwind_buf *.
6555         (struct pthread): Likewise for cleanup_jmp_buf element.
6557         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6558         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6559         * unwind.c (__pthread_unwind_next): Likewise.
6561 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6563         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6564         (lll_futex_timed_wait): Use int for futex value parameter.
6565         (lll_futex_wake): Likewise.
6566         (lll_futex_requeue): Likewise.
6568         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6569         Replace one memory operation with one register operation.
6571         * tst-join4.c (do_test): Fix error message.
6573         * tst-rwlock6.c (do_test): Use correct format specifier.
6575         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6576         (__lll_mutex_lock_wait): Replace one memory operation with one
6577         register operation.
6578         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6579         (__lll_mutex_lock_wait): Likewise.
6581         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6582         (__lll_mutex_cond_lock): Add one to value parameter of
6583         __lll_lock_wait to reflect reality in the futex syscall.
6584         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6585         (lll_mutex_cond_lock): Likewise.
6587 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6589         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6590         New function.
6591         (lll_mutex_cond_lock): Define.
6593 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6595         * Makefile (tests): Add tst-signal6.
6596         * tst-signal6.c: New file.
6598         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6599         (__lll_mutex_unlock_force): New function
6600         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6602         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6603         (__lll_mutex_unlock_force): New function.
6604         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6606         * tst-rwlock7.c (do_test): Use correct format specifier.
6608         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6609         Find break parameter in correct asm argument.
6611 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6613         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6614         Remove out4.
6615         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6616         error occured.
6617         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6618         Add __mutex.
6619         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6620         lll_futex_requeue, lll_mutex_unlock_force): Define.
6622 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6624         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6625         (pthread_cond_t): Add __mutex.
6626         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6627         lll_futex_requeue, lll_mutex_unlock_force): Define.
6629 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6631         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6632         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6633         Add __mutex field.
6634         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6635         Define.
6636         (lll_futex_wait, lll_futex_wake): Define.
6637         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6638         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6639         FUTEX_REQUEUE instead of FUTEX_WAIT.
6640         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6641         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6642         mutex which was used in condvar structure.  Call
6643         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6644         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6646         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6647         include tcb-offsets.h.  Read wakeup value in locked region.
6648         Use the value of gbr register as THREAD_ID.
6649         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6650         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6651         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6653         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6654         macros.
6656 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6658         * sysdeps/pthread/pthread_cond_broadcast.c
6659         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6661 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6663         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6664         typo in register name.
6665         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6666         correctly.  Actually use requeue.  Little optimization.
6667         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6668         mutex address early.  Handle cancellation state as 32-bit value.
6669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6670         Remove unnecessary label.
6672 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6674         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6675         instead of FUTEX_WAIT.
6676         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6677         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6679         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6680         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6681         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6682         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6683         of __pthread_mutex_lock_internal.
6684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6685         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6686         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6687         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6688         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6689         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6690         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6691         Add pthread_mutex_cond_lock.
6692         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6693         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6694         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6695         lll_mutex_cond_lock.
6696         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6697         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6698         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6699         Add __mutex field.
6700         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6701         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6703         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6704         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6706         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6707         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6708         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6709         macro don't define aliases.
6711         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6712         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6713         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6714         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6717         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6718         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6719         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6721 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6723         * sem_open.c: Fix one endless loop.  Implement correct semantics
6724         wrt opening the same semaphore more then once.
6725         * sem_close.c: Adjust for sem_open change.
6726         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6727         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6728         * Makefile (tests): Add tst-sem7.
6729         * tst-sem7.c: New file.
6731 2003-05-16  Roland McGrath  <roland@redhat.com>
6733         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6734         uninitialized variable braino.
6736 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6738         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6739         test for syscall availability.
6741         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6742         __no_posix_timers to -1 if the syscalls don't exist.
6744         * pthread_join.c (pthread_join): Set tid field of the joined
6745         thread to -1.  This isn't necessary but helps to recognize some
6746         error conditions with almost no cost.
6748         * allocatestack.c (FREE_P): Also negative values indicate an
6749         unused stack.
6751         * unwind.c: Include <unistd.h>.
6753 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6755         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6757 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6759         * Makefile (crti-objs, crtn-objs): New variables.
6760         (omit-deps, extra-objs): Add crtn.
6761         ($(objpfx)libpthread.so): Depend on both crti and crtn
6762         and links to them in multidir.
6763         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6765 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6767         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6768         (lll_mutex_unlock): Use atomic_exchange_rel.
6770 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6772         * cond-perf.c (cons): Add missing locking around setting of alldone.
6774 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6776         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6777         related macros.
6778         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6780 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6782         * tst-sem6.c: New file.
6783         * Makefile (tests): Add tst-sem6.
6785         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6786         Use atomic_exchange_rel instead of atomic_exchange.
6787         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6788         Likewise.
6790         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6791         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6792         vsyscall is possible.
6794         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6795         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6796         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6797         pthread_setaffinity_np.
6798         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6799         and pthread_setaffinity_np.
6800         * Makefile (libpthread-routines): Add pthread_getaffinity and
6801         pthread_setaffinity.
6803         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6804         use it in case mmap to allocate the stack fails.
6805         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6806         ARCH_MAP_FLAGS here.
6807         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6808         ARCH_RETRY_MMAP.
6810 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6812         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6813         handler implementation.  It is now lockless in fork().
6814         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6815         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6816         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6817         declare the __fork_*_lists.
6818         (struct fork_handler): Include pointers to all three functions.
6819         Add next, refcntr and need_signal elements.
6820         (__fork_handlers): New declaration.
6821         (__register_atfork_malloc): Remove declaration.
6822         (HAVE_register_atfork_malloc): Remove definition.
6823         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6824         __pthread_child_handler variable.
6825         (__libc_pthread_init): Use __register_atfork instead of explicitly
6826         adding to the list.
6827         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6828         and lll_futex_wake.
6829         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6831         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6832         function must never be reached.
6834         * cond-perf.c: New file.
6836 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6838         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6840 2003-05-04  Roland McGrath  <roland@redhat.com>
6842         * Makefile ($(objpfx)../libc.so): New target.
6844 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6846         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6847         (pthread_condattr_t): Size is only an int, don't use long for
6848         alignment.
6849         (pthread_mutexattr_t): Likewise.
6850         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6851         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6852         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6854 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6856         * sysdeps/i386/tls.h: Define THREAD_ID.
6857         * sysdeps/ia64/tls.h: Likewise.
6858         * sysdeps/powerpc/tls.h: Likewise.
6859         * sysdeps/s390/tls.h: Likewise.
6860         * sysdeps/sh/tls.h: Likewise.
6861         * sysdeps/x86_64/tls.h: Likewise.
6862         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6863         record ownership.
6864         * pthread_mutex_timedlock.c: Likewise.
6865         * pthread_mutex_trylock.c: Likewise.
6866         * pthread_mutex_unlock.c: Likewise.
6867         * pthread_rwlock_trywrlock.c: Likewise.
6868         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6869         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6870         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6871         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6873         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6874         flag.
6876 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6878         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6879         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6880         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6881         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6882         Make __align long long instead of long.
6883         (pthread_rwlock_t): Formatting.
6884         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6885         (pthread_rwlock_t): Formatting.
6886         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6887         (pthread_cond_t): Make __align long long instead of long.
6888         (pthread_rwlock_t): Move __flags field to the same position as in
6889         linuxthreads.
6891 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6893         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6894         * tst-rwlock7.c (do_test): Likewise.
6896 2003-04-26  Roland McGrath  <roland@redhat.com>
6898         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6900 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6902         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6903         sizeof (struct pthread).
6904         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6905         1 struct pthread.
6906         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6907         to 0.
6908         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6909         struct pthread.
6910         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6911         to 32-bit bytes.
6912         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6913         tcbp.
6914         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6915         unneccessarily.
6916         (NO_TLS_OFFSET): Define.
6917         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6918         add TLS_TCB_SIZE unnecessarily.
6920 2003-04-22  Roland McGrath  <roland@redhat.com>
6922         * Makeconfig (shared-thread-library): Reverse link order to work
6923         around linker bug.
6925 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6927         * semaphore.h: Fix typo in comment.
6929 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6931         * sysdeps/pthread/sigfillset.c: New file.
6933         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6934         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6935         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6936         * sysdeps/pthread/sigaction.c: Likewise.
6937         * sysdeps/pthread/sigprocmask.c: New file.
6938         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6939         __SIGRTMIN+1.
6940         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6941         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6942         in this case.
6944 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6946         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6947         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6949         * sysdeps/unix/sysv/linux/unregister-atfork.c
6950         (__unregister_atfork): Don't free memory not allocated dynamically.
6952         * semaphore.h: Remove __THROW marker from cancellation points.
6953         * nptl/sysdeps/pthread/pthread.h: Likewise.
6955 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6957         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6958         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6959         __THROW.
6961 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6963         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6965 2003-04-15  Roland McGrath  <roland@redhat.com>
6967         * forward.c (__pthread_unwind): Tweak to avoid warning.
6969 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6971         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6973 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6976         overflow CFA advance instructions.
6977         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6979 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6981         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6982         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6983         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6984         defined.
6986         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6987         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6988         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6989         DW_CFA_advance_loc for .Laddl-.Lsubl.
6991 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6993         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6994         position-independent unwind data for static libraries.
6995         Add missing unwind info.  Add comments.
6997         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6998         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6999         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7000         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7002 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7004         * Makefile: Make sure all cancellation points are compiled with
7005         exception and asynchronous unwind tables.
7007         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7008         which mishandles loading of global object addresses in PIC.
7009         (THREAD_SETMEM_NC): Likewise.
7011 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7013         * pthread.h: Define new data structure for cleanup buffer.  Declare
7014         new cleanup handler interfaces.
7015         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7016         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7017         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7018         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7019         it.  Declare old cleanup handler installation functions.
7020         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7021         handling.
7022         * cleanup_defer.c: Likewise.
7023         * cleanup_compat.c: New file.  Old cleanup code.
7024         * cleanup_def_compat.c: New file.  Old cleanup code.
7025         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7026         if own thread descriptor.
7027         * unwind.c: New file.
7028         * forward.c: Add __pthread_unwind.
7029         * init.c (pthread_functions): Add __pthread_unwind.
7030         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7031         Add ptr___pthread_unwind.
7032         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7033         and unwind function.
7034         * Makefile (libpthread-routines): Add cleanup_compat,
7035         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7036         table generation if necessary.
7037         * version.c: Record whether unwind support is compiled in.
7038         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7039         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7040         handler interfaces.
7041         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7042         complication to generate unwind information for syscall wrappers.
7043         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7044         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7045         __cleanup_fct_attribute.
7047         * Makefile: Add rules to build and run tst-cleanup0.
7048         * tst-cleanup0.c: New file.
7049         * tst-cleanup0.expect: New file.
7051         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7052         caller.  Optimize to avoid often unecessary local variable.
7054 2003-04-11  Roland McGrath  <roland@redhat.com>
7056         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7057         sets variable `multidir'; include that.
7058         (generated): Add it.
7059         ($(objpfx)$(multidir)/crti.o): New target.
7060         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7062 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7064         * tst-attr2.c (do_test): Add cast to avoid warning.
7065         * tst-mutex4.c (do_test): Likewise.
7067 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7069         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7070         in child.
7072 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7074         * Makefile (tests): Add tst-detach1.
7075         * tst-detach1.c: New file.
7077 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7079         * sysdeps/pthread/pthread.h: Remove duplicate
7080         pthread_cleanup_{push,pop} definitions.
7082         * tst-barrier2.c: Eliminate warnings.
7083         * tst-cancel4.c: Likewise.
7084         * tst-cond4.c: Likewise.
7085         * tst-cond6.c: Likewise.
7086         * tst-detach1.c: Likewise.
7087         * tst-rwlock4.c: Likewise.
7088         * tst-rwlock6.c: Likewise.
7089         * tst-rwlock7.c: Likewise.
7090         * tst-sem3.c: Likewise.
7091         * tst-spin2.c: Likewise.
7092         * tst-umask1.c: Likewise.
7094 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7096         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7098 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7100         * descr.h (struct pthread): Move cancelhandling member to the front.
7102 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7104         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7105         malloc_parent, and malloc_child statically.
7106         (__register_atfork_malloc): New function.
7107         (free_mem): Don't free any of the malloc_* variables on the list.
7108         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7109         Define HAVE_register_atfork_malloc.
7111 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7113         * sysdeps/pthread/createthread.c (create_thread): Add some more
7114         comments explaining when to set multiple_threads and when not.
7116         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7117         THREAD_ATOMIC_BIT_SET if not already defined.
7118         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7119         THREAD_ATOMIC_BIT_SET:
7120         * sysdeps/x86_64/tls.h: Likewise.
7121         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7122         THREAD_ATOMIC_CMPXCHG_VAL.
7123         (_pthread_cleanup_pop_restore): Likewise.
7124         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7125         (__pthread_enable_asynccancel_2): Likewise.
7126         (__pthread_disable_asynccancel): Likewise.
7127         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7128         (__libc_disable_asynccancel): Likewise.
7129         * init.c (sigcancel_handler): Likewise.
7130         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7131         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7133 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7135         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7136         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7137         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7138         * Makefile (tests): Add tst-cancel11.
7139         * tst-cancel11.c: New file.
7141 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7143         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7144         round, not the first.  Use specific_used flag instead of local
7145         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7146         (__free_tcb): Don't call deallocate_tsd here.
7147         (start_thread): Call deallocate_tsd here.
7148         * pthread_setspecific.c: Set specific_used flag really only when
7149         needed.
7150         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7151         * tst-tsd3.c: New file.
7152         * tst-tsd4.c: New file.
7154 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7156         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7157         Use atomic_exchange_and_add instead of __lll_add.
7158         (__lll_mutex_timedlock): Likewise.
7159         Patch by Ian Wienand.
7161 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7163         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7164         (SINGLE_THREAD_P): Fix typo.
7165         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7167 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7169         * Makefile (tests): Add tst-align.
7170         * tst-align.c: New file.
7171         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7173         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7174         function correctly.
7176         * tst-tsd2.c: Add casts to avoid warnings.
7178 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7180         * descr.h (struct pthread): Move most often used elements to the front.
7182 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7184         * Makefile (libpthread-routines): Add pthread_atfork.
7185         (libpthread-static-only-routines): Add pthread_atfork.
7187 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7189         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7190         of TLS_DTV_AT_TP.
7191         (INSTALL_DTV): Add parens.
7192         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7193         Use passed descr instead of THREAD_SELF.
7194         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7195         (__lll_mutex_timedlock_wait): Correct expected value after
7196         spurious wakeup.
7197         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7198         Release lock before waking up the waiters.
7199         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7200         criteria.  Reorderstruct passed to cleanup handler.  Fix
7201         handling of cancellation and failung pthread_mutex_unlock call.
7202         Use __pthread_enable_asynccancel_2 instead of
7203         __pthread_enable_asynccancel.
7204         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7205         Return result of lock re-get if it fails.
7206         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7207         for __pthread_cleanup_push.
7208         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7209         completely broken rwlock implementation.
7210         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7211         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7213         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7215         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7216         versioned_symbol macro.
7217         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7218         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7220 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7222         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7223         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7224         and __helper_tid.
7225         (struct timer): Remove th and bar field.
7226         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7227         debugging code.  Create only one helper thread.
7228         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7229         helper thread.
7230         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7231         Renamed.  Define statically.  Use thread info from siginfo.
7232         (__helper_once): New variable.
7233         (__helper_tid): New variable.
7234         (__reset_helper_control): New function.
7235         (__start_helper_thread): New function.
7237         * pthread_create.c (start_thread): Don't use setjmp inside
7238         __builtin_expect to work around gcc bug.
7240         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7241         timer_delete syscall fails, but not with ENOSYS, set
7242         __no_posix_timers.
7244         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7245         (timer_settime): Fix typo.
7246         * sysdeps/unix/sysv/linux/timer_getoverr.c
7247         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7249 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7252         offset of cleanupbuf.__prev.
7254 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7256         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7257         of included file.
7259 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7261         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7262         NULL provide default definition to syscall.
7264 2003-03-25  Roland McGrath  <roland@redhat.com>
7266         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7267         (timer_id2ptr): Fix typo.
7269 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7271         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7272         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7273         * sysdeps/ia64/pthreaddef.h: Likewise.
7274         * sysdeps/powerpc/pthreaddef.h: Likewise.
7275         * sysdeps/s390/pthreaddef.h: Likewise.
7276         * sysdeps/sh/pthreaddef.h: Likewise.
7277         * sysdeps/x86_64/pthreaddef.h: Likewise.
7278         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7279         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7280         being changed.
7281         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7282         SIGTIMER is not unblocked.
7283         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7284         RT signal taken.
7285         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7286         be send.
7287         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7288         pass pointer through as ID.
7289         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7290         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7291         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7292         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7293         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7294         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7295         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7296         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7297         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7298         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7299         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7300         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7301         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7302         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7303         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7304         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7305         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7306         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7307         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7308         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7309         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7310         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7311         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7312         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7313         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7314         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7315         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7316         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7317         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7318         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7319         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7320         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7321         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7323         * pthreadP.h: Remove FRAME_LEFT definition.
7324         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7325         already left frame.  Programs which have this problem are not POSIX
7326         compliant.
7327         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7329 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7331         * sysdeps/pthread/tst-timer.c: Check return values of the
7332         functions we test.
7334 2003-03-23  Roland McGrath  <roland@redhat.com>
7336         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7337         * tst-tls3mod.c: Likewise.
7338         * tst-tls1.c: Likewise.
7339         * tst-tls2.c: Likewise.
7341         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7342         undefined behavior.
7344         * tst-join5.c (tf1, tf2): Add a cast.
7346         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7348         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7349         Don't test anything.
7350         * tst-cond4.c: Likewise.
7351         * tst-cond6.c: Likewise.
7352         * tst-flock2.c: Likewise.
7353         * tst-mutex4.c: Likewise.
7354         * tst-rwlock4.c: Likewise.
7355         * tst-signal1.c: Likewise.
7356         * tst-spin2.c: Likewise.
7357         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7359         * tst-mutex4.c: Use test-skeleton.c.
7360         * tst-spin2.c: Likewise.
7361         * tst-sysconf.c: Likewise.
7362         * tst-barrier2.c: Likewise.
7363         * tst-cond4.c: Likewise.
7364         * tst-cond6.c: Likewise.
7365         * tst-rwlock4.c: Likewise.
7366         * tst-unload.c: Likewise.
7367         * tst-flock2.c (do_test): Use return instead of exit.
7369 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7371         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7373 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7375         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7376         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7377         instead of __lll_compare_and_swap.
7378         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7379         Likewise.
7380         Removed definition if __lll_compare_and_swap.
7382         * cancellation.c: Adjust for new form of compare&exchange macros.
7383         * cleanup_defer.c: Likewise.
7384         * init.c: Likewise.
7385         * libc-cancellation.c: Likewise.
7386         * old_pthread_cond_broadcast.c: Likewise.
7387         * old_pthread_cond_signal.c: Likewise.
7388         * old_pthread_cond_timedwait.c: Likewise.
7389         * old_pthread_cond_wait.c: Likewise.
7390         * pthread_cancel.c: Likewise.
7391         * pthread_create.c: Likewise.
7392         * pthread_detach.c: Likewise.
7393         * pthread_join.c: Likewise.
7394         * pthread_key_delete.c: Likewise.
7395         * pthread_setcancelstate.c: Likewise.
7396         * pthread_setcanceltype.c: Likewise.
7397         * pthread_timedjoin.c: Likewise.
7398         * pthread_tryjoin.c: Likewise.
7399         * sysdeps/pthread/createthread.c: Likewise.
7401 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7403         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7404         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7405         definitions.  Replace uses with calls to atomic_* functions.
7406         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7407         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7408         __lll_test_and_set calls with atomic_exchange_and_add and
7409         atomic_exchange calls respectively.
7410         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7411         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7412         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7413         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7414         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7415         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7416         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7418         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7419         returns the old value.
7421 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7423         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7424         int for variable OLDVAL and correct inline assembler contraint.
7425         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7426         type int for variable OLD.
7428         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7429         only for s390-32.
7430         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7431         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7432         instead of multiple_threads field in the TCB.
7434 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7436         * sysdeps/i386/i686/bits/atomic.h: Removed.
7437         * sysdeps/i386/i586/bits/atomic.h: Removed.
7438         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7439         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7440         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7441         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7442         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7443         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7444         * atomic.h: Removed.  Moved to glibc.
7446         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7447         support for clock selection.
7449         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7450         signalling waiters.
7452 2003-03-18  Roland McGrath  <roland@redhat.com>
7454         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7455         Add __lll_rel_instr first.  Add memory clobber.
7456         (lll_mutex_unlock): Use __lll_test_and_set.
7457         From Paul Mackerras <paulus@samba.org>.
7459         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7460         unconditionally.
7461         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7462         (SINGLE_THREAD_P):  Add `header.' prefix.
7463         From Paul Mackerras <paulus@samba.org>.
7465         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7466         pthread_timedjoin_np to ...
7467         (libpthread: GLIBC_2.3.3): ... here.
7468         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7470         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7471         Avoid shadowing VAL variable.
7473         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7474         New macro.
7476 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7478         * Makefile (tests): Add tst-cond11.
7479         * tst-cond11.c: New file.
7481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7482         struct passed to cleanup handler to eliminate one more
7483         instruction.
7484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7486         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7487         (pthrad_cond_t): Replace __unused field with __clock.
7489         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7490         waken all waiters in cleanup handler.
7491         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7494         * pthread_condattr_getclock.c: New file.
7495         * pthread_condattr_setclock.c: New file.
7496         * sysdeps/pthread/pthread.h: Declare these new functions.
7497         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7498         * Makefile (libpthread-routines): Add the new functions.
7499         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7500         Renamed field to value.  Document use of the bits.
7501         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7502         change.
7503         * pthread_condattr_setpshared.c: Likewise.
7504         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7505         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7506         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7507         Add __clock field.
7508         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7509         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7510         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7511         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7512         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7513         Implement clock selection.
7514         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7515         * pthread-errnos.sym: Add ENOSYS.
7516         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7517         _POSIX_CLOCK_SELECTION.
7518         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7520         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7521         invalid .size directive.
7523 2003-03-17  Roland McGrath  <roland@redhat.com>
7525         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7526         Formatting tweaks.
7528 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7530         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7531         Use __lll_add instead of spelling it out.  Use protected symbol names.
7532         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7533         Use __lll_add.
7534         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7535         Renamed from lll_compare_and_swap.  Use new name where necessary.
7536         (__lll_add): Defined.
7537         (__lll_dec_if_positive): Defined.
7538         (__lll_test_and_set): Defined.
7539         * sysdeps/ia64/pthread_spin_init.c: Removed.
7540         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7541         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7542         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7543         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7544         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7545         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7546         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7547         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7548         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7549         __sync_lock_release_si.
7550         Patch by Jakub Jelinek.
7552         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7553         Fix timeout handling.
7554         (__lll_timedwait_tid): Likewise.
7555         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7556         Patch by Jakub Jelinek.
7558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7560 2003-03-17  Roland McGrath  <roland@redhat.com>
7562         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7563         * sysdeps/pthread/pthread_spin_init.c: New file.
7564         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7565         * sysdeps/powerpc/Makefile: New file.
7566         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7567         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7568         * sysdeps/powerpc/pthreaddef.h: New file.
7569         * sysdeps/powerpc/tcb-offsets.sym: New file.
7570         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7571         * sysdeps/powerpc/tls.h: New file.
7572         * sysdeps/powerpc/bits/atomic.h: New file.
7573         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7574         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7575         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7577         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7578         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7579         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7580         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7581         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7582         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7583         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7584         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7585         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7586         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7587         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7588         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7589         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7590         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7591         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7593         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7594         not gettimeofday.
7595         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7596         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7597         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7598         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7599         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7601 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7603         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7604         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7607         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7609 2003-03-16  Roland McGrath  <roland@redhat.com>
7611         * tst-fork4.c: Include <string.h>.
7612         * tst-signal2.c: Likewise.
7613         * tst-mutex5.c (do_test): exit -> return.
7614         * tst-mutex2.c: Include <stdlib.h>.
7616 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7618         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7619         (__lll_mutex_timedlock_wait): Correct expected value after
7620         spurious wakeup.  Otherwise we would never wait again.
7622         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7623         zone versus inline asm stupidity.  Use correct instructions.
7625         * tst-rwlock6.c: Add some more status output.
7627 2003-03-15  Roland McGrath  <roland@redhat.com>
7629         * sysdeps/pthread/configure.in: New file.
7630         * sysdeps/pthread/configure: New file (generated).
7632 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7634         * allocatestack.c (allocate_stack): Store the exact stack size of
7635         user allocated stacks.
7637 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7639         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7640         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7641         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7642         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7643         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7644         Use `header.' prefix.
7645         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7647 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7649         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7650         __builtin_frame_address, use stack pointer.
7652         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7653         instead of __builtin_frame_pointer.
7655 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7657         * tst-basic1.c (do_test): Add cast to avoid warning.
7658         * tst-basic2.c (do_test): Likewise.
7660         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7661         amount of stack correction.
7663         * tst-fork4.c: Use test-skeleton.c.
7665 2003-03-14  Roland McGrath  <roland@redhat.com>
7667         * init.c: Fix typo "#eli" for "#else".
7669 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7671         * allocatestack.c (__stack_user): Use hidden_data_def.
7672         * pthread_create.c (__pthread_keys): Likewise.
7674         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7676 2003-03-14  Roland McGrath  <roland@redhat.com>
7678         * tst-fork4.c: New file.
7679         * Makefile (tests): Add it.
7681         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7682         we always define the padding space.
7683         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7684         stopped supporting its own extensions fully.
7685         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7686         struct also called `header', so `header.multiple_threads' is the field
7687         name to use on all machines.
7688         * allocatestack.c (allocate_stack): Use `header.' prefix.
7689         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7690         * pthread_create.c (__pthread_create_2_1): Likewise.
7691         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7692         (THREAD_SELF): Likewise.
7693         * sysdeps/x86_64/tls.h: Likewise.
7694         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7695         (SINGLE_THREAD_P): Likewise.
7696         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7697         (SINGLE_THREAD_P): Likewise.
7698         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7699         (SINGLE_THREAD_P): Likewise.
7701         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7702         value directly.
7704 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7706         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7707         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7709         * pthread_create.c (start_thread): setjmp is expected to return 0.
7711         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7712         (THREAD_GETMEM_NC): Likewise.
7714 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7716         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7717         and the size of the stack which must be allocated is a multiple,
7718         allocate one more page.
7719         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7720         MULTI_PAGE_ALIASING.
7722 2003-03-13  Roland McGrath  <roland@redhat.com>
7724         * pthread_create.c (start_thread): Set EXITING_BIT after the
7725         event-reporting (and destructors), not before.
7727 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7729         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7730         lll_futex_wake): Declare register variables as long int instead of
7731         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7732         Make syscall arguments clobbered by the syscall.
7733         (lll_futex_wait): Define using lll_futex_timed_wait.
7735         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7736         to void *.
7738         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7739         PPID if [! NDEBUG].
7741         * allocatestack.c (nptl_ncreated): Only declare if
7742         COLORING_INCREMENT != 0.
7744         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7745         (__libc_enable_asynccancel_2): Remove prototype.
7747         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7748         ctid to match kernel.
7750 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7752         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7753         libc_multiple_threads.
7754         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7755         __libc_multiple_threads to...
7756         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7758         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7759         versioning.
7760         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7761         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7763         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7764         (__pthread_once_internal): Define.
7766         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7767         macros instead of .symver directly.
7768         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7769         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7771         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7772         * sysdeps/x86_64/tcb-offsets.sym: New file.
7773         * sysdeps/x86_64/Makefile: New file.
7775         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7776         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7777         to access own pthread_t in TCB.
7778         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7779         Likewise.
7780         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7781         Likewise.
7782         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7784 2003-03-12  Roland McGrath  <roland@redhat.com>
7786         * pthread-errnos.sym: New file.
7787         * Makefile (gen-as-const-headers): New variable, list that file.
7788         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7789         header <pthread-errnos.h> instead of defining errno values here.
7790         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7791         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7792         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7793         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7794         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7795         Likewise.
7796         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7797         Likewise.
7798         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7799         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7800         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7801         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7802         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7803         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7804         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7805         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7807         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7808         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7809         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7810         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7811         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7812         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7813         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7814         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7815         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7816         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7817         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7818         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7819         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7820         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7821         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7822         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7824         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7826         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7827         CLONE_CHILD_SETTID worked.
7829 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7831         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7832         file.
7833         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7834         file.
7836         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7837         (pthread_cond_t): Add padding.
7839         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7840         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7841         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7843         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7844         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7845         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7846         (__pthread_rwlock_timedrdlock): Likewise.
7847         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7848         (__pthread_rwlock_wrlock): Likewise.
7849         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7850         (__pthread_rwlock_rdlock): Likewise.
7852         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7854         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7855         result of lock re-get if it fails.
7857 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7859         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7860         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7861         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7864         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7865         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7866         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7867         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7868         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7870         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7871         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7873         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7874         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7875         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7876         (create_thread): Likewise.
7877         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7878         * init.c (__pthread_initialize_minimal_internal): Initialize
7879         __libc_multiple_threads_ptr if necessary.
7880         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7881         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7882         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7883         __libc_multiple_threads.
7884         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7885         necessary.
7887         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7888         (THREAD_SETMEM_NC): Likewise.
7890         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7891         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7892         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7893         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7895         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7896         Eliminate one entire instruction.
7898         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7899         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7900         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7901         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7902         instead of __pthread_enable_asynccancel.
7903         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7904         (__pthread_cond_wait): Likewise.
7905         * sysdeps/pthread/pthread_cond_timedwait.c
7906         (__pthread_cond_timedwait): Likewise.
7907         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7909         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7910         (__condvar_cleanup): Wake up all waiters in case we got signaled
7911         after being woken up but before disabling asynchronous
7912         cancellation.
7913         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7914         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7915         (__condvar_cleanup): Likewise.
7917         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7918         Make it an error if architecture has no #if case.  Add x86-64.
7920         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7921         pt-initfini.s generation.
7923         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7924         (TLS_INIT_TP): Fix typo.
7926 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7928         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7929         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7931         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7932         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7933         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7934         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7935         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7936         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7937         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7938         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7940 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7942         * sysdeps/pthread/pthread_cond_timedwait.c
7943         (__pthread_cond_timedwait): Return the result of the final
7944         locking.  If it succeeds, the regular function return value.
7946         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7947         Return result of the final locking.
7948         * version.c (__nptl_main): Work around problems with the strange
7949         INTERNAL_SYSCALL macro on ppc32.
7950         * init.c (__pthread_initialize_minimal_internal): Unblock
7951         SIGCANCEL in case the parent blocked it.
7952         Reported by Paul Mackerras <paulus@samba.org>.
7954         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7955         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7956         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7958 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7960         * sysdeps/pthread/pthread_cond_timedwait.c
7961         (__pthread_cond_timedwait): Unlock and fail if
7962         __pthread_mutex_unlock_internal failed.
7964         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7965         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7966         Use ARCH_CLONE.
7967         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7968         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7969         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7970         ALLOCATE_STACK): New macros.
7971         (TLS_TPADJ): New macro.
7972         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7973         (allocate_stack): Handle TLS_DTV_AT_TP and
7974         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7975         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7976         Don't set PD->self.
7977         * init.c [__ia64__] (__NR_set_tid_address): Define.
7979         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7980         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7981         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7982         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7983         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7984         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7985         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7986         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7987         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7988         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7989         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7990         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7991         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7992         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7993         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7994         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7995         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7996         * sysdeps/ia64/bits/atomic.h: New file.
7997         * sysdeps/ia64/Makefile: New file.
7998         * sysdeps/ia64/pthread_spin_init.c: New file.
7999         * sysdeps/ia64/pthread_spin_lock.c: New file.
8000         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8001         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8002         * sysdeps/ia64/pthreaddef.h: New file.
8003         * sysdeps/ia64/tcb-offsets.sym: New file.
8004         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8005         * sysdeps/ia64/tls.h: New file.
8007         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8008         to syscall instead of no arguments.
8010 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8012         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8013         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8014         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8015         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8017         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8018         unused code.
8020         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8022         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8023         lowlevelbarrier.sym.
8024         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8025         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8026         Include lowlevelbarrier.h and don't define offsets locally.
8027         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8029         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8030         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8031         (__lll_mutex_timedlock_wait): Likewise.
8032         (lll_mutex_lock): Adjust asm for that.
8033         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8034         (lll_lock): Adjust asm for operand order change.
8035         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8036         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8038         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8039         Reverse order of parameters.
8040         (__lll_timedwait_tid): Remove regparms attribute.
8041         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8042         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8044         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8045         (__lll_timedwait_tid): Remove one unnecessary instruction.
8047         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8048         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8049         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8050         lowlevelmutex.S.
8052         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8053         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8054         for NOT_IN_libc.
8055         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8056         lowlevellock.S.
8058         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8059         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8060         for libc.so.
8061         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8062         define LOCK here (if UP is not defined).  The actual code is in
8063         lowlevelmutex.S.
8065         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8066         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8067         __lll_timedwait_tid for libc.so.
8068         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8069         define LOCK here (if UP is not defined).  The actual code is in
8070         lowlevellock.S.
8072         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8073         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8074         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8075         instead of lowlevelsem.h.
8076         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8077         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8078         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8080         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8081         lowlevelrwlock.sym.
8082         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8083         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8084         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8086         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8087         register loading.
8088         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8089         last changed.  D'oh.
8091         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8093         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8094         of __libc_locking_needed.
8095         (lll_trylock): Initialize %eax to zero.
8097         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8098         pthread_cond_t definition.
8100 2003-03-10  Roland McGrath  <roland@redhat.com>
8102         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8103         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8104         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8105         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8106         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8108         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8109         Instead of setting PD->multiple_threads, set globals
8110         __pthread_multiple_threads and __libc_multiple_threads.
8111         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8112         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8113         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8115         * descr.h (struct pthread): Conditionalize first member on
8116         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8117         containing an anonymous tcbhead_t.  Move `list' member out.
8118         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8119         * allocatestack.c: Remove use of `header.data.' prefix.
8120         * pthread_create.c: Likewise.
8121         * init.c (__pthread_initialize_minimal_internal): Likewise.
8122         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8123         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8124         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8125         * sysdeps/x86_64/tls.h: Likewise.
8126         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8127         (SINGLE_THREAD_P): Likewise.
8128         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8129         (SINGLE_THREAD_P): Likewise.
8130         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8131         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8133 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8135         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8137         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8138         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8140         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8141         leftovers from the ia32 code.
8143         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8144         memory load.
8145         (clear_once_control): Don't load %esi.
8147         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8148         handling.
8150         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8152         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8153         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8155         * Makefile (tests): Add tst-cond10.
8156         * tst-cond10.c: New file.
8158 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8160         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8161         * tst-signal3.c (do_test): Likewise.
8162         * tst-sem5.c (do_test): Likewise.
8163         * tst-kill6.c (do_test): Likewise.
8164         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8166         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8167         of inc/dec.
8168         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8169         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8170         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8171         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8173         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8174         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8175         Likewise.
8176         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8177         Likewise.
8178         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8179         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8181         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8182         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8183         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8184         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8185         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8187         * allocatestack.c (allocate_stack): If mprotect() fails free the
8188         TLS memory.
8190 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8192         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8194         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8195         lll_wake_tid.  This was used only to work around kernel limits in
8196         the early days.
8197         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8198         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8199         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8200         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8202         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8203         (__pthread_initialize_minimal_internal): Change initialization of
8204         __static_tls_align_m1 appropriately.
8205         * pthreadP.h (__static_tls_align_m1): Renamed from
8206         __static_tls_align.
8207         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8208         instead of __static_tls_align-1.
8210 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8212         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8214         * pthread_create.c: Define __pthread_keys using nocommon
8215         attribute, not by placing it explicitly in bss.
8216         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8218         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8219         Use it in mmap call to allocate stacks.
8221         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8223         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8224         result of the thread function.
8226 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8228         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8229         version is just fine.
8231         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8232         (__pthread_child_handler): Renamed from pthread_child_handler,
8233         exported, and marked hidden.  Change all users.
8234         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8235         free __pthread_child_handler from child list.
8237 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8239         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8241         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8242         Fix handling of cancellation and failing pthread_mutex_unlock call.
8243         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8244         (__pthread_cond_wait): Likewise.
8246         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8247         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8248         lll_futex_timed_wait call.
8249         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8250         (pthread_rwlock_timedwrlock): Likewise.
8252         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8253         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8254         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8256         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8257         check of lll_futex_wake return value.
8259 2003-03-03  Roland McGrath  <roland@redhat.com>
8261         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8263         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8264         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8265         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8267 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8269         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8270         error for CPU clocks.
8272         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8273         _POSIX_MONOTONIC_CLOCK.
8274         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8276         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8277         recent kernels.
8279 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8281         * descr.h (struct pthread): Move cleanup field to the front.
8283 2003-03-01  Roland McGrath  <roland@redhat.com>
8285         * sem_open.c (sem_open): Braino fix.
8287 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8289         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8290         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8291         __pthread_cleanup_pop functionality.
8292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8294         * descr.h (struct pthread): Move tid field to the front now that
8295         it is often used.
8297         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8298         (__lll_mutex_timedlock_wait): Remove.
8299         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8300         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8301         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8302         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8303         (lll_unlock_wake_cb): Don't save and restore %esi.
8304         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8305         %esi.
8306         (__lll_timedwait_tid): Add alignment.
8307         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8308         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8309         %esi.
8310         (__lll_timedwait_tid): Removed.
8311         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8312         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8313         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8314         (pthread_barrier_wait): Don't save, load, and restore %esi for
8315         last thread.
8316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8317         (__pthread_cond_signal): Don't save, load, and restore %esi.
8318         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8319         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8320         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8321         Don't save, load, and restore %esi.
8323 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8326         Release lock before waking up the waiters.
8328         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8330         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8331         (reader_thread): Likewise.
8333         * sysdeps/pthread/pthread_rwlock_unlock.c
8334         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8335         to wake up readers if there are none.
8337         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8338         Release internal lock before wake threads.
8340 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8342         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8343         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8344         predefined.
8345         * tst-rwlock9.c: Likewise.
8346         * tst-rwlock10.c: New file.
8347         * tst-rwlock11.c: New file.
8349         * Makefile (tests): Add tst-dlsym1.
8350         * tst-dlsym1.c: New file.
8352         * init.c (__pthread_initialize_minimal_internal): Set
8353         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8354         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8356 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8358         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8360         * tst-cond2.c: Fix sychronization with child.
8362         * tst-rwlock8.c (reader_thread): Remove unused variable.
8364         * Makefile: Add rules to build and run tst-tls3.
8365         * tst-tls3.c: New file.
8366         * tst-tls3mod.c: New file.
8368         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8369         * tst-rwlock8.c: New file.
8370         * tst-rwlock9.c: New file.
8371         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8372         complete broken rwlock implementation.
8373         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8374         Likewise.
8375         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8376         Likewise.
8377         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8378         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8379         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8380         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8381         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8382         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8383         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8385 2003-02-23  Roland McGrath  <roland@redhat.com>
8387         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8389 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8391         * Makefile (tests): Add tst-context1.
8392         * tst-context1.c: New file.
8394         * Makefile (tests): Add tst-tls1 and tst-tls2.
8395         * tst-tls1.c: New file.
8396         * tst-tls2.c: New file.
8398         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8399         for failed cmpxchg.
8401         * pthread_create.c (start_thread): Set EXITING_BIT early.
8403         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8404         (THREAD_GETMEM_NC): Likewise.
8406 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8408         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8409         off 3 more bytes by using offset-less instructions when possible.
8411         * Makefile: Add dependency for $(objpfx)version.d.
8413         * eintr.c (eintr_source): Add unnecessary return but the compiler
8414         insists.
8416         * tst-kill3.c: Include <unistd.h>.
8418 2003-02-21  Roland McGrath  <roland@redhat.com>
8420         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8422 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8424         * Makefile (tests): Add tst-eintr1.
8425         (distribute): Add eintr.c.
8426         * tst-eintr1.c: New file.
8427         * eintr.c: New file.
8429         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8431         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8432         Disallow sending SIGCANCEL.
8434         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8435         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8436         * tst-kill1.c: New file.
8437         * tst-kill2.c: New file.
8438         * tst-kill3.c: New file.
8439         * tst-kill5.c: New file.
8440         * tst-kill6.c: New file.
8441         * tst-basic7.c: Renamed to...
8442         * tst-kill4.c: ...this.
8444 2003-02-21  Roland McGrath  <roland@redhat.com>
8446         * Makefile (install-lib-ldscripts): New variable.
8448 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8450         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8451         * pthread_cancel.c: Use INVALID_TD_P.
8452         * pthread_detach.c: Likewise.
8453         * pthread_getschedparam.c: Likewise.
8454         * pthread_setschedparam.c: Likewise.
8455         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8456         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8457         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8458         * pthread_timedjoin.c: Likewise.
8460         * tst-basic7.c: Include <signal.h>.
8462         * pthread_join.c (pthread_join): Limited checking for invalid
8463         descriptors.
8464         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8466 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8468         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8469         beginning of the loop.  Clear the entire first block of TSD.
8470         * Makefile (tests): Add tst-key4.
8471         * tst-key4.c: New file.
8473 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8475         * Makefile (tests): Add tst-basic7.
8476         * tst-basic7.c: New file.
8478         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8479         Add some more __builtin_expect.
8481         * pthreadP.h: Define dummy version of DEBUGGING_P.
8483 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8485         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8486         _POSIX_THREAD_PRIORITY_SCHEDULING.
8487         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8488         _XOPEN_REALTIME_THREADS.
8489         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8491         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8492         kernel returns EINVAL for PID <= 0, work around it.
8494         * Makefile (tests): Add tst-signal5.
8495         * tst-signal5.c: New file.
8497         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8498         and LOGIN_NAME_MAX.
8500         * tst-cancel1.c (tf): Block all signals.
8502         * Makefile (tests): Add tst-basic6.
8503         * tst-basic6.c: New file.
8505         * tst-basic1.c: Add test for process ID.
8507         * Makefile (tests): Add tst-cancel10.
8508         * tst-cancel10.c: New file.
8510         * Makefile (tests): Add tst-signal4.
8511         * tst-signal4.c: New file.
8513         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8514         __sigismember instead of sigismember.  Add __builtin_expect.
8516 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8518         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8519         pthread_setcancelstate, and pthread_rwlock_setpshared.
8521         * tst-cancel7.c (do_test): Make sure the pid file exists before
8522         canceling the thread.
8524         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8525         pthread_rwlock_timedrdlock tests.
8526         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8527         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8528         Check for invalid tv_nsec field.
8529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8530         Likewise.
8532         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8533         recursive mutex of overflow.
8535         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8537         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8538         going into an endless loop.
8539         * Makefile (tests): Add tst-cancel9.
8540         * tst-cancel9.c: New file.
8542         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8544 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8546         * tst-mutex5.c (do_test): Add more timedlock tests.
8548         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8549         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8551         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8552         use INLINE_SYSCALL.  Error number is returned, not -1.
8554         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8555         and __deallocate_stack with internal_function.
8556         * pthread_create.c: Adjust definitions appropriately.
8557         * allocatestack.c: Likewise.
8559         * pthread_join.c: Add one more __builtin_expect.
8560         * pthread_timedjoin.c: Likewise.
8562         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8563         not data of sequence number does not match.
8564         Add one __builtin_expect.
8566         * Makefile (tests): Add tst-clock1.
8567         * tst-clock1.c: New file.
8569         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8570         negative arguments.
8571         * Makefile (tests): Add tst-basic5.
8572         * tst-basic5.c: New file.
8574 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8576         * Makefile (tests): Add tst-basic4.
8577         * tst-basic4.c: New file.
8579         * pthreadP.h: Add declaraction for __nptl_nthreads.
8580         * pthread_create.c: Define __nptl_nthreads
8581         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8582         after thread is done.  If then zero, call exit(0).
8583         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8584         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8585         * init.c (pthread_functions): Initialize ptr_nthreads.
8586         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8587         (__reclaim_stacks): Decrement __nptl_nthreads.
8588         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8589         Define.
8590         * Makefile (tests): Add tst-basic3.
8591         * tst-basic3.c: New file.
8593         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8594         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8595         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8596         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8597         if asynchronous canceling is enabled.
8598         * pthread_join.c (pthread_join): When recognizing circular joins,
8599         take into account the other thread might be already canceled.
8600         * Makefile (tests): Add tst-join5.
8601         * tst-join5.c: New file.
8603         * Makefile (tests): Add tst-join4.
8604         * tst-join4.c: New file.
8606 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8608         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8610 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8612         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8613         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8614         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8615         warning.
8616         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8617         to avoid warning.
8618         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8619         error if lll_futex_wake failed.
8621 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8623         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8624         handling of cancellation and failung pthread_mutex_unlock call.
8625         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8626         * Makefile (tests): Add tst-cond8 and tst-cond9.
8627         * tst-cond8.c: New file.
8628         * tst-cond9.c: New file.
8630         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8632         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8633         non-standard initializers with __USE_GNU.
8635         * Makefile (tests): Add tst-cleanup3.
8636         * tst-cleanup3.c: New file.
8638 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8640         * Makefile (tests): Add tst-attr1 and tst-attr2.
8641         * tst-attr1.c: New file.
8642         * tst-attr2.c: New file.
8644         * Makefile: Add rules to build and run tst-atfork2 test.
8645         * tst-atfork2.c: New file.
8646         * tst-atfork2mod.c: New file.
8648         * sysdeps/unix/sysv/linux/unregister-atfork.c
8649         (__unregister_atfork): Free the memory allocated for the handlers
8650         after removing them from the lists.
8652         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8653         cleanup function.
8655         * tst-atfork1.c (do_test): Wait for the child we forked.
8656         Report error in child.
8658         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8660         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8662 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8664         * Makefile (tests): Add tst-cancel8.
8665         * tst-cancel8.c: New file.
8667         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8668         clearing of control variable.
8669         * Makefile (tests): Add tst-once3 and tst-once4.
8670         * tst-once3.c: New file.
8671         * tst-once4.c: New file.
8673 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8675         * sysdeps/sh/Makefile: New file.
8676         * sysdeps/sh/bits/atomic.h: New file.
8677         * sysdeps/sh/pthread_spin_init.c: New file.
8678         * sysdeps/sh/pthread_spin_lock.c: New file.
8679         * sysdeps/sh/pthread_spin_trylock.S: New file.
8680         * sysdeps/sh/pthread_spin_unlock.S: New file.
8681         * sysdeps/sh/pthreaddef.h: New file.
8682         * sysdeps/sh/tcb-offsets.sym: New file.
8683         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8684         * sysdeps/sh/tls.h: New file.
8685         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8686         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8687         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8688         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8689         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8690         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8691         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8692         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8693         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8694         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8695         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8696         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8697         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8698         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8699         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8700         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8701         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8702         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8703         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8704         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8705         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8706         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8707         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8708         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8709         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8710         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8711         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8712         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8713         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8714         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8716 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8718         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8719         according to POSIX.
8721         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8723 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8725         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8726         (TLS_GET_FS): New #define.
8727         (TLS_SET_FS): New #define.
8728         Correct value of __NR_set_thread_area.
8730         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8732 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8734         * Makefile (tests): Add tst-popen1.
8735         * tst-popen1.c: New file.
8737         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8738         but inactive generalization.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8740         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8741         Minor optimization, remove one instruction.
8742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8744 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8746         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8748 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8750         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8751         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8752         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8753         * sysdeps/pthread/pthread_cond_signal.c: New file.
8754         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8755         * sysdeps/pthread/pthread_cond_wait.c: New file.
8756         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8757         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8758         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8759         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8760         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8761         * sysdeps/s390/Makefile: New file.
8762         * sysdeps/s390/bits/atomic.h: New file.
8763         * sysdeps/s390/pthread_spin_init.c: New file.
8764         * sysdeps/s390/pthread_spin_lock.c: New file.
8765         * sysdeps/s390/pthread_spin_trylock.c: New file.
8766         * sysdeps/s390/pthread_spin_unlock.c: New file.
8767         * sysdeps/s390/pthreaddef.h: New file.
8768         * sysdeps/s390/tcb-offsets.sym: New file.
8769         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8770         * sysdeps/s390/tls.h: New file.
8771         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8772         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8773         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8774         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8775         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8776         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8777         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8778         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8779         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8780         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8781         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8782         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8783         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8784         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8785         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8786         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8787         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8788         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8789         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8790         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8791         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8792         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8793         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8795 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8797         * atomic.h: Add a couple more default implementations.
8798         (atomic_compare_and_exchange_acq): Use
8799         __arch_compare_and_exchange_32_acq in return value definition.  It
8800         always exists.
8801         (atomic_bit_set): Renamed from atomic_set_bit.
8802         Add missing atomic_ prefixes.
8804         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8805         thread library is available, use correct value to mark initialized
8806         once variable.
8808 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8810         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8811         __sysconf to determine pagesize.
8813         * pthread_create.c: Include <atomic.h>.
8814         * allocatestack.c (allocate_stack): Implement coloring of the
8815         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8816         size minus one.  Adjust users.
8817         * sysdeps/i386/i686/Makefile: New file.
8819 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8821         * allocatestack.c: Improve comment throughout the file.
8823         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8824         (__lll_lock_wait): Add branch prediction.
8825         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8826         (__lll_lock_wait): Likewise.
8827         (lll_unlock_wake_cb): Removed.
8829 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8831         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8832         _POSIX_THREAD_PRIORITY_SCHEDULING.
8834 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8836         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8837         Fix return type of ptr___pthread_getspecific.
8839 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8841         * Makefile (tests): Add tst-umask1.
8842         (tst-umask1-ARGS): Define.
8843         * tst-umask1.c: New file.
8845 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8847         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8848         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8849         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8850         pthread_rwlock_unlock.
8851         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8852         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8853         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8854         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8855         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8856         New file.
8857         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8858         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8859         New file.
8860         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8861         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8862         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8863         New file.
8864         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8865         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8866         New file.
8867         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8868         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8869         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8870         New file.
8871         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8872         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8873         New file.
8874         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8876         * Makefile (libpthread-routines): Remove lowlevelcond and
8877         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8878         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8879         and pthread_cond_broadcast.
8880         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8881         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8882         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8883         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8884         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8885         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8886         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8887         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8888         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8889         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8894         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8895         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8896         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8897         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8898         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8899         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8900         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8901         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8902         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8903         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8904         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8905         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8906         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8907         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8908         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8909         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8910         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8912         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8913         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8914         of the code is moved to ...
8915         * sysdeps/pthread/createthread.c: ...here.  New file.
8917 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8919         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8920         (__new_sem_post): Clear %eax before returning.
8921         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8923         * Makefile (tests): Add tst-cleanup2.
8924         * tst-cleanup2.c: New file.
8926         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8927         Interpret first parameter correctly.
8929 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8931         * Makefile (headers): Add bits/semaphore.h.
8933 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8935         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8936         if not SHARED.
8938 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8940         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8941         must be used and mapping failed.
8942         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8944         * Makefile (CFLAGS-pthread_self.os): Define this, not
8945         CFLAGS-pthread_self.c.
8947 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8949         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8950         lll_unlock_wake_cb.
8952         * Makefile (libpthread-routines): Add version.  Add rules to build
8953         version.os and banner.h.
8954         * version.c: New file.
8956 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8958         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8959         the alias unconditional.
8960         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8962 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8964         * Makefile (CFLAGS-pthread_self.c): New definition.
8966 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8968         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8969         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8970         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8971         * init.c (__pthread_initialize_minimal_internal): Likewise.
8973 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8975         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8977         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8978         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8979         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8980         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8981         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8982         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8984 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8986         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8987         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8988         * tst-cancel-wrappers.sh: Remove all exceptions.
8990 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8992         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8993         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8995         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8996         Use __libc_pthread_functions array if SHARED.
8998         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8999         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9001         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9002         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9003         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9004         __libc_ptf_call instead of __libc_maybe_call.
9005         (PTF): New #define.
9006         (__libc_cleanup_region_start): Wrap function name with PTF call.
9007         (__libc_cleanup_region_end): Likewise.
9008         (__libc_cleanup_end): Likewise.
9010         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9011         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9012         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9013         * pthreadP.h: Add prototypes.
9015         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9016         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9017         __pthread_rwlock_unlock aliases.
9018         * pthreadP.h: Add prototypes for new aliases.
9020         * pthreadP.h (struct pthead_functions): Moved to...
9021         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9022         * init.c (pthread_functions): Add initializers for new elements.
9024         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9025         __pthread_cleanup_pop_restore aliases.
9026         * pthreadP.h: Add prototypes.
9028         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9029         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9030         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9031         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9032         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9033         * pthreadP.h: Adjust prototypes and callers.
9035 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9037         * Makefile (tests): Add tst-cancel7.
9038         (tst-cancel7-ARGS): New variable.
9039         * tst-cancel7.c: New file.
9041         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9042         around gcc defficiencies.
9043         * old_pthread_cond_signal.c: Likewise.
9044         * old_pthread_cond_timedwait.c: Likewise.
9045         * old_pthread_cond_wait.c: Likewise.
9047         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9049 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9051         * Makefile (tests): Add tst-cond7.
9052         * tst-cond7.c: New file.
9054         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9055         (condvar_cleanup): Get condvar address from the right place.
9057         * atomic.h: Correct definitions of atomic_full_barrier,
9058         atomic_read_barrier, atomic_write_barrier.
9060         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9061         race-free.
9062         * old_pthread_cond_signal.c: Likewise.
9063         * old_pthread_cond_timedwait.c: Likewise.
9064         * old_pthread_cond_wait.c: Likewise.
9066 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9068         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9070 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9072         * pthreadP.h (pthread_cond_2_0_t): New type.
9073         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9074         Use new type for the 2.0 condvar function prototypes.
9075         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9076         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9077         parameter.
9078         * old_pthread_cond_destroy.c: Likewise.
9079         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9080         * old_pthread_cond_signal.c: Likewise.
9081         * old_pthread_cond_timedwait.c: Likewise.
9082         * old_pthread_cond_wait.c: Likewise.
9084         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9085         (__pthread_cond_wait): Don't save cancellation mode and seq value
9086         in same location.
9088         * herrno.c (__h_errno_location): Don't define as weak.
9090 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9092         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9093         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9094         and pthread_cond_wait.
9095         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9096         Renamed to...
9097         (__pthread_cond_broadcast_2_0): ... this.
9098         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9099         Renamed to...
9100         (__pthread_cond_destroy_2_0): ... this.
9101         * old_pthread_cond_init.c (__old_pthread_cond_init):
9102         Renamed to...
9103         (__pthread_cond_init_2_0): ... this.
9104         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9105         Renamed to...
9106         (__pthread_cond_signal_2_0): ... this.
9107         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9108         Renamed to...
9109         (__pthread_cond_wait_2_0): ... this.
9110         * pthread_cond_destroy.c: Include shlib-compat.h.
9111         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9112         * pthread_cond_init.c: Include shlib-compat.h.
9113         (pthread_cond_init): Change strong_alias into versioned_symbol.
9114         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9115         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9116         fields.
9117         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9118         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9119         __pthread_cond_wait_2_0): New prototypes.
9120         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9121         __old_pthread_cond_init, __old_pthread_cond_signal,
9122         __old_pthread_cond_wait): Removed.
9123         * init.c: Include shlib-compat.h.
9124         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9125         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9126         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9127         ptr___pthread_cond_*_2_0 fields.
9128         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9129         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9131         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9132         LIBC_SIGACTION was not yet defined.
9133         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9134         [!defined LIBC_SIGACTION] (__sigaction): New function and
9135         libc_hidden_weak.
9136         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9137         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9139 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9141         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9143 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9145         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9146         New, larger type definition.
9147         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9148         implementation.
9149         * Versions [libpthread]: Add definitions for new pthread_cond_*
9150         interfaces for version GLIBC_2.3.2.
9151         * pthread_cond_init.c: Update initialization for new type definition.
9152         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9153         pthread_cond_timedwait, pthread_cond_signal, and
9154         pthread_cond_broadcast.  Add old_pthread_cond_init,
9155         old_pthread_cond_destroy, old_pthread_cond_wait,
9156         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9157         old_pthread_cond_broadcast.
9158         * old_pthread_cond_broadcast.c: New file.
9159         * old_pthread_cond_destroy.c: New file.
9160         * old_pthread_cond_init.c: New file.
9161         * old_pthread_cond_signal.c: New file.
9162         * old_pthread_cond_timedwait.c: New file.
9163         * old_pthread_cond_wait.c: New file.
9164         * pthreadP.h: Add prototypes for the compatibility interfaces.
9166         * pthread_cond_destroy.c: Don't include <errno.h>.
9168 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9170         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9171         unnecessary zero offset when addressing MUTEX.
9173 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9175         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9176         __register_atfork.
9177         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9178         for __register_atfork.
9180 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9182         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9183         instead of ASSEMBLER test macro.
9185         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9186         __libc_current_sigrtmax): Add libc_hidden_def.
9188         * sysdeps/pthread/list.h: Remove assert.h include.
9190 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9192         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9193         __pthread_initialize_minimal_internal not
9194         __pthread_initialize_minimal.
9196 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9198         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9199         __pthread_initialize_minimal as hidden.
9201         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9202         constructor.
9204 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9206         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9207         $(common-objpfx)format.lds, include that into the output script.
9208         Fix comment.
9209         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9211 2002-12-28  Andreas Jaeger  <aj@suse.de>
9213         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9214         nsec resolution changes.
9215         (xstat64_conv): Likewise.
9216         (xstat32_conv): Likewise.
9217         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9218         struct kernel_stat.
9219         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9220         structs stat and stat64.
9221         * time/time.h (__timespec_defined): Define for __USE_MISC.
9222         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9224 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9226         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9227         argument.
9228         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9229         (pthread_exit): Use strong_alias to avoid warnings.
9230         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9231         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9232         ptr___pthread_attr_init_2_*.
9233         * init.c (pthread_functions): Adjust.
9235 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9237         * forward.c: Make all functions available by default again.  It
9238         caused too much trouble.
9240         * pt-siglongjmp.c: Removed.
9242 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9244         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9245         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9246         * sysdeps/i386/Makefile: New file.
9247         * sysdeps/i386/tcb-offsets.sym: New file.
9248         * sysdeps/pthread/tcb-offsets.h: New file.
9249         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9250         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9252         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9253         __register_atfork...
9254         (GLIBC_2.3.2): ...here.
9256 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9258         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9259         pthread_attr_setstackaddr with __attribute_deprecated__.
9261 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9263         * pt-system.c (system): Remove cancellation handling.
9264         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9265         cancellation routines.
9267 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9269         * descr.h: Include <dl-sysdep.h>.
9270         (struct pthread): Move header.data.list to the back of the struct.
9271         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9272         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9273         (SYSINFO_OFFSEET): Likewise.
9275 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9277         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9278         Define.
9279         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9280         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9281         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9282         (USE_DL_SYSINFO): Undef.
9284 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9286         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9287         $(common-objpfx)libc.so.
9288         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9289         it is bigger than pipe buffer size even on arches with bigger
9290         page size.
9291         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9293 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9295         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9296         correct errno access for case that USE___THREAD is not defined.
9298 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9300         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9301         Patch by Marijn Ros <marijn@mad.scientist.com>.
9303 2002-12-22  Roland McGrath  <roland@redhat.com>
9305         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9307 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9309         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9311 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9313         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9314         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9315         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9317         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9318         of int $0x80.
9319         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9320         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9321         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9322         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9323         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9324         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9325         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9326         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9328         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9329         sysenter.
9330         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9332         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9334         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9335         in new TCB.
9336         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9337         that sysinfo is properly initialized.
9338         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9339         to 1 only for ld.so.
9341         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9342         RTLD_CORRECT_DYNAMIC_WEAK.
9344 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9346         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9347         Use return 0 as 6th argument to FORWARD4.
9348         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9350 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9352         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9353         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9354         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9355         (INIT_SYSINFO): New #define.
9356         (TLS_TP_INIT): Use INIT_SYSINFO.
9357         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9358         At test to make sure SYSINFO_OFFSET value is correct.
9359         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9361 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9363         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9364         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9365         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9366         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9367         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9368         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9369         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9371 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9373         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9374         macro instead of using int $0x80 directly.
9376         * sysdeps/pthread/bits/stdio-lock.h: New file.
9377         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9378         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9379         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9380         * Makefile (routines): Add libc-lowlevelmutex.
9382         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9383         __i686.get_pc_thunk.dx.
9385 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9387         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9388         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9389         ($(objpfx)tst-cancel-wrappers.out): New rule.
9390         * tst-cancel-wrappers.sh: New test.
9391         * tst-locale1.c: Include signal.h.
9392         (uselocale): Test static linking of __libc_current_sigrt*.
9394 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9396         * Makefile (tests): Add tst-cancel6.
9397         * tst-cancel6.c: New file
9399 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9401         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9402         Define meaningfully for assembler as well.
9403         * pthreadP.h (struct pthread_functions): Remove
9404         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9405         and ptr_pthread_attr_init_2_1 fields.
9406         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9407         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9408         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9409         (FORWARD3): Define using FORWARD4.
9410         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9411         versions.
9412         * pt-system.c: Remove duplicate stdlib.h include.
9414 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9416         * sem_init.c: Define sem_init@GLIBC_2.0.
9417         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9418         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9420         * flockfile.c: Moved to...
9421         * sysdeps/pthread/flockfile.c: ...here.  New file.
9422         * funlockfile.c: Moved to...
9423         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9424         * ftrylockfile.c: Moved to...
9425         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9427 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9429         * libc-cancellation.c: Guard both function with
9430         #if !defined NOT_IN_libc.
9431         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9432         automatically provided pthread wrappers.
9433         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9434         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9435         nor in libpthread.
9436         * pt-open.c: Removed.
9437         * pt-fcntl.c: Removed.
9438         * pt-fsync.c: Removed.
9439         * pt-lseek.c: Removed.
9440         * pt-msgrcv.c: Removed.
9441         * pt-msgsnd.c: Removed.
9442         * pt-msync.c: Removed.
9443         * pt-nanosleep.c: Removed.
9444         * pt-open64.c: Removed.
9445         * pt-pause.c: Removed.
9446         * pt-pread.c: Removed.
9447         * pt-pread64.c: Removed.
9448         * pt-pwrite.c: Removed.
9449         * pt-pwrite64.c: Removed.
9450         * pt-read.c: Removed.
9451         * pt-recv.c: Removed.
9452         * pt-recvfrom.c: Removed.
9453         * pt-recvmsg.c: Removed.
9454         * pt-send.c: Removed.
9455         * pt-sendto.c: Removed.
9456         * pt-sigtimedwait.c: Removed.
9457         * pt-sigwait.c: Removed.
9458         * pt-wait.c: Removed.
9459         * pt-waitpid.c: Removed.
9460         * pt-write.c: Removed.
9461         * pt-accept.c: Removed.
9462         * pt-close.c: Removed.
9463         * pt-connect.c: Removed.
9464         * pt-lseek64.c: Removed.
9465         * pt-sendmsg.c: Removed.
9466         * pt-tcdrain.c: Removed.
9468 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9470         * init.c (__pthread_initialize_minimal_internal): Renamed from
9471         __pthread_initialize_minimal.  Make old name an alias.  This
9472         converts a normal relocation into a relative relocation.
9474         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9476         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9477         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9478         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9479         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9480         pt-sigwaitinfo, pt-waitid, and pt-writev.
9481         * pt-creat.c: Removed.
9482         * pt-poll.c: Removed.
9483         * pt-pselect.c: Removed.
9484         * pt-readv.c: Removed.
9485         * pt-select.c: Removed.
9486         * pt-sigpause.c: Removed.
9487         * pt-sigsuspend.c: Removed.
9488         * pt-sigwaitinfo.c: Removed.
9489         * pt-waitid.c: Removed.
9490         * pt-writev.c: Removed.
9492         * init.c (pthread_functions): New variable.
9493         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9494         (or NULL) to __libc_pthread_init.
9495         * forward.c: Rewrite to use __libc:pthread_functions array to get
9496         function addresses.
9497         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9498         prototype.
9499         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9500         Take new parameter.  Copy content of variable pointed to by it
9501         to __libc_pthread_init.
9503         * pthreadP.h (struct pthread_functions): New type.
9504         (__libc_pthread_init): Declare.
9506         * pthread_attr_destroy.c: Add namespace protected alias.
9507         * pthread_attr_getdetachstate.c: Likewise.
9508         * pthread_attr_getinheritsched.c: Likewise.
9509         * pthread_attr_getschedparam.c: Likewise.
9510         * pthread_attr_getschedpolicy.c: Likewise.
9511         * pthread_attr_getscope.c: Likewise.
9512         * pthread_attr_setdetachstate.c: Likewise.
9513         * pthread_attr_setinheritsched.c: Likewise.
9514         * pthread_attr_setschedparam.c: Likewise.
9515         * pthread_attr_setschedpolicy.c: Likewise.
9516         * pthread_attr_setscope.c: Likewise.
9517         * pthread_cond_broadcast.c: Likewise.
9518         * pthread_cond_destroy.c: Likewise.
9519         * pthread_cond_init.c: Likewise.
9520         * pthread_cond_signal.c: Likewise.
9521         * pthread_cond_wait.c: Likewise.
9522         * pthread_condattr_destroy.c: Likewise.
9523         * pthread_condattr_init.c: Likewise.
9524         * pthread_equal.c: Likewise.
9525         * pthread_exit.c: Likewise.
9526         * pthread_getschedparam.c: Likewise.
9527         * pthread_self.c: Likewise.
9528         * pthread_setcancelstate.c: Likewise.
9529         * pthread_setschedparam.c: Likewise.
9530         * pthread_mutex_destroy.c: Likewise.
9531         * pthread_mutex_init.c: Likewise.
9532         * pthreadP.h: Add prototypes for the aliases.
9534         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9535         multiple_threads member in correct TCB to 1.
9537         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9538         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9539         member of thread decriptor, otherwise return unconditionally 1.
9541 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9543         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9544         regular Linux version.  Remove file.
9545         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9546         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9547         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9548         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9549         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9550         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9551         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9552         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9553         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9554         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9555         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9556         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9557         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9558         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9559         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9560         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9561         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9562         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9563         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9564         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9565         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9566         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9567         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9568         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9569         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9570         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9571         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9572         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9573         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9574         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9576 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9578         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9579         * sysdeps/unix/sysv/linux/open.c: Removed.
9580         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9581         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9582         * sysdeps/unix/sysv/linux/msync.c: Removed.
9583         * sysdeps/unix/sysv/linux/read.c: Removed.
9584         * sysdeps/unix/sysv/linux/close.c: Removed.
9585         * sysdeps/unix/sysv/linux/creat.c: Removed.
9586         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9587         * sysdeps/unix/sysv/linux/pause.c: Removed.
9588         * sysdeps/unix/sysv/linux/select.c: Removed.
9589         * sysdeps/unix/sysv/linux/write.c: Removed.
9591 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9593         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9594         element in TCB to see whether locking is needed.
9596         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9597         MULTIPLE_THREADS_OFFSET value is correct.
9599         * sysdeps/unix/sysv/linux/close.c: New file.
9600         * sysdeps/unix/sysv/linux/connect.S: New file.
9601         * sysdeps/unix/sysv/linux/creat.c: New file.
9602         * sysdeps/unix/sysv/linux/fsync.c: New file.
9603         * sysdeps/unix/sysv/linux/llseek.c: New file.
9604         * sysdeps/unix/sysv/linux/lseek.c: New file.
9605         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9606         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9607         * sysdeps/unix/sysv/linux/msync.c: New file.
9608         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9609         * sysdeps/unix/sysv/linux/open.c: New file.
9610         * sysdeps/unix/sysv/linux/open64.c: New file.
9611         * sysdeps/unix/sysv/linux/pause.c: New file.
9612         * sysdeps/unix/sysv/linux/poll.c: New file.
9613         * sysdeps/unix/sysv/linux/pread.c: New file.
9614         * sysdeps/unix/sysv/linux/pread64.c: New file.
9615         * sysdeps/unix/sysv/linux/pselect.c: New file.
9616         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9617         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9618         * sysdeps/unix/sysv/linux/readv.c: New file.
9619         * sysdeps/unix/sysv/linux/recv.S: New file.
9620         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9621         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9622         * sysdeps/unix/sysv/linux/select.c: New file.
9623         * sysdeps/unix/sysv/linux/send.S: New file.
9624         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9625         * sysdeps/unix/sysv/linux/sendto.S: New file.
9626         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9627         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9628         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9629         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9630         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9631         * sysdeps/unix/sysv/linux/system.c: New file.
9632         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9633         * sysdeps/unix/sysv/linux/wait.c: New file.
9634         * sysdeps/unix/sysv/linux/waitid.c: New file.
9635         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9636         * sysdeps/unix/sysv/linux/writev.c: New file.
9637         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9639         * pt-readv.c: Fix comment.
9641 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9643         * tst-cleanup1.c: Include stdlib.h.
9645         * tst-cancel5.c: New test.
9646         * Makefile (tests): Add tst-cancel5.
9647         (tst-cancel5): Link against libc.so libpthread.so in that order.
9649 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9651         * forward.c (test_loaded): Prevent recursive calls.
9653         * Makefile (routines): Add libc-cancellation.
9654         * libc-cancellation.c: New file.
9655         * descr.h (struct pthread): Add multiple_threads field.
9656         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9657         new thread descriptor to 1.
9658         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9659         Initialize multiple_thread field after successful thread creation.
9660         * cancellation.c (__do_cancel): Move to pthreadP.h.
9661         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9662         (__pthread_disable_asynccancel): Add internal_function attribute.
9663         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9664         * pthread_setcancelstate.c: Likewise.
9665         * pthread_setcanceltype.c: Likewise.
9666         * pthread_exit.c: Likewise.
9667         * pthreadP.h (CANCELLATION_P): Likewise.
9668         (__do_cancel): Define as static inline.
9669         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9670         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9671         declarations.
9672         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9673         fields.  Define MULTIPLE_THREADS_OFFSET.
9674         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9675         declaration.
9676         * sysdeps/unix/sysv/linux/accept.S: New file.
9677         * sysdeps/unix/sysv/linux/read.c: New file.
9678         * sysdeps/unix/sysv/linux/write.c: New file.
9679         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9680         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9681         initialization of __libc_locking_needed.
9682         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9683         __libc_locking_needed, use multiple_threads field in TCB.
9684         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9686 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9688         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9689         version.
9690         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9692         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9693         access to __libc_locking_needed for PIC.
9695 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9697         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9698         declare for libc.so.
9699         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9700         expression.
9701         (__libc_lock_lock): Put into statement expression.
9702         (__libc_lock_unlock): Remove trailing semicolon.
9703         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9705 2002-12-12  Roland McGrath  <roland@redhat.com>
9707         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9708         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9710 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9712         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9713         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9714         Initialize __libc_locking_needed.
9715         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9716         instead of __register_pthread_fork_handler.
9717         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9718         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9719         fork-gen with libc_pthread_init.
9720         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9721         of __register_pthread_fork_handler.
9722         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9723         of __register_pthread_fork_handler.
9724         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9725         __libc_locking_needed to determine whether lock prefix can be avoided.
9726         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9728 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9730         * Makefile (tests): Add tst-cleanup1.
9731         * tst-cleanup1.c: New file.
9732         * cancellation.c (__cleanup_thread): Removed.
9733         (__do_cancel): Remove call to __cleanup_thread.
9734         * pthreadP.h: Remove __cleanup_thread prorotype.
9736         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9737         Remember function and argument even if cancellation handler
9738         function is not available.
9739         (__libc_cleanup_region_end): Execute registered function directly if
9740         pthread functions are not available.
9741         (__libc_cleanup_end): Likewise.
9743         * init.c (__pthread_initialize_minimal): Fix initialization in
9744         static lib by preventing gcc from being too clever.
9746 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9748         * init.c (__pthread_initialize_minimal): Remove unneccesary
9749         sigaddset call.
9751         * Makefile (tests): We can run tst-locale2 now.
9753 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9755         * Versions: Remove duplicated sigwait entry.
9757 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9759         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9760         inside libpthread.
9762         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9764         * pthreadP.h: Declare __pthread_enable_asynccancel and
9765         __pthread_disable_asynccancel.
9766         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9767         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9768         * cancellation.c (__pthread_enable_asynccancel): New function.
9769         (__pthread_disable_asynccancel): New function.
9770         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9771         * pt-close.c: Likewise.
9772         * pt-connect.c: Likewise.
9773         * pt-creat.c: Likewise.
9774         * pt-fcntl.c: Likewise.
9775         * pt-fsync.c: Likewise.
9776         * pt-lseek.c: Likewise.
9777         * pt-lseek64.c: Likewise.
9778         * pt-msgrcv.c: Likewise.
9779         * pt-msgsnd.c: Likewise.
9780         * pt-msync.c: Likewise.
9781         * pt-nanosleep.c: Likewise.
9782         * pt-open.c: Likewise.
9783         * pt-open64.c: Likewise.
9784         * pt-pause.c: Likewise.
9785         * pt-poll.c: Likewise.
9786         * pt-pread.c: Likewise.
9787         * pt-pread64.c: Likewise.
9788         * pt-pselect.c: Likewise.
9789         * pt-pwrite.c: Likewise.
9790         * pt-pwrite64.c: Likewise.
9791         * pt-read.c: Likewise.
9792         * pt-readv.c: Likewise.
9793         * pt-recv.c: Likewise.
9794         * pt-recvfrom.c: Likewise.
9795         * pt-recvmsg.c: Likewise.
9796         * pt-select.c: Likewise.
9797         * pt-send.c: Likewise.
9798         * pt-sendmsg.c: Likewise.
9799         * pt-sendto.c: Likewise.
9800         * pt-sigpause.c: Likewise.
9801         * pt-sigsuspend.c: Likewise.
9802         * pt-sigtimedwait.c: Likewise.
9803         * pt-sigwait.c: Likewise.
9804         * pt-sigwaitinfo.c: Likewise.
9805         * pt-system.c: Likewise.
9806         * pt-tcdrain.c: Likewise.
9807         * pt-wait.c: Likewise.
9808         * pt-waitid.c: Likewise.
9809         * pt-waitpid.c: Likewise.
9810         * pt-write.c: Likewise.
9811         * pt-writev.c: Likewise.
9812         * pthread_join.c: Likewise.
9813         * pthread_timedjoin.c: Likewise.
9815         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9816         (__xpg_sigpause): New function.
9817         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9819 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9821         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9823         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9824         _GI_pthread_cleanup_pop to pthreadP.h.
9826         * ftrylockfile.c: Use _IO_lock_trylock instead of
9827         pthread_mutex_trylock.
9829         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9830         (CANCEL_RESET): Likewise.
9831         (__pthread_setcanceltype_): Declare.
9832         (__pthread_mutex_lock_internal): Declare.
9833         (__pthread_mutex_unlock_internal): Declare.
9834         (__pthread_once_internal): Declare.
9835         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9836         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9838         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9839         and pthread_mutex_unlock.
9840         * pthread_cond_wait.c: Likewise.
9841         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9842         * pthread_mutex_unlock.c: Likewise.
9844         * pthread_setcanceltype.c: Add additional alias
9845         __pthread_setcanceltype.
9847         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9848         * sem_open.c (sem_open): Likewise.
9849         Use __libc_open, __libc_write, and __libc_close instead of
9850         open, write, and close respectively.
9852         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9853         Rewrite as statement expression since it must return a value.
9855         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9856         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9857         __pthread_kill.
9859         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9860         alias __pthread_once_internal.
9862         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9864 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9866         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9867         * tst-stdio1.c: New file.
9868         * tst-stdio2.c: New file.
9870         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9872         * Makefile (tests): Comment out tst-locale2 for now.
9873         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9875         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9876         -D_IO_MTSAFE_IO.
9877         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9878         Use _IO_lock_init instead of explicit assignment.
9880         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9881         Define __libc_lock_* and __libc_lock_recursive macros with
9882         lowlevellock macros, not pthread mutexes.
9884         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9885         of pthread_mutex_lock.
9886         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9887         instead of pthread_mutex_unlock.
9889 2002-12-06  Roland McGrath  <roland@redhat.com>
9891         * allocatestack.c (__stack_user): Use uninitialized defn.
9892         * init.c (__pthread_initialize_minimal): Initialize it here.
9894 2002-12-05  Roland McGrath  <roland@redhat.com>
9896         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9897         string.
9898         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9900         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9901         missing & here too.
9903 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9905         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9906         lowlevellock.
9907         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9908         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9909         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9910         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9911         for __libc_lock_* macros.
9912         * Makefile (routines): Add libc-lowlevellock.
9914 2002-10-09  Roland McGrath  <roland@redhat.com>
9916         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9917         Under [__PIC__], call the function via the pointer fetched for
9918         comparison rather than a call by name that uses the PLT.
9919         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9920         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9921         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9922         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9923         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9925 2002-12-04  Roland McGrath  <roland@redhat.com>
9927         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9929         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9930         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9932         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9934 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9936         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9937         a completely opaque, non-integer type.
9938         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9940 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9942         * sysdeps/i386/tls.h: Include stdlib.h.
9943         * sysdeps/x86_64/tls.h: Likewise.
9945 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9947         * Makefile (tests): Add tst-locale2.
9948         (tests-static): Likewise.
9949         * tst-locale2.c: New file.
9951         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9952         volatile and add memory clobbers to lock operations.
9954 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9956         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9957         * sysdeps/i386/i486/bits/atomic.h: New file.
9958         * sysdeps/i386/i586/bits/atomic.h: New file.
9959         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9960         include i486 version.
9961         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9962         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9963         Patch by Marijn Ros <marijn@mad.scientist.com>.
9965         * allocatestack.c (get_cached_stack): Don't crash if we first
9966         found a stack with a larger size then needed.
9967         Reported by Hui Huang <hui.huang@sun.com>.
9969         * Makefile (tests): Add tst-sysconf.
9970         * tst-sysconf.c: New file.
9972         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9973         PTHREAD_THREADS_MAX.
9975 2002-12-02  Roland McGrath  <roland@redhat.com>
9977         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9978         Declare using hidden_proto instead of attribute_hidden, so there are
9979         non-.hidden static symbols for gdb to find.
9980         (__pthread_keys): Likewise.
9981         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9982         * allocatestack.c (__stack_user): Likewise.
9983         * pthread_create.c (__pthread_keys): Likewise.
9984         (__nptl_threads_events, __nptl_last_event): Make these static instead
9985         of hidden.
9986         * pthread_key_create.c (__pthread_pthread_keys_max,
9987         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9989 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9991         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9992         statically.
9993         * tst-locale1.c: New file.
9995         * pthread_cond_timedwait.c: Include <stdlib.h>.
9997         * Makefile (tests): Add tst-fork2 and tst-fork3.
9998         * tst-fork2.c: New file.
9999         * tst-fork3.c: New file.
10001 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10003         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10005         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10006         require it to 200112L.
10008         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10009         instruction only if HAVE_CMOV is defined.
10010         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10012         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10014         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10016         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10018         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10020 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10022         * sysdeps/x86_64/bits/atomic.h: New file.
10024         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10025         16-bit operations.
10027         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10028         possible since gettid cannot fail.
10030         * sysdeps/x86_64/pthreaddef.h: New file.
10032         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10034         * sysdeps/x86_64/pthread_spin_init.c: New file.
10035         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10036         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10037         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10039         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10040         Add missing lock prefix.  Minute optimization.
10042         * tst-spin2.c (main): Also check successful trylock call.
10044         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10045         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10047         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10048         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10050         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10051         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10052         value in case of an error.  Add support for INTERNAL_SYSCALL.
10054         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10055         value in case of an error.
10057         * sysdeps/x86_64/tls.h: New file.
10059 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10061         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10062         takes the array member name and the index as parameters.
10063         (THREAD_SETMEM_NC): Likewise.
10064         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10065         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10066         interfaces.
10068         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10069         to decide which code to use.
10070         (THREAD_SETMEM_NC): Likewise.
10072         * allocatestack.c (queue_stack): Don't remove stack from list here.
10073         Do it in the caller.  Correct condition to prematurely terminate
10074         loop to free stacks.
10075         (__deallocate_stack): Remove stack from list here.
10077 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10079         * Makefile (tests): Add tst-stack1.
10080         * tst-stack1.c: New file.
10082         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10083         provided stack.
10085         * pthread_attr_getstack.c: Return bottom of the thread area.
10087 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10089         * Makefile (libpthread-routines): Add pt-allocrtsig and
10090         pthread_kill_other_threads.
10091         * pt-allocrtsig.c: New file.
10092         * pthread_kill_other_threads.c: New file.
10093         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10094         all three functions.
10095         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10096         allocrtsig.
10097         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10098         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10099         and __libc_allocate_rtsig_private.
10100         * Versions (libpthread): Export pthread_kill_other_threads_np,
10101         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10103 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10105         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10106         the end of the stack.  Adjust computations.
10107         When mprotect call fails dequeue stack and free it.
10108         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10109         attribute.
10110         * pthread_getattr_np.c: Likewise.
10112         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10113         surprises.
10115 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10117         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10118         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10120 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10122         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10123         * pthread_setspecific.c: Likewise.
10125 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10127         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10128         definitions.  Get them from the official place.
10129         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10131         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10132         Use new CLONE_ flags in clone() calls.
10134         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10135         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10137         * Versions: Add pthread_* functions for libc.
10138         * forward.c: New file.
10140         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10141         errno-loc.
10142         * herrno.c: New file.
10143         * res.c: New file.
10145         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10146         sem_trywait, and sem_timedwait.  Add herrno and res.
10147         * sem_init.c: Don't initialize lock and waiters members.
10148         * sem_open.c: Likewise.
10149         * sem_post.c: Removed.
10150         * sem_wait.c: Removed.
10151         * sem_trywait.c: Removed.
10152         * sem_timedwait.c: Removed.
10153         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10154         Includes full implementations of sem_post, sem_wait, sem_trywait,
10155         and sem_timedwait.
10156         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10157         for new implementation.
10158         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10159         and waiters fields.
10161         * tst-sem3.c: Improve error message.
10162         * tst-signal3.c: Likewise.
10164         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10165         to tell the kernel about the termination futex and to initialize tid
10166         member.  Don't initialize main_thread.
10167         * descr.h (struct pthread): Remove main_thread member.
10168         * cancelllation.c (__do_cancel): Remove code handling main thread.
10169         The main thread is not special anymore.
10171         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10172         size of the stacks to stack_cache_actsize.
10174         * pt-readv.c: Add missing "defined".
10175         * pt-sigwait.c: Likewise.
10176         * pt-writev.c: Likewise.
10178 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10180         * Versions: Export __connect from libpthread.
10181         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10183         * Makefile (libpthread-routines): Add pt-raise.
10184         * sysdeps/unix/sysv/linux/raise.c: New file.
10185         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10186         * sysdeps/generic/pt-raise.c: New file.
10188         * pthread_cond_init.c: Initialize all data elements of the condvar
10189         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10191         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10192         * pthread_create.c: Likewise.
10194         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10195         * tst-key1.c: New file.
10196         * tst-key2.c: New file.
10197         * tst-key3.c: New file.
10199         * Versions: Export pthread_detach for version GLIBC_2.0.
10200         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10202 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10204         * pthread_key_create.c: Terminate search after an unused key was found.
10205         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10207         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10208         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10210 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10212         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10213         dynamic lookup for errno in PIC.
10215         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10216         release the stack lock as soon as possible.
10217         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10218         the static TLS block.
10219         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10221         * cancellation.c: Renamed from cancelation.c.
10222         * Makefile: Adjust accordingly.
10223         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10224         * cleanup_defer.c: Use CANCELLATION_P.
10225         * pthread_testcancel.c: Likewise.
10226         * descr.h: Fix spelling in comments.
10227         * init.c: Likewise.
10228         * pthread_getattr_np.c: Likewise.
10229         * pthread_getschedparam.c: Likewise.
10230         * pthread_setschedparam.c: Likewise.
10231         * Versions: Likewise.
10233         * pt-pselect.c: New file.
10234         * Makefile (libpthread-routines): Add pt-pselect.
10235         * Versions: Add pselect.
10237         * tst-cancel4.c: New file.
10238         * Makefile (tests): Add tst-cancel4.
10240 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10242         * pthread_mutex_lock.c: Always record lock ownership.
10243         * pthread_mutex_timedlock.c: Likewise.
10244         * pthread_mutex_trylock.c: Likewise.
10246         * pt-readv.c: New file.
10247         * pt-writev.c: New file.
10248         * pt-creat.c: New file.
10249         * pt-msgrcv.c: New file.
10250         * pt-msgsnd.c: New file.
10251         * pt-poll.c: New file.
10252         * pt-select.c: New file.
10253         * pt-sigpause.c: New file.
10254         * pt-sigsuspend.c: New file.
10255         * pt-sigwait.c: New file.
10256         * pt-sigwaitinfo.c: New file.
10257         * pt-waitid.c: New file.
10258         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10259         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10260         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10261         * Versions: Add all the new functions.
10263         * tst-exit1.c: New file.
10264         * Makefile (tests): Add tst-exit1.
10266         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10268 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10270         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10272         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10273         call.  pthread_join is an official cancellation point.
10274         * pthread_timedjoin.c: Likewise.
10276         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10277         and the condvar's mutex are retrieved.
10278         * pthread_cond_timedwait.c: Likewise.
10279         Reported by dice@saros.East.Sun.COM.
10281 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10283         * pthreadP.h: Cut out all type definitions and move them...
10284         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10285         * pthreadP.h: Include <internaltypes.h>.
10287         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10288         performance tweaks.
10290         * sem_trywait.c: Shuffle #includes around to get right order.
10291         * sem_timedwait.c: Likewise.
10292         * sem_post.c: Likewise.
10293         * sem_wait.c: Likewise.
10295         * nptl 0.3 released.
10297         * Makefile (tests): Add tst-signal3.
10298         * tst-signal3.c: New file.
10300 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10302         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10303         the asms modify the sem object.
10304         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10306         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10307         the actual members.
10308         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10309         * semaphoreP.h: Include pthreadP.h.
10310         * sem_getvalue.c: Adjust to sem_t change.
10311         * sem_init.c: Likewise.
10312         * sem_open.c: Likewise.
10313         * sem_post.c: Likewise.
10314         * sem_timedwait.c: Likewise.
10315         * sem_trywait.c: Likewise.
10316         * sem_wait.c: Likewise.
10318 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10320         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10321         * tst-basic2.c: New file.
10322         * tst-exec1.c: New file.
10323         * tst-exec2.c: New file.
10324         * tst-exec3.c: New file.
10326         * tst-fork1.c: Remove extra */.
10328         * nptl 0.2 released.  The API for IA-32 is complete.