* sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
[glibc.git] / nptl / ChangeLog
blobddecc8bef526f51fe8cf13fb83921a9c6ff0631a
1 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
4         Store 2 before returning ETIMEDOUT.
5         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
6         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7         (__lll_lock_wait_private): Optimize.
8         (__lll_lock_wait): Likewise.
10 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
12         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
13         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
14         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
16 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
18         [BZ #5240]
19         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
20         If we time out, try one last time to lock the futex to avoid
21         losing a wakeup signal.
22         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
23         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
25         [BZ #5245]
26         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
27         if necessary.
29 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
31         [BZ #5245]
32         * allocatestack.c (allocate_stack): Change ENOMEM error in case
33         mmap failed to EAGAIN.
34         * Makefile (tests): Add tst-basic7.
35         * tst-basic7.c: New file.
37 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
39         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
40         Use __linkin_atfork.
42 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
44         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
45         missing line continuations.
46         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
47         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
49 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
51         [BZ #5220]
52         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
53         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
54         (struct timer): Add next element.
55         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
56         enqueue timer structure into __active_timer_sigev_thread list.
57         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
58         remove timer struct from __active_timer_sigev_thread.
59         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
60         Before using timer structure make sure it is still on the
61         __active_timer_sigev_thread list.  Keep lock until done.
62         Define __active_timer_sigev_thread and
63         __active_timer_sigev_thread_lock.
65 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
67         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
68         Redefine thread_atfork for use of ATFORK_MEM.
69         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
70         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
71         function.
72         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
73         Use atomic operation when removing first element of list.
75 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
77         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
78         routine instead of an alias to __new_sem_post.
80 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
82         * init.c (__pthread_initialize_minimal): Initialize word to appease
83         valgrind.
85 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
87         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
88         libc.so just clear NAME.
89         (__libc_rwlock_fini): Nop inside of libc.so.
90         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
91         all zeros.
93 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
95         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
96         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
97         unlocking failed.
98         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
100 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
102         [BZ #4938]
103         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
104         reclaimed stack if necessary.
105         * Makefile (tests): Add tst-tsd6.
106         * tst-tsd6.c: New file.
108 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
110         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
111         Add private argument.
113 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
116         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
118 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
120         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
121         (__lll_robust_timedlock): Pass private as last argument to
122         __lll_robust_timedlock_wait.
123         (__lll_unlock): Fix a pasto.
125 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
127         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
128         sparc_old_sem): New structs.
129         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
130         (__sem_wait_cleanup): New function.
131         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
132         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
133         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
134         lll_futex_wait.
135         (__old_sem_wait): New function.
136         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
137         nptl/sysdeps/unix/sysv/linux/sparc version.
138         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
139         Likewise.
140         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
141         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
142         (__new_sem_trywait): Use sparc_old_sem structure.
143         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
144         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
145         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
146         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
147         lll_futex_timed_wait.
148         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
149         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
150         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
151         lll_futex_wake.
152         (__old_sem_post): New function.
153         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
154         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
155         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
156         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
157         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
158         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
160 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
162         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
163         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
164         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
165         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
166         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
167         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
168         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
169         Use FUTEX_WAKE_OP.
170         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
171         kernel-features.h and tcb-offsets.h.
172         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
173         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
174         process private.
175         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
176         tcb-offsets.h.
177         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
178         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
179         process private.
180         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
181         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
188 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
190         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
191         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
192         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
193         lll_futex_timed_wait.
195         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
196         __lll_robust_unlock): Rewrite as macros instead of inline functions.
197         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
198         __lll_robust_unlock, __lll_wait_tid): Likewise.
200 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
202         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
203         Fix a pasto.
204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
205         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
206         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
207         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
209         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
210         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
212         kernel-features.h.
213         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
214         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
215         process private.  Switch DW_CFA_advance_loc1 and some
216         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
218         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
219         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
220         process private.  Switch DW_CFA_advance_loc{1,2} and some
221         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
222         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
223         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
224         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
225         Likewise.
226         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
228         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
229         Likewise.
230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
231         (__pthread_cond_broadcast): Compare %r8 instead of
232         dep_mutex-cond_*(%rdi) with $-1.
233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
234         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
235         of oring.
237 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
239         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
241 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
243         * allocatestack.c: Include kernel-features.h.
244         * pthread_create.c: Likewise.
245         * pthread_mutex_init.c: Likewise.
246         * init.c: Likewise.
247         * pthread_cond_timedwait.c: Likewise.
248         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
249         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
251         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
252         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
255         Likewise.
256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
257         Likewise.
258         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
259         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
260         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
261         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
263 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
265         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
266         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
267         byte elements.  One of them is the new __shared element.
268         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
269         adjust names of other padding elements.
270         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
271         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
272         byte elements.  One of them is the new __shared element.
273         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
274         adjust names of other padding elements.
275         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
276         Renamed __pad1 element to __shared, adjust names of other padding
277         elements.
278         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
279         (pthread_rwlock_t): Likewise.
280         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
281         typo.
283 2007-08-09  Anton Blanchard  <anton@samba.org>
285         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
287 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
289         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
290         <kernel-features.h>.
291         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
293 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
295         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
296         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
297         dealing with robust mutexes.
298         * pthread_mutex_timedlock.c: Likewise.
299         * pthread_mutex_trylock.c: Likewise.
300         * pthread_mutex_unlock.c: Likewise.
301         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
303 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
305         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
306         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
307         (PTHREAD_MUTEX_PSHARED): Define.
308         * pthread_mutex_init.c (__pthread_mutex_init): Set
309         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
310         mutexes.
311         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
312         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
313         as second argument to lll_lock.
314         (LLL_MUTEX_TRYLOCK): Take mutex as argument
315         instead of its __data.__lock field.
316         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
317         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
318         to lll_robust_lock.
319         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
320         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
321         instead of mutex->__data.__kind directly, pass
322         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
323         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
324         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
325         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
326         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
327         to lll_timedlock, lll_robust_timedlock, lll_unlock and
328         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
329         of mutex->__data.__kind directly.
330         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
331         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
332         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
333         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
334         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
335         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
336         and lll_futex_wake.
337         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
338         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
339         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
340         directly.
341         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
342         Take mutex as argument instead of its __data.__lock field, pass
343         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
344         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
345         __data.__lock field.
346         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
347         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
348         to lll_robust_cond_lock.
349         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
350         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
351         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
352         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
353         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
354         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
355         lll_futex_wait.
356         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
357         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
358         lll_futex_wake.
359         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
360         pshared variable, pass it to lll_lock, lll_unlock,
361         lll_futex_timedwait and lll_futex_wake.
362         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
363         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
364         and lll_futex_wake.
365         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
366         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
367         macro.
368         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
369         lll_futex_wake_unlock): Likewise.
370         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
371         Likewise.
372         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
373         lll_futex_wake_unlock): Likewise.
374         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
375         Likewise.
376         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
377         lll_futex_wake_unlock): Likewise.
378         (lll_futex_wake): Fix a typo.
379         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
381         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
382         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
383         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
385         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
386         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
387         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
388         (__pthread_cond_timedwait): Likewise.
389         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
390         (__condvar_cleanup, __pthread_cond_wait): Likewise.
392 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
394         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
395         Don't use CGOTSETUP and CGOTRESTORE macros.
396         (CGOTSETUP, CGOTRESTORE): Remove.
397         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
398         @local symbol.
400 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
402         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
403         definitions for private futexes.
404         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
405         kernel-features.h and lowlevellock.h.  Use private futexes if
406         they are available.
407         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
408         (__lll_mutex_lock_wait): Rename to
409         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
410         (__lll_mutex_timedlock_wait): Rename to ...
411         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
412         Don't compile in for libc.so.
413         (__lll_mutex_unlock_wake): Rename to ...
414         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
415         (__lll_timedwait_tid): Use __NR_gettimeofday.
416         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
417         the header from assembler.  Renamed all lll_mutex_* resp.
418         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
419         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
420         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
421         Define.
422         (__lll_lock_wait_private): Add prototype.
423         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
424         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
425         __lll_unlock_wake): Likewise.
426         (lll_lock): Add private argument.  Call __lll_lock_wait_private
427         if private is constant LLL_PRIVATE.
428         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
429         lll_timedlock, lll_robust_timedlock): Add private argument.
430         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
431         if private is constant LLL_PRIVATE.
432         (lll_robust_unlock, lll_robust_dead): Add private argument.
433         (lll_lock_t): Remove.
434         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
435         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
436         lll_cond_wake, lll_cond_broadcast): Remove.
437         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
438         kernel-features.h and lowlevellock.h.
439         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
440         (LOAD_FUTEX_WAIT): Define.
441         (__lll_robust_mutex_lock_wait): Rename to ...
442         (__lll_robust_lock_wait): ... this.  Add private argument.
443         Use LOAD_FUTEX_WAIT macro.
444         (__lll_robust_mutex_timedlock_wait): Rename to ...
445         (__lll_robust_timedlock_wait): ... this.    Add private argument.
446         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
447         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
448         lowlevellock.h.
449         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
450         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
451         __lll_mutex_{lock,unlock}_*.
452         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
453         lowlevellock.h and pthread-errnos.h.
454         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
455         FUTEX_CMP_REQUEUE, EINVAL): Remove.
456         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
457         __lll_mutex_{lock,unlock}_*.
458         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
459         lowlevellock.h and pthread-errnos.h.
460         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
461         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
462         __lll_mutex_{lock,unlock}_*.
463         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
464         lowlevellock.h.
465         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
466         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
467         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
468         (__condvar_tw_cleanup): Likewise.
469         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
470         lowlevellock.h.
471         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
472         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
473         __lll_mutex_{lock,unlock}_*.
474         ( __condvar_w_cleanup): Likewise.
475         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
476         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
477         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
478         lowlevellock.h.
479         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
480         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
481         __lll_mutex_{lock,unlock}_*.
482         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
483         lowlevellock.h.
484         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
485         FUTEX_PRIVATE_FLAG): Remove.
486         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
487         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
488         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
489         lowlevellock.h.
490         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
491         FUTEX_PRIVATE_FLAG): Remove.
492         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
493         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
494         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
495         lowlevellock.h.
496         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
497         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
498         __lll_mutex_{lock,unlock}_*.
499         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
500         lowlevellock.h.
501         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
502         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
503         __lll_mutex_{lock,unlock}_*.
504         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
505         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
506         (__new_sem_post): Use standard initial exec code sequences.
507         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
508         lowlevellock.h.
509         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
510         FUTEX_PRIVATE_FLAG): Remove.
511         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
512         exec code sequences.
513         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
514         (__new_sem_trywait): Use standard initial exec code sequences.
515         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
516         (__new_sem_wait): Use standard initial exec code sequences.
518 2007-07-31  Anton Blanchard  <anton@samba.org>
520         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
521         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
522         atomic_full_barrier.
524 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
526         * allocatestack.c (stack_cache_lock): Change type to int.
527         (get_cached_stack, allocate_stack, __deallocate_stack,
528         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
529         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
530         as second argument to lll_lock and lll_unlock macros on
531         stack_cache_lock.
532         * pthread_create.c (__find_in_stack_list): Likewise.
533         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
534         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
535         as second argument.
536         * descr.h (struct pthread): Change lock and setxid_futex field
537         type to int.
538         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
539         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
540         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
541         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
542         Likewise.
543         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
544         * pthread_cond_init.c (__pthread_cond_init): Likewise.
545         * pthreadP.h (__attr_list_lock): Change type to int.
546         * pthread_attr_init.c (__attr_list_lock): Likewise.
547         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
548         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
549         lll_{,un}lock.
550         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
551         also for lll_futex_{wake,wait}.
552         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
553         a pointer to const.
554         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
555         LLL_SHARED as second argument to lll_{,un}lock.
556         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
557         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
558         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
559         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
560         Likewise.
561         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
562         as second argument to lll_{,un}lock macros on pd->lock.
563         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
564         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
565         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
566         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
567         Likewise.
568         * sysdeps/pthread/createthread.c (do_clone, create_thread):
569         Likewise.
570         * pthread_once.c (once_lock): Change type to int.
571         (__pthread_once): Pass LLL_PRIVATE as second argument to
572         lll_{,un}lock macros on once_lock.
573         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
574         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
575         rwlock->__data.__shared as second argument to them and similarly
576         for lll_futex_w*.
577         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
578         Likewise.
579         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
580         Likewise.
581         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
582         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
583         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
584         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
585         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
586         to lll_{,un}lock macros on __sem_mappings_lock.
587         * sem_open.c (check_add_mapping): Likewise.
588         (__sem_mappings_lock): Change type to int.
589         * semaphoreP.h (__sem_mappings_lock): Likewise.
590         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
591         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
592         instead of lll_*mutex_*, pass LLL_SHARED as last
593         argument.
594         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
595         pass LLL_SHARED as last argument.
596         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
597         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
598         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
599         pass LLL_SHARED as last argument.
600         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
601         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
602         LLL_SHARED as last argument.
603         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
604         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
605         Similarly.
606         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
607         __libc_lock_lock_recursive, __libc_lock_unlock,
608         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
609         argument to lll_{,un}lock.
610         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
611         _IO_lock_unlock): Likewise.
612         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
613         compound literal.
614         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
615         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
616         __fork_lock.
617         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
618         free_mem): Likewise.
619         (__fork_lock): Change type to int.
620         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
621         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
622         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
623         lll_futex_wake.
624         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
625         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
626         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
627         New function.
628         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
629         pass it through to lll_futex_*wait, only compile in when
630         IS_IN_libpthread.
631         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
632         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
633         argument and pass it through to lll_futex_*wait.
634         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
635         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
636         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
637         inline functions to __lll_* resp. __lll_robust_*.
638         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
639         (lll_mutex_dead): Add private argument.
640         (__lll_lock_wait_private): New prototype.
641         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
642         __lll_robust_lock_timedwait): Add private argument to prototypes.
643         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
644         call __lll_lock_wait_private, otherwise pass private to
645         __lll_lock_wait.
646         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
647         __lll_robust_timedlock): Add private argument, pass it to
648         __lll_*wait functions.
649         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
650         call __lll_unlock_wake_private, otherwise pass private to
651         __lll_unlock_wake.
652         (__lll_robust_unlock): Add private argument, pass it to
653         __lll_robust_unlock_wake.
654         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
655         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
656         argument, pass it through to __lll_* inline function.
657         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
658         (lll_lock_t): Remove.
659         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
660         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
661         lll_cond_wake, lll_cond_broadcast): Remove.
662         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
663         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
664         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
665         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
666         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
667         the header from assembler.  Renamed all lll_mutex_* resp.
668         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
669         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
670         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
671         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
672         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
673         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
674         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
675         Remove prototype.
676         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
677         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
678         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
679         (lll_trylock): Likewise, use __lll_trylock_asm, pass
680         MULTIPLE_THREADS_OFFSET as another asm operand.
681         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
682         MULTIPLE_THREADS_OFFSET as last asm operand, call
683         __lll_lock_wait_private if private is constant LLL_PRIVATE,
684         otherwise pass private as another argument to __lll_lock_wait.
685         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
686         lll_timedlock, lll_robust_timedlock): Add private argument, pass
687         private as another argument to __lll_*lock_wait call.
688         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
689         MULTIPLE_THREADS_OFFSET as another asm operand, call
690         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
691         otherwise pass private as another argument to __lll_unlock_wake.
692         (lll_robust_unlock): Add private argument, pass private as another
693         argument to __lll_unlock_wake.
694         (lll_robust_dead): Add private argument, use __lll_private_flag
695         macro.
696         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
697         LLL_MUTEX_LOCK_INITIALIZER.
698         (lll_lock_t): Remove.
699         (LLL_LOCK_INITIALIZER_WAITERS): Define.
700         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
701         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
702         lll_cond_wake, lll_cond_broadcast): Remove.
703         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
704         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
705         2007-05-2{3,9} changes.
706         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
707         kernel-features.h and lowlevellock.h.
708         (LOAD_PRIVATE_FUTEX_WAIT): Define.
709         (LOAD_FUTEX_WAIT): Rewritten.
710         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
711         define.
712         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
713         (__lll_mutex_lock_wait): Rename to ...
714         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
715         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
716         (__lll_mutex_timedlock_wait): Rename to ...
717         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
718         contains private argument.  Don't compile in for libc.so.
719         (__lll_mutex_unlock_wake): Rename to ...
720         (__lll_unlock_wake): ... this.  %ecx contains private argument.
721         Don't compile in for libc.so.
722         (__lll_timedwait_tid): Use __NR_gettimeofday.
723         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
724         kernel-features.h and lowlevellock.h.
725         (LOAD_FUTEX_WAIT): Define.
726         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
727         define.
728         (__lll_robust_mutex_lock_wait): Rename to ...
729         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
730         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
731         macro.
732         (__lll_robust_mutex_timedlock_wait): Rename to ...
733         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
734         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
735         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
736         lowlevellock.h.
737         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
738         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
739         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
740         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
741         to __lll_lock_wait in %edx.
742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
743         Include lowlevellock.h and pthread-errnos.h.
744         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
745         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
746         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
747         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
748         pass LLL_SHARED in %ecx to both __lll_lock_wait and
749         __lll_unlock_wake.
750         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
751         Include lowlevellock.h and pthread-errnos.h.
752         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
753         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
754         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
755         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
756         pass LLL_SHARED in %ecx to both __lll_lock_wait and
757         __lll_unlock_wake.
758         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
759         Include lowlevellock.h.
760         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
761         Don't define.
762         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
763         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
764         pass LLL_SHARED in %ecx to both __lll_lock_wait and
765         __lll_unlock_wake.  Use __NR_gettimeofday.
766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
767         Include lowlevellock.h.
768         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
769         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
770         to __lll_*, pass cond_lock address in %edx rather than %ecx to
771         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
772         and __lll_unlock_wake.
773         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
774         Include lowlevellock.h.
775         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
776         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
777         MUTEX(%ebx) address in %edx rather than %ecx to
778         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
779         and __lll_unlock_wake.  Move return value from %ecx to %edx
780         register.
781         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
782         Include lowlevellock.h.
783         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
784         Don't define.
785         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
786         MUTEX(%ebp) address in %edx rather than %ecx to
787         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
788         and __lll_unlock_wake.  Move return value from %ecx to %edx
789         register.  Use __NR_gettimeofday.
790         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
791         Include lowlevellock.h.
792         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
793         Don't define.
794         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
795         MUTEX(%ebp) address in %edx rather than %ecx to
796         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
797         and __lll_unlock_wake.  Move return value from %ecx to %edx
798         register.  Use __NR_gettimeofday.
799         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
800         Include lowlevellock.h.
801         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
802         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
803         MUTEX(%edi) address in %edx rather than %ecx to
804         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
805         and __lll_unlock_wake.
806         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
807         Include lowlevellock.h.
808         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
809         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
810         MUTEX(%ebx) address in %edx rather than %ecx to
811         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
812         and __lll_unlock_wake.  Move return value from %ecx to %edx
813         register.
814         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
815         lowlevellock.h.
816         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
817         define.
818         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
819         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
820         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
821         lowlevellock.h.
822         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
823         (sem_timedwait): Use __NR_gettimeofday.
824         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
825         lowlevellock.h.
826         (LOCK): Don't define.
827         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
828         lowlevellock.h.
829         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
830         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
831         are waiters.
832         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
833         2007-05-2{3,9} changes.
834         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
835         kernel-features.h and lowlevellock.h.
836         (LOAD_PRIVATE_FUTEX_WAIT): Define.
837         (LOAD_FUTEX_WAIT): Rewritten.
838         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
839         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
840         (__lll_mutex_lock_wait): Rename to ...
841         (__lll_lock_wait): ... this.  %esi is now private argument.
842         Don't compile in for libc.so.
843         (__lll_mutex_timedlock_wait): Rename to ...
844         (__lll_timedlock_wait): ... this.  %esi contains private argument.
845         Don't compile in for libc.so.
846         (__lll_mutex_unlock_wake): Rename to ...
847         (__lll_unlock_wake): ... this.  %esi contains private argument.
848         Don't compile in for libc.so.
849         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
850         kernel-features.h and lowlevellock.h.
851         (LOAD_FUTEX_WAIT): Define.
852         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
853         (__lll_robust_mutex_lock_wait): Rename to ...
854         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
855         Use LOAD_FUTEX_WAIT macro.
856         (__lll_robust_mutex_timedlock_wait): Rename to ...
857         (__lll_robust_timedlock_wait): ... this. %esi argument contains
858         private, use LOAD_FUTEX_WAIT macro.
859         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
860         lowlevellock.h.
861         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
862         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
863         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
864         __lll_lock_wait and __lll_unlock_wake.
865         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
866         Include lowlevellock.h and pthread-errnos.h.
867         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
868         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
869         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
870         pass LLL_SHARED in %esi to both __lll_lock_wait and
871         __lll_unlock_wake.
872         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
873         Include lowlevellock.h and pthread-errnos.h.
874         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
875         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
876         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
877         pass LLL_SHARED in %esi to both __lll_lock_wait and
878         __lll_unlock_wake.
879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
880         Include lowlevellock.h.
881         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
882         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
883         pass LLL_SHARED in %esi to both __lll_lock_wait and
884         __lll_unlock_wake.
885         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
886         Include lowlevellock.h.
887         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
888         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
889         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
890         and __lll_unlock_wake.
891         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
892         Include lowlevellock.h.
893         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
894         Don't define.
895         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
896         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
897         and __lll_unlock_wake.
898         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
899         Include lowlevellock.h.
900         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
901         Don't define.
902         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
903         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
904         and __lll_unlock_wake.
905         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
906         Include lowlevellock.h.
907         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
908         Don't define.
909         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
910         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
911         and __lll_unlock_wake.
912         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
913         Include lowlevellock.h.
914         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
915         Don't define.
916         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
917         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
918         and __lll_unlock_wake.
919         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
920         Include lowlevellock.h.
921         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
922         Don't define.
923         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
924         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
925         and __lll_unlock_wake.
926         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
927         lowlevellock.h.
928         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
929         define.
930         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
931         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
932         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
933         lowlevellock.h.
934         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
935         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
936         lowlevellock.h.
937         (LOCK): Don't define.
938         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
939         lowlevellock.h.
940         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
941         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
942         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
943         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
944         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
945         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
946         (__lll_lock_wait_private): New function.
947         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
948         it to lll_futex_*wait.  Don't compile in for libc.so.
949         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
950         Remove.
951         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
952         (struct sparc_pthread_barrier): Remove.
953         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
954         struct sparc_pthread_barrier.  Pass
955         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
956         and lll_futex_wait macros.
957         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
958         Remove.
959         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
960         Include sparc pthread_barrier_wait.c instead of generic one.
962 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
964         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
966         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
967         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
968         %ecx.
969         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
970         (pthread_rwlock_timedwrlock): Likewise.
971         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
972         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
974 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
976         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
978 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
980         * tst-locale2.c (useless): Add return statement.
982 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
984         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
985         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
986         * pthread_create.c (start_thread): Likewise.
987         * init.c (sighandler_setxid): Likewise.
988         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
989         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
990         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
991         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
992         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
993         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
994         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
995         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
996         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
997         Likewise.
998         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
999         Likewise.
1000         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1001         Likewise.
1002         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1003         __rtld_notify): Likewise.
1004         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1005         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1006         __pthread_once): Likewise.
1007         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1008         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1009         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1010         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1011         (lll_futex_wait): Add private argument, define as wrapper around
1012         lll_futex_timed_wait.
1013         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1014         use __lll_private_flag macro.
1015         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1016         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1017         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1018         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1019         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1020         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1021         (lll_futex_wait): Add private argument, define as wrapper around
1022         lll_futex_timed_wait.
1023         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1024         use __lll_private_flag macro.
1025         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1026         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1027         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1028         Define.
1029         (lll_futex_timed_wait, lll_futex_wake): Use it.
1030         (lll_private_futex_wait, lll_private_futex_timed_wait,
1031         lll_private_futex_wake): Removed.
1032         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1033         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1034         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1035         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1036         (lll_futex_wait): Add private argument, define as wrapper around
1037         lll_futex_timed_wait.
1038         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1039         use __lll_private_flag macro.
1040         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1041         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1042         to lll_futex_*.
1043         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1044         (lll_private_futex_wait, lll_private_futex_timed_wait,
1045         lll_private_futex_wake): Removed.
1046         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1047         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1048         (lll_private_futex_wait, lll_private_futex_timed_wait,
1049         lll_private_futex_wake): Removed.
1050         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1051         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1052         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1053         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1054         (lll_futex_wait): Add private argument, define as wrapper around
1055         lll_futex_timed_wait.
1056         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1057         use __lll_private_flag macro.
1058         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1059         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1060         to lll_futex_*.
1061         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1062         Define.
1063         (lll_futex_timed_wait, lll_futex_wake): Use it.
1064         (lll_private_futex_wait, lll_private_futex_timed_wait,
1065         lll_private_futex_wake): Removed.
1067 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1069         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1070         of the structure for sparc32.
1072 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1074         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1076 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1078         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1079         code used when private futexes are assumed.
1080         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1081         Likewise.
1083 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1085         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1086         (__lll_private_flag): Define.
1087         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1088         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1089         __lll_private_flag.
1090         (lll_private_futex_wait, lll_private_futex_timedwait,
1091         lll_private_futex_wake): Define as wrapper around non-_private
1092         macros.
1093         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1094         (__lll_private_flag): Define.
1095         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1096         (lll_private_futex_wait, lll_private_futex_timedwait,
1097         lll_private_futex_wake): Define as wrapper around non-_private
1098         macros.
1100 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1102         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1103         parameter to lll_futex_wait call.
1104         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1106         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1107         Replace lll_futex_wait with lll_private_futex_wait.
1108         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1109         Add LLL_SHARED parameter to lll_futex_wake().
1111         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1112         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1113         lll_private_futex_wake.
1114         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1115         bit from private parm before syscall.
1116         (lll_futex_timed_wait): Likewise.
1117         (lll_futex_wake): Likewise.
1118         (lll_futex_wake_unlock): Likewise.
1119         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1120         (lll_robust_mutex_unlock): Likewise.
1121         (lll_mutex_unlock_force): Likewise.
1122         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1124 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1127         compilation when unconditionally using private futexes.
1128         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1130         Likewise.
1131         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1134 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1136         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1137         Define.
1139 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1141         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1142         kernel-features.h.
1144 2007-05-16  Roland McGrath  <roland@redhat.com>
1146         * init.c (__nptl_initial_report_events): New variable.
1147         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1148         to that.
1150 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1152         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1153         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1155 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1157         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1158         implementation.
1160 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1162         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1163         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1164         * pthread_mutex_timedlock.c: Likewise.
1165         * pthread_mutex_trylock.c: Likewise.
1166         * pthread_mutex_unlock.c: Likewise.
1168 2007-06-17  Andreas Schwab  <schwab@suse.de>
1170         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1171         sections.
1173 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1175         * allocatestack.c (allocate_stack): Make code compile if
1176         __ASSUME_PRIVATE_FUTEX is set.
1178 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1180         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1181         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1183         (__pthread_rwlock_wrlock): Likewise.
1184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1185         (pthread_rwlock_timedrdlock): Likewise.
1186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1187         (pthread_rwlock_timedwrlock): Likewise.
1188         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1189         (__pthread_rwlock_unlock): Likewise.
1191 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1193         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1194         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1195         Split __flags into __flags, __shared, __pad1 and __pad2.
1196         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1197         futexes if they are available.
1198         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1199         in libc-lowlevellock.S allow using private futexes.
1200         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1201         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1202         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1203         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1204         lll_private_futex_timed_wait and lll_private_futex_wake.
1205         (lll_robust_mutex_unlock): Fix typo.
1206         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1207         field in futex command setup.
1208         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1209         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1210         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1211         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1212         if they are available.  Remove clear_once_control.
1213         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1214         futexes if they are available.
1215         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1217         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1219         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1220         Wake only when there are waiters.
1221         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1222         support.  Indicate that there are waiters.  Remove unnecessary
1223         extra cancellation test.
1224         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1225         left-over duplication of __sem_wait_cleanup.
1227 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1229         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1230         parameter to lll_futex_wait, lll_futex_timed_wait, and
1231         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1232         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1233         lll_private_futex_wake.
1234         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1235         * allocatestack.c: Adjust use of lll_futex_* macros.
1236         * init.c: Likewise.
1237         * lowlevellock.h: Likewise.
1238         * pthread_barrier_wait.c: Likewise.
1239         * pthread_cond_broadcast.c: Likewise.
1240         * pthread_cond_destroy.c: Likewise.
1241         * pthread_cond_signal.c: Likewise.
1242         * pthread_cond_timedwait.c: Likewise.
1243         * pthread_cond_wait.c: Likewise.
1244         * pthread_create.c: Likewise.
1245         * pthread_mutex_lock.c: Likewise.
1246         * pthread_mutex_setprioceiling.c: Likewise.
1247         * pthread_mutex_timedlock.c: Likewise.
1248         * pthread_mutex_unlock.c: Likewise.
1249         * pthread_rwlock_timedrdlock.c: Likewise.
1250         * pthread_rwlock_timedwrlock.c: Likewise.
1251         * pthread_rwlock_unlock.c: Likewise.
1252         * sysdeps/alpha/tls.h: Likewise.
1253         * sysdeps/i386/tls.h: Likewise.
1254         * sysdeps/ia64/tls.h: Likewise.
1255         * sysdeps/powerpc/tls.h: Likewise.
1256         * sysdeps/pthread/aio_misc.h: Likewise.
1257         * sysdeps/pthread/gai_misc.h: Likewise.
1258         * sysdeps/s390/tls.h: Likewise.
1259         * sysdeps/sh/tls.h: Likewise.
1260         * sysdeps/sparc/tls.h: Likewise.
1261         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1262         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1263         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1264         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1265         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1266         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1267         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1268         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1269         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1270         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1271         Likewise.
1272         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1273         * sysdeps/x86_64/tls.h: Likewise.
1275 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1277         * pthread_getattr_np.c: No need to install a cancellation handler,
1278         this is no cancellation point.
1279         * pthread_getschedparam.c: Likewise.
1280         * pthread_setschedparam.c: Likewise.
1281         * pthread_setschedprio.c: Likewise.
1282         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1283         lll_unlock_wake_cb.
1284         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1285         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1286         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1287         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1288         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1289         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1290         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1291         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1292         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1293         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1294         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1297         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1298         whether there are more than one thread makes no sense here since
1299         we only call the slow path if the locks are taken.
1300         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1302         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1303         COND_NWAITERS_SHIFT.
1304         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1305         COND_CLOCK_BITS.
1306         * pthread_cond_init.c: Likewise.
1307         * pthread_cond_timedwait.c: Likewise.
1308         * pthread_cond_wait.c: Likewise.
1309         * pthread_condattr_getclock.c: Likewise.
1310         * pthread_condattr_setclock.c: Likewise.
1311         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1312         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1314         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1315         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1317 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1319         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1320         unistd.h.
1322         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1323         insn suffix.
1324         (THREAD_GSCOPE_GET_FLAG): Remove.
1325         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1326         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1327         changes.
1328         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1329         (THREAD_GSCOPE_GET_FLAG): Remove.
1330         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1331         instead of THREAD_GSCOPE_GET_FLAG.
1332         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1333         it.
1334         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1335         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1336         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1337         THREAD_GSCOPE_WAIT): Define.
1338         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1339         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1340         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1341         THREAD_GSCOPE_WAIT): Define.
1342         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1343         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1344         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1345         THREAD_GSCOPE_WAIT): Define.
1346         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1347         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1348         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1349         THREAD_GSCOPE_WAIT): Define.
1351 2007-05-24  Richard Henderson  <rth@redhat.com>
1353         * descr.h (struct pthread): Add header.gscope_flag.
1354         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1355         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1356         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1357         THREAD_GSCOPE_WAIT): Define.
1359 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1361         * init.c: Make it compile with older kernel headers.
1363         * tst-initializers1.c: Show through exit code which test failed.
1365         * pthread_rwlock_init.c: Also initialize __shared field.
1366         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1367         element in rwlock structure into four byte elements.  One of them is
1368         the new __shared element.
1369         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1370         Likewise.
1371         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1372         __shared, adjust names of other padding elements.
1373         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1374         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1375         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1376         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1377         FUTEX_PRIVATE_FLAG.
1378         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1379         futex to use private operations if possible.
1380         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1381         Likewise.
1382         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1383         Likewise.
1384         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1385         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1387         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1388         Likewise.
1389         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1390         Likewise.
1391         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1392         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1394 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1396         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1397         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1398         * pthread_rwlock_timedrdlock.c: Likewise.
1399         * pthread_rwlock_tryrdlock.c: Likewise.
1401         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1402         optimization.
1404         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1405         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1406         duplication of __sem_wait_cleanup.
1408         * allocatestack.c: Revert last change.
1409         * init.c: Likewise.
1410         * sysdeps/i386/tls.h: Likewise.
1411         * sysdeps/x86_64/tls.h: Likewise.
1412         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1413         header structure.
1414         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1416         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1417         Add private field.
1418         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1419         * pthread_barrier_init.c: Set private flag if pshared and private
1420         futexes are supported.
1421         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1422         private field in futex command setup.
1423         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1425 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1427         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1428         support.
1429         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1430         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1431         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1432         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1433         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1435         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1436         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1437         fields in the structure.
1438         (__old_sem_init): New function.
1439         * sem_open.c: Initialize all fields of the structure.
1440         * sem_getvalue.c: Adjust for renamed element.
1441         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1442         (gen-as-const-headers): Add structsem.sym.
1443         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1444         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1445         struct new_sem.  Add struct old_sem.
1446         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1447         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1448         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1449         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1450         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1451         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1452         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1453         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1454         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1455         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1456         * tst-sem10.c: New file.
1457         * tst-sem11.c: New file.
1458         * tst-sem12.c: New file.
1459         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1460         of struct sem.
1462 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1463             Jakub Jelinek  <jakub@redhat.com>
1465         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1466         Move __pthread_enable_asynccancel right before futex syscall.
1467         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1468         Likewise.
1470 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1472         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1473         THREAD_COPY_PRIVATE_FUTEX): Define.
1474         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1475         THREAD_COPY_PRIVATE_FUTEX): Define.
1476         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1477         * init.c (__pthread_initialize_minimal_internal): Use
1478         THREAD_SET_PRIVATE_FUTEX.
1480         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1481         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1482         THREAD_GSCOPE_FLAG_WAIT): Define.
1483         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1484         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1485         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1486         PTR_DEMANGLE.
1487         (THREAD_GSCOPE_GET_FLAG): Define.
1488         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1489         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1490         instead of ->header.gscope_flag directly.
1492 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1494         * init.c (__pthread_initialize_minimal_internal): Check whether
1495         private futexes are available.
1496         * allocatestack.c (allocate_stack): Copy private_futex field from
1497         current thread into the new stack.
1498         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1499         futexes if they are available.
1500         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1501         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1502         in libc-lowlevellock.S allow using private futexes.
1503         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1504         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1505         FUTEX_PRIVATE_FLAG.
1506         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1507         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1508         if they are available.
1509         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1510         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1511         * sysdeps/i386/tcb-offsets.sym: Likewise.
1512         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1513         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1515 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1517         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1518         Remove ptr_wait_lookup_done again.
1519         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1520         (__pthread_initialize_minimal_internal): Initialize
1521         _dl_wait_lookup_done pointer in _rtld_global directly.
1522         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1523         Remove code to code _dl_wait_lookup_done.
1524         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1525         encrypted for now.
1527 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1529         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1530         pthread_mutex_init failed with ENOTSUP.
1532 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1534         * allocatestack.c (__wait_lookup_done): New function.
1535         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1536         Add ptr_wait_lookup_done.
1537         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1538         * pthreadP.h: Declare __wait_lookup_done.
1539         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1540         Define macros to implement reference handling of global scope.
1541         * sysdeps/x86_64/tls.h: Likewise.
1542         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1543         Initialize GL(dl_wait_lookup_done).
1545 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1547         [BZ #4512]
1548         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1549         is detected.
1550         * pthread_mutex_timedlock.c: Likewise.
1551         * pthread_mutex_trylock.c: Likewise.
1552         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1554         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1555         * tst-robust9.c: New file.
1556         * tst-robustpi9.c: New file.
1558         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1559         unnecessary extra cancellation test.
1561 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1563         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1564         extra cancellation test.
1565         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1567 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1569         * descr.h (struct pthread): Rearrange members to fill hole in
1570         64-bit layout.
1572         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1573         (__pthread_setaffinity_new): If syscall was successful and
1574         RESET_VGETCPU_CACHE is defined, use it before returning.
1575         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1577 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1579         [BZ #4455]
1580         * tst-align2.c: Include stackinfo.h.
1581         * tst-getpid1.c: Likewise.
1583 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1585         [BZ #4455]
1586         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1587         * tst-getpid1.c (do_test): Likewise.
1589         [BZ #4456]
1590         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1591         (allocate_stack): Likewise.
1593 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1595         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1596         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1597         (__lll_robust_timedlock_wait): Likewise.
1598         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1600 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1602         [BZ #4465]
1603         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1604         * tst-cancel4.c (tf_fdatasync): New test.
1606 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1608         [BZ #4392]
1609         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1610         check mutexes like normal mutexes.
1612         [BZ #4306]
1613         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1614         Initialize the whole sigevent structure to appease valgrind.
1616 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1618         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1619         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1621 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1623         * tst-locale1.c: Avoid warnings.
1624         * tst-locale2.c: Likewise.
1626 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1628         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1629         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1631 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1633         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1634         __extern_always_inline where appropriate.
1635         * sysdeps/pthread/pthread.h: Likewise.
1637 2007-03-13  Richard Henderson  <rth@redhat.com>
1639         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1640         separate cfi regions for the two subsections.
1642 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1644         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1645         new thread, don't just decrement it.
1646         Patch by Suzuki K P <suzuki@in.ibm.com>.
1648 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1650         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1651         PTHFCT_CALL definition.
1653 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1655         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1656         available, don't use it.
1658 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1660         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1661         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1662         call into the kernel to delay.
1664 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1666         * tst-initializers1.c: We want to test the initializers as seen
1667         outside of libc, so undefined _LIBC.
1669         * pthread_join.c (cleanup): Avoid warning.
1671 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1673         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1674         (__lll_timedwait_tid): Add unwind info.
1676         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1677         function table, mangle the pointers.
1678         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1679         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1680         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1681         demangle pointers before use.
1682         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1683         demangle pointer.
1684         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1685         * sysdeps/pthread/setxid.h: Likewise.
1687 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1689         * tst-rwlock7.c: Show some more information in case of correct
1690         behavior.
1692 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1694         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1695         (lll_futex_timed_wait): Undo part of last change, don't negate
1696         return value.
1698 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1701         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1703 2006-12-28  David S. Miller  <davem@davemloft.net>
1705         * shlib-versions: Fix sparc64 linux target specification.
1707 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1709         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1710         Adjust include path for pthread_barrier_wait.c move.
1712 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1714         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1715         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1717 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1719         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1720         6 argument cancellable syscalls.
1721         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1722         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1723         6 argument cancellable syscalls.
1724         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1726 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1728         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1729         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1731 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1733         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1734         __sync_lock_release instead of __sync_lock_release_si.
1736 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1738         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1739         Define.
1740         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1741         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1742         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1743         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1744         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1745         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1746         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1747         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1748         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1749         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1750         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1752 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1754         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1755         * pthread_barrier_wait.c: ...here.
1756         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1757         * pthread_cond_broadcast.c: ...here.
1758         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1759         * pthread_cond_signal.c: ...here.
1760         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1761         * pthread_cond_timedwait.c: ...here.
1762         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1763         * pthread_cond_wait.c: ...here.
1764         * sysdeps/pthread/pthread_once.c: Move to...
1765         * pthread_once.c: ...here.
1766         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1767         * pthread_rwlock_rdlock.c: ...here.
1768         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1769         * pthread_rwlock_timedrdlock.c: ...here.
1770         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1771         * pthread_rwlock_timedwrlock.c: ...here.
1772         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1773         * pthread_rwlock_unlock.c: ...here.
1774         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1775         * pthread_rwlock_wrlock.c: ...here.
1776         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1777         * pthread_spin_destroy.c: ...here.
1778         * sysdeps/pthread/pthread_spin_init.c: Move to...
1779         * pthread_spin_init.c: ...here.
1780         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1781         * pthread_spin_unlock.c: ...here.
1782         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1783         * pthread_getcpuclockid.c: ...here.
1785         * init.c: USE_TLS support is now always enabled.
1786         * tst-tls5.h: Likewise.
1787         * sysdeps/alpha/tls.h: Likewise.
1788         * sysdeps/i386/tls.h: Likewise.
1789         * sysdeps/ia64/tls.h: Likewise.
1790         * sysdeps/powerpc/tls.h: Likewise.
1791         * sysdeps/s390/tls.h: Likewise.
1792         * sysdeps/sh/tls.h: Likewise.
1793         * sysdeps/sparc/tls.h: Likewise.
1794         * sysdeps/x86_64/tls.h: Likewise.
1796 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1798         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1799         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1800         failed.
1802         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1803         Define to THREAD_SELF->header.multiple_threads.
1804         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1805         Likewise.
1806         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1807         Likewise.
1808         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1809         (SINGLE_THREAD_P): Likewise.
1810         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1811         (SINGLE_THREAD_P): Likewise.
1812         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1813         (SINGLE_THREAD_P): Likewise.
1814         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1815         (SINGLE_THREAD_P): Likewise.
1816         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1817         Likewise.
1818         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1819         (SINGLE_THREAD_P): Likewise.
1820         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1821         (SINGLE_THREAD_P): Likewise.
1822         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1823         Likewise.
1825 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1827         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1828         by default rather than 2_3_3.
1830 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1832         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1833         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1834         atomic_* instead of catomic_* macros.
1836 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1838         [BZ #3285]
1839         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1840         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1841         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1842         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1843         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1844         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1845         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1846         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1847         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1848         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1849         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1850         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1851         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1853 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1855         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1856         cancelable syscalls with six parameters.
1858         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1859         operations instead of atomic_*.
1861 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1863         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1865 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1867         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1868         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1869         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1870         New file.
1871         * pthread_attr_setstack.c: Allow overwriting the version number of the
1872         new symbol.
1873         * pthread_attr_setstacksize.c: Likewise.
1874         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1875         it.
1876         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1877         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1879 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1881         [BZ #3251]
1882         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1883         Patch by Petr Baudis.
1885 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1887         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1889         * tst-cancel2.c (tf): Loop as long as something was written.
1891 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1893         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1894         mutexes wake all mutexes.
1895         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1896         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1897         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1899 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1901         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1902         to guarantee the thread is always canceled.
1904 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1906         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1907         Include stdlib.h.
1908         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1909         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1910         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1912         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1914 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1916         [BZ #3123]
1917         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1918         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1919         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1921         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1922         * Makefile (tests): Add tst-cond22.
1923         * tst-cond22.c: New file.
1925 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1927         [BZ #3124]
1928         * descr.h (struct pthread): Add parent_cancelhandling.
1929         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1930         cancelhandling value to child.
1931         * pthread_create.c (start_thread): If parent thread was canceled
1932         reset the SIGCANCEL mask.
1933         * Makefile (tests): Add tst-cancel25.
1934         * tst-cancel25.c: New file.
1936 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1937             Ulrich Drepper  <drepper@redhat.com>
1939         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1940         counterp if it is already zero.
1941         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1943 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1944             Roland McGrath  <roland@redhat.com>
1946         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1947         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1948         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1949         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1950         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1951         lll_robust_mutex_timedlock, lll_mutex_unlock,
1952         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1953         Add _L_*_ symbols around the subsection.
1954         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1955         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1957 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1958             Roland McGrath  <roland@redhat.com>
1960         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1961         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1962         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1963         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1964         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1965         lll_robust_mutex_timedlock, lll_mutex_unlock,
1966         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1967         Add _L_*_ symbols around the subsection.
1968         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
1969         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1971 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
1973         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
1974         change because it can disturb too much existing code.  If real hard
1975         reader preference is needed we'll introduce another type.
1976         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1977         (pthread_rwlock_timedwrlock): Likewise.
1978         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1979         Likewise.
1981 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
1983         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
1984         reader preference.
1985         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
1986         (pthread_rwlock_timedwrlock): Likewise.
1987         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
1988         Likewise.
1990 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
1992         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
1993         Only define ifdef SHARED.
1995 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
1997         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
1998         (free_stacks): ...here.
1999         (__free_stack_cache): New function.
2000         * pthreadP.h: Declare __free_stack_cache.
2001         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2002         ptr_freeres.
2003         * init.c (pthread_functions): Initialize ptr_freeres.
2004         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2005         New freeres function.
2007 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2009         [BZ #3018]
2010         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2012 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2014         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2015         _XOPEN_REALTIME_THREADS.
2017 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2019         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2020         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2021         HAVE_CLOCK_GETTIME_VSYSCALL.
2022         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2024 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2026         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2027         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2028         * descr.h (struct priority_protection_data): New type.
2029         (struct pthread): Add tpp field.
2030         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2031         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2032         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2033         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2034         TPP mutexes.
2035         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2036         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2037         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2038         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2039         * tpp.c: New file.
2040         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2041         boosted by TPP.
2042         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2043         * pthread_mutexattr_getprioceiling.c
2044         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2045         in the SCHED_FIFO priority range.
2046         * pthread_mutexattr_setprioceiling.c
2047         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2048         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2049         if mutex is not TPP.  Ceiling is now in __data.__lock.
2050         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2051         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2052         is now in __data.__lock.  Add locking.
2053         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2054         * Makefile (libpthread-routines): Add tpp.
2055         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2056         * tst-tpp.h: New file.
2057         * tst-mutexpp1.c: New file.
2058         * tst-mutexpp6.c: New file.
2059         * tst-mutexpp10.c: New file.
2060         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2061         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2063 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2065         [BZ #2843]
2066         * pthread_join.c (pthread_join): Account for self being canceled
2067         when checking for deadlocks.
2068         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2069         (tf1): Don't print anything after pthread_join returns, this would be
2070         another cancellation point.
2071         (tf2): Likewise.
2072         * tst-join6.c: New file.
2073         * Makefile (tests): Add tst-join6.
2075 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2077         [BZ #2892]
2078         * pthread_setspecific.c (__pthread_setspecific): Check
2079         out-of-range index before checking for unused key.
2081         * sysdeps/pthread/gai_misc.h: New file.
2083 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2085         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2086         file.  Don't use sysctl.
2087         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2088         overwrite the file if this is likely not true.
2090 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2092         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2093         * Makefile (tests): Add tst-getpid3.
2094         * tst-getpid3.c: New file.
2096 2006-07-30  Roland McGrath  <roland@redhat.com>
2098         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2100         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2101         (pause_not_cancel): New macro.
2102         (nanosleep_not_cancel): New macro.
2103         (sigsuspend_not_cancel): New macro.
2104         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2105         nanosleep_not_cancel macro from <not-cancel.h>.
2106         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2107         macro from <not-cancel.h>.
2109 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2110             Jakub Jelinek  <jakub@redhat.com>
2112         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2113         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2114         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2115         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2116         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2117         * pthread_mutex_lock.c: Likewise.
2118         * pthread_mutex_timedlock.c: Likewise.
2119         * pthread_mutex_trylock.c: Likewise.
2120         * pthread_mutex_unlock.c: Likewise.
2121         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2122         all mutexes.
2123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2125         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2126         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2127         pthread-pi-defines.sym.
2128         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2129         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2130         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2131         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2132         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2133         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2134         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2135         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2136         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2137         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2138         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2139         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2140         * tst-mutex2.c: Likewise.
2141         * tst-mutex3.c: Likewise.
2142         * tst-mutex4.c: Likewise.
2143         * tst-mutex5.c: Likewise.
2144         * tst-mutex6.c: Likewise.
2145         * tst-mutex7.c: Likewise.
2146         * tst-mutex7a.c: Likewise.
2147         * tst-mutex8.c: Likewise.
2148         * tst-mutex9.c: Likewise.
2149         * tst-robust1.c: Likewise.
2150         * tst-robust7.c: Likewise.
2151         * tst-robust8.c: Likewise.
2152         * tst-mutexpi1.c: New file.
2153         * tst-mutexpi2.c: New file.
2154         * tst-mutexpi3.c: New file.
2155         * tst-mutexpi4.c: New file.
2156         * tst-mutexpi5.c: New file.
2157         * tst-mutexpi6.c: New file.
2158         * tst-mutexpi7.c: New file.
2159         * tst-mutexpi7a.c: New file.
2160         * tst-mutexpi8.c: New file.
2161         * tst-mutexpi9.c: New file.
2162         * tst-robust1.c: New file.
2163         * tst-robust2.c: New file.
2164         * tst-robust3.c: New file.
2165         * tst-robust4.c: New file.
2166         * tst-robust5.c: New file.
2167         * tst-robust6.c: New file.
2168         * tst-robust7.c: New file.
2169         * tst-robust8.c: New file.
2170         * Makefile (tests): Add the new tests.
2172         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2173         * pthread_mutex_destroy.c: Remove unneeded label.
2175 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2177         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2178         computations to compile time.
2180 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2182         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2184 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2186         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2188 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2190         * pthread_key_create.c (__pthread_key_create): Do away with
2191         __pthread_keys_lock.
2193         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2194         (__kernel_cpumask_size): Mark as hidden.
2195         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2197         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2198         * semaphoreP.h (__sem_mappings_lock): Likewise.
2200 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2202         * pthread_atfork.c: Mark __dso_handle as hidden.
2204 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2206         [BZ #2644]
2207         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2208         the reload problem.  Change the one path in pthread_cancel_init
2209         which causes the problem.  Force gcc to reload.  Simplify callers.
2210         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2211         (_Unwind_GetBSP): Undo last patch.
2213 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2215         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2216         function pointer is reloaded after pthread_cancel_init calls.
2218         [BZ #2644]
2219         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2220         pointers are reloaded after pthread_cancel_init calls.
2222 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2224         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2225         __always_inline.
2227 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2229         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2230         Allocate new object which is passed to timer_sigev_thread so that
2231         the timer can be deleted before the new thread is scheduled.
2233 2006-04-26  Roland McGrath  <roland@redhat.com>
2235         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2237 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2239         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2240         suffix for conditional jumps.
2241         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2242         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2243         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2244         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2245         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2246         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2248         * init.c (sigcancel_handler): Compare with correct PID even if the
2249         thread is in the middle of a fork call.
2250         (sighandler_setxid): Likewise.
2251         Reported by Suzuki K P <suzuki@in.ibm.com> .
2253 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2255         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2257 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2259         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2260         fails [Coverity CID 105].
2262 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2264         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2266 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2268         [BZ #2505]
2269         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2270         Define __lll_rel_instr using lwsync.
2272 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2274         * allocatestack.c (allocate_stack): Always initialize robust_head.
2275         * descr.h: Define struct robust_list_head.
2276         (struct pthread): Use robust_list_head in robust mutex list definition.
2277         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2278         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2279         (__pthread_initialize_minimal_internal): Register robust_list with
2280         the kernel.
2281         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2282         Declare __set_robust_list_avail.
2283         * pthread_create.c (start_thread): Register robust_list of new thread.
2284         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2285         waiters.
2286         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2287         number of users, it's unreliable.
2288         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2289         set_robust_list syscall is available.
2290         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2291         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2292         Set robust_head.list_op_pending before trying to lock a robust mutex.
2293         * pthread_mutex_timedlock.c: Likewise.
2294         * pthread_mutex_trylock.c: Likewise.
2295         * pthread_mutex_unlock.c: Likewise for unlocking.
2296         * Makefile (tests): Add tst-robust8.
2297         * tst-robust8.c: New file.
2299 2006-03-08  Andreas Schwab  <schwab@suse.de>
2301         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2302         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2304 2006-03-05  Roland McGrath  <roland@redhat.com>
2306         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2307         and $config_os doesn't match *linux*.
2309 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2311         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2312         Use __syscall_error.
2313         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2314         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2315         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2316         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2317         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2318         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2320 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2322         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2324 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2326         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2327         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2328         mutex.
2329         (__lll_robust_timedlock_wait): Likewise.
2330         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2331         (__lll_robust_lock_wait): Likewise.
2332         (__lll_robust_timedlock_wait): Likewise.
2333         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2334         (__lll_robust_lock_wait): Likewise.
2335         (__lll_robust_timedlock_wait): Likewise.
2337 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2339         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2340         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2341         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2342         lll_robust_mutex_unlock): Define.
2343         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2345 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2347         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2348         instead of <clone.S>.
2350 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2352         * Makefile (libpthread-routines): Add
2353         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2354         and pthread_mutex_[sg]etprioceiling.
2355         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2356         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2357         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2358         pthread_mutex_setprioceiling.
2359         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2360         PTHREAD_PRIO_PROTECT): New enum values.
2361         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2362         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2363         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2364         prototypes.
2365         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2366         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2367         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2368         Define.
2369         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2370         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2371         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2372         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2373         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2374         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2375         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2376         protocol mutexes.
2377         * pthread_mutex_getprioceiling.c: New file.
2378         * pthread_mutex_setprioceiling.c: New file.
2379         * pthread_mutexattr_getprioceiling.c: New file.
2380         * pthread_mutexattr_setprioceiling.c: New file.
2381         * pthread_mutexattr_getprotocol.c: New file.
2382         * pthread_mutexattr_setprotocol.c: New file.
2384 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2386         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2388 2006-02-27  Roland McGrath  <roland@redhat.com>
2390         * sysdeps/pthread/Subdirs: List nptl here too.
2391         * configure (libc_add_on_canonical): New variable.
2393         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2395         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2396         self to get main source tree's file.
2397         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2398         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2399         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2400         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2401         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2402         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2403         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2404         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2405         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2406         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2407         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2408         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2409         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2411         * Makefile: Use $(sysdirs) in vpath directive.
2413         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2414         (CPPFLAGS-timer_routines.c): Likewise.
2416         * Makeconfig (includes): Variable removed.
2418 2006-02-26  Roland McGrath  <roland@redhat.com>
2420         * sysdeps/generic/pt-raise.c: Moved to ...
2421         * pt-raise.c: ... here.
2422         * sysdeps/generic/lowlevellock.h: Moved to ...
2423         * lowlevellock.h: ... here.
2425 2006-02-23  Roland McGrath  <roland@redhat.com>
2427         * descr.h (struct pthread): Add final member `end_padding'.
2428         (PTHREAD_STRUCT_END_PADDING): Use it.
2430 2006-02-20  Roland McGrath  <roland@redhat.com>
2432         * sysdeps/mips: Directory removed, saved in ports repository.
2433         * sysdeps/unix/sysv/linux/mips: Likewise.
2435 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2437         * tst-robust1.c: Add second mutex to check that the mutex list is
2438         handled correctly.
2440 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2442         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2443         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2444         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2445         lll_robust_mutex_unlock): New macros.
2446         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2447         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2448         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2449         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2450         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2452 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2454         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2455         definitions.
2456         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2458 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2460         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2461         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2462         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2463         (lll_robust_mutex_unlock): Likewise.
2465 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2467         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2468         Set robust_list.__next rather than robust_list.
2469         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2470         (__pthread_list_t): New typedef.
2471         (pthread_mutex_t): Replace __next and __prev fields with __list.
2472         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2473         (__pthread_list_t): New typedef.
2474         (pthread_mutex_t): Replace __next and __prev fields with __list.
2475         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2476         (__pthread_list_t, __pthread_slist_t): New typedefs.
2477         (pthread_mutex_t): Replace __next and __prev fields with __list.
2478         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2479         (__pthread_list_t, __pthread_slist_t): New typedefs.
2480         (pthread_mutex_t): Replace __next and __prev fields with __list.
2481         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2482         (__pthread_list_t, __pthread_slist_t): New typedefs.
2483         (pthread_mutex_t): Replace __next and __prev fields with __list.
2484         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2485         (__pthread_slist_t): New typedef.
2486         (pthread_mutex_t): Replace __next field with __list.
2488 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2490         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2491         PTHREAD_MUTEX_OWNERDEAD.
2492         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2493         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2494         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2495         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2496         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2497         to PTHREAD_MUTEX_INCONSISTENT.
2498         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2499         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2500         * pthread_mutex_trylock.c: Likewise.
2501         * pthread_mutex_timedlock.c: Likewise.
2502         * pthread_mutex_unlock.c: Likewise.
2503         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2504         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2505         lowlevelrobustlock.sym.
2506         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2507         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2508         definitions.
2509         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2510         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2511         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2512         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2513         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2515 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2517         * allocatestack.c (allocate_stack): Initialize robust_list.
2518         * init.c (__pthread_initialize_minimal_internal): Likewise.
2519         * descr.h (struct xid_command): Pretty printing.
2520         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2521         robust_list.  Adjust macros.
2522         * pthread_create.c (start_thread): Adjust robust_list handling.
2523         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2524         but the owner for all robust mutex types.
2525         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2526         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2527         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2528         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2530         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2531         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2533 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2535         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2536         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2538 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2540         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2541         Return status.
2542         (lll_futex_timed_wait): Define.
2544 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2546         * tst-cancel4.c: Test ppoll.
2548 2006-01-18  Andreas Jaeger  <aj@suse.de>
2550         [BZ #2167]
2551         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2552         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2553         by Jim Gifford <patches@jg555.com>.
2555 2006-01-13  Richard Henderson  <rth@redhat.com>
2557         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2559 2006-01-10  Roland McGrath  <roland@redhat.com>
2561         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2562         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2563         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2564         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2565         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2566         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2567         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2568         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2569         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2570         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2572 2006-01-09  Roland McGrath  <roland@redhat.com>
2574         * tst-initializers1-c89.c: New file.
2575         * tst-initializers1-c99.c: New file.
2576         * tst-initializers1-gnu89.c: New file.
2577         * tst-initializers1-gnu99.c: New file.
2578         * Makefile (tests): Add them.
2579         (CFLAGS-tst-initializers1-c89.c): New variable.
2580         (CFLAGS-tst-initializers1-c99.c): New variable.
2581         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2582         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2584         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2585         Use __extension__ on anonymous union definition.
2586         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2587         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2588         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2589         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2590         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2592 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2594         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2595         Don't give the union a name because it changes the mangled name.
2596         Instead name the struct for __data.
2597         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2598         Likewise.
2599         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2600         Likewise.
2602 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2604         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2605         stack bias to mc_ftp field.
2607 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2609         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2610         being too clever and reloading the futex value where it shouldn't.
2612 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2614         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2615         correct type.
2617 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2619         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2620         Add cfi directives.
2622 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2624         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2625         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2626         rename in tcbhead_t.
2628         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2629         Don't give the union a name because it changes the mangled name.
2630         Instead name the struct for __data.
2631         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2632         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2633         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2634         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2635         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2636         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2638 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2640         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2641         Return status.
2642         (lll_futex_timed_wait): Define.
2643         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2644         * sysdeps/pthread/aio_misc.h: New file.
2646 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2648         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2650 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2652         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2653         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2654         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2656 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2658         * tst-cancel24.cc: Use C headers instead of C++ headers.
2660 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2662         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2663         sparc-linux configured glibc.
2664         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2665         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2666         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2667         atomic_compare_and_exchange_val_24_acq instead of
2668         atomic_compare_and_exchange_val_acq.
2669         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2670         instead of atomic_exchange_rel.
2671         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2672         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2673         file.
2674         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2675         file.
2676         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2677         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2678         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2679         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2680         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2681         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2682         New file.
2683         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2684         New file.
2685         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2686         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2687         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2688         file.
2689         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2690         file.
2691         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2693 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2695         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2696         mutex initializers.
2698 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2700         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2701         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2702         THREAD_COPY_POINTER_GUARD): Define.
2703         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2704         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2706 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2708         * version.c: Update copyright year.
2710 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2712         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2713         .eh_frame section, use cfi_* directives.
2714         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2716 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2718         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2719         now.
2721 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2723         * sysdeps/pthread/sigaction.c: Removed.
2724         * sigaction.c: New file.
2725         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2727 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2729         * Makefile (tests): Add tst-signal7.
2730         * tst-signal7.c: New file.
2732 2005-12-27  Roland McGrath  <roland@redhat.com>
2734         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2735         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2736         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2737         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2738         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2739         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2740         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2741         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2742         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2743         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2744         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2746 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2748         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2749         and __prev field to pthread_mutex_t.
2750         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2751         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2752         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2753         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2754         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2755         to pthread_mutex_t.
2757 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2759         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2760         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2761         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2762         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2763         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2764         and PTHREAD_MUTEXATTR_FLAG_BITS.
2765         * descr.h (struct pthread): Add robust_list field and define
2766         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2767         * pthread_mutexattr_getrobust.c: New file.
2768         * pthread_mutexattr_setrobust.c: New file.
2769         * pthread_mutex_consistent.c: New file.
2770         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2771         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2772         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2773         Adjust pthread_mutex_t initializers.
2774         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2775         field to pthread_mutex_t.
2776         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2777         and __prev field to pthread_mutex_t.
2778         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2779         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2780         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2781         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2782         * pthread_mutexattr_gettype.c: Likewise.
2783         * pthread_mutexattr_setpshared.c: Likewise.
2784         * pthread_mutexattr_settype.c: Likewise.
2785         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2786         Initialize mutex kind according to robust flag.
2787         * pthread_mutex_lock.c: Implement local robust mutex.
2788         * pthread_mutex_timedlock.c: Likewise.
2789         * pthread_mutex_trylock.c: Likewise.
2790         * pthread_mutex_unlock.c: Likewise.
2791         * pthread_create.c (start_thread): Mark robust mutexes which remained
2792         locked as dead.
2793         * tst-robust1.c: New file.
2794         * tst-robust2.c: New file.
2795         * tst-robust3.c: New file.
2796         * tst-robust4.c: New file.
2797         * tst-robust5.c: New file.
2798         * tst-robust6.c: New file.
2799         * tst-robust7.c: New file.
2800         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2801         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2802         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2803         tst-robust5, tst-robust6, and tst-robust7.
2805         * tst-typesizes.c: New file.
2806         * Makefile (tests): Add tst-typesizes.
2808         * tst-once3.c: More debug output.
2810 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2812         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2813         missing after last change.
2815         * version.c: Update copyright year.
2817 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2819         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2820         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2821         * pthread_mutex_trylock.c: Likewise.
2822         * pthread_mutex_timedlock.c: Likewise.
2823         * pthread_mutex_unlock.c: Likewise.
2825 2005-12-22  Roland McGrath  <roland@redhat.com>
2827         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2828         so that #include_next's search location is not reset to the -I..
2829         directory where <nptl/...> can be found.
2831 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2833         [BZ #1913]
2834         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2835         Fix unwind info.  Remove useless branch prediction prefix.
2836         * tst-cancel24.cc: New file.
2837         * Makefile: Add rules to build and run tst-cancel24.
2839 2005-12-21  Roland McGrath  <roland@redhat.com>
2841         * libc-cancellation.c: Use <> rather than "" #includes.
2842         * pt-cleanup.c: Likewise.
2843         * pthread_create.c: Likewise.
2844         * pthread_join.c: Likewise.
2845         * pthread_timedjoin.c: Likewise.
2846         * pthread_tryjoin.c: Likewise.
2847         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2848         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2849         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2850         * unwind.c: Likewise.
2852 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2854         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2855         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2856         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2857         THREAD_COPY_POINTER_GUARD): Define.
2859 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2861         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2862         rather than one.
2863         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2864         THREAD_COPY_POINTER_GUARD): Define.
2865         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2866         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2867         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2868         THREAD_COPY_POINTER_GUARD): Define.
2869         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2870         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2871         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2872         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2873         Use PTR_DEMANGLE for B0 if defined.
2875 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2877         * pthread_create.c (__pthread_create_2_1): Use
2878         THREAD_COPY_POINTER_GUARD if available.
2879         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2880         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2881         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2882         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2883         * sysdeps/x86_64/tls.h: Likewise.
2885 2005-12-15  Roland McGrath  <roland@redhat.com>
2887         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2889 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2891         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2892         sysdeps/generic.
2893         * errno-loc.c: New file.
2895 2005-12-12  Roland McGrath  <roland@redhat.com>
2897         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2898         adjustments before choosing stack size.  Update minimum stack size
2899         calculation to match allocate_stack change.
2901 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2903         * allocatestack.c (allocate_stack): Don't demand that there is an
2904         additional full page available on the stack beside guard, TLS, the
2905         minimum stack.
2907 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2909         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2910         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2912         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2913         compiling 32-bit code we must define __cleanup_fct_attribute.
2915 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2917         [BZ #1920]
2918         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2919         __attribute__ instead of __attribute.
2920         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2921         (__cleanup_fct_attribute): Likewise.
2923 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2925         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2926         a write barrier before writing libgcc_s_getcfa.
2928 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2930         * sysdeps/unix/sysv/linux/configure: Removed.
2932 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2934         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2935         optional init_array/fini_array support.
2937 2005-10-24  Roland McGrath  <roland@redhat.com>
2939         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2940         versioned_symbol use.
2942 2005-10-16  Roland McGrath  <roland@redhat.com>
2944         * init.c (__pthread_initialize_minimal_internal): Even when using a
2945         compile-time default stack size, apply the minimum that allocate_stack
2946         will require, and round up to page size.
2948 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2950         * Makefile ($(test-modules)): Remove static pattern rule.
2952 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2953             Ulrich Drepper  <drepper@redhat.com>
2955         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2956         alignment in callback function.
2957         * Makefile: Add rules to build and run tst-align3.
2958         * tst-align3.c: New file.
2960 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2962         * allocatestack.c (setxid_signal_thread): Add
2963         INTERNAL_SYSCALL_DECL (err).
2965 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
2967         * allocatestack.c (setxid_signal_thread): Need to use
2968         atomic_compare_and_exchange_bool_acq.
2970 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
2971             Jakub Jelinek  <jakub@redhat.com>
2973         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
2974         CANCEL_RESTMASK.
2975         (struct pthread): Move specific_used field to avoid padding.
2976         Add setxid_futex field.
2977         * init.c (sighandler_setxid): Reset setxid flag and release the
2978         setxid futex.
2979         * allocatestack.c (setxid_signal_thread): New function.  Broken
2980         out of the bodies of the two loops in __nptl_setxid.  For undetached
2981         threads check whether they are exiting and if yes, don't send a signal.
2982         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
2983         * pthread_create.c (start_thread): For undetached threads, check
2984         whether setxid bit is set.  If yes, wait until signal has been
2985         processed.
2987         * allocatestack.c (STACK_VARIABLES): Initialize them.
2988         * pthread_create.c (__pthread_create_2_1): Initialize pd.
2990 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
2992         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
2993         waiters, awake all waiters on the associated mutex.
2995 2005-09-22  Roland McGrath  <roland@redhat.com>
2997         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
2998         ../sysdeps/x86_64/hp-timing.h).
3000 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3002         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3003         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3004         (lll_futex_wake_unlock): Define.
3005         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3006         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3007         (lll_futex_wake_unlock): Define.
3008         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3009         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3010         (lll_futex_wake_unlock): Define.
3011         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3012         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3013         (lll_futex_wake_unlock): Define.
3014         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3015         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3016         (lll_futex_wake_unlock): Define.
3017         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3018         lll_futex_wake_unlock.
3019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3020         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3021         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3022         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3023         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3024         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3026 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3028         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3029         Fix typo in register name.
3031 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3033         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3034         Use __sigfillset.  Document that sigfillset does the right thing wrt
3035         to SIGSETXID.
3037 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3039         [BZ #1102]
3040         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3041         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3042         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3043         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3044         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3045         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3046         in the structure.
3047         * Makefile (tests): Add tst-initializers1.
3048         (CFLAGS-tst-initializers1.c): Set.
3049         * tst-initializers1.c: New test.
3051 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3053         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3054         Make sure __flags are located at offset 48 from the start of the
3055         structure.
3057 2005-07-02  Roland McGrath  <roland@redhat.com>
3059         * Makeconfig: Comment fix.
3061 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3063         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3064         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3065         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3066         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3067         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3068         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3069         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3070         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3071         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3072         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3074 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3076         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3077         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3078         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3079         fields.
3080         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3081         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3082         field.  Put in sysinfo field unconditionally.
3083         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3084         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3085         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3086         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3087         fields.
3088         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3089         * pthread_create.c (__pthread_create_2_1): Use
3090         THREAD_COPY_STACK_GUARD macro.
3091         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3092         tests.
3093         * tst-stackguard1.c: New file.
3094         * tst-stackguard1-static.c: New file.
3096 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3098         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3099         Invoke CGOTSETUP and CGOTRESTORE.
3100         (CGOTSETUP, CGOTRESTORE): Define.
3102 2005-05-29  Richard Henderson  <rth@redhat.com>
3104         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3105         (tf_write, tf_writev): Use it.
3106         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3107         the system minimum.
3109 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3111         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3112         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3113         __librt_*_asynccancel@local.
3115 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3117         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3118         all occurrences of JUMPTARGET.  Instead append @local to labels.
3120 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3122         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3123         size/alignment of struct pthread rather than tcbhead_t.
3124         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3125         Likewise.
3126         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3127         Likewise.
3128         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3129         Likewise.
3131 2005-05-19  Richard Henderson  <rth@redhat.com>
3133         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3134         __sync_val_compare_and_swap, not explicit _si variant.
3135         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3137 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3139         [BZ #915]
3140         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3142 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3144         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3145         .eh_frame section, use cfi_* directives.
3147 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3149         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3150         of "" includes.
3152 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3154         [BZ #1075]
3155         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3156         aio_write blocks.
3158 2005-04-27  Roland McGrath  <roland@redhat.com>
3160         * Makefile (tests): Remove tst-clock2.
3162         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3163         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3164         translating to the kernel clockid_t for our own process/thread clock.
3166         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3168 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3170         * old_pthread_cond_init.c: Include <errno.h>.
3171         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3172         process shared or uses clock other than CLOCK_REALTIME.
3173         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3175 2005-04-13  David S. Miller  <davem@davemloft.net>
3177         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3178         * sysdeps/sparc/sparc64/clone.S: New file.
3180 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3182         [BZ #1102]
3183         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3184         __inline instead of inline.
3185         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3187 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3189         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3190         functionally equivalent, but shorter instructions.
3191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3192         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3193         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3194         Likewise.
3195         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3196         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3197         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3198         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3200         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3201         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3202         Likewise.
3203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3204         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3206         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3207         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3209 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3211         * sysdeps/mips/Makefile: New file.
3212         * sysdeps/mips/nptl-sysdep.S: New file.
3213         * sysdeps/mips/tcb-offsets.sym: New file.
3214         * sysdeps/mips/pthread_spin_lock.S: New file.
3215         * sysdeps/mips/pthread_spin_trylock.S: New file.
3216         * sysdeps/mips/pthreaddef.h: New file.
3217         * sysdeps/mips/tls.h: New file.
3218         * sysdeps/mips/jmpbuf-unwind.h: New file.
3219         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3220         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3221         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3222         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3223         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3224         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3225         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3226         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3227         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3228         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3230 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3232         [BZ #1112]
3233         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3234         variable to scerr.
3236 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3238         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3240 2005-02-25  Roland McGrath  <roland@redhat.com>
3242         * alloca_cutoff.c: Correct license text.
3243         * tst-unload.c: Likewise.
3244         * sysdeps/pthread/allocalim.h: Likewise.
3245         * sysdeps/pthread/pt-initfini.c: Likewise.
3246         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3247         * sysdeps/pthread/bits/sigthread.h: Likewise.
3248         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3249         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3251 2005-02-16  Roland McGrath  <roland@redhat.com>
3253         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3254         Use unsigned int * for ptr_nthreads.
3256 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3258         [BZ #721]
3259         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3260         gcc4.
3262 2005-02-07  Richard Henderson  <rth@redhat.com>
3264         [BZ #787]
3265         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3266         argument.
3268 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3270         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3271         order of arguments in invocation of atomic_add_zero.
3273 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3275         [BZ #737]
3276         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3277         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3278         at least gotntpoff relocation and addition.
3279         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3280         Likewise.
3281         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3282         Likewise.
3283         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3284         Likewise.
3286 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3288         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3289         entry for static tls deallocation fix.
3290         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3291         also contains information whether the memory pointed to is static
3292         TLS or not.
3293         * sysdeps/i386/tls.h: Likewise.
3294         * sysdeps/ia64/tls.h: Likewise.
3295         * sysdeps/powerpc/tls.h: Likewise.
3296         * sysdeps/s390/tls.h: Likewise.
3297         * sysdeps/sh/tls.h: Likewise.
3298         * sysdeps/sparc/tls.h: Likewise.
3299         * sysdeps/x86_64/tls.h: Likewise.
3301 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3303         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3305 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3307         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3308         %esp.
3309         * Makefile (tests): Add tst-align2.
3310         * tst-align2.c: New test.
3311         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3312         -mpreferred-stack-boundary=4.
3314 2004-12-18  Roland McGrath  <roland@redhat.com>
3316         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3317         New file removed withdrawn for the moment.
3319 2004-12-17  Richard Henderson  <rth@redhat.com>
3321         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3322         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3324 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3326         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3327         Increased PTHREAD_STACK_MIN.
3329         * tst-context1.c (stacks): Use bigger stack size.
3331 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3333         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3334         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3336 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3338         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3339         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3340         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3342 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3344         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3346 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3348         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3349         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3351         * tst-getpid1.c: If child crashes, report this first.  Print which
3352         signal.
3354 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3356         * init.c (__pthread_initialize_minimal_internal): Also unblock
3357         SIGSETXID.
3359 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3361         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3362         _POSIX_THREAD_CPUTIME): Define to 0.
3363         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3364         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3365         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3366         __timer_signal_thread_tclk): Remove.
3367         (init_module): Remove their initialization.
3368         (thread_cleanup): Remove their cleanup assertions.
3369         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3370         __timer_signal_thread_tclk): Remove.
3371         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3372         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3373         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3375 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3377         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3378         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3380         * Makefile (tests): Add tst-getpid2.
3381         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3382         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3383         * tst-getpid2.c: New test.
3385 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3387         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3389 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3391         * Makefile (tests): Add tst-getpid1.
3392         * tst-getpid1.c: New file.
3393         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3394         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3396 2004-12-02  Roland McGrath  <roland@redhat.com>
3398         * Makefile (libpthread-nonshared): Variable removed.
3399         ($(objpfx)libpthread_nonshared.a): Target removed.
3400         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3401         These are now handled by generic magic from
3402         libpthread-static-only-routines being set.
3404 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3406         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3407         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3408         _POSIX_THREAD_PRIO_PROTECT): Define.
3409         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3410         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3411         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3413 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3415         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3416         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3417         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3418         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3419         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3420         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3421         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3423 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3425         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3427         * Makefile (libpthread-routines): Add pthread_setschedprio.
3428         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3429         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3430         * pthread_setschedprio.c: New file.
3432 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3434         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3435         * pthread_cancel.c (pthread_create): Likewise.
3437         * Makefile (libpthread-routines): Add vars.
3438         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3439         * init.c (__default_stacksize, __is_smp): Remove.
3440         * vars.c: New file.
3441         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3442         and define a wrapper macro.
3443         (PTHREAD_STATIC_FN_REQUIRE): Define.
3444         * allocatestack.c (__find_thread_by_id): Undefine.
3445         * pthread_create (__pthread_keys): Remove.
3446         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3447         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3448         PTHREAD_STATIC_FN_REQUIRE.
3450 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3452         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3453         parameter to REGISTER macro.
3455 2004-11-17  Roland McGrath  <roland@redhat.com>
3457         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3458         Make sure SIGCANCEL is blocked as well.
3460 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3462         * sysdeps/pthread/setxid.h: New file.
3463         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3464         (struct xid_command): Add forward decl.
3465         (struct pthread_functions): Change return type of __nptl_setxid hook
3466         to int.
3467         * pthreadP.h (__nptl_setxid): Change return type to int.
3468         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3469         calling thread, return its return value and set errno on failure.
3470         * descr.h (struct xid_command): Change id type to long array.
3472         * Makefile: Add rules to build and test tst-setuid1 and
3473         tst-setuid1-static.
3474         * tst-setuid1.c: New test.
3475         * tst-setuid1-static.c: New test.
3477 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3479         * Makefile (tests): Add tst-exit3.
3480         * tst-exit3.c: New test.
3482 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3484         * Makefile (tests): Add tst-exit2.
3485         * tst-exit2.c: New file.
3487 2004-11-09  Roland McGrath  <roland@redhat.com>
3489         [BZ #530]
3490         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3491         here, before calling clone.
3492         * pthread_create.c (start_thread): Don't do it here.
3494 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3496         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3498 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3500         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3501         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3502         assembler warning.
3504 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3506         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3507         if sched_priority is not between minprio and maxprio.
3509 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3511         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3512         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3514         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3515         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3517 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3519         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3520         not-cancelable I/O functions.
3522 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3524         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3525         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3526         make sure 2 is stored in the futex and we looked at the old value.
3527         Fix a few other problems to return the correct value.
3529 2004-10-14  Richard Henderson  <rth@redhat.com>
3531         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3532         make gcc4 happy.
3534 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3536         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3537         of pthread-functions.h and pthreaddef.h.
3538         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3540         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3541         Change __data.__nwaiters from int to unsigned int.
3543         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3544         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3546         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3547         before return type.
3549         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3550         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3552 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3554         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3555         test fails, remove message queue.
3556         (tf_msgsnd): Likewise.
3558 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3560         * tst-clock1.c: Change #ifdef to #if defined.
3561         * tst-clock2.c: Likewise.
3562         * tst-cond11.c: Likewise.
3564         * sysdeps/pthread/timer_create.c (timer_create): Use
3565         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3566         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3567         THREAD_CPUTIME.
3569 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3571         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3572         _POSIX_THREAD_CPUTIME): Define to 0.
3574 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3576         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3577         and _POSIX_THREAD_CPUTIME to zero.
3578         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3579         * tst-barrier2.c: Fix testing for POSIX feature.
3580         * tst-clock1.c: Likewise.
3581         * tst-clock2.c: Likewise.
3582         * tst-cond11.c: Likewise.
3583         * tst-cond4.c: Likewise.
3584         * tst-cond6.c: Likewise.
3585         * tst-flock2.c: Likewise.
3586         * tst-mutex4.c: Likewise.
3587         * tst-mutex9.c: Likewise.
3588         * tst-rwlock12.c: Likewise.
3589         * tst-rwlock4.c: Likewise.
3590         * tst-signal1.c: Likewise.
3591         * tst-spin2.c: Likewise.
3592         * sysdeps/pthread/posix-timer.h: Likewise.
3593         * sysdeps/pthread/timer_create.c: Likewise.
3594         * sysdeps/pthread/timer_routines.c: Likewise.
3596 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3598         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3599         (__lll_mutex_timedlock_wait): Address futex correctly.
3601         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3602         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3603         make sure 2 is stored in the futex and we looked at the old value.
3604         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3605         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3606         which might very well made the code not working at all before.
3607         [BZ #417]
3609 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3611         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3612         allow SIGSETXID to be sent.
3613         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3614         for SIGSETXID to be defined.
3615         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3616         SIGSETXID cannot be blocked.
3618         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3619         Add __extension__ to long long types.
3620         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3621         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3622         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3623         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3624         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3625         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3626         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3628 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3630         * descr.h (struct pthread): Add stopped_start field.
3631         * sysdeps/pthread/createthread.c (create_thread): Set
3632         start_stopped flag in descriptor for new thread appropriately.
3633         * pthread_create.c (start_thread): Only take lock to be stopped on
3634         startup if stopped_start flag says so.
3636 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3638         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3639         is created detached and if yes, do not try to free the stack in case
3640         the thread creation failed.
3641         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3642         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3643         case there has been no error.  [BZ #405]
3645         * pthread_create.c (start_thread): Don't wait for scheduler data
3646         etc to be set at the beginning of the function.  The cancellation
3647         infrastructure must have been set up.  And enable async
3648         cancellation before potentially going to sleep.  [BZ #401]
3650 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3652         * Versions: Remove exports for pthread_set*id_np functions.
3653         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3654         for now.
3655         * Makefile: Don't build pthread_set*id code for now.
3657 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3659         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3660         internal use.
3661         * allocatestack.c (__nptl_setxid): New function.
3662         * descr.h (struct xid_command): Define type.
3663         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3664         (sighandler_setxid): New function.
3665         (__pthread_initialize_minimal): Register sighandler_setxid for
3666         SIGCANCEL.
3667         * pt-allocrtsig.c: Update comment.
3668         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3669         Declare __nptl_setxid.
3670         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3671         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3672         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3673         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3674         and pthread_setresuid_np.
3675         * pthread_setgid_np.c: New file.
3676         * pthread_setuid_np.c: New file.
3677         * pthread_setegid_np.c: New file.
3678         * pthread_seteuid_np.c: New file.
3679         * pthread_setregid_np.c: New file.
3680         * pthread_setreuid_np.c: New file.
3681         * pthread_setresgid_np.c: New file.
3682         * pthread_setresuid_np.c: New file.
3683         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3684         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3685         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3686         and pthread_setresuid_np.
3687         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3688         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3689         pthread_setregid, and pthread_setresgid.
3691 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3693         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3694         ENOMEM when out of memory.
3696 2004-09-10  Roland McGrath  <roland@redhat.com>
3698         [BZ #379]
3699         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3700         code, since we don't try to use the broken CLONE_STOPPED any more.
3701         * pthread_create.c (start_thread): Likewise.
3703 2004-09-15  Richard Henderson  <rth@redhat.com>
3705         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3707 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3709         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3710         (__libc_unwind_longjmp): Delete macro and declare as function.
3711         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3712         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3713         nptl directory.
3714         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3715         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3716         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3718 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3720         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3721         for __USE_XOPEN2K.
3722         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3723         types also for __USE_XOPEN2K.
3724         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3725         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3726         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3727         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3728         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3729         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3730         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3731         [BZ #320]
3733 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3735         * sysdeps/pthread/pthread.h
3736         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3737         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3738         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3739         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3740         [BZ #375]
3742 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3744         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3745         PSEUDO to be used with . prefix.
3747         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3748         Use atomic_increment instead of atomic_exchange_and_add.
3749         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3750         Likewise.
3751         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3752         Likewise.
3753         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3754         Likewise.
3756         * allocatestack.c (allocate_stack): Use atomic_increment_val
3757         instead of atomic_exchange_and_add.
3758         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3759         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3760         Likewise.
3761         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3762         Likewise.
3764         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3765         the initialization function might throw.
3767 2005-09-05  Richard Henderson  <rth@redhat.com>
3769         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3770         Move definition inside libpthread, libc, librt check.  Provide
3771         definition for rtld.
3773 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3775         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3776         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3777         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3778         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3779         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3780         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3781         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3782         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3783         * unwind.c: Use it.
3785         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3786         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3787         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3788         Likewise.
3789         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3790         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3791         this is the last waiter, signal pthread_cond_destroy caller and
3792         avoid using the pthread_cond_t structure after unlock.
3793         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3795         Read clock type from the least significant bits of __nwaiters instead
3796         of __clock.
3797         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3798         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3800 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3802         [BZ #342]
3803         * Makefile (tests): Add tst-cond20 and tst-cond21.
3804         * tst-cond20.c: New test.
3805         * tst-cond21.c: New test.
3806         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3807         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3808         it unsigned int.
3809         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3810         Likewise.
3811         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3812         (pthread_cond_t): Likewise.
3813         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3814         Likewise.
3815         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3816         Likewise.
3817         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3818         Likewise.
3819         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3820         (cond_nwaiters): New.
3821         (clock_bits): New.
3822         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3823         if there are waiters not signalled yet.
3824         Wait until all already signalled waiters wake up.
3825         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3826         __nwaiters.  If pthread_cond_destroy has been called and this is the
3827         last waiter, signal pthread_cond_destroy caller and avoid using
3828         the pthread_cond_t structure after unlock.
3829         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3830         decrement it when leaving.  If pthread_cond_destroy has been called
3831         and this is the last waiter, signal pthread_cond_destroy caller.
3832         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3833         Likewise.  Read clock type from the least significant bits of
3834         __nwaiters instead of __clock.
3835         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3836         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3837         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3838         clock type just from the last COND_CLOCK_BITS bits of value.
3839         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3840         instead of __clock, just from second bit of condattr's value.
3842 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3844         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3845         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3846         != 64.
3847         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3849 2004-08-15  Roland McGrath  <roland@frob.com>
3851         * pthread_atfork.c: Update copyright terms including special exception
3852         for these trivial files, which are statically linked into executables
3853         that use dynamic linking for the significant library code.
3855 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3857         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3858         pthread_rwlock_rdlock.
3859         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3860         Decrease __nr_readers_queued after reacquiring lock.
3861         * sysdeps/pthread/pthread_rwlock_timedrdlock
3862         (pthread_rwlock_timedrdlock): Likewise.
3863         Reported by Bob Cook <bobcook47@hotmail.com>.
3865 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3867         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3868         before pthread_barrier_wait.
3870 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3873         Remove unnecessary exception handling data.
3875 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3877         [BZ #284]
3878         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3879         instead of clockid_t.
3881 2004-07-21  Roland McGrath  <roland@redhat.com>
3883         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3885 2004-07-19  Roland McGrath  <roland@redhat.com>
3887         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3889 2004-07-02  Roland McGrath  <roland@redhat.com>
3891         * configure: Don't exit.
3893 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3895         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3896         (__pthread_cond_timedwait): Check for invalid nanosecond in
3897         timeout value.
3899 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3901         * Makefile: Add rules to build and run tst-fini1.
3902         * tst-fini1.c: New file.
3903         * tst-fini1mod.c: New file.
3905 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3907         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3908         if no cancellation support is needed.
3909         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3910         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3911         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3912         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3913         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3914         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3915         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3916         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3917         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3919         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3920         only if not already defined.
3922 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3924         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3925         constraint "m" instead of "0" for futex.
3927         * shlib-versions: Add powerpc64-.*-linux.*.
3929 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3931         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3932         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3933         for valid tv_nsec.
3934         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3935         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3936         bits.
3938 2004-06-29  Roland McGrath  <roland@redhat.com>
3940         * Banner: NPTL no longer has its own version number.
3941         * Makefile (nptl-version): Variable removed.
3942         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3943         using $(version), the glibc version number.
3945 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3947         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3948         Fix branch offset for a PLT entry.
3949         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
3950         Likewise.
3951         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3952         Likewise.
3953         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
3954         Likewise.
3955         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
3956         Likewise.
3958 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3960         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
3961         unconditionally.
3963 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
3965         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3966         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
3967         instead of tv_sec.
3968         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
3969         (pthread_rwlock_timedrdlock): Likewise.
3971 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
3973         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
3974         Set __r7 to val, not mutex.
3976 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
3978         * Makefile: Add rules to build tst-rwlock14.
3979         * tst-rwlock14.c: New file.
3981 2004-06-24  Boris Hu  <boris.hu@intel.com>
3983         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
3984         check.
3985         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
3987 2004-06-19  Andreas Jaeger  <aj@suse.de>
3989         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
3990         assembler in last patch.
3992 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
3994         * sysdeps/pthread/pthread_cond_timedwait.c
3995         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
3996         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3997         (__pthread_cond_timedwait): Check for invalid nanosecond in
3998         timeout value.
3999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4000         * tst-cond19.c: New file.
4001         * Makefile: Add rules to build and run tst-cond19.
4003 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4005         * tst-context1.c (GUARD_PATTERN): Defined.
4006         (tst_context_t): Define struct containing ucontext_t & guard words.
4007         (ctx): Declare as an array of tst_context_t.
4008         (fct): Verify uc_link & guard words are still valid.
4009         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4011 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4013         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4014         Add __data.__futex field, reshuffle __data.__clock.
4015         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4016         (__pthread_cond_signal): Increment __futex at the same time as
4017         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4018         address of low 32-bits of __wakeup_seq to futex syscall.
4019         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4020         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4021         releasing internal lock to FUTEX_WAIT.
4022         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4023         (__pthread_cond_timedwait): Likewise.
4024         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4025         (FUTEX_CMP_REQUEUE): Define.
4026         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4027         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4028         Pass __futex value from before the unlock and __futex address instead
4029         of address of low 32-bits of __wakeup_seq to futex syscall.
4030         Fallback to FUTEX_WAKE all on any errors.
4032 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4034         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4035         comment typo.
4036         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4037         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4038         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4039         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4040         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4042 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4044         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4045         Add memory clobber to inline assembly.
4046         (__lll_mutex_trylock): Likewise.
4047         (__lll_mutex_cond_trylock): Likewise.
4049 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4051         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4052         Pass val argument as 6th system call argument in %r7.
4054 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4056         * Makefile (tests): Add tst-cond16.
4057         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4058         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4059         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4060         Add __data.__futex field, reshuffle __data.__clock.
4061         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4062         (__pthread_cond_signal): Increment __futex at the same time as
4063         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4064         address of low 32-bits of __wakeup_seq to futex syscall.
4065         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4066         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4067         releasing internal lock to FUTEX_WAIT.
4068         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4069         (__pthread_cond_timedwait): Likewise.
4070         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4071         (FUTEX_CMP_REQUEUE): Define.
4072         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4073         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4074         Pass __futex value from before the unlock and __futex address instead
4075         of address of low 32-bits of __wakeup_seq to futex syscall.
4076         Fallback to FUTEX_WAKE all on any errors.
4077         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4078         Define.
4079         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4080         internally.  Return non-zero if error, zero if success.
4081         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4082         Add __data.__futex field, reshuffle __data.__clock.
4083         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4084         Define.
4085         (lll_futex_requeue): Add val argument, return 1 unconditionally
4086         for the time being.
4087         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4088         Add __data.__futex field, reshuffle __data.__clock.
4089         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4090         Define.
4091         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4092         internally.  Return non-zero if error, zero if success.
4093         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4094         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4095         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4096         Define.
4097         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4098         internally.  Return non-zero if error, zero if success.
4099         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4100         Add __data.__futex field, reshuffle __data.__clock.
4101         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4102         Define.
4103         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4104         internally.  Return non-zero if error, zero if success.
4105         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4106         Add __data.__futex field, reshuffle __data.__clock.
4107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4108         Add __data.__futex field, reshuffle __data.__clock.
4109         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4110         Increment __futex at the same time as __wakeup_seq or __total_seq.
4111         Pass address of __futex instead of address of low 32-bits of
4112         __wakeup_seq to futex syscall.
4113         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4114         Pass __futex value from before releasing internal lock
4115         to FUTEX_WAIT.
4116         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4117         Likewise.  Avoid unnecessary shadowing of variables.
4118         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4119         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4120         unlock and __futex address instead of address of low 32-bits of
4121         __wakeup_seq to futex_requeue macro, adjust for new return value
4122         meaning.
4123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4124         (__pthread_cond_signal): Increment __futex at the same time as
4125         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4126         address of low 32-bits of __wakeup_seq to futex syscall.
4127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4128         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4129         releasing internal lock to FUTEX_WAIT.
4130         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4131         (__pthread_cond_timedwait): Likewise.
4132         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4133         (FUTEX_CMP_REQUEUE): Define.
4134         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4135         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4136         Pass __futex value from before the unlock and __futex address instead
4137         of address of low 32-bits of __wakeup_seq to futex syscall.
4138         Fallback to FUTEX_WAKE all on any errors.
4140 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4142         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4143         Add nop to align the end of critical section.
4144         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4146 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4148         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4149         Add __broadcast_seq field.
4150         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4151         all waiters as woken with woken_seq and bump broadcast counter.
4152         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4153         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4154         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4155         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4157 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4160         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4161         Reported by Kaz Kojima.
4163 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4165         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4167 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4169         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4170         __broadcast_seq with bc_seq after acquiring internal lock instead of
4171         before it.
4173 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4175         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4176         compilation.
4177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4178         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4179         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4180         (pthread_cond_t): Add __data.__broadcast_seq field.
4181         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4182         (FRAME_SIZE): Define.
4183         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4184         Comment typo fixes.
4185         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4186         Define.
4187         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4188         typo fixes.
4189         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4190         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4191         fixes.
4193 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4195         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4196         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4197         Add __broadcast_seq field.
4198         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4199         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4200         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4201         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4202         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4203         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4204         all waiters as woken with woken_seq and bump broadcast counter.
4205         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4207         __broadcast_seq field.
4208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4209         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4210         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4211         * pthread_cond_init.c: Initialize __broadcast_seq field.
4212         * Makefile (tests): Add tst-cond17 and tst-cond18.
4213         Add .NOTPARALLEL goal.
4214         * tst-cond16.c: New file.  From Jakub.
4215         * tst-cond17.c: New file.  From Jakub.
4216         * tst-cond18.c: New file.  From Jakub.
4218 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4220         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4221         unwind info.
4223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4224         Parametrize frame size.  Correct some unwind info.
4225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4227 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4229         * tst-stack3.c: Note testing functionality beyond POSIX.
4231 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4233         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4234         Change conditional from ifdef to if.
4236 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4238         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4239         SYSDEP_CANCEL_ERROR): Define.
4240         (PSEUDO): Use it.
4242 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4244         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4246 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4248         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4250 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4252         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4253         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4254         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4255         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4257 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4259         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4260         thread has all signals blocked.
4262 2004-04-18  Andreas Jaeger  <aj@suse.de>
4264         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4265         (SEM_VALUE_MAX): Add missing brace.
4267 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4269         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4270         in rt subdir.
4271         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4272         * sysdeps/pthread/tst-mqueue8x.c: New test.
4273         * tst-cancel4.c: Update comment about message queues.
4275         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4276         return it_value { 0, 0 }.
4277         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4278         like SIGEV_SIGNAL.
4279         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4280         assertion for SIGEV_NONE.
4281         (thread_attr_compare): Compare all attributes, not just a partial
4282         subset.
4284 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4286         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4288 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4290         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4291         Just use a plain number.
4292         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4293         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4294         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4295         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4296         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4297         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4298         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4300 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4302         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4303         frame info.
4304         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4306 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4308         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4309         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4310         of calling sigwaitinfo.
4312 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4314         * allocatestack.c (allocate_stack): Set reported_guardsize
4315         unconditionally.
4316         * pthread_getattr_np.c (pthread_getattr_np): Use
4317         reported_guardsize instead of guardsize.
4318         * descr.h (struct pthread): Add reported_guardsize field.
4320 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4322         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4324 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4326         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4328 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4330         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4331         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4332         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4333         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4334         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4335         Define.
4336         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4337         (_POSIX_MESSAGE_PASSING): Define.
4338         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4339         (_POSIX_MESSAGE_PASSING): Define.
4340         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4341         (_POSIX_MESSAGE_PASSING): Define.
4343 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4345         * tst-context1.c (fct): Check whether correct stack is used.
4347 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4349         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4350         matching constraints for asm mem parameters.
4352         * tst-clock2.c (tf): Don't define unless needed.
4354 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4356         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4357         $(gnulib).
4359 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4361         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4362         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4363         * pthreadP.h: Declare __nptl_deallocate_tsd.
4364         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4365         Adjust caller.
4367         * Makefile (tests): Add tst-tsd5.
4368         * tst-tsd5.c: New file.
4370 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4372         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4373         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4374         is SHLIB_COMPAT check.
4375         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4376         (__pthread_attr_getaffinity_old): Likewise.
4377         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4378         (__pthread_getaffinity_old): Likewise.
4379         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4380         (__pthread_setaffinity_old): Likewise.
4382 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4384         * allocatestack.c (_make_stacks_executable): Call
4385         _dl_make_stack_executable first.
4387 2004-03-24  Roland McGrath  <roland@redhat.com>
4389         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4390         constraint instead of "0".
4392 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4394         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4395         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4397         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4398         code to avoid warning.
4400 2004-03-24  Andreas Jaeger  <aj@suse.de>
4402         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4403         (__pthread_attr_setaffinity_old): Remove const.
4405 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4407         * sysdeps/unix/sysv/linux/smp.h: New file.
4408         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4409         * init.c: Define __is_smp.
4410         (__pthread_initialize_minimal_internal): Call is_smp_system to
4411         initialize __is_smp.
4412         * pthreadP.h: Declare __is_smp.
4413         Define MAX_ADAPTIVE_COUNT is necessary.
4414         * pthread_mutex_init.c: Add comment regarding __spins field.
4415         * pthread_mutex_lock.c: Implement adaptive mutex type.
4416         * pthread_mutex_timedlock.c: Likewise.
4417         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4418         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4419         Add __spins field.
4420         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4421         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4422         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4423         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4424         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4425         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4426         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4427         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4428         lll_mutex_cond_trylock.
4429         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4430         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4431         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4432         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4433         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4434         Define BUSY_WAIT_NOP.
4435         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4436         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4438         * tst-mutex5.c: Add support for testing adaptive mutexes.
4439         * tst-mutex7.c: Likewise.
4440         * tst-mutex5a.c: New file.
4441         * tst-mutex7a.c: New file.
4442         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4444         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4445         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4446         vgettimeofday call might destroy the content.
4448         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4449         @pause in the loop.
4451         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4452         No need to restrict type of ret.  Make it int.  Add comment.
4454         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4455         Remove unnecessary setne instruction.
4457 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4459         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4460         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4461         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4462         If realloc fails, break out of the loop.
4464 2004-03-20  Andreas Jaeger  <aj@suse.de>
4466         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4467         (__pthread_setaffinity_old): Fix interface.
4468         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4469         (__pthread_getaffinity_old): Likewise.
4471         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4472         (__pthread_setaffinity_new): Remove duplicate declaration.
4474 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4476         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4477         the return value to a safe register.
4478         (CDISABLE): Set the function argument correctly.
4480 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4482         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4483         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4484         Rewrite so that only one locked memory operation per round is needed.
4485         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4486         (pthread_barrier_wait): After wakeup, release lock only when the
4487         last thread stopped using the barrier object.
4488         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4489         (__pthread_cond_wait): Don't store mutex address if the current
4490         value is ~0l.  Add correct cleanup support and unwind info.
4491         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4492         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4493         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4494         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4495         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4496         Add correct cleanup support and unwind info.
4497         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4498         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4499         information for syscall wrappers.
4501 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4503         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4504         cpusetsize field, remove next.
4505         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4506         parameter for size of the CPU set.
4507         (pthread_setaffinity_np): Likewise.
4508         (pthread_attr_getaffinity_np): Likewise.
4509         (pthread_attr_setaffinity_np): Likewise.
4510         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4511         interface change, keep compatibility code.
4512         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4513         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4514         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4515         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4516         __pthread_getaffinity_np.
4517         * Versions: Add version for changed interfaces.
4518         * tst-attr3.c: Adjust test for interface change.
4519         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4520         increasing buffer sizes.
4521         * pthread_attr_destroy.c: Remove unused list handling.
4522         * pthread_attr_init.c: Likewise.
4524 2004-03-17  Roland McGrath  <roland@redhat.com>
4526         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4527         first argument to clock_getres so we ever enable kernel timers.
4529 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4531         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4533 2004-03-12  Richard Henderson  <rth@redhat.com>
4535         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4536         oldvalue from CENABLE to CDISABLE.
4538 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4540         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4541         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4542         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4543         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4545 2004-03-11  Richard Henderson  <rth@redhat.com>
4547         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4548         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4549         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4551 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4553         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4554         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4555         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4557 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4559         * forward.c (__pthread_cond_broadcast_2_0,
4560         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4561         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4562         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4564 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4566         * sysdeps/sh/tcb-offsets.sym: Add PID.
4567         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4568         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4570 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4572         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4573         include <sysdep-cancel.h>, vfork is no cancellation point.
4574         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4575         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4576         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4578 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4580         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4581         libc_hidden_def.
4582         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4583         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4584         Likewise.
4585         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4586         Likewise.
4587         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4588         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4589         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4590         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4591         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4593         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4594         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4595         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4596         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4597         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4598         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4600         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4601         a local register for saving old PID.  Negate PID in parent upon exit.
4603         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4604         tcb-offsets.h.
4605         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4606         before syscall, set to the old value in the parent afterwards.
4607         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4608         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4609         tcb-offsets.h.
4610         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4611         before syscall, set to the old value in the parent afterwards.
4612         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4613         * sysdeps/s390/tcb-offsets.sym: Add PID.
4615         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4616         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4617         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4618         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4619         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4620         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4622 2004-03-10  Andreas Schwab  <schwab@suse.de>
4624         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4625         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4626         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4628 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4630         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4631         * tst-cancel21.c (do_one_test): Likewise.
4632         Reported by Gordon Jin <gordon.jin@intel.com>.
4634 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4636         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4637         if non-zero and set to INT_MIN if zero.
4638         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4639         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4640         (SAVE_PID, RESTORE_PID): Define.
4641         (__vfork): Use it.
4642         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4643         Use relative path to avoid including NPTL i386/vfork.S.
4644         (SAVE_PID, RESTORE_PID): Define.
4645         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4646         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4647         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4648         tst-vfork2x.
4649         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4650         * tst-vfork1.c: New test.
4651         * tst-vfork2.c: New test.
4652         * tst-vfork1x.c: New test.
4653         * tst-vfork2x.c: New test.
4655 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4657         * sysdeps/i386/tcb-offsets.sym: Add PID.
4658         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4659         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4660         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4662 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4664         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4666 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4668         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4669         _rtld_global_ro.
4671 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4673         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4674         _rtld_global_ro.
4676         * tst-once4.c: Remove unnecessary macro definition.
4678         * tst-mutex7.c (do_test): Limit thread stack size.
4679         * tst-once2.c (do_test): Likewise.
4680         * tst-tls3.c (do_test): Likewise.
4681         * tst-tls1.c (do_test): Likewise.
4682         * tst-signal3.c (do_test): Likewise.
4683         * tst-kill6.c (do_test): Likewise.
4684         * tst-key4.c (do_test): Likewise.
4685         * tst-join4.c (do_test): Likewise.
4686         * tst-fork1.c (do_test): Likewise.
4687         * tst-context1.c (do_test): Likewise.
4688         * tst-cond2.c (do_test): Likewise.
4689         * tst-cond10.c (do_test): Likewise.
4690         * tst-clock2.c (do_test): Likewise.
4691         * tst-cancel10.c (do_test): Likewise.
4692         * tst-basic2.c (do_test): Likewise.
4693         * tst-barrier4.c (do_test): Likewise.
4695 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4697         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4699 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4701         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4702         (__pthread_cond_timedwait): Optimize wakeup test.
4703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4704         (__pthread_cond_wait): Likewise.
4705         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4706         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4707         Likewise.
4709 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4711         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4712         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4713         the atomic instruction needed.
4714         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4715         (__lll_mutex_lock_wait): Likewise.
4717 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4719         * Makefile (tests): Add tst-cond14 and tst-cond15.
4720         * tst-cond14.c: New file.
4721         * tst-cond15.c: New file.
4723 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4725         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4726         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4727         needs to be implemented differently to be useful.
4729 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4731         * pthread_attr_setschedparam.c: Don't test priority against limits
4732         here.  Set ATTR_FLAG_SCHED_SET flag.
4733         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4734         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4735         from parent thread to child.  If attribute is used and scheduling
4736         parameters are not inherited, copy parameters from attribute or
4737         compute them.  Check priority value.
4738         * pthread_getschedparam.c: If the parameters aren't known yet get
4739         them from the kernel.
4740         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4741         ATTR_FLAG_POLICY_SET flag for thread.
4742         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4743         and ATTR_FLAG_POLICY_SET.
4745         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4747         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4748         fail if stack address hasn't been set.  Just return 0.
4750 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4752         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4753         libpthread for the files in this list.
4754         (CFLAGS-tst-unload): Removed.
4755         * tst-unload.c (do_test): Don't use complete path for
4756         LIBPHREAD_SO.
4758         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4759         tst-_res1mod2.
4761 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4763         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4764         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4765         operation per round is needed.
4766         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4767         (__lll_mutex_lock_wait): Likewise.
4769 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4771         * tst-cancel9.c (cleanup): Don't print to stderr.
4773 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4775         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4777 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4779         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4780         (__syscall_error_handler2): Call CDISABLE.
4781         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4782         (__syscall_error_handler2): Call CDISABLE.
4784         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4785         Release lock before the loop, don't reacquire it.
4787         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4789 2004-02-19  Andreas Schwab  <schwab@suse.de>
4791         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4792         Fix last change.
4794 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4796         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4797         (pthread_barrier_wait): After wakeup, release lock only when the
4798         last thread stopped using the barrier object.
4799         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4800         (pthread_barrier_wait): Likewise.
4801         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4802         Likewise.
4803         * Makefile (tests): Add tst-barrier4.
4804         * tst-barrier4.c: New file.
4806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4807         (__pthread_cond_timedwait): Perform timeout test while holding
4808         internal lock to prevent wakeup race.
4809         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4810         * sysdeps/pthread/pthread_cond_timedwait.c
4811         (__pthread_cond_timedwait): Likewise.
4812         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4813         (__pthread_cond_timedwait): Likewise.
4815 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4817         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4818         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4819         * Makefile (tests): Add tst-rwlock13.
4820         * tst-rwlock13.c: New test.
4822 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4824         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4825         (__condvar_tw_cleanup): Little optimization.
4826         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4828 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4830         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4831         libpthread as "lib" parameter to SHLIB_COMPAT.
4832         (__novmx_siglongjmp): Fix typo in function name.
4833         (__novmx_longjmp): Fix typo in function name.
4835 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4837         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4838         __builtin_expect.
4840         * sysdeps/generic/pt-longjmp.c: Moved to...
4841         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4843 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4845         * Makefile (libpthread-routines): Add pt-cleanup.
4846         * pt-longjmp.c: Removed.
4847         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4848         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4849         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4850         Version longjmp, siglongjmp for GLIBC_2.3.4.
4851         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4853 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4855         * sysdeps/pthread/pthread_cond_timedwait.c
4856         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4857         Reuse code.  Add __builtin_expects.
4859         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4860         (__pthread_cond_timedwait): Get internal lock in case timeout has
4861         passed before the futex syscall.
4862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4864 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4866         * allocatestack.c: Pretty printing.
4868         * sysdeps/pthread/createthread.c (create_thread): Don't add
4869         CLONE_DETACHED bit if it is not necessary.
4871 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4873         * pthread_getattr_np.c: Include ldsodefs.h.
4875 2004-01-16  Richard Henderson  <rth@redhat.com>
4877         * allocatestack.c: Don't declare __libc_stack_end.
4878         * init.c (__pthread_initialize_minimal_internal): Likewise.
4879         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4881 2004-01-15  Richard Henderson  <rth@redhat.com>
4883         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4884         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4885         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4886         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4887         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4888         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4889         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4890         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4892 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4894         * init.c (pthread_functions): Make array const.
4896 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4898         * allocatestack.c (__make_stacks_executable): Change interface.
4899         Check parameters.  Pass parameter on to libc counterpart.
4900         * pthreadP.h: Change declaration.
4902 2004-01-13  Richard Henderson  <rth@redhat.com>
4904         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4905         prototype form.
4906         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4907         Likewise.
4909         * sysdeps/alpha/Makefile: New file.
4910         * sysdeps/alpha/tcb-offsets.sym: New file.
4911         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4912         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4914         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4915         on powerpc version.
4917 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4919         * Makefile (tests): Add tst-backtrace1.
4920         * tst-backtrace1.c: New test.
4922 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4924         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4925         register as second parameter to the REGISTER macro.
4926         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4927         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4928         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4929         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4930         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4931         of thread register as second parameter to REGISTER macro in 64 case.
4933 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4935         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4936         (CFLAGS-getpid.o): Defined.
4937         (CFLAGS-getpid.os): Defined.
4939 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4941         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4942         returned for main thread does not overlap with any other VMA.
4943         Patch by Jakub Jelinek.
4945 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4947         * tst-raise1.c: Include stdio.h.
4949 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
4951         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
4952         setting with __ASSUME_TGKILL || defined __NR_tgkill.
4953         If pid is 0, set it to selftid.
4954         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
4955         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
4956         != 0, return self->tid without doing a syscall.
4957         * descr.h (struct pthread): Move pid field after tid.
4959         * Makefile (tests): Add tst-raise1.
4960         * tst-raise1.c: New file.
4962 2003-12-23  Roland McGrath  <roland@redhat.com>
4964         * tst-oddstacklimit.c: New file.
4965         * Makefile (tests): Add it.
4966         (tst-oddstacklimit-ENV): New variable.
4968         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
4969         value up to page size for __default_stacksize.
4971 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
4973         * Makefile (tests): Add tst-eintr5.
4974         * tst-eintr5.c: New file.
4976         * eintr.c (eintr_source): Prevent sending signal to self.
4978         * tst-eintr2.c (tf1): Improve error message.
4980 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
4982         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
4983         * sysdeps/unix/sysv/linux/getpid.c: New file.
4984         * pthread_cancel.c: Add comment explaining use of PID field.
4985         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
4986         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
4987         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
4988         temporarily to signal the field must not be relied on and updated
4989         by getpid().
4990         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
4991         temporarily negative.
4992         * sysdeps/unix/sysv/linux/raise.c: Likewise.
4994 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
4996         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
4997         (eintr_source): If ARG != NULL, use pthread_kill.
4998         * tst-eintr1.c: Adjust for this change.
4999         * tst-eintr2.c: Likewise.
5000         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5001         * tst-eintr3.c: New file.
5002         * tst-eintr4.c: New file.
5004 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5006         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5007         if CANCELSTATE_BITMASK is set.
5008         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5009         Likewise.
5011         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5012         (tests-reverse): Add tst-cancel23.
5013         * tst-cancel22.c: New test.
5014         * tst-cancel23.c: New test.
5016 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5018         * tst-eintr1.c: Better error messages.
5020         * Makefile (tests): Add tst-eintr2.
5021         * tst-eintr2.c: New file.
5023 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5025         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5026         (CFLAGS-tst-cancelx21.c): Set.
5027         * tst-cancel21.c: New test.
5028         * tst-cancelx21.c: New test.
5030         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5031         comparison operand.
5032         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5033         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5034         * pt-longjmp.c: Include jmpbuf-unwind.h.
5035         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5036         _JMPBUF_UNWINDS.  Adjust compared pointers.
5037         * init.c (__pthread_initialize_minimal_internal): Initialize
5038         pd->stackblock_size.
5039         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5040         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5041         * sysdeps/i386/jmpbuf-unwind.h: New file.
5042         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5043         * sysdeps/s390/jmpbuf-unwind.h: New file.
5044         * sysdeps/sh/jmpbuf-unwind.h: New file.
5045         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5046         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5047         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5048         (_JMPBUF_CFA_UNWINDS): Remove.
5049         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5051 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5053         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5054         (CFLAGS-tst-cancelx20.c): Set.
5055         * tst-cancel20.c: New test.
5056         * tst-cancelx20.c: New test.
5058 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5060         * init.c (__pthread_initialize_minimal_internal): Don't treat
5061         architectures with separate register stack special here when
5062         computing default stack size.
5064 2003-12-17  Roland McGrath  <roland@redhat.com>
5066         * Makefile (tst-cancelx7-ARGS): New variable.
5067         Reportd by Greg Schafer <gschafer@zip.com.au>.
5069 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5071         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5072         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5073         (tst-stack3-ENV): Set.
5074         ($(objpfx)tst-stack3-mem): New.
5075         * tst-stack3.c: New test.
5077 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5079         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5080         Add unwind directives.  Drop unused .regstk directive.
5081         (_fini_EPILOG_BEGINS): Add unwind directives.
5083 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5085         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5086         Assume parameter is a pointer.
5087         (lll_futex_wake): Likewise.
5088         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5089         Likewise.
5090         (lll_futex_wake): Likewise.
5091         Reported by Boris Hu.
5092         * sysdeps/unix/sysv/linux/unregister-atfork.c
5093         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5095         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5097 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5099         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5100         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5101         __rtld_lock_initialize for ld.so lock.
5102         Patch in part by Adam Li <adam.li@intel.com>.
5104 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5106         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5107         in $(gnulib).  Also, remove stale comment.
5109 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5111         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5112         advantage of new syscall stub and optimize accordingly.
5114         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5115         from SYS_futex, to match expectations of
5116         sysdep.h:DO_INLINE_SYSCALL.
5117         (lll_futex_clobbers): Remove.
5118         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5119         (lll_futex_wake): Likewise.
5120         (lll_futex_requeue): Likewise.
5121         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5122         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5123         Jelinek).
5124         (__lll_mutex_lock): Likewise.
5125         (__lll_mutex_cond_lock): Likewise.
5126         (__lll_mutex_timed_lock): Likewise.
5127         (__lll_mutex_unlock): Likewise.
5128         (__lll_mutex_unlock_force): Likewise.
5130         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5131         comes before the include of <sysdep.h>.
5132         (THREAD_SELF_SYSINFO): New macro.
5133         (THREAD_SYSINFO): Likewise.
5134         (INIT_SYSINFO): New macro.
5135         (TLS_INIT_TP): Call INIT_SYSINFO.
5137         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5139         * sysdeps/pthread/createthread.c (create_thread): Use
5140         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5141         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5142         THREAD_SELF_SYSINFO instead of open code.
5143         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5144         (THREAD_SYSINFO): Likewise.
5146         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5148         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5150 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5152         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5153         instead of .init.  Patch by David Mosberger.
5155 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5157         * sysdeps/pthread/configure.in: Remove broken declaration in C
5158         cleanup handling check.
5160 2003-11-30  Andreas Jaeger  <aj@suse.de>
5162         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5163         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5164         Likewise.
5166 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5168         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5169         * pthread_attr_destroy.c: Include shlib-compat.h.
5170         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5171         is set in iattr->flags.
5172         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5174 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5176         * Makefile (distribute): Add tst-cleanup4aux.c.
5178         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5179         include.
5181 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5183         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5184         pthread_cond_signal.
5186         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5187         store mutex address if the current value is ~0l.
5188         * sysdeps/pthread/pthread_cond_timedwait.c
5189         (__pthread_cond_timedwait): Likewise.
5190         * sysdeps/pthread/pthread_cond_broadcast.c
5191         (__pthread_cond_broadcast): Don't use requeue for pshared
5192         condvars.
5194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5195         (__pthread_cond_wait): Don't store mutex address if the current
5196         value is ~0l.
5197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5198         (__pthread_cond_timedwait): Likewise.
5199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5200         (__pthread_cond_broadcast): Don't use requeue for pshared
5201         condvars.
5203         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5204         element with ~0l for pshared condvars, with NULL otherwise.
5206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5207         (__pthread_cond_wait): Don't store mutex address if the current
5208         value is ~0l.
5209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5210         (__pthread_cond_timedwait): Likewise.
5211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5212         (__pthread_cond_broadcast): Don't use requeue for pshared
5213         condvars.
5215         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5216         * tst-cond12.c: New file.
5217         * tst-cond13.c: New file.
5219 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5221         * sysdeps/pthread/configure.in: Make missing forced unwind support
5222         fatal.
5224 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5226         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5228 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5230         * Makefile: Add magic to clean up correctly.
5232 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5234         * unwind.c (FRAME_LEFT): Define.
5235         (unwind_stop): Handle old style cleanups here.
5236         (__pthread_unwind): Handle old style cleanups only if
5237         !HAVE_FORCED_UNWIND.
5238         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5239         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5240         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5241         ($(objpfx)tst-cleanupx4): Likewise.
5242         * tst-cleanup4.c: New test.
5243         * tst-cleanup4aux.c: New.
5244         * tst-cleanupx4.c: New test.
5246 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5248         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5249         lll_mutex_*lock macros to skip atomic operations on some archs.
5251 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5253         * sysdeps/pthread/tst-timer.c (main): Initialize
5254         sigev2.sigev_value as well.
5256 2003-10-15  Roland McGrath  <roland@redhat.com>
5258         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5259         is missing.
5260         * sysdeps/pthread/configure: Regenerated.
5262 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5264         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5265         locking macros.  No distinction between normal and mutex locking
5266         anymore.
5267         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5268         Merge bits from lowlevelmutex.S we still need.
5269         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5270         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5271         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5272         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5273         new mutex implementation.
5274         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5275         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5276         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5277         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5278         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5279         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5280         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5281         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5282         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5283         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5284         symbol for entry point to avoid cancellation.
5286 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5288         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5289         changes.
5290         (SAVE_OLDTYPE_0): Fix a typo.
5292 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5294         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5295         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5297 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5299         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5300         correct offset.
5302 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5304         * Makefile (tests): Add tst-cancel19.
5305         * tst-cancel19.c: New test.
5307 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5309         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5310         restoring of the old cancellation type.
5312 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5314         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5316 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5318         * sysdeps/pthread/malloc-machine.h: New file
5320 2003-09-24  Roland McGrath  <roland@redhat.com>
5322         * allocatestack.c (__make_stacks_executable): Don't ignore return
5323         value from _dl_make_stack_executable.
5325 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5327         * allocatestack.c (__make_stacks_executable): Also change
5328         permission of the currently unused stacks.
5330         * allocatestack.c (change_stack_perm): Split out from
5331         __make_stacks_executable.
5332         (allocate_stack): If the required permission changed between the time
5333         we started preparing the stack and queueing it, change the permission.
5334         (__make_stacks_executable): Call change_stack_perm.
5336         * Makefile: Build tst-execstack-mod locally.
5337         * tst-execstack-mod.c: New file.
5339 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5341         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5343 2003-09-23  Roland McGrath  <roland@redhat.com>
5345         * tst-execstack.c: New file.
5346         * Makefile (tests): Add it.
5347         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5348         (LDFLAGS-tst-execstack): New variable.
5350         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5351         whether to use PROT_EXEC for stack mmap.
5352         (__make_stacks_executable): New function.
5353         * pthreadP.h: Declare it.
5354         * init.c (__pthread_initialize_minimal_internal): Set
5355         GL(dl_make_stack_executable_hook) to that.
5357 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5359         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5360         recommendation from AMD re avoidance of lock prefix.
5362 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5364         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5365         lll_futex_timed_wait instead of lll_futex_wait.
5366         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5367         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5368         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5369         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5370         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5371         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5372         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5373         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5374         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5375         Completely revamp the locking macros.  No distinction between
5376         normal and mutex locking anymore.
5377         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5378         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5379         __lll_lock_timedwait): Fix prototypes.
5380         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5381         __lll_lock_timedwait): Likewise.
5382         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5383         macros, add __builtin_expect.
5384         (lll_mutex_timedlock): Likewise.  Fix return value.
5385         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5386         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5387         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5388         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5389         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5390         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5391         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5392         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5394 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5396         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5397         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5398         operation if possible.
5400         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5401         like jumping over the lock prefix.
5403 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5405         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5406         locking macros.  No distinction between normal and mutex locking
5407         anymore.
5408         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5409         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5410         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5411         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5412         locking.  Merge bits from lowlevelmutex.S we still need.
5413         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5414         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5415         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5416         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5417         * Makefile (routines): Remove libc-lowlevelmutex.
5418         (libpthread-rountines): Remove lowlevelmutex.
5419         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5420         for new mutex implementation.
5421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5422         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5423         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5424         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5425         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5426         Likewise.
5427         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5428         Likewise.
5429         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5431         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5432         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5434         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5435         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5436         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5437         Likewise.
5438         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5439         Likewise.
5440         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5441         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5443         Don't use requeue.
5444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5445         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5447 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5449         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5450         in parameters of asm with output parameters.
5452         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5453         type of DECR parameter to int.
5454         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5456 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5458         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5459         guardsize for each thread.
5461 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5463         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5464         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5465         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5467         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5468         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5469         NULL.
5470         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5471         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5472         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5473         (pthread_getaffinity_np): Add hidden_def.
5475         * Makefile (tests): Add tst-attr3.
5476         * tst-attr3.c: New test.
5478         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5480 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5482         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5483         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5485 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5487         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5488         * tst-align.c: Include tst-stack-align.h.
5489         (tf, do_test): Use TEST_STACK_ALIGN macro.
5491 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5493         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5494         variable.
5496 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5498         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5499         stack-related values for the initial thread.
5501 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5503         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5505 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5507         * pthread_mutex_lock.c: Minor code rearrangements.
5509 2003-09-05  Roland McGrath  <roland@redhat.com>
5511         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5512         Instead, include ../nptl_db/db_info.c to do its magic.
5513         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5514         (__pthread_pthread_key_2ndlevel_size): Likewise.
5515         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5516         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5517         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5518         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5519         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5520         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5521         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5522         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5523         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5524         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5525         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5526         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5527         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5528         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5529         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5530         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5531         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5533 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5535         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5536         of pthread_t to be compatible with LT.
5537         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5538         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5539         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5540         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5541         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5542         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5543         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5545 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5547         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5549 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5551         * unwind-forcedunwind.c: Move to...
5552         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5553         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5554         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5555         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5556         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5557         * unwind.c: Include jmpbuf-unwind.h.
5558         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5560 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5562         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5563         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5564         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5565         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5566         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5567         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5568         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5569         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5570         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5571         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5572         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5573         function.
5574         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5575         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5576         * Makefile (tests): Add tst-stack2.
5577         * tst-stack2.c: New test.
5578         * tst-stack1.c: Include limits.h and sys/param.h.
5579         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5581         * pthread_condattr_setpshared.c: Include errno.h.
5582         (pthread_condattr_setpshared): Return EINVAL if pshared
5583         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5585         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5586         defined symbol for entry point to avoid cancellation.
5587         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5588         Likewise.
5589         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5590         Likewise.
5591         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5592         Likewise.
5593         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5594         Likewise.
5595         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5596         Likewise.
5597         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5598         __close_nocancel, __read_nocancel, __write_nocancel,
5599         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5600         libpthread.so or librt.so, define to corresponding function
5601         without _nocancel suffix.
5602         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5603         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5604         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5606         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5608 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5610         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5611         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5613         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5614         in subsections has a symbol associated with it.
5616         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5617         defined symbol for entry point to avoid cancellation.
5618         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5620 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5622         * Makefile (tests): Add tst-tls5.
5623         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5624         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5625         ($(objpfx)tst-tls5): New.
5626         ($(objpfx)tst-tls6.out): Likewise.
5627         (tests): Depend on $(objpfx)tst-tls6.out.
5628         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5629         (do_test): Check pthread_self () return value alignment.
5630         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5631         (tf): Check pthread_self () return value alignment.
5632         * tst-tls5.c: New test.
5633         * tst-tls5.h: New.
5634         * tst-tls5mod.c: New.
5635         * tst-tls5moda.c: New.
5636         * tst-tls5modb.c: New.
5637         * tst-tls5modc.c: New.
5638         * tst-tls5modd.c: New.
5639         * tst-tls5mode.c: New.
5640         * tst-tls5modf.c: New.
5641         * tst-tls6.sh: New test.
5643         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5644         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5645         * init.c (pthread_functions): Initialize them.
5646         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5647         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5648         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5649         pthread_cond_timedwait@@GLIBC_2.3.2.
5651 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5653         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5654         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5655         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5656         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5657         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5658         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5660         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5662         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5663         _POSIX_THREAD_PRIORITY_SCHEDULING.
5664         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5666 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5668         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5669         nested function, use static inline function from libio.h.
5670         Code by Richard Henderson.
5672         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5673         weak.
5675 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5677         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5678         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5679         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5680         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5681         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5682         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5683         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5684         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5685         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5686         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5687         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5688         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5689         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5690         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5691         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5692         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5693         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5694         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5695         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5696         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5697         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5698         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5699         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5700         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5701         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5702         * sysdeps/sparc/tls.h: New file.
5703         * sysdeps/sparc/tcb-offsets.sym: New file.
5704         * sysdeps/sparc/Makefile: New file.
5705         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5706         * init.c [__sparc__] (__NR_set_tid_address): Define.
5708 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5710         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5711         _IO_release_lock): Define.
5713 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5715         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5716         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5718 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5720         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5721         (__pthread_cleanup_class): Add missing return types of member
5722         functions.
5724 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5726         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5727         (lll_mutex_unlock_force): Add memory barrier between store and futex
5728         syscall.
5730 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5732         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5733         tempmsg in first loop.
5735 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5737         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5738         _POSIX_THREAD_PRIORITY_SCHEDULING.
5739         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5741 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5743         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5744         (__rtld_lock_default_lock_recursive,
5745         __rtld_lock_default_unlock_recursive): Define.
5746         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5747         __rtld_lock_unlock_recursive): Define using
5748         GL(_dl_rtld_*lock_recursive).
5749         * init.c (__pthread_initialize_minimal_internal): Initialize
5750         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5751         Lock GL(_dl_load_lock) the same number of times as
5752         GL(_dl_load_lock) using non-mt implementation was nested.
5754         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5755         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5757 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5759         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5760         PIPE_BUF.
5762 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5764         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5766 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5768         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5769         to first syscall error check.  Move syscall error check for tkill
5770         into __ASSUME_CLONE_STOPPED #ifdef.
5772 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5774         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5775         is not defined, do explicit synchronization.
5776         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5777         is not defined also unlock pd->lock for non-debugging case in case
5778         it is necessary.
5779         * pthread_create.c (start_thread): Always get and release pd->lock
5780         if __ASSUME_CLONE_STOPPED is not defined.
5781         (start_thread_debug): Removed.  Adjust users.
5782         * allocatestack.c (allocate_stack): Always initialize lock if
5783         __ASSUME_CLONE_STOPPED is not defined.
5784         * Makefile (tests): Add tst-sched1.
5785         * tst-sched1.c: New file.
5787         * sysdeps/pthread/createthread.c (do_clone): Only use
5788         sched_setschduler and pass correct parameters.
5790 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5792         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5793         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5794         PTHREAD_STACK_MIN in comments.
5796 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5798         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5799         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5800         argument.
5801         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5802         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5803         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5804         (__pthread_cleanup_upto): Fix prototype.
5805         (_longjmp_unwind): Adjust caller.
5806         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5807         Change second argument to const struct pointer.
5808         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5809         * tst-sem9.c (main): Likewise.
5810         * unwind.c: Include string.h for strlen prototype.
5812 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5814         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5815         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5816         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5817         Define HAVE_CMOV.
5818         Patch by Nicholas Miell <nmiell@attbi.com>.
5820 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5822         * init.c (__pthread_initialize_minimal_internal): Initialize
5823         GL(dl_init_static_tls).
5824         * pthreadP.h (__pthread_init_static_tls): New prototype.
5825         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5826         New functions.
5827         * Makefile (tests): Add tst-tls4.
5828         (modules-names): Add tst-tls4moda and tst-tls4modb.
5829         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5830         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5831         tst-tls4modb.so.
5832         * tst-tls4.c: New file.
5833         * tst-tls4moda.c: New file.
5834         * tst-tls4modb.c: New file.
5836 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5838         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5839         before __timer_dealloc.
5840         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5841         Don't call list_unlink.
5843 2003-07-29  Roland McGrath  <roland@redhat.com>
5845         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5847 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5849         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5850         Don't reuse struct aiocb A if it failed.
5851         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5852         not just one byte, as that does not block.
5854 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5856         * sysdeps/pthread/unwind-resume.c: New file.
5857         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5858         unwind-resume in csu subdir.
5859         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5860         exceptions.
5861         (librt-sysdep_routines, librt-shared-only-routines): Add
5862         rt-unwind-resume.
5863         * sysdeps/pthread/rt-unwind-resume.c: New file.
5864         * unwind-forcedunwind.c: New file.
5865         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5866         (libpthread-shared-only-routines): Likewise.
5867         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5868         * pthreadP.h (pthread_cancel_init): New prototype.
5869         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5871         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5872         attr argument const struct pthread_attr *.
5874         * res.c (__res_state): Return __resp.
5875         * descr.h: Include resolv.h.
5876         (struct pthread): Add res field.
5877         * pthread_create.c: Include resolv.h.
5878         (start_thread): Initialize __resp.
5879         * Makefile (tests): Add tst-_res1.
5880         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5881         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5882         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5883         libpthread.
5884         * tst-_res1.c: New file.
5885         * tst-_res1mod1.c: New file.
5886         * tst-_res1mod2.c: New file.
5888 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5890         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5892         * Makefile: Define various *-no-z-defs variables for test DSOs
5893         which has undefined symbols.
5895 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5897         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5898         Retry if the stwcx fails to store once_control.
5900 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5902         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5903         pthread_attr_setaffinity.
5904         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5905         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5906         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5907         * pthread_attr_destroy.c: Free cpuset element if allocated.
5908         * pthread_create.c: Pass iattr as additional parameter to
5909         create_thread.
5910         * sysdeps/pthread/createthread.c: If attribute is provided and
5911         a new thread is created with affinity set or scheduling parameters,
5912         start thread with CLONE_STOPPED.
5913         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5914         pthread_attr_setaffinity.
5915         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5916         cpuset element.
5918 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5920         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5922 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5924         * sysdeps/pthread/configure.in: Require CFI directives also for
5925         ppc and s390.
5927 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5929         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5930         Add cfi directives.
5932 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5934         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5935         CLEANUP_JMP_BUF.
5936         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5937         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5938         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5939         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5940         not self pointer in __writer.  Compare with TID to determine
5941         deadlocks.
5942         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5943         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5944         Likewise.
5945         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
5946         Likewise.
5947         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
5948         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
5949         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
5950         macros also when compiling librt.
5952 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
5954         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
5955         -fasynchronous-unwind-tables.
5956         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5957         (PSEUDO): Add cfi directives.
5958         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
5959         Likewise.
5960         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5961         Likewise.
5963 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
5965         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
5966         __pthread_unregister_cancel): Add prototypes and hidden_proto.
5967         * unwind.c (__pthread_unwind_next): Add hidden_def.
5968         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
5969         Likewise.
5970         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5971         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5972         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5973         Likewise.
5974         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
5975         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
5976         Likewise.
5977         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
5978         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
5979         __pthread_unregister_cancel and __pthread_unwind_next.
5981 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
5983         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
5984         different symbol for the cancellation syscall wrapper and
5985         non-cancellation syscall wrapper.
5986         (PSEUDO_END): Define.
5988 2003-07-05  Richard Henderson  <rth@redhat.com>
5990         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
5991         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
5992         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
5993         return actual return value from the syscall, not 0.
5995 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
5997         * descr.h (struct pthread): Add pid field.
5998         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
5999         (__reclaim_stacks): Likewise.
6000         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6001         also check for PID of the signal source.
6002         (__pthread_initialize_minimal_internal): Also initialize pid field
6003         of initial thread's descriptor.
6004         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6005         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6006         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6007         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6008         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6010 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6012         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6013         Fix use of parameter.
6014         (__libc_cleanup_pop): Likewise.
6016 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6018         * init.c (sigcancel_handler): Change parameters to match handler
6019         for SA_SIGACTION.  Check signal number and code to recognize
6020         invalid invocations.
6022 2003-07-03  Roland McGrath  <roland@redhat.com>
6024         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6025         Apply sizeof (struct pthread) bias to r13 value.
6027 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6029         * sysdeps/pthread/configure.in: Require CFI directives.
6031         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6032         definition.
6033         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6034         libpthread compilation.
6035         * unwind.c (__pthread_unwind): Add hidden_def.
6036         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6038 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6040         * libc-cancellation.c (__libc_cleanup_routine): Define.
6041         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6042         (__pthread_cleanup_pop): Define.
6044 2003-07-01  Richard Henderson  <rth@redhat.com>
6046         * sysdeps/alpha/elf/pt-initfini.c: New file.
6047         * sysdeps/alpha/pthread_spin_lock.S: New file.
6048         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6049         * sysdeps/alpha/pthreaddef.h: New file.
6050         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6051         * sysdeps/alpha/tls.h: New file.
6052         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6053         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6054         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6055         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6056         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6057         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6058         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6059         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6060         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6061         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6063 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6065         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6066         cleanup support and unwind info.
6068 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6070         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6071         Use correct cleanup handler registration.  Add unwind info.
6072         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6073         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6074         * tst-once3.c: Add cleanup handler and check it is called.
6075         * tst-once4.c: Likewise.
6076         * tst-oncex3.c: New file.
6077         * tst-oncex4.c: New file.
6078         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6080 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6082         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6084 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6086         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6087         (tf_msgsnd): Likewise.
6089         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6090         premature returns a bit more.
6092 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6094         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6095         definition to the front.
6097         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6098         the cleanup functions to make the names unique.  Fix dwarf opcode
6099         un unwind table.
6100         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6101         functions to make the names unique.  Fix CFA offset for two blocks.
6103 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6105         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6106         missing closing braces.
6107         Patch by Christophe Saout <christophe@saout.de>.
6109 2003-06-24  Roland McGrath  <roland@redhat.com>
6111         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6113 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6115         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6116         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6118         * pthreadP.h: Declare __find_thread_by_id.
6119         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6120         * pthread_clock_gettime.c: Allow using other thread's clock.
6121         * pthread_clock_settime.c: Likewise.
6122         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6123         * Makefile: Add rules to build and run tst-clock2.
6124         * tst-clock2.c: New file.
6126 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6129         to use exception-based cleanup handler.
6130         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6132         * tst-cond8.c (ch): Announce that we are done.
6134         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6136         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6137         Also test aio_suspend with timeout value.
6139 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6141         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6142         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6143         attribute_hidden.
6145         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6146         (__pthread_mutex_lock_internal): Likewise.
6147         (__pthread_mutex_unlock_internal): Likewise.
6148         (__pthread_mutex_unlock_usercnt): Declare.
6149         * pthread_mutex_destroy.c: Always fail if used in any way.
6150         * pthread_mutex_init.c: Update comment.
6151         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6152         * pthread_mutex_timedlock.c: Adjust __nusers.
6153         * pthread_mutex_trylock.c: Adjust __nusers.
6154         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6155         and public interfaces are wrapper with pass additional parameter.
6156         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6157         parameter zero.
6158         * tst-mutex8.c: New file.
6159         * Makefile (tests): Add tst-mutex8.
6160         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6161         __pthread_mutex_unlock_usercnt.
6162         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6163         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6167         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6168         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6169         Add __nusers.
6170         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6171         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6172         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6173         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6174         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6176         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6177         * pthread_mutex_timedlock.c: Likewise.
6178         * pthread_mutex_trylock.c: Adjust __nusers.
6179         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6180         * tst-mutex9.c: New file.
6181         * Makefile (tests): Add tst-mutex9.
6182         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6183         * sysdeps/ia64/tls.h: Likewise.
6184         * sysdeps/powerpc/tls.h: Likewise.
6185         * sysdeps/s390/tls.h: Likewise.
6186         * sysdeps/sh/tls.h: Likewise.
6187         * sysdeps/x86_64/tls.h: Likewise.
6188         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6189         Change type of __owner.
6190         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6191         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6192         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6193         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6194         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6196 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6198         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6199         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6201         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6202         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6203         instead of nr to lll_futex_wake.  Only set errno and return -1
6204         if err < 0.
6206         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6207         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6208         return actual return value from the syscall, not 0.
6210 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6212         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6213         find a random value.
6214         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6215         errno==EIDRM.
6217         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6218         compat_timer_settime.
6219         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6220         compat_timer_gettime.
6221         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6222         compat_timer_getoverrun.
6223         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6224         compat_timer_delete.
6226         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6227         error-checking mutex detect busy mutexes.
6229 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6231         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6232         Add ax to clobber list.
6233         (lll_mutex_cond_lock): Likewise.
6234         (lll_mutex_unlock): Likewise.
6235         (lll_lock): Likewise.
6236         (lll_unlock): Likewise.
6238         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6239         * tst-cancel18.c: New file.
6240         * tst-cancelx18.c: New file.
6242         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6243         and tcdrain.
6245         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6246         * tst-cancel17.c: New file.
6247         * tst-cancelx17.c: New file.
6249         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6250         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6251         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6253         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6255 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6257         * sysdeps/pthread/createthread.c (create_thread): Set
6258         header.multiple_threads unconditionally.
6259         * allocatestack.c (allocate_stack): Likewise.
6260         * descr.h (struct pthread): Add header.multiple_threads
6261         unconditionally.
6262         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6263         Define for librt.  #error if neither libpthread, libc nor librt.
6264         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6265         Likewise.
6266         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6267         CDISABLE): Likewise.
6268         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6269         CDISABLE): Likewise.
6270         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6271         CDISABLE): Likewise.
6272         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6273         CDISABLE): Likewise.  Access header.multiple_threads outside of
6274         libc and libpthread.
6275         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6276         Likewise.
6277         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6278         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6280 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6282         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6283         Also test early cancellation before the thread reaches the cancellation
6284         point.
6286         * Makefile: Compile forward.c with exceptions.
6288         * sysdeps/unix/sysv/linux/sleep.c: New file.
6290 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6292         * Makefile: Add CFLAGS definition to compile function wrappers
6293         duplicated from libc with exceptions.
6294         * tst-cancel4.c: Also check cancellation handlers.
6296         * Makefile: Add rules to build and run tst-cancel16 and
6297         tst-cancelx16.  Add missing CFLAGS definitions.
6298         * tst-cancel16.c: New file.
6299         * tst-cancelx16.c: New file.
6301 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6303         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6304         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6305         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6306         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6308         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6309         (LIBC_CANCEL_RESET): Likewise.
6310         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6311         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6312         librt-cancellation.
6313         (CFLAGS-libcrt-cancellation.c): Define.
6314         * sysdeps/pthread/librt-cancellation.c: New file.
6315         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6316         macros also when compiling librt.
6317         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6318         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6319         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6320         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6321         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6322         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6323         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6325         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6326         compat_timer_create.
6328 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6330         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6332         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6333         __register_atfork.
6334         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6335         Add libc_hidden_def.
6337 2003-06-13  Roland McGrath  <roland@redhat.com>
6339         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6340         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6342 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6344         * allocatestack.c (queue_stack): Always inline.
6345         * ptreadhP.h (__do_cancel): Likewise.
6347 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6349         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6350         a typo.
6352 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6355         (__pthread_cond_signal): Remove incorrect second addition for
6356         cond_lock!=0.
6358 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6360         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6361         (__pthread_cond_signal): Use correct futex pointer in
6362         __lll_mutex_lock_wait call.
6364         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6365         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6367 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6369         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6370         cancelable.
6371         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6372         Likewise.
6374         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6375         hand-written CFI generation code.  Since ENTRY/END also initiated
6376         CFI frames this caused two CFI sets to be generated.
6378 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6380         * cleanup_routine.c: New file.
6381         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6382         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6383         cleanup handling.
6384         * Makefile (libpthread-routines): Add cleanup_routine.
6385         Add more CFLAGS variables to compile with exceptions.  Add comments
6386         why which file needs unwind tables.
6387         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6388         tests.
6389         * tst-cancelx1.c: New file.
6390         * tst-cancelx2.c: New file.
6391         * tst-cancelx3.c: New file.
6392         * tst-cancelx4.c: New file.
6393         * tst-cancelx5.c: New file.
6394         * tst-cancelx6.c: New file.
6395         * tst-cancelx7.c: New file.
6396         * tst-cancelx8.c: New file.
6397         * tst-cancelx9.c: New file.
6398         * tst-cancelx10.c: New file.
6399         * tst-cancelx11.c: New file.
6400         * tst-cancelx12.c: New file.
6401         * tst-cancelx13.c: New file.
6402         * tst-cancelx14.c: New file.
6403         * tst-cancelx15.c: New file.
6404         * tst-cleanupx0.c: New file.
6405         * tst-cleanupx0.expect: New file.
6406         * tst-cleanupx1.c: New file.
6407         * tst-cleanupx2.c: New file.
6408         * tst-cleanupx3.c: New file.
6410         * tst-cleanup0.c: Make standard compliant.
6411         * tst-cleanup1.c: Likewise.
6413         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6414         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6415         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6416         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6417         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6418         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6419         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6420         CLEANUP_JMP_BUF.
6421         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6422         * tst-cancel12.c: New file.
6423         * tst-cancel13.c: New file.
6424         * tst-cancel14.c: New file.
6425         * tst-cancel15.c: New file.
6426         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6427         and tst-cancel15.
6429         * tst-cancel1.c: Add some comments.
6431         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6432         timeout correctly.
6434 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6436         * Makefile (CFLAGS-pthread_cancel.c): Define.
6438 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6440         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6441         Change type of __writer element to int.
6442         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6443         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6444         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6445         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6446         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6447         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6448         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6449         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6450         Compare with TID to determine deadlocks.
6451         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6452         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6453         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6454         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6457         Likewise.
6458         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6459         Likewise.
6460         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6461         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6462         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6463         Likewise.
6464         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6465         Likewise.
6466         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6467         * Makefile (tests): Add tst-rwlock12.
6468         * tst-rwlock12.c: New file.
6470 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6472         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6473         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6474         Remove bogus hidden_proto.
6475         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6476         Likewise.
6477         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6478         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6479         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6480         ___lll_mutex_timedlock): Likewise.
6482 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6485         (__pthread_cond_signal): Add some code to eventually handle
6486         cond_lock!=0.
6488 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6490         * Makefile (tests): Add tst-exec4.
6491         (tst-exec4-ARGS): Define.
6492         * tst-exec4.c: New file.
6494 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6496         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6497         Also fail if tv_nsec < 0.
6498         (__lll_timedwait_tid): Likewise.
6499         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6500         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6501         Likewise.
6502         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6503         Likewise.
6504         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6505         Likewise.
6506         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6507         Likewise.
6508         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6509         Likewise.
6510         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6511         Likewise.
6513         * Makefile (tests): Add tst-sem8 and tst-sem9.
6514         * tst-sem8.c: New file.
6515         * tst-sem9.c: New file.
6516         * sem_open.c: Fix creation of in_use record if the file exists but
6517         no internal record.
6519         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6520         definitions.
6522         * sysdeps/pthread/timer_create.c (timer_create): In case
6523         evp==NULL, assign timer ID to sival_ptr.
6525         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6526         struct pthread_unwind_buf *.
6527         (struct pthread): Likewise for cleanup_jmp_buf element.
6529         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6530         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6531         * unwind.c (__pthread_unwind_next): Likewise.
6533 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6535         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6536         (lll_futex_timed_wait): Use int for futex value parameter.
6537         (lll_futex_wake): Likewise.
6538         (lll_futex_requeue): Likewise.
6540         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6541         Replace one memory operation with one register operation.
6543         * tst-join4.c (do_test): Fix error message.
6545         * tst-rwlock6.c (do_test): Use correct format specifier.
6547         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6548         (__lll_mutex_lock_wait): Replace one memory operation with one
6549         register operation.
6550         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6551         (__lll_mutex_lock_wait): Likewise.
6553         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6554         (__lll_mutex_cond_lock): Add one to value parameter of
6555         __lll_lock_wait to reflect reality in the futex syscall.
6556         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6557         (lll_mutex_cond_lock): Likewise.
6559 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6561         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6562         New function.
6563         (lll_mutex_cond_lock): Define.
6565 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6567         * Makefile (tests): Add tst-signal6.
6568         * tst-signal6.c: New file.
6570         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6571         (__lll_mutex_unlock_force): New function
6572         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6574         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6575         (__lll_mutex_unlock_force): New function.
6576         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6578         * tst-rwlock7.c (do_test): Use correct format specifier.
6580         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6581         Find break parameter in correct asm argument.
6583 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6585         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6586         Remove out4.
6587         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6588         error occured.
6589         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6590         Add __mutex.
6591         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6592         lll_futex_requeue, lll_mutex_unlock_force): Define.
6594 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6596         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6597         (pthread_cond_t): Add __mutex.
6598         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6599         lll_futex_requeue, lll_mutex_unlock_force): Define.
6601 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6603         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6604         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6605         Add __mutex field.
6606         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6607         Define.
6608         (lll_futex_wait, lll_futex_wake): Define.
6609         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6610         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6611         FUTEX_REQUEUE instead of FUTEX_WAIT.
6612         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6613         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6614         mutex which was used in condvar structure.  Call
6615         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6616         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6618         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6619         include tcb-offsets.h.  Read wakeup value in locked region.
6620         Use the value of gbr register as THREAD_ID.
6621         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6622         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6623         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6625         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6626         macros.
6628 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6630         * sysdeps/pthread/pthread_cond_broadcast.c
6631         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6633 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6635         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6636         typo in register name.
6637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6638         correctly.  Actually use requeue.  Little optimization.
6639         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6640         mutex address early.  Handle cancellation state as 32-bit value.
6641         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6642         Remove unnecessary label.
6644 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6646         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6647         instead of FUTEX_WAIT.
6648         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6649         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6652         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6653         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6654         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6655         of __pthread_mutex_lock_internal.
6656         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6658         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6659         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6661         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6662         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6663         Add pthread_mutex_cond_lock.
6664         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6665         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6666         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6667         lll_mutex_cond_lock.
6668         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6669         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6670         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6671         Add __mutex field.
6672         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6673         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6675         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6676         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6678         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6679         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6680         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6681         macro don't define aliases.
6683         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6684         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6685         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6686         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6688         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6689         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6690         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6691         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6693 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6695         * sem_open.c: Fix one endless loop.  Implement correct semantics
6696         wrt opening the same semaphore more then once.
6697         * sem_close.c: Adjust for sem_open change.
6698         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6699         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6700         * Makefile (tests): Add tst-sem7.
6701         * tst-sem7.c: New file.
6703 2003-05-16  Roland McGrath  <roland@redhat.com>
6705         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6706         uninitialized variable braino.
6708 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6710         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6711         test for syscall availability.
6713         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6714         __no_posix_timers to -1 if the syscalls don't exist.
6716         * pthread_join.c (pthread_join): Set tid field of the joined
6717         thread to -1.  This isn't necessary but helps to recognize some
6718         error conditions with almost no cost.
6720         * allocatestack.c (FREE_P): Also negative values indicate an
6721         unused stack.
6723         * unwind.c: Include <unistd.h>.
6725 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6727         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6729 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6731         * Makefile (crti-objs, crtn-objs): New variables.
6732         (omit-deps, extra-objs): Add crtn.
6733         ($(objpfx)libpthread.so): Depend on both crti and crtn
6734         and links to them in multidir.
6735         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6737 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6739         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6740         (lll_mutex_unlock): Use atomic_exchange_rel.
6742 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6744         * cond-perf.c (cons): Add missing locking around setting of alldone.
6746 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6748         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6749         related macros.
6750         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6752 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6754         * tst-sem6.c: New file.
6755         * Makefile (tests): Add tst-sem6.
6757         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6758         Use atomic_exchange_rel instead of atomic_exchange.
6759         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6760         Likewise.
6762         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6763         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6764         vsyscall is possible.
6766         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6767         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6768         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6769         pthread_setaffinity_np.
6770         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6771         and pthread_setaffinity_np.
6772         * Makefile (libpthread-routines): Add pthread_getaffinity and
6773         pthread_setaffinity.
6775         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6776         use it in case mmap to allocate the stack fails.
6777         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6778         ARCH_MAP_FLAGS here.
6779         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6780         ARCH_RETRY_MMAP.
6782 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6784         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6785         handler implementation.  It is now lockless in fork().
6786         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6787         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6788         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6789         declare the __fork_*_lists.
6790         (struct fork_handler): Include pointers to all three functions.
6791         Add next, refcntr and need_signal elements.
6792         (__fork_handlers): New declaration.
6793         (__register_atfork_malloc): Remove declaration.
6794         (HAVE_register_atfork_malloc): Remove definition.
6795         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6796         __pthread_child_handler variable.
6797         (__libc_pthread_init): Use __register_atfork instead of explicitly
6798         adding to the list.
6799         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6800         and lll_futex_wake.
6801         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6803         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6804         function must never be reached.
6806         * cond-perf.c: New file.
6808 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6810         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6812 2003-05-04  Roland McGrath  <roland@redhat.com>
6814         * Makefile ($(objpfx)../libc.so): New target.
6816 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6818         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6819         (pthread_condattr_t): Size is only an int, don't use long for
6820         alignment.
6821         (pthread_mutexattr_t): Likewise.
6822         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6823         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6824         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6826 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6828         * sysdeps/i386/tls.h: Define THREAD_ID.
6829         * sysdeps/ia64/tls.h: Likewise.
6830         * sysdeps/powerpc/tls.h: Likewise.
6831         * sysdeps/s390/tls.h: Likewise.
6832         * sysdeps/sh/tls.h: Likewise.
6833         * sysdeps/x86_64/tls.h: Likewise.
6834         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6835         record ownership.
6836         * pthread_mutex_timedlock.c: Likewise.
6837         * pthread_mutex_trylock.c: Likewise.
6838         * pthread_mutex_unlock.c: Likewise.
6839         * pthread_rwlock_trywrlock.c: Likewise.
6840         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6841         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6842         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6843         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6845         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6846         flag.
6848 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6850         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6851         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6852         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6853         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6854         Make __align long long instead of long.
6855         (pthread_rwlock_t): Formatting.
6856         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6857         (pthread_rwlock_t): Formatting.
6858         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6859         (pthread_cond_t): Make __align long long instead of long.
6860         (pthread_rwlock_t): Move __flags field to the same position as in
6861         linuxthreads.
6863 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6865         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6866         * tst-rwlock7.c (do_test): Likewise.
6868 2003-04-26  Roland McGrath  <roland@redhat.com>
6870         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6872 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6874         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6875         sizeof (struct pthread).
6876         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6877         1 struct pthread.
6878         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6879         to 0.
6880         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6881         struct pthread.
6882         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6883         to 32-bit bytes.
6884         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6885         tcbp.
6886         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6887         unneccessarily.
6888         (NO_TLS_OFFSET): Define.
6889         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6890         add TLS_TCB_SIZE unnecessarily.
6892 2003-04-22  Roland McGrath  <roland@redhat.com>
6894         * Makeconfig (shared-thread-library): Reverse link order to work
6895         around linker bug.
6897 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6899         * semaphore.h: Fix typo in comment.
6901 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6903         * sysdeps/pthread/sigfillset.c: New file.
6905         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6906         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6907         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6908         * sysdeps/pthread/sigaction.c: Likewise.
6909         * sysdeps/pthread/sigprocmask.c: New file.
6910         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6911         __SIGRTMIN+1.
6912         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6913         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6914         in this case.
6916 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6918         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6919         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6921         * sysdeps/unix/sysv/linux/unregister-atfork.c
6922         (__unregister_atfork): Don't free memory not allocated dynamically.
6924         * semaphore.h: Remove __THROW marker from cancellation points.
6925         * nptl/sysdeps/pthread/pthread.h: Likewise.
6927 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6929         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6930         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6931         __THROW.
6933 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6935         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6937 2003-04-15  Roland McGrath  <roland@redhat.com>
6939         * forward.c (__pthread_unwind): Tweak to avoid warning.
6941 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6943         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
6945 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
6947         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
6948         overflow CFA advance instructions.
6949         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6951 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
6953         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
6954         * sysdeps/i386/pthread_spin_lock.c: Likewise.
6955         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
6956         defined.
6958         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
6959         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
6960         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
6961         DW_CFA_advance_loc for .Laddl-.Lsubl.
6963 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
6965         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
6966         position-independent unwind data for static libraries.
6967         Add missing unwind info.  Add comments.
6969         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
6970         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6971         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6974 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
6976         * Makefile: Make sure all cancellation points are compiled with
6977         exception and asynchronous unwind tables.
6979         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
6980         which mishandles loading of global object addresses in PIC.
6981         (THREAD_SETMEM_NC): Likewise.
6983 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
6985         * pthread.h: Define new data structure for cleanup buffer.  Declare
6986         new cleanup handler interfaces.
6987         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
6988         (struct pthread): Add cleanup_jmp_buf pointer.  Define
6989         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
6990         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
6991         it.  Declare old cleanup handler installation functions.
6992         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
6993         handling.
6994         * cleanup_defer.c: Likewise.
6995         * cleanup_compat.c: New file.  Old cleanup code.
6996         * cleanup_def_compat.c: New file.  Old cleanup code.
6997         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
6998         if own thread descriptor.
6999         * unwind.c: New file.
7000         * forward.c: Add __pthread_unwind.
7001         * init.c (pthread_functions): Add __pthread_unwind.
7002         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7003         Add ptr___pthread_unwind.
7004         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7005         and unwind function.
7006         * Makefile (libpthread-routines): Add cleanup_compat,
7007         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7008         table generation if necessary.
7009         * version.c: Record whether unwind support is compiled in.
7010         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7011         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7012         handler interfaces.
7013         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7014         complication to generate unwind information for syscall wrappers.
7015         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7016         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7017         __cleanup_fct_attribute.
7019         * Makefile: Add rules to build and run tst-cleanup0.
7020         * tst-cleanup0.c: New file.
7021         * tst-cleanup0.expect: New file.
7023         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7024         caller.  Optimize to avoid often unecessary local variable.
7026 2003-04-11  Roland McGrath  <roland@redhat.com>
7028         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7029         sets variable `multidir'; include that.
7030         (generated): Add it.
7031         ($(objpfx)$(multidir)/crti.o): New target.
7032         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7034 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7036         * tst-attr2.c (do_test): Add cast to avoid warning.
7037         * tst-mutex4.c (do_test): Likewise.
7039 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7042         in child.
7044 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7046         * Makefile (tests): Add tst-detach1.
7047         * tst-detach1.c: New file.
7049 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7051         * sysdeps/pthread/pthread.h: Remove duplicate
7052         pthread_cleanup_{push,pop} definitions.
7054         * tst-barrier2.c: Eliminate warnings.
7055         * tst-cancel4.c: Likewise.
7056         * tst-cond4.c: Likewise.
7057         * tst-cond6.c: Likewise.
7058         * tst-detach1.c: Likewise.
7059         * tst-rwlock4.c: Likewise.
7060         * tst-rwlock6.c: Likewise.
7061         * tst-rwlock7.c: Likewise.
7062         * tst-sem3.c: Likewise.
7063         * tst-spin2.c: Likewise.
7064         * tst-umask1.c: Likewise.
7066 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7068         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7070 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7072         * descr.h (struct pthread): Move cancelhandling member to the front.
7074 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7076         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7077         malloc_parent, and malloc_child statically.
7078         (__register_atfork_malloc): New function.
7079         (free_mem): Don't free any of the malloc_* variables on the list.
7080         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7081         Define HAVE_register_atfork_malloc.
7083 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7085         * sysdeps/pthread/createthread.c (create_thread): Add some more
7086         comments explaining when to set multiple_threads and when not.
7088         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7089         THREAD_ATOMIC_BIT_SET if not already defined.
7090         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7091         THREAD_ATOMIC_BIT_SET:
7092         * sysdeps/x86_64/tls.h: Likewise.
7093         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7094         THREAD_ATOMIC_CMPXCHG_VAL.
7095         (_pthread_cleanup_pop_restore): Likewise.
7096         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7097         (__pthread_enable_asynccancel_2): Likewise.
7098         (__pthread_disable_asynccancel): Likewise.
7099         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7100         (__libc_disable_asynccancel): Likewise.
7101         * init.c (sigcancel_handler): Likewise.
7102         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7103         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7105 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7107         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7108         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7109         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7110         * Makefile (tests): Add tst-cancel11.
7111         * tst-cancel11.c: New file.
7113 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7115         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7116         round, not the first.  Use specific_used flag instead of local
7117         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7118         (__free_tcb): Don't call deallocate_tsd here.
7119         (start_thread): Call deallocate_tsd here.
7120         * pthread_setspecific.c: Set specific_used flag really only when
7121         needed.
7122         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7123         * tst-tsd3.c: New file.
7124         * tst-tsd4.c: New file.
7126 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7128         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7129         Use atomic_exchange_and_add instead of __lll_add.
7130         (__lll_mutex_timedlock): Likewise.
7131         Patch by Ian Wienand.
7133 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7135         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7136         (SINGLE_THREAD_P): Fix typo.
7137         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7139 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7141         * Makefile (tests): Add tst-align.
7142         * tst-align.c: New file.
7143         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7145         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7146         function correctly.
7148         * tst-tsd2.c: Add casts to avoid warnings.
7150 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7152         * descr.h (struct pthread): Move most often used elements to the front.
7154 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7156         * Makefile (libpthread-routines): Add pthread_atfork.
7157         (libpthread-static-only-routines): Add pthread_atfork.
7159 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7161         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7162         of TLS_DTV_AT_TP.
7163         (INSTALL_DTV): Add parens.
7164         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7165         Use passed descr instead of THREAD_SELF.
7166         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7167         (__lll_mutex_timedlock_wait): Correct expected value after
7168         spurious wakeup.
7169         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7170         Release lock before waking up the waiters.
7171         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7172         criteria.  Reorderstruct passed to cleanup handler.  Fix
7173         handling of cancellation and failung pthread_mutex_unlock call.
7174         Use __pthread_enable_asynccancel_2 instead of
7175         __pthread_enable_asynccancel.
7176         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7177         Return result of lock re-get if it fails.
7178         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7179         for __pthread_cleanup_push.
7180         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7181         completely broken rwlock implementation.
7182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7187         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7188         versioned_symbol macro.
7189         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7190         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7192 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7194         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7195         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7196         and __helper_tid.
7197         (struct timer): Remove th and bar field.
7198         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7199         debugging code.  Create only one helper thread.
7200         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7201         helper thread.
7202         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7203         Renamed.  Define statically.  Use thread info from siginfo.
7204         (__helper_once): New variable.
7205         (__helper_tid): New variable.
7206         (__reset_helper_control): New function.
7207         (__start_helper_thread): New function.
7209         * pthread_create.c (start_thread): Don't use setjmp inside
7210         __builtin_expect to work around gcc bug.
7212         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7213         timer_delete syscall fails, but not with ENOSYS, set
7214         __no_posix_timers.
7216         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7217         (timer_settime): Fix typo.
7218         * sysdeps/unix/sysv/linux/timer_getoverr.c
7219         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7221 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7224         offset of cleanupbuf.__prev.
7226 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7228         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7229         of included file.
7231 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7233         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7234         NULL provide default definition to syscall.
7236 2003-03-25  Roland McGrath  <roland@redhat.com>
7238         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7239         (timer_id2ptr): Fix typo.
7241 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7243         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7244         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7245         * sysdeps/ia64/pthreaddef.h: Likewise.
7246         * sysdeps/powerpc/pthreaddef.h: Likewise.
7247         * sysdeps/s390/pthreaddef.h: Likewise.
7248         * sysdeps/sh/pthreaddef.h: Likewise.
7249         * sysdeps/x86_64/pthreaddef.h: Likewise.
7250         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7251         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7252         being changed.
7253         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7254         SIGTIMER is not unblocked.
7255         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7256         RT signal taken.
7257         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7258         be send.
7259         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7260         pass pointer through as ID.
7261         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7262         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7263         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7264         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7265         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7266         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7267         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7268         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7269         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7270         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7271         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7272         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7273         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7274         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7275         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7276         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7277         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7278         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7279         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7280         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7281         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7282         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7283         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7284         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7285         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7286         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7287         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7288         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7289         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7290         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7291         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7292         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7293         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7295         * pthreadP.h: Remove FRAME_LEFT definition.
7296         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7297         already left frame.  Programs which have this problem are not POSIX
7298         compliant.
7299         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7301 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7303         * sysdeps/pthread/tst-timer.c: Check return values of the
7304         functions we test.
7306 2003-03-23  Roland McGrath  <roland@redhat.com>
7308         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7309         * tst-tls3mod.c: Likewise.
7310         * tst-tls1.c: Likewise.
7311         * tst-tls2.c: Likewise.
7313         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7314         undefined behavior.
7316         * tst-join5.c (tf1, tf2): Add a cast.
7318         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7320         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7321         Don't test anything.
7322         * tst-cond4.c: Likewise.
7323         * tst-cond6.c: Likewise.
7324         * tst-flock2.c: Likewise.
7325         * tst-mutex4.c: Likewise.
7326         * tst-rwlock4.c: Likewise.
7327         * tst-signal1.c: Likewise.
7328         * tst-spin2.c: Likewise.
7329         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7331         * tst-mutex4.c: Use test-skeleton.c.
7332         * tst-spin2.c: Likewise.
7333         * tst-sysconf.c: Likewise.
7334         * tst-barrier2.c: Likewise.
7335         * tst-cond4.c: Likewise.
7336         * tst-cond6.c: Likewise.
7337         * tst-rwlock4.c: Likewise.
7338         * tst-unload.c: Likewise.
7339         * tst-flock2.c (do_test): Use return instead of exit.
7341 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7343         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7345 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7347         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7348         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7349         instead of __lll_compare_and_swap.
7350         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7351         Likewise.
7352         Removed definition if __lll_compare_and_swap.
7354         * cancellation.c: Adjust for new form of compare&exchange macros.
7355         * cleanup_defer.c: Likewise.
7356         * init.c: Likewise.
7357         * libc-cancellation.c: Likewise.
7358         * old_pthread_cond_broadcast.c: Likewise.
7359         * old_pthread_cond_signal.c: Likewise.
7360         * old_pthread_cond_timedwait.c: Likewise.
7361         * old_pthread_cond_wait.c: Likewise.
7362         * pthread_cancel.c: Likewise.
7363         * pthread_create.c: Likewise.
7364         * pthread_detach.c: Likewise.
7365         * pthread_join.c: Likewise.
7366         * pthread_key_delete.c: Likewise.
7367         * pthread_setcancelstate.c: Likewise.
7368         * pthread_setcanceltype.c: Likewise.
7369         * pthread_timedjoin.c: Likewise.
7370         * pthread_tryjoin.c: Likewise.
7371         * sysdeps/pthread/createthread.c: Likewise.
7373 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7375         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7376         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7377         definitions.  Replace uses with calls to atomic_* functions.
7378         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7379         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7380         __lll_test_and_set calls with atomic_exchange_and_add and
7381         atomic_exchange calls respectively.
7382         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7383         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7384         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7385         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7386         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7387         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7388         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7390         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7391         returns the old value.
7393 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7395         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7396         int for variable OLDVAL and correct inline assembler contraint.
7397         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7398         type int for variable OLD.
7400         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7401         only for s390-32.
7402         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7403         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7404         instead of multiple_threads field in the TCB.
7406 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7408         * sysdeps/i386/i686/bits/atomic.h: Removed.
7409         * sysdeps/i386/i586/bits/atomic.h: Removed.
7410         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7411         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7412         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7413         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7414         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7415         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7416         * atomic.h: Removed.  Moved to glibc.
7418         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7419         support for clock selection.
7421         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7422         signalling waiters.
7424 2003-03-18  Roland McGrath  <roland@redhat.com>
7426         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7427         Add __lll_rel_instr first.  Add memory clobber.
7428         (lll_mutex_unlock): Use __lll_test_and_set.
7429         From Paul Mackerras <paulus@samba.org>.
7431         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7432         unconditionally.
7433         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7434         (SINGLE_THREAD_P):  Add `header.' prefix.
7435         From Paul Mackerras <paulus@samba.org>.
7437         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7438         pthread_timedjoin_np to ...
7439         (libpthread: GLIBC_2.3.3): ... here.
7440         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7442         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7443         Avoid shadowing VAL variable.
7445         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7446         New macro.
7448 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7450         * Makefile (tests): Add tst-cond11.
7451         * tst-cond11.c: New file.
7453         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7454         struct passed to cleanup handler to eliminate one more
7455         instruction.
7456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7459         (pthrad_cond_t): Replace __unused field with __clock.
7461         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7462         waken all waiters in cleanup handler.
7463         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7464         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7466         * pthread_condattr_getclock.c: New file.
7467         * pthread_condattr_setclock.c: New file.
7468         * sysdeps/pthread/pthread.h: Declare these new functions.
7469         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7470         * Makefile (libpthread-routines): Add the new functions.
7471         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7472         Renamed field to value.  Document use of the bits.
7473         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7474         change.
7475         * pthread_condattr_setpshared.c: Likewise.
7476         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7477         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7478         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7479         Add __clock field.
7480         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7481         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7482         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7483         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7485         Implement clock selection.
7486         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7487         * pthread-errnos.sym: Add ENOSYS.
7488         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7489         _POSIX_CLOCK_SELECTION.
7490         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7493         invalid .size directive.
7495 2003-03-17  Roland McGrath  <roland@redhat.com>
7497         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7498         Formatting tweaks.
7500 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7502         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7503         Use __lll_add instead of spelling it out.  Use protected symbol names.
7504         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7505         Use __lll_add.
7506         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7507         Renamed from lll_compare_and_swap.  Use new name where necessary.
7508         (__lll_add): Defined.
7509         (__lll_dec_if_positive): Defined.
7510         (__lll_test_and_set): Defined.
7511         * sysdeps/ia64/pthread_spin_init.c: Removed.
7512         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7513         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7514         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7515         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7516         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7517         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7518         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7519         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7520         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7521         __sync_lock_release_si.
7522         Patch by Jakub Jelinek.
7524         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7525         Fix timeout handling.
7526         (__lll_timedwait_tid): Likewise.
7527         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7528         Patch by Jakub Jelinek.
7530         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7532 2003-03-17  Roland McGrath  <roland@redhat.com>
7534         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7535         * sysdeps/pthread/pthread_spin_init.c: New file.
7536         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7537         * sysdeps/powerpc/Makefile: New file.
7538         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7539         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7540         * sysdeps/powerpc/pthreaddef.h: New file.
7541         * sysdeps/powerpc/tcb-offsets.sym: New file.
7542         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7543         * sysdeps/powerpc/tls.h: New file.
7544         * sysdeps/powerpc/bits/atomic.h: New file.
7545         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7546         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7547         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7549         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7550         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7551         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7552         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7553         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7554         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7555         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7556         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7557         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7558         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7559         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7560         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7561         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7562         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7563         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7565         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7566         not gettimeofday.
7567         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7568         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7569         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7570         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7571         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7573 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7575         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7576         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7577         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7579         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7581 2003-03-16  Roland McGrath  <roland@redhat.com>
7583         * tst-fork4.c: Include <string.h>.
7584         * tst-signal2.c: Likewise.
7585         * tst-mutex5.c (do_test): exit -> return.
7586         * tst-mutex2.c: Include <stdlib.h>.
7588 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7590         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7591         (__lll_mutex_timedlock_wait): Correct expected value after
7592         spurious wakeup.  Otherwise we would never wait again.
7594         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7595         zone versus inline asm stupidity.  Use correct instructions.
7597         * tst-rwlock6.c: Add some more status output.
7599 2003-03-15  Roland McGrath  <roland@redhat.com>
7601         * sysdeps/pthread/configure.in: New file.
7602         * sysdeps/pthread/configure: New file (generated).
7604 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7606         * allocatestack.c (allocate_stack): Store the exact stack size of
7607         user allocated stacks.
7609 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7611         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7612         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7613         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7614         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7615         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7616         Use `header.' prefix.
7617         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7619 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7621         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7622         __builtin_frame_address, use stack pointer.
7624         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7625         instead of __builtin_frame_pointer.
7627 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7629         * tst-basic1.c (do_test): Add cast to avoid warning.
7630         * tst-basic2.c (do_test): Likewise.
7632         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7633         amount of stack correction.
7635         * tst-fork4.c: Use test-skeleton.c.
7637 2003-03-14  Roland McGrath  <roland@redhat.com>
7639         * init.c: Fix typo "#eli" for "#else".
7641 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7643         * allocatestack.c (__stack_user): Use hidden_data_def.
7644         * pthread_create.c (__pthread_keys): Likewise.
7646         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7648 2003-03-14  Roland McGrath  <roland@redhat.com>
7650         * tst-fork4.c: New file.
7651         * Makefile (tests): Add it.
7653         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7654         we always define the padding space.
7655         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7656         stopped supporting its own extensions fully.
7657         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7658         struct also called `header', so `header.multiple_threads' is the field
7659         name to use on all machines.
7660         * allocatestack.c (allocate_stack): Use `header.' prefix.
7661         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7662         * pthread_create.c (__pthread_create_2_1): Likewise.
7663         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7664         (THREAD_SELF): Likewise.
7665         * sysdeps/x86_64/tls.h: Likewise.
7666         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7667         (SINGLE_THREAD_P): Likewise.
7668         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7669         (SINGLE_THREAD_P): Likewise.
7670         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7671         (SINGLE_THREAD_P): Likewise.
7673         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7674         value directly.
7676 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7678         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7679         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7681         * pthread_create.c (start_thread): setjmp is expected to return 0.
7683         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7684         (THREAD_GETMEM_NC): Likewise.
7686 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7688         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7689         and the size of the stack which must be allocated is a multiple,
7690         allocate one more page.
7691         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7692         MULTI_PAGE_ALIASING.
7694 2003-03-13  Roland McGrath  <roland@redhat.com>
7696         * pthread_create.c (start_thread): Set EXITING_BIT after the
7697         event-reporting (and destructors), not before.
7699 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7701         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7702         lll_futex_wake): Declare register variables as long int instead of
7703         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7704         Make syscall arguments clobbered by the syscall.
7705         (lll_futex_wait): Define using lll_futex_timed_wait.
7707         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7708         to void *.
7710         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7711         PPID if [! NDEBUG].
7713         * allocatestack.c (nptl_ncreated): Only declare if
7714         COLORING_INCREMENT != 0.
7716         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7717         (__libc_enable_asynccancel_2): Remove prototype.
7719         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7720         ctid to match kernel.
7722 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7724         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7725         libc_multiple_threads.
7726         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7727         __libc_multiple_threads to...
7728         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7730         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7731         versioning.
7732         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7733         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7735         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7736         (__pthread_once_internal): Define.
7738         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7739         macros instead of .symver directly.
7740         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7741         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7743         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7744         * sysdeps/x86_64/tcb-offsets.sym: New file.
7745         * sysdeps/x86_64/Makefile: New file.
7747         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7748         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7749         to access own pthread_t in TCB.
7750         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7751         Likewise.
7752         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7753         Likewise.
7754         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7756 2003-03-12  Roland McGrath  <roland@redhat.com>
7758         * pthread-errnos.sym: New file.
7759         * Makefile (gen-as-const-headers): New variable, list that file.
7760         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7761         header <pthread-errnos.h> instead of defining errno values here.
7762         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7763         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7764         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7765         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7766         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7767         Likewise.
7768         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7769         Likewise.
7770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7772         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7773         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7774         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7775         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7776         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7777         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7778         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7779         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7780         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7781         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7782         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7783         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7784         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7785         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7786         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7787         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7788         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7789         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7790         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7791         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7792         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7793         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7794         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7795         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7796         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7798         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7799         CLONE_CHILD_SETTID worked.
7801 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7803         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7804         file.
7805         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7806         file.
7808         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7809         (pthread_cond_t): Add padding.
7811         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7812         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7813         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7815         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7816         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7818         (__pthread_rwlock_timedrdlock): Likewise.
7819         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7820         (__pthread_rwlock_wrlock): Likewise.
7821         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7822         (__pthread_rwlock_rdlock): Likewise.
7824         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7827         result of lock re-get if it fails.
7829 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7831         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7832         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7833         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7835         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7836         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7837         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7838         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7839         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7840         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7842         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7843         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7845         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7846         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7847         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7848         (create_thread): Likewise.
7849         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7850         * init.c (__pthread_initialize_minimal_internal): Initialize
7851         __libc_multiple_threads_ptr if necessary.
7852         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7853         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7854         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7855         __libc_multiple_threads.
7856         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7857         necessary.
7859         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7860         (THREAD_SETMEM_NC): Likewise.
7862         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7863         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7864         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7865         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7867         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7868         Eliminate one entire instruction.
7870         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7871         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7873         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7874         instead of __pthread_enable_asynccancel.
7875         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7876         (__pthread_cond_wait): Likewise.
7877         * sysdeps/pthread/pthread_cond_timedwait.c
7878         (__pthread_cond_timedwait): Likewise.
7879         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7882         (__condvar_cleanup): Wake up all waiters in case we got signaled
7883         after being woken up but before disabling asynchronous
7884         cancellation.
7885         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7886         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7887         (__condvar_cleanup): Likewise.
7889         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7890         Make it an error if architecture has no #if case.  Add x86-64.
7892         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7893         pt-initfini.s generation.
7895         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7896         (TLS_INIT_TP): Fix typo.
7898 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7900         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7901         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7903         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7904         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7905         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7906         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7907         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7908         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7909         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7910         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7912 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7914         * sysdeps/pthread/pthread_cond_timedwait.c
7915         (__pthread_cond_timedwait): Return the result of the final
7916         locking.  If it succeeds, the regular function return value.
7918         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7919         Return result of the final locking.
7920         * version.c (__nptl_main): Work around problems with the strange
7921         INTERNAL_SYSCALL macro on ppc32.
7922         * init.c (__pthread_initialize_minimal_internal): Unblock
7923         SIGCANCEL in case the parent blocked it.
7924         Reported by Paul Mackerras <paulus@samba.org>.
7926         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7928         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7930 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7932         * sysdeps/pthread/pthread_cond_timedwait.c
7933         (__pthread_cond_timedwait): Unlock and fail if
7934         __pthread_mutex_unlock_internal failed.
7936         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7937         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7938         Use ARCH_CLONE.
7939         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7940         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7941         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7942         ALLOCATE_STACK): New macros.
7943         (TLS_TPADJ): New macro.
7944         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
7945         (allocate_stack): Handle TLS_DTV_AT_TP and
7946         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
7947         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
7948         Don't set PD->self.
7949         * init.c [__ia64__] (__NR_set_tid_address): Define.
7951         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
7952         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
7953         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
7954         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
7955         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
7956         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
7957         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
7958         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
7959         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
7960         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
7961         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
7962         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
7963         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
7964         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
7965         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
7966         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
7967         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
7968         * sysdeps/ia64/bits/atomic.h: New file.
7969         * sysdeps/ia64/Makefile: New file.
7970         * sysdeps/ia64/pthread_spin_init.c: New file.
7971         * sysdeps/ia64/pthread_spin_lock.c: New file.
7972         * sysdeps/ia64/pthread_spin_trylock.c: New file.
7973         * sysdeps/ia64/pthread_spin_unlock.c: New file.
7974         * sysdeps/ia64/pthreaddef.h: New file.
7975         * sysdeps/ia64/tcb-offsets.sym: New file.
7976         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
7977         * sysdeps/ia64/tls.h: New file.
7979         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
7980         to syscall instead of no arguments.
7982 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
7984         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
7985         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
7986         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
7987         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
7989         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
7990         unused code.
7992         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
7994         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
7995         lowlevelbarrier.sym.
7996         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
7997         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
7998         Include lowlevelbarrier.h and don't define offsets locally.
7999         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8001         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8002         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8003         (__lll_mutex_timedlock_wait): Likewise.
8004         (lll_mutex_lock): Adjust asm for that.
8005         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8006         (lll_lock): Adjust asm for operand order change.
8007         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8008         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8010         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8011         Reverse order of parameters.
8012         (__lll_timedwait_tid): Remove regparms attribute.
8013         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8014         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8016         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8017         (__lll_timedwait_tid): Remove one unnecessary instruction.
8019         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8020         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8021         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8022         lowlevelmutex.S.
8024         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8025         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8026         for NOT_IN_libc.
8027         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8028         lowlevellock.S.
8030         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8031         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8032         for libc.so.
8033         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8034         define LOCK here (if UP is not defined).  The actual code is in
8035         lowlevelmutex.S.
8037         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8038         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8039         __lll_timedwait_tid for libc.so.
8040         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8041         define LOCK here (if UP is not defined).  The actual code is in
8042         lowlevellock.S.
8044         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8045         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8046         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8047         instead of lowlevelsem.h.
8048         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8049         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8050         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8052         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8053         lowlevelrwlock.sym.
8054         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8055         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8056         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8058         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8059         register loading.
8060         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8061         last changed.  D'oh.
8063         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8065         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8066         of __libc_locking_needed.
8067         (lll_trylock): Initialize %eax to zero.
8069         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8070         pthread_cond_t definition.
8072 2003-03-10  Roland McGrath  <roland@redhat.com>
8074         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8075         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8076         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8077         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8078         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8080         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8081         Instead of setting PD->multiple_threads, set globals
8082         __pthread_multiple_threads and __libc_multiple_threads.
8083         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8084         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8085         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8087         * descr.h (struct pthread): Conditionalize first member on
8088         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8089         containing an anonymous tcbhead_t.  Move `list' member out.
8090         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8091         * allocatestack.c: Remove use of `header.data.' prefix.
8092         * pthread_create.c: Likewise.
8093         * init.c (__pthread_initialize_minimal_internal): Likewise.
8094         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8095         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8096         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8097         * sysdeps/x86_64/tls.h: Likewise.
8098         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8099         (SINGLE_THREAD_P): Likewise.
8100         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8101         (SINGLE_THREAD_P): Likewise.
8102         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8103         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8105 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8107         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8109         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8110         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8112         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8113         leftovers from the ia32 code.
8115         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8116         memory load.
8117         (clear_once_control): Don't load %esi.
8119         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8120         handling.
8122         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8124         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8125         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8127         * Makefile (tests): Add tst-cond10.
8128         * tst-cond10.c: New file.
8130 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8132         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8133         * tst-signal3.c (do_test): Likewise.
8134         * tst-sem5.c (do_test): Likewise.
8135         * tst-kill6.c (do_test): Likewise.
8136         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8138         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8139         of inc/dec.
8140         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8141         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8142         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8143         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8144         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8146         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8147         Likewise.
8148         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8149         Likewise.
8150         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8155         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8156         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8157         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8159         * allocatestack.c (allocate_stack): If mprotect() fails free the
8160         TLS memory.
8162 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8164         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8166         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8167         lll_wake_tid.  This was used only to work around kernel limits in
8168         the early days.
8169         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8170         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8171         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8172         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8174         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8175         (__pthread_initialize_minimal_internal): Change initialization of
8176         __static_tls_align_m1 appropriately.
8177         * pthreadP.h (__static_tls_align_m1): Renamed from
8178         __static_tls_align.
8179         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8180         instead of __static_tls_align-1.
8182 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8184         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8186         * pthread_create.c: Define __pthread_keys using nocommon
8187         attribute, not by placing it explicitly in bss.
8188         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8190         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8191         Use it in mmap call to allocate stacks.
8193         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8195         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8196         result of the thread function.
8198 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8200         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8201         version is just fine.
8203         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8204         (__pthread_child_handler): Renamed from pthread_child_handler,
8205         exported, and marked hidden.  Change all users.
8206         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8207         free __pthread_child_handler from child list.
8209 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8211         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8213         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8214         Fix handling of cancellation and failing pthread_mutex_unlock call.
8215         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8216         (__pthread_cond_wait): Likewise.
8218         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8219         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8220         lll_futex_timed_wait call.
8221         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8222         (pthread_rwlock_timedwrlock): Likewise.
8224         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8225         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8226         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8228         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8229         check of lll_futex_wake return value.
8231 2003-03-03  Roland McGrath  <roland@redhat.com>
8233         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8235         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8236         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8237         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8239 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8241         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8242         error for CPU clocks.
8244         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8245         _POSIX_MONOTONIC_CLOCK.
8246         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8248         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8249         recent kernels.
8251 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8253         * descr.h (struct pthread): Move cleanup field to the front.
8255 2003-03-01  Roland McGrath  <roland@redhat.com>
8257         * sem_open.c (sem_open): Braino fix.
8259 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8261         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8262         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8263         __pthread_cleanup_pop functionality.
8264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8266         * descr.h (struct pthread): Move tid field to the front now that
8267         it is often used.
8269         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8270         (__lll_mutex_timedlock_wait): Remove.
8271         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8272         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8273         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8274         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8275         (lll_unlock_wake_cb): Don't save and restore %esi.
8276         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8277         %esi.
8278         (__lll_timedwait_tid): Add alignment.
8279         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8280         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8281         %esi.
8282         (__lll_timedwait_tid): Removed.
8283         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8284         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8285         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8286         (pthread_barrier_wait): Don't save, load, and restore %esi for
8287         last thread.
8288         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8289         (__pthread_cond_signal): Don't save, load, and restore %esi.
8290         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8291         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8292         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8293         Don't save, load, and restore %esi.
8295 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8298         Release lock before waking up the waiters.
8300         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8302         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8303         (reader_thread): Likewise.
8305         * sysdeps/pthread/pthread_rwlock_unlock.c
8306         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8307         to wake up readers if there are none.
8309         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8310         Release internal lock before wake threads.
8312 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8314         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8315         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8316         predefined.
8317         * tst-rwlock9.c: Likewise.
8318         * tst-rwlock10.c: New file.
8319         * tst-rwlock11.c: New file.
8321         * Makefile (tests): Add tst-dlsym1.
8322         * tst-dlsym1.c: New file.
8324         * init.c (__pthread_initialize_minimal_internal): Set
8325         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8326         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8328 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8330         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8332         * tst-cond2.c: Fix sychronization with child.
8334         * tst-rwlock8.c (reader_thread): Remove unused variable.
8336         * Makefile: Add rules to build and run tst-tls3.
8337         * tst-tls3.c: New file.
8338         * tst-tls3mod.c: New file.
8340         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8341         * tst-rwlock8.c: New file.
8342         * tst-rwlock9.c: New file.
8343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8344         complete broken rwlock implementation.
8345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8346         Likewise.
8347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8348         Likewise.
8349         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8350         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8351         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8352         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8353         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8354         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8355         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8357 2003-02-23  Roland McGrath  <roland@redhat.com>
8359         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8361 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8363         * Makefile (tests): Add tst-context1.
8364         * tst-context1.c: New file.
8366         * Makefile (tests): Add tst-tls1 and tst-tls2.
8367         * tst-tls1.c: New file.
8368         * tst-tls2.c: New file.
8370         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8371         for failed cmpxchg.
8373         * pthread_create.c (start_thread): Set EXITING_BIT early.
8375         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8376         (THREAD_GETMEM_NC): Likewise.
8378 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8380         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8381         off 3 more bytes by using offset-less instructions when possible.
8383         * Makefile: Add dependency for $(objpfx)version.d.
8385         * eintr.c (eintr_source): Add unnecessary return but the compiler
8386         insists.
8388         * tst-kill3.c: Include <unistd.h>.
8390 2003-02-21  Roland McGrath  <roland@redhat.com>
8392         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8394 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8396         * Makefile (tests): Add tst-eintr1.
8397         (distribute): Add eintr.c.
8398         * tst-eintr1.c: New file.
8399         * eintr.c: New file.
8401         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8403         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8404         Disallow sending SIGCANCEL.
8406         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8407         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8408         * tst-kill1.c: New file.
8409         * tst-kill2.c: New file.
8410         * tst-kill3.c: New file.
8411         * tst-kill5.c: New file.
8412         * tst-kill6.c: New file.
8413         * tst-basic7.c: Renamed to...
8414         * tst-kill4.c: ...this.
8416 2003-02-21  Roland McGrath  <roland@redhat.com>
8418         * Makefile (install-lib-ldscripts): New variable.
8420 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8422         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8423         * pthread_cancel.c: Use INVALID_TD_P.
8424         * pthread_detach.c: Likewise.
8425         * pthread_getschedparam.c: Likewise.
8426         * pthread_setschedparam.c: Likewise.
8427         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8428         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8429         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8430         * pthread_timedjoin.c: Likewise.
8432         * tst-basic7.c: Include <signal.h>.
8434         * pthread_join.c (pthread_join): Limited checking for invalid
8435         descriptors.
8436         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8438 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8440         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8441         beginning of the loop.  Clear the entire first block of TSD.
8442         * Makefile (tests): Add tst-key4.
8443         * tst-key4.c: New file.
8445 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8447         * Makefile (tests): Add tst-basic7.
8448         * tst-basic7.c: New file.
8450         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8451         Add some more __builtin_expect.
8453         * pthreadP.h: Define dummy version of DEBUGGING_P.
8455 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8457         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8458         _POSIX_THREAD_PRIORITY_SCHEDULING.
8459         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8460         _XOPEN_REALTIME_THREADS.
8461         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8463         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8464         kernel returns EINVAL for PID <= 0, work around it.
8466         * Makefile (tests): Add tst-signal5.
8467         * tst-signal5.c: New file.
8469         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8470         and LOGIN_NAME_MAX.
8472         * tst-cancel1.c (tf): Block all signals.
8474         * Makefile (tests): Add tst-basic6.
8475         * tst-basic6.c: New file.
8477         * tst-basic1.c: Add test for process ID.
8479         * Makefile (tests): Add tst-cancel10.
8480         * tst-cancel10.c: New file.
8482         * Makefile (tests): Add tst-signal4.
8483         * tst-signal4.c: New file.
8485         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8486         __sigismember instead of sigismember.  Add __builtin_expect.
8488 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8490         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8491         pthread_setcancelstate, and pthread_rwlock_setpshared.
8493         * tst-cancel7.c (do_test): Make sure the pid file exists before
8494         canceling the thread.
8496         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8497         pthread_rwlock_timedrdlock tests.
8498         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8499         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8500         Check for invalid tv_nsec field.
8501         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8502         Likewise.
8504         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8505         recursive mutex of overflow.
8507         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8509         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8510         going into an endless loop.
8511         * Makefile (tests): Add tst-cancel9.
8512         * tst-cancel9.c: New file.
8514         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8516 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8518         * tst-mutex5.c (do_test): Add more timedlock tests.
8520         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8521         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8523         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8524         use INLINE_SYSCALL.  Error number is returned, not -1.
8526         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8527         and __deallocate_stack with internal_function.
8528         * pthread_create.c: Adjust definitions appropriately.
8529         * allocatestack.c: Likewise.
8531         * pthread_join.c: Add one more __builtin_expect.
8532         * pthread_timedjoin.c: Likewise.
8534         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8535         not data of sequence number does not match.
8536         Add one __builtin_expect.
8538         * Makefile (tests): Add tst-clock1.
8539         * tst-clock1.c: New file.
8541         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8542         negative arguments.
8543         * Makefile (tests): Add tst-basic5.
8544         * tst-basic5.c: New file.
8546 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8548         * Makefile (tests): Add tst-basic4.
8549         * tst-basic4.c: New file.
8551         * pthreadP.h: Add declaraction for __nptl_nthreads.
8552         * pthread_create.c: Define __nptl_nthreads
8553         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8554         after thread is done.  If then zero, call exit(0).
8555         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8556         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8557         * init.c (pthread_functions): Initialize ptr_nthreads.
8558         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8559         (__reclaim_stacks): Decrement __nptl_nthreads.
8560         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8561         Define.
8562         * Makefile (tests): Add tst-basic3.
8563         * tst-basic3.c: New file.
8565         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8566         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8567         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8568         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8569         if asynchronous canceling is enabled.
8570         * pthread_join.c (pthread_join): When recognizing circular joins,
8571         take into account the other thread might be already canceled.
8572         * Makefile (tests): Add tst-join5.
8573         * tst-join5.c: New file.
8575         * Makefile (tests): Add tst-join4.
8576         * tst-join4.c: New file.
8578 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8580         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8582 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8584         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8585         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8586         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8587         warning.
8588         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8589         to avoid warning.
8590         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8591         error if lll_futex_wake failed.
8593 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8596         handling of cancellation and failung pthread_mutex_unlock call.
8597         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8598         * Makefile (tests): Add tst-cond8 and tst-cond9.
8599         * tst-cond8.c: New file.
8600         * tst-cond9.c: New file.
8602         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8604         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8605         non-standard initializers with __USE_GNU.
8607         * Makefile (tests): Add tst-cleanup3.
8608         * tst-cleanup3.c: New file.
8610 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8612         * Makefile (tests): Add tst-attr1 and tst-attr2.
8613         * tst-attr1.c: New file.
8614         * tst-attr2.c: New file.
8616         * Makefile: Add rules to build and run tst-atfork2 test.
8617         * tst-atfork2.c: New file.
8618         * tst-atfork2mod.c: New file.
8620         * sysdeps/unix/sysv/linux/unregister-atfork.c
8621         (__unregister_atfork): Free the memory allocated for the handlers
8622         after removing them from the lists.
8624         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8625         cleanup function.
8627         * tst-atfork1.c (do_test): Wait for the child we forked.
8628         Report error in child.
8630         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8632         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8634 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8636         * Makefile (tests): Add tst-cancel8.
8637         * tst-cancel8.c: New file.
8639         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8640         clearing of control variable.
8641         * Makefile (tests): Add tst-once3 and tst-once4.
8642         * tst-once3.c: New file.
8643         * tst-once4.c: New file.
8645 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8647         * sysdeps/sh/Makefile: New file.
8648         * sysdeps/sh/bits/atomic.h: New file.
8649         * sysdeps/sh/pthread_spin_init.c: New file.
8650         * sysdeps/sh/pthread_spin_lock.c: New file.
8651         * sysdeps/sh/pthread_spin_trylock.S: New file.
8652         * sysdeps/sh/pthread_spin_unlock.S: New file.
8653         * sysdeps/sh/pthreaddef.h: New file.
8654         * sysdeps/sh/tcb-offsets.sym: New file.
8655         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8656         * sysdeps/sh/tls.h: New file.
8657         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8658         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8659         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8660         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8661         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8662         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8663         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8664         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8665         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8666         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8667         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8668         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8669         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8670         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8671         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8672         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8673         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8674         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8675         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8676         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8679         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8680         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8682         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8683         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8684         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8685         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8686         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8688 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8690         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8691         according to POSIX.
8693         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8695 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8697         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8698         (TLS_GET_FS): New #define.
8699         (TLS_SET_FS): New #define.
8700         Correct value of __NR_set_thread_area.
8702         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8704 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8706         * Makefile (tests): Add tst-popen1.
8707         * tst-popen1.c: New file.
8709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8710         but inactive generalization.
8711         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8712         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8713         Minor optimization, remove one instruction.
8714         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8716 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8718         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8720 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8722         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8723         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8724         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8725         * sysdeps/pthread/pthread_cond_signal.c: New file.
8726         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8727         * sysdeps/pthread/pthread_cond_wait.c: New file.
8728         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8729         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8730         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8731         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8732         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8733         * sysdeps/s390/Makefile: New file.
8734         * sysdeps/s390/bits/atomic.h: New file.
8735         * sysdeps/s390/pthread_spin_init.c: New file.
8736         * sysdeps/s390/pthread_spin_lock.c: New file.
8737         * sysdeps/s390/pthread_spin_trylock.c: New file.
8738         * sysdeps/s390/pthread_spin_unlock.c: New file.
8739         * sysdeps/s390/pthreaddef.h: New file.
8740         * sysdeps/s390/tcb-offsets.sym: New file.
8741         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8742         * sysdeps/s390/tls.h: New file.
8743         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8744         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8745         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8746         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8747         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8748         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8749         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8750         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8751         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8752         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8753         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8754         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8755         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8756         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8757         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8758         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8759         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8760         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8761         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8762         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8763         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8764         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8765         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8767 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8769         * atomic.h: Add a couple more default implementations.
8770         (atomic_compare_and_exchange_acq): Use
8771         __arch_compare_and_exchange_32_acq in return value definition.  It
8772         always exists.
8773         (atomic_bit_set): Renamed from atomic_set_bit.
8774         Add missing atomic_ prefixes.
8776         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8777         thread library is available, use correct value to mark initialized
8778         once variable.
8780 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8782         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8783         __sysconf to determine pagesize.
8785         * pthread_create.c: Include <atomic.h>.
8786         * allocatestack.c (allocate_stack): Implement coloring of the
8787         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8788         size minus one.  Adjust users.
8789         * sysdeps/i386/i686/Makefile: New file.
8791 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8793         * allocatestack.c: Improve comment throughout the file.
8795         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8796         (__lll_lock_wait): Add branch prediction.
8797         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8798         (__lll_lock_wait): Likewise.
8799         (lll_unlock_wake_cb): Removed.
8801 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8803         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8804         _POSIX_THREAD_PRIORITY_SCHEDULING.
8806 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8808         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8809         Fix return type of ptr___pthread_getspecific.
8811 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8813         * Makefile (tests): Add tst-umask1.
8814         (tst-umask1-ARGS): Define.
8815         * tst-umask1.c: New file.
8817 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8819         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8820         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8821         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8822         pthread_rwlock_unlock.
8823         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8824         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8825         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8826         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8828         New file.
8829         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8830         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8831         New file.
8832         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8833         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8834         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8835         New file.
8836         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8837         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8838         New file.
8839         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8840         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8841         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8842         New file.
8843         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8844         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8845         New file.
8846         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8848         * Makefile (libpthread-routines): Remove lowlevelcond and
8849         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8850         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8851         and pthread_cond_broadcast.
8852         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8853         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8854         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8855         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8856         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8857         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8858         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8859         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8860         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8861         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8862         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8866         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8867         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8868         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8869         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8870         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8871         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8872         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8873         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8874         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8875         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8876         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8877         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8878         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8879         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8880         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8881         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8882         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8884         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8885         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8886         of the code is moved to ...
8887         * sysdeps/pthread/createthread.c: ...here.  New file.
8889 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8891         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8892         (__new_sem_post): Clear %eax before returning.
8893         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8895         * Makefile (tests): Add tst-cleanup2.
8896         * tst-cleanup2.c: New file.
8898         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8899         Interpret first parameter correctly.
8901 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8903         * Makefile (headers): Add bits/semaphore.h.
8905 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8907         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8908         if not SHARED.
8910 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8912         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8913         must be used and mapping failed.
8914         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8916         * Makefile (CFLAGS-pthread_self.os): Define this, not
8917         CFLAGS-pthread_self.c.
8919 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8921         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8922         lll_unlock_wake_cb.
8924         * Makefile (libpthread-routines): Add version.  Add rules to build
8925         version.os and banner.h.
8926         * version.c: New file.
8928 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8930         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8931         the alias unconditional.
8932         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8934 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8936         * Makefile (CFLAGS-pthread_self.c): New definition.
8938 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8940         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8941         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8942         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8943         * init.c (__pthread_initialize_minimal_internal): Likewise.
8945 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
8947         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
8949         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8950         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8951         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8952         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8953         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
8954         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
8956 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8958         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
8959         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
8960         * tst-cancel-wrappers.sh: Remove all exceptions.
8962 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
8964         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
8965         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
8967         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
8968         Use __libc_pthread_functions array if SHARED.
8970         * pthreadP.h: Move pthread_cond_2_0_t definition to...
8971         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
8973         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
8974         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
8975         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
8976         __libc_ptf_call instead of __libc_maybe_call.
8977         (PTF): New #define.
8978         (__libc_cleanup_region_start): Wrap function name with PTF call.
8979         (__libc_cleanup_region_end): Likewise.
8980         (__libc_cleanup_end): Likewise.
8982         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
8983         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
8984         * pthread_key_create.c: Add __pthread_key_create_internal alias.
8985         * pthreadP.h: Add prototypes.
8987         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
8988         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
8989         __pthread_rwlock_unlock aliases.
8990         * pthreadP.h: Add prototypes for new aliases.
8992         * pthreadP.h (struct pthead_functions): Moved to...
8993         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
8994         * init.c (pthread_functions): Add initializers for new elements.
8996         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
8997         __pthread_cleanup_pop_restore aliases.
8998         * pthreadP.h: Add prototypes.
9000         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9001         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9002         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9003         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9004         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9005         * pthreadP.h: Adjust prototypes and callers.
9007 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9009         * Makefile (tests): Add tst-cancel7.
9010         (tst-cancel7-ARGS): New variable.
9011         * tst-cancel7.c: New file.
9013         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9014         around gcc defficiencies.
9015         * old_pthread_cond_signal.c: Likewise.
9016         * old_pthread_cond_timedwait.c: Likewise.
9017         * old_pthread_cond_wait.c: Likewise.
9019         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9021 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9023         * Makefile (tests): Add tst-cond7.
9024         * tst-cond7.c: New file.
9026         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9027         (condvar_cleanup): Get condvar address from the right place.
9029         * atomic.h: Correct definitions of atomic_full_barrier,
9030         atomic_read_barrier, atomic_write_barrier.
9032         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9033         race-free.
9034         * old_pthread_cond_signal.c: Likewise.
9035         * old_pthread_cond_timedwait.c: Likewise.
9036         * old_pthread_cond_wait.c: Likewise.
9038 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9040         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9042 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9044         * pthreadP.h (pthread_cond_2_0_t): New type.
9045         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9046         Use new type for the 2.0 condvar function prototypes.
9047         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9048         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9049         parameter.
9050         * old_pthread_cond_destroy.c: Likewise.
9051         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9052         * old_pthread_cond_signal.c: Likewise.
9053         * old_pthread_cond_timedwait.c: Likewise.
9054         * old_pthread_cond_wait.c: Likewise.
9056         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9057         (__pthread_cond_wait): Don't save cancellation mode and seq value
9058         in same location.
9060         * herrno.c (__h_errno_location): Don't define as weak.
9062 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9064         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9065         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9066         and pthread_cond_wait.
9067         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9068         Renamed to...
9069         (__pthread_cond_broadcast_2_0): ... this.
9070         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9071         Renamed to...
9072         (__pthread_cond_destroy_2_0): ... this.
9073         * old_pthread_cond_init.c (__old_pthread_cond_init):
9074         Renamed to...
9075         (__pthread_cond_init_2_0): ... this.
9076         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9077         Renamed to...
9078         (__pthread_cond_signal_2_0): ... this.
9079         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9080         Renamed to...
9081         (__pthread_cond_wait_2_0): ... this.
9082         * pthread_cond_destroy.c: Include shlib-compat.h.
9083         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9084         * pthread_cond_init.c: Include shlib-compat.h.
9085         (pthread_cond_init): Change strong_alias into versioned_symbol.
9086         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9087         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9088         fields.
9089         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9090         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9091         __pthread_cond_wait_2_0): New prototypes.
9092         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9093         __old_pthread_cond_init, __old_pthread_cond_signal,
9094         __old_pthread_cond_wait): Removed.
9095         * init.c: Include shlib-compat.h.
9096         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9097         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9098         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9099         ptr___pthread_cond_*_2_0 fields.
9100         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9101         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9103         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9104         LIBC_SIGACTION was not yet defined.
9105         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9106         [!defined LIBC_SIGACTION] (__sigaction): New function and
9107         libc_hidden_weak.
9108         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9109         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9111 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9113         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9115 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9117         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9118         New, larger type definition.
9119         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9120         implementation.
9121         * Versions [libpthread]: Add definitions for new pthread_cond_*
9122         interfaces for version GLIBC_2.3.2.
9123         * pthread_cond_init.c: Update initialization for new type definition.
9124         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9125         pthread_cond_timedwait, pthread_cond_signal, and
9126         pthread_cond_broadcast.  Add old_pthread_cond_init,
9127         old_pthread_cond_destroy, old_pthread_cond_wait,
9128         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9129         old_pthread_cond_broadcast.
9130         * old_pthread_cond_broadcast.c: New file.
9131         * old_pthread_cond_destroy.c: New file.
9132         * old_pthread_cond_init.c: New file.
9133         * old_pthread_cond_signal.c: New file.
9134         * old_pthread_cond_timedwait.c: New file.
9135         * old_pthread_cond_wait.c: New file.
9136         * pthreadP.h: Add prototypes for the compatibility interfaces.
9138         * pthread_cond_destroy.c: Don't include <errno.h>.
9140 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9142         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9143         unnecessary zero offset when addressing MUTEX.
9145 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9147         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9148         __register_atfork.
9149         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9150         for __register_atfork.
9152 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9154         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9155         instead of ASSEMBLER test macro.
9157         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9158         __libc_current_sigrtmax): Add libc_hidden_def.
9160         * sysdeps/pthread/list.h: Remove assert.h include.
9162 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9164         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9165         __pthread_initialize_minimal_internal not
9166         __pthread_initialize_minimal.
9168 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9170         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9171         __pthread_initialize_minimal as hidden.
9173         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9174         constructor.
9176 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9178         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9179         $(common-objpfx)format.lds, include that into the output script.
9180         Fix comment.
9181         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9183 2002-12-28  Andreas Jaeger  <aj@suse.de>
9185         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9186         nsec resolution changes.
9187         (xstat64_conv): Likewise.
9188         (xstat32_conv): Likewise.
9189         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9190         struct kernel_stat.
9191         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9192         structs stat and stat64.
9193         * time/time.h (__timespec_defined): Define for __USE_MISC.
9194         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9196 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9198         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9199         argument.
9200         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9201         (pthread_exit): Use strong_alias to avoid warnings.
9202         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9203         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9204         ptr___pthread_attr_init_2_*.
9205         * init.c (pthread_functions): Adjust.
9207 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9209         * forward.c: Make all functions available by default again.  It
9210         caused too much trouble.
9212         * pt-siglongjmp.c: Removed.
9214 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9216         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9217         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9218         * sysdeps/i386/Makefile: New file.
9219         * sysdeps/i386/tcb-offsets.sym: New file.
9220         * sysdeps/pthread/tcb-offsets.h: New file.
9221         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9222         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9224         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9225         __register_atfork...
9226         (GLIBC_2.3.2): ...here.
9228 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9230         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9231         pthread_attr_setstackaddr with __attribute_deprecated__.
9233 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9235         * pt-system.c (system): Remove cancellation handling.
9236         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9237         cancellation routines.
9239 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9241         * descr.h: Include <dl-sysdep.h>.
9242         (struct pthread): Move header.data.list to the back of the struct.
9243         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9244         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9245         (SYSINFO_OFFSEET): Likewise.
9247 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9249         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9250         Define.
9251         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9252         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9253         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9254         (USE_DL_SYSINFO): Undef.
9256 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9258         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9259         $(common-objpfx)libc.so.
9260         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9261         it is bigger than pipe buffer size even on arches with bigger
9262         page size.
9263         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9265 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9267         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9268         correct errno access for case that USE___THREAD is not defined.
9270 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9272         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9273         Patch by Marijn Ros <marijn@mad.scientist.com>.
9275 2002-12-22  Roland McGrath  <roland@redhat.com>
9277         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9279 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9281         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9283 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9285         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9286         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9287         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9289         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9290         of int $0x80.
9291         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9292         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9293         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9294         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9295         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9296         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9297         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9298         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9300         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9301         sysenter.
9302         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9304         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9306         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9307         in new TCB.
9308         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9309         that sysinfo is properly initialized.
9310         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9311         to 1 only for ld.so.
9313         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9314         RTLD_CORRECT_DYNAMIC_WEAK.
9316 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9318         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9319         Use return 0 as 6th argument to FORWARD4.
9320         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9322 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9324         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9325         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9326         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9327         (INIT_SYSINFO): New #define.
9328         (TLS_TP_INIT): Use INIT_SYSINFO.
9329         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9330         At test to make sure SYSINFO_OFFSET value is correct.
9331         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9333 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9335         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9336         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9337         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9338         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9339         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9340         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9341         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9343 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9345         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9346         macro instead of using int $0x80 directly.
9348         * sysdeps/pthread/bits/stdio-lock.h: New file.
9349         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9350         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9351         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9352         * Makefile (routines): Add libc-lowlevelmutex.
9354         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9355         __i686.get_pc_thunk.dx.
9357 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9359         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9360         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9361         ($(objpfx)tst-cancel-wrappers.out): New rule.
9362         * tst-cancel-wrappers.sh: New test.
9363         * tst-locale1.c: Include signal.h.
9364         (uselocale): Test static linking of __libc_current_sigrt*.
9366 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9368         * Makefile (tests): Add tst-cancel6.
9369         * tst-cancel6.c: New file
9371 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9373         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9374         Define meaningfully for assembler as well.
9375         * pthreadP.h (struct pthread_functions): Remove
9376         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9377         and ptr_pthread_attr_init_2_1 fields.
9378         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9379         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9380         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9381         (FORWARD3): Define using FORWARD4.
9382         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9383         versions.
9384         * pt-system.c: Remove duplicate stdlib.h include.
9386 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9388         * sem_init.c: Define sem_init@GLIBC_2.0.
9389         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9390         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9392         * flockfile.c: Moved to...
9393         * sysdeps/pthread/flockfile.c: ...here.  New file.
9394         * funlockfile.c: Moved to...
9395         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9396         * ftrylockfile.c: Moved to...
9397         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9399 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9401         * libc-cancellation.c: Guard both function with
9402         #if !defined NOT_IN_libc.
9403         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9404         automatically provided pthread wrappers.
9405         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9406         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9407         nor in libpthread.
9408         * pt-open.c: Removed.
9409         * pt-fcntl.c: Removed.
9410         * pt-fsync.c: Removed.
9411         * pt-lseek.c: Removed.
9412         * pt-msgrcv.c: Removed.
9413         * pt-msgsnd.c: Removed.
9414         * pt-msync.c: Removed.
9415         * pt-nanosleep.c: Removed.
9416         * pt-open64.c: Removed.
9417         * pt-pause.c: Removed.
9418         * pt-pread.c: Removed.
9419         * pt-pread64.c: Removed.
9420         * pt-pwrite.c: Removed.
9421         * pt-pwrite64.c: Removed.
9422         * pt-read.c: Removed.
9423         * pt-recv.c: Removed.
9424         * pt-recvfrom.c: Removed.
9425         * pt-recvmsg.c: Removed.
9426         * pt-send.c: Removed.
9427         * pt-sendto.c: Removed.
9428         * pt-sigtimedwait.c: Removed.
9429         * pt-sigwait.c: Removed.
9430         * pt-wait.c: Removed.
9431         * pt-waitpid.c: Removed.
9432         * pt-write.c: Removed.
9433         * pt-accept.c: Removed.
9434         * pt-close.c: Removed.
9435         * pt-connect.c: Removed.
9436         * pt-lseek64.c: Removed.
9437         * pt-sendmsg.c: Removed.
9438         * pt-tcdrain.c: Removed.
9440 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9442         * init.c (__pthread_initialize_minimal_internal): Renamed from
9443         __pthread_initialize_minimal.  Make old name an alias.  This
9444         converts a normal relocation into a relative relocation.
9446         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9448         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9449         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9450         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9451         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9452         pt-sigwaitinfo, pt-waitid, and pt-writev.
9453         * pt-creat.c: Removed.
9454         * pt-poll.c: Removed.
9455         * pt-pselect.c: Removed.
9456         * pt-readv.c: Removed.
9457         * pt-select.c: Removed.
9458         * pt-sigpause.c: Removed.
9459         * pt-sigsuspend.c: Removed.
9460         * pt-sigwaitinfo.c: Removed.
9461         * pt-waitid.c: Removed.
9462         * pt-writev.c: Removed.
9464         * init.c (pthread_functions): New variable.
9465         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9466         (or NULL) to __libc_pthread_init.
9467         * forward.c: Rewrite to use __libc:pthread_functions array to get
9468         function addresses.
9469         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9470         prototype.
9471         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9472         Take new parameter.  Copy content of variable pointed to by it
9473         to __libc_pthread_init.
9475         * pthreadP.h (struct pthread_functions): New type.
9476         (__libc_pthread_init): Declare.
9478         * pthread_attr_destroy.c: Add namespace protected alias.
9479         * pthread_attr_getdetachstate.c: Likewise.
9480         * pthread_attr_getinheritsched.c: Likewise.
9481         * pthread_attr_getschedparam.c: Likewise.
9482         * pthread_attr_getschedpolicy.c: Likewise.
9483         * pthread_attr_getscope.c: Likewise.
9484         * pthread_attr_setdetachstate.c: Likewise.
9485         * pthread_attr_setinheritsched.c: Likewise.
9486         * pthread_attr_setschedparam.c: Likewise.
9487         * pthread_attr_setschedpolicy.c: Likewise.
9488         * pthread_attr_setscope.c: Likewise.
9489         * pthread_cond_broadcast.c: Likewise.
9490         * pthread_cond_destroy.c: Likewise.
9491         * pthread_cond_init.c: Likewise.
9492         * pthread_cond_signal.c: Likewise.
9493         * pthread_cond_wait.c: Likewise.
9494         * pthread_condattr_destroy.c: Likewise.
9495         * pthread_condattr_init.c: Likewise.
9496         * pthread_equal.c: Likewise.
9497         * pthread_exit.c: Likewise.
9498         * pthread_getschedparam.c: Likewise.
9499         * pthread_self.c: Likewise.
9500         * pthread_setcancelstate.c: Likewise.
9501         * pthread_setschedparam.c: Likewise.
9502         * pthread_mutex_destroy.c: Likewise.
9503         * pthread_mutex_init.c: Likewise.
9504         * pthreadP.h: Add prototypes for the aliases.
9506         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9507         multiple_threads member in correct TCB to 1.
9509         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9510         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9511         member of thread decriptor, otherwise return unconditionally 1.
9513 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9515         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9516         regular Linux version.  Remove file.
9517         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9518         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9519         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9520         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9521         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9522         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9523         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9524         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9525         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9526         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9527         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9528         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9529         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9530         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9531         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9532         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9533         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9534         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9535         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9536         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9537         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9538         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9539         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9540         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9541         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9542         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9543         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9544         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9545         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9546         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9548 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9550         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9551         * sysdeps/unix/sysv/linux/open.c: Removed.
9552         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9553         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9554         * sysdeps/unix/sysv/linux/msync.c: Removed.
9555         * sysdeps/unix/sysv/linux/read.c: Removed.
9556         * sysdeps/unix/sysv/linux/close.c: Removed.
9557         * sysdeps/unix/sysv/linux/creat.c: Removed.
9558         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9559         * sysdeps/unix/sysv/linux/pause.c: Removed.
9560         * sysdeps/unix/sysv/linux/select.c: Removed.
9561         * sysdeps/unix/sysv/linux/write.c: Removed.
9563 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9565         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9566         element in TCB to see whether locking is needed.
9568         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9569         MULTIPLE_THREADS_OFFSET value is correct.
9571         * sysdeps/unix/sysv/linux/close.c: New file.
9572         * sysdeps/unix/sysv/linux/connect.S: New file.
9573         * sysdeps/unix/sysv/linux/creat.c: New file.
9574         * sysdeps/unix/sysv/linux/fsync.c: New file.
9575         * sysdeps/unix/sysv/linux/llseek.c: New file.
9576         * sysdeps/unix/sysv/linux/lseek.c: New file.
9577         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9578         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9579         * sysdeps/unix/sysv/linux/msync.c: New file.
9580         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9581         * sysdeps/unix/sysv/linux/open.c: New file.
9582         * sysdeps/unix/sysv/linux/open64.c: New file.
9583         * sysdeps/unix/sysv/linux/pause.c: New file.
9584         * sysdeps/unix/sysv/linux/poll.c: New file.
9585         * sysdeps/unix/sysv/linux/pread.c: New file.
9586         * sysdeps/unix/sysv/linux/pread64.c: New file.
9587         * sysdeps/unix/sysv/linux/pselect.c: New file.
9588         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9589         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9590         * sysdeps/unix/sysv/linux/readv.c: New file.
9591         * sysdeps/unix/sysv/linux/recv.S: New file.
9592         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9593         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9594         * sysdeps/unix/sysv/linux/select.c: New file.
9595         * sysdeps/unix/sysv/linux/send.S: New file.
9596         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9597         * sysdeps/unix/sysv/linux/sendto.S: New file.
9598         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9599         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9600         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9601         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9602         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9603         * sysdeps/unix/sysv/linux/system.c: New file.
9604         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9605         * sysdeps/unix/sysv/linux/wait.c: New file.
9606         * sysdeps/unix/sysv/linux/waitid.c: New file.
9607         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9608         * sysdeps/unix/sysv/linux/writev.c: New file.
9609         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9611         * pt-readv.c: Fix comment.
9613 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9615         * tst-cleanup1.c: Include stdlib.h.
9617         * tst-cancel5.c: New test.
9618         * Makefile (tests): Add tst-cancel5.
9619         (tst-cancel5): Link against libc.so libpthread.so in that order.
9621 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9623         * forward.c (test_loaded): Prevent recursive calls.
9625         * Makefile (routines): Add libc-cancellation.
9626         * libc-cancellation.c: New file.
9627         * descr.h (struct pthread): Add multiple_threads field.
9628         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9629         new thread descriptor to 1.
9630         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9631         Initialize multiple_thread field after successful thread creation.
9632         * cancellation.c (__do_cancel): Move to pthreadP.h.
9633         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9634         (__pthread_disable_asynccancel): Add internal_function attribute.
9635         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9636         * pthread_setcancelstate.c: Likewise.
9637         * pthread_setcanceltype.c: Likewise.
9638         * pthread_exit.c: Likewise.
9639         * pthreadP.h (CANCELLATION_P): Likewise.
9640         (__do_cancel): Define as static inline.
9641         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9642         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9643         declarations.
9644         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9645         fields.  Define MULTIPLE_THREADS_OFFSET.
9646         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9647         declaration.
9648         * sysdeps/unix/sysv/linux/accept.S: New file.
9649         * sysdeps/unix/sysv/linux/read.c: New file.
9650         * sysdeps/unix/sysv/linux/write.c: New file.
9651         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9652         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9653         initialization of __libc_locking_needed.
9654         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9655         __libc_locking_needed, use multiple_threads field in TCB.
9656         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9658 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9660         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9661         version.
9662         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9664         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9665         access to __libc_locking_needed for PIC.
9667 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9669         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9670         declare for libc.so.
9671         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9672         expression.
9673         (__libc_lock_lock): Put into statement expression.
9674         (__libc_lock_unlock): Remove trailing semicolon.
9675         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9677 2002-12-12  Roland McGrath  <roland@redhat.com>
9679         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9680         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9682 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9684         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9685         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9686         Initialize __libc_locking_needed.
9687         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9688         instead of __register_pthread_fork_handler.
9689         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9690         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9691         fork-gen with libc_pthread_init.
9692         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9693         of __register_pthread_fork_handler.
9694         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9695         of __register_pthread_fork_handler.
9696         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9697         __libc_locking_needed to determine whether lock prefix can be avoided.
9698         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9700 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9702         * Makefile (tests): Add tst-cleanup1.
9703         * tst-cleanup1.c: New file.
9704         * cancellation.c (__cleanup_thread): Removed.
9705         (__do_cancel): Remove call to __cleanup_thread.
9706         * pthreadP.h: Remove __cleanup_thread prorotype.
9708         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9709         Remember function and argument even if cancellation handler
9710         function is not available.
9711         (__libc_cleanup_region_end): Execute registered function directly if
9712         pthread functions are not available.
9713         (__libc_cleanup_end): Likewise.
9715         * init.c (__pthread_initialize_minimal): Fix initialization in
9716         static lib by preventing gcc from being too clever.
9718 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9720         * init.c (__pthread_initialize_minimal): Remove unneccesary
9721         sigaddset call.
9723         * Makefile (tests): We can run tst-locale2 now.
9725 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9727         * Versions: Remove duplicated sigwait entry.
9729 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9731         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9732         inside libpthread.
9734         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9736         * pthreadP.h: Declare __pthread_enable_asynccancel and
9737         __pthread_disable_asynccancel.
9738         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9739         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9740         * cancellation.c (__pthread_enable_asynccancel): New function.
9741         (__pthread_disable_asynccancel): New function.
9742         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9743         * pt-close.c: Likewise.
9744         * pt-connect.c: Likewise.
9745         * pt-creat.c: Likewise.
9746         * pt-fcntl.c: Likewise.
9747         * pt-fsync.c: Likewise.
9748         * pt-lseek.c: Likewise.
9749         * pt-lseek64.c: Likewise.
9750         * pt-msgrcv.c: Likewise.
9751         * pt-msgsnd.c: Likewise.
9752         * pt-msync.c: Likewise.
9753         * pt-nanosleep.c: Likewise.
9754         * pt-open.c: Likewise.
9755         * pt-open64.c: Likewise.
9756         * pt-pause.c: Likewise.
9757         * pt-poll.c: Likewise.
9758         * pt-pread.c: Likewise.
9759         * pt-pread64.c: Likewise.
9760         * pt-pselect.c: Likewise.
9761         * pt-pwrite.c: Likewise.
9762         * pt-pwrite64.c: Likewise.
9763         * pt-read.c: Likewise.
9764         * pt-readv.c: Likewise.
9765         * pt-recv.c: Likewise.
9766         * pt-recvfrom.c: Likewise.
9767         * pt-recvmsg.c: Likewise.
9768         * pt-select.c: Likewise.
9769         * pt-send.c: Likewise.
9770         * pt-sendmsg.c: Likewise.
9771         * pt-sendto.c: Likewise.
9772         * pt-sigpause.c: Likewise.
9773         * pt-sigsuspend.c: Likewise.
9774         * pt-sigtimedwait.c: Likewise.
9775         * pt-sigwait.c: Likewise.
9776         * pt-sigwaitinfo.c: Likewise.
9777         * pt-system.c: Likewise.
9778         * pt-tcdrain.c: Likewise.
9779         * pt-wait.c: Likewise.
9780         * pt-waitid.c: Likewise.
9781         * pt-waitpid.c: Likewise.
9782         * pt-write.c: Likewise.
9783         * pt-writev.c: Likewise.
9784         * pthread_join.c: Likewise.
9785         * pthread_timedjoin.c: Likewise.
9787         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9788         (__xpg_sigpause): New function.
9789         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9791 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9793         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9795         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9796         _GI_pthread_cleanup_pop to pthreadP.h.
9798         * ftrylockfile.c: Use _IO_lock_trylock instead of
9799         pthread_mutex_trylock.
9801         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9802         (CANCEL_RESET): Likewise.
9803         (__pthread_setcanceltype_): Declare.
9804         (__pthread_mutex_lock_internal): Declare.
9805         (__pthread_mutex_unlock_internal): Declare.
9806         (__pthread_once_internal): Declare.
9807         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9808         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9810         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9811         and pthread_mutex_unlock.
9812         * pthread_cond_wait.c: Likewise.
9813         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9814         * pthread_mutex_unlock.c: Likewise.
9816         * pthread_setcanceltype.c: Add additional alias
9817         __pthread_setcanceltype.
9819         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9820         * sem_open.c (sem_open): Likewise.
9821         Use __libc_open, __libc_write, and __libc_close instead of
9822         open, write, and close respectively.
9824         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9825         Rewrite as statement expression since it must return a value.
9827         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9828         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9829         __pthread_kill.
9831         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9832         alias __pthread_once_internal.
9834         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9836 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9838         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9839         * tst-stdio1.c: New file.
9840         * tst-stdio2.c: New file.
9842         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9844         * Makefile (tests): Comment out tst-locale2 for now.
9845         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9847         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9848         -D_IO_MTSAFE_IO.
9849         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9850         Use _IO_lock_init instead of explicit assignment.
9852         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9853         Define __libc_lock_* and __libc_lock_recursive macros with
9854         lowlevellock macros, not pthread mutexes.
9856         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9857         of pthread_mutex_lock.
9858         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9859         instead of pthread_mutex_unlock.
9861 2002-12-06  Roland McGrath  <roland@redhat.com>
9863         * allocatestack.c (__stack_user): Use uninitialized defn.
9864         * init.c (__pthread_initialize_minimal): Initialize it here.
9866 2002-12-05  Roland McGrath  <roland@redhat.com>
9868         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9869         string.
9870         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9872         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9873         missing & here too.
9875 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9877         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9878         lowlevellock.
9879         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9880         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9881         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9882         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9883         for __libc_lock_* macros.
9884         * Makefile (routines): Add libc-lowlevellock.
9886 2002-10-09  Roland McGrath  <roland@redhat.com>
9888         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9889         Under [__PIC__], call the function via the pointer fetched for
9890         comparison rather than a call by name that uses the PLT.
9891         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9892         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9893         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9894         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9895         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9897 2002-12-04  Roland McGrath  <roland@redhat.com>
9899         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9901         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9902         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9904         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9906 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9908         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9909         a completely opaque, non-integer type.
9910         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9912 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9914         * sysdeps/i386/tls.h: Include stdlib.h.
9915         * sysdeps/x86_64/tls.h: Likewise.
9917 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9919         * Makefile (tests): Add tst-locale2.
9920         (tests-static): Likewise.
9921         * tst-locale2.c: New file.
9923         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9924         volatile and add memory clobbers to lock operations.
9926 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9928         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9929         * sysdeps/i386/i486/bits/atomic.h: New file.
9930         * sysdeps/i386/i586/bits/atomic.h: New file.
9931         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9932         include i486 version.
9933         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9934         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9935         Patch by Marijn Ros <marijn@mad.scientist.com>.
9937         * allocatestack.c (get_cached_stack): Don't crash if we first
9938         found a stack with a larger size then needed.
9939         Reported by Hui Huang <hui.huang@sun.com>.
9941         * Makefile (tests): Add tst-sysconf.
9942         * tst-sysconf.c: New file.
9944         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
9945         PTHREAD_THREADS_MAX.
9947 2002-12-02  Roland McGrath  <roland@redhat.com>
9949         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
9950         Declare using hidden_proto instead of attribute_hidden, so there are
9951         non-.hidden static symbols for gdb to find.
9952         (__pthread_keys): Likewise.
9953         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
9954         * allocatestack.c (__stack_user): Likewise.
9955         * pthread_create.c (__pthread_keys): Likewise.
9956         (__nptl_threads_events, __nptl_last_event): Make these static instead
9957         of hidden.
9958         * pthread_key_create.c (__pthread_pthread_keys_max,
9959         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
9961 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
9963         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
9964         statically.
9965         * tst-locale1.c: New file.
9967         * pthread_cond_timedwait.c: Include <stdlib.h>.
9969         * Makefile (tests): Add tst-fork2 and tst-fork3.
9970         * tst-fork2.c: New file.
9971         * tst-fork3.c: New file.
9973 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
9975         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
9977         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
9978         require it to 200112L.
9980         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
9981         instruction only if HAVE_CMOV is defined.
9982         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
9984         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
9986         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
9988         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
9990         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
9992 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
9994         * sysdeps/x86_64/bits/atomic.h: New file.
9996         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
9997         16-bit operations.
9999         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10000         possible since gettid cannot fail.
10002         * sysdeps/x86_64/pthreaddef.h: New file.
10004         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10006         * sysdeps/x86_64/pthread_spin_init.c: New file.
10007         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10008         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10009         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10011         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10012         Add missing lock prefix.  Minute optimization.
10014         * tst-spin2.c (main): Also check successful trylock call.
10016         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10017         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10019         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10020         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10022         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10023         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10024         value in case of an error.  Add support for INTERNAL_SYSCALL.
10026         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10027         value in case of an error.
10029         * sysdeps/x86_64/tls.h: New file.
10031 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10033         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10034         takes the array member name and the index as parameters.
10035         (THREAD_SETMEM_NC): Likewise.
10036         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10037         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10038         interfaces.
10040         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10041         to decide which code to use.
10042         (THREAD_SETMEM_NC): Likewise.
10044         * allocatestack.c (queue_stack): Don't remove stack from list here.
10045         Do it in the caller.  Correct condition to prematurely terminate
10046         loop to free stacks.
10047         (__deallocate_stack): Remove stack from list here.
10049 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10051         * Makefile (tests): Add tst-stack1.
10052         * tst-stack1.c: New file.
10054         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10055         provided stack.
10057         * pthread_attr_getstack.c: Return bottom of the thread area.
10059 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10061         * Makefile (libpthread-routines): Add pt-allocrtsig and
10062         pthread_kill_other_threads.
10063         * pt-allocrtsig.c: New file.
10064         * pthread_kill_other_threads.c: New file.
10065         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10066         all three functions.
10067         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10068         allocrtsig.
10069         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10070         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10071         and __libc_allocate_rtsig_private.
10072         * Versions (libpthread): Export pthread_kill_other_threads_np,
10073         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10075 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10077         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10078         the end of the stack.  Adjust computations.
10079         When mprotect call fails dequeue stack and free it.
10080         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10081         attribute.
10082         * pthread_getattr_np.c: Likewise.
10084         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10085         surprises.
10087 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10089         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10090         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10092 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10094         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10095         * pthread_setspecific.c: Likewise.
10097 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10099         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10100         definitions.  Get them from the official place.
10101         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10103         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10104         Use new CLONE_ flags in clone() calls.
10106         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10107         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10109         * Versions: Add pthread_* functions for libc.
10110         * forward.c: New file.
10112         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10113         errno-loc.
10114         * herrno.c: New file.
10115         * res.c: New file.
10117         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10118         sem_trywait, and sem_timedwait.  Add herrno and res.
10119         * sem_init.c: Don't initialize lock and waiters members.
10120         * sem_open.c: Likewise.
10121         * sem_post.c: Removed.
10122         * sem_wait.c: Removed.
10123         * sem_trywait.c: Removed.
10124         * sem_timedwait.c: Removed.
10125         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10126         Includes full implementations of sem_post, sem_wait, sem_trywait,
10127         and sem_timedwait.
10128         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10129         for new implementation.
10130         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10131         and waiters fields.
10133         * tst-sem3.c: Improve error message.
10134         * tst-signal3.c: Likewise.
10136         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10137         to tell the kernel about the termination futex and to initialize tid
10138         member.  Don't initialize main_thread.
10139         * descr.h (struct pthread): Remove main_thread member.
10140         * cancelllation.c (__do_cancel): Remove code handling main thread.
10141         The main thread is not special anymore.
10143         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10144         size of the stacks to stack_cache_actsize.
10146         * pt-readv.c: Add missing "defined".
10147         * pt-sigwait.c: Likewise.
10148         * pt-writev.c: Likewise.
10150 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10152         * Versions: Export __connect from libpthread.
10153         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10155         * Makefile (libpthread-routines): Add pt-raise.
10156         * sysdeps/unix/sysv/linux/raise.c: New file.
10157         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10158         * sysdeps/generic/pt-raise.c: New file.
10160         * pthread_cond_init.c: Initialize all data elements of the condvar
10161         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10163         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10164         * pthread_create.c: Likewise.
10166         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10167         * tst-key1.c: New file.
10168         * tst-key2.c: New file.
10169         * tst-key3.c: New file.
10171         * Versions: Export pthread_detach for version GLIBC_2.0.
10172         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10174 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10176         * pthread_key_create.c: Terminate search after an unused key was found.
10177         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10179         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10180         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10182 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10184         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10185         dynamic lookup for errno in PIC.
10187         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10188         release the stack lock as soon as possible.
10189         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10190         the static TLS block.
10191         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10193         * cancellation.c: Renamed from cancelation.c.
10194         * Makefile: Adjust accordingly.
10195         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10196         * cleanup_defer.c: Use CANCELLATION_P.
10197         * pthread_testcancel.c: Likewise.
10198         * descr.h: Fix spelling in comments.
10199         * init.c: Likewise.
10200         * pthread_getattr_np.c: Likewise.
10201         * pthread_getschedparam.c: Likewise.
10202         * pthread_setschedparam.c: Likewise.
10203         * Versions: Likewise.
10205         * pt-pselect.c: New file.
10206         * Makefile (libpthread-routines): Add pt-pselect.
10207         * Versions: Add pselect.
10209         * tst-cancel4.c: New file.
10210         * Makefile (tests): Add tst-cancel4.
10212 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10214         * pthread_mutex_lock.c: Always record lock ownership.
10215         * pthread_mutex_timedlock.c: Likewise.
10216         * pthread_mutex_trylock.c: Likewise.
10218         * pt-readv.c: New file.
10219         * pt-writev.c: New file.
10220         * pt-creat.c: New file.
10221         * pt-msgrcv.c: New file.
10222         * pt-msgsnd.c: New file.
10223         * pt-poll.c: New file.
10224         * pt-select.c: New file.
10225         * pt-sigpause.c: New file.
10226         * pt-sigsuspend.c: New file.
10227         * pt-sigwait.c: New file.
10228         * pt-sigwaitinfo.c: New file.
10229         * pt-waitid.c: New file.
10230         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10231         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10232         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10233         * Versions: Add all the new functions.
10235         * tst-exit1.c: New file.
10236         * Makefile (tests): Add tst-exit1.
10238         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10240 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10242         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10244         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10245         call.  pthread_join is an official cancellation point.
10246         * pthread_timedjoin.c: Likewise.
10248         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10249         and the condvar's mutex are retrieved.
10250         * pthread_cond_timedwait.c: Likewise.
10251         Reported by dice@saros.East.Sun.COM.
10253 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10255         * pthreadP.h: Cut out all type definitions and move them...
10256         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10257         * pthreadP.h: Include <internaltypes.h>.
10259         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10260         performance tweaks.
10262         * sem_trywait.c: Shuffle #includes around to get right order.
10263         * sem_timedwait.c: Likewise.
10264         * sem_post.c: Likewise.
10265         * sem_wait.c: Likewise.
10267         * nptl 0.3 released.
10269         * Makefile (tests): Add tst-signal3.
10270         * tst-signal3.c: New file.
10272 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10274         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10275         the asms modify the sem object.
10276         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10278         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10279         the actual members.
10280         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10281         * semaphoreP.h: Include pthreadP.h.
10282         * sem_getvalue.c: Adjust to sem_t change.
10283         * sem_init.c: Likewise.
10284         * sem_open.c: Likewise.
10285         * sem_post.c: Likewise.
10286         * sem_timedwait.c: Likewise.
10287         * sem_trywait.c: Likewise.
10288         * sem_wait.c: Likewise.
10290 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10292         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10293         * tst-basic2.c: New file.
10294         * tst-exec1.c: New file.
10295         * tst-exec2.c: New file.
10296         * tst-exec3.c: New file.
10298         * tst-fork1.c: Remove extra */.
10300         * nptl 0.2 released.  The API for IA-32 is complete.