* sysdeps/i386/fpu/ftestexcept.c (fetestexcept): Use short for fnstsw.
[glibc.git] / nptl / ChangeLog
blobb1f89484ddf35c27f36d5899174e1ac31a32fc95
1 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
5 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
8         a scratch register.
9         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
10         (__lll_lock_wait_private): Fix typo.
11         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
12         (pthread_barrier_wait): Likewise.  Adjust XADD use.
13         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
14         Adjust XADD use.
15         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
16         (pthread_rwlock_timedrdlock): Return correct return value.
17         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
18         (pthread_rwlock_timedwrlock): Likewise.  
20 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
22         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
23         thread returns the program exits with an error code.
25 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
27         * pthread-errnos.sym: Add EOVERFLOW.
28         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
29         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
30         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
31         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
33 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
35         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
36         parameter.  Passed it as permission to mmap.
37         * allocatestack.c (allocate_stack): Pass prot as second parameter
38         to ARCH_RETRY_MMAP.
40 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
42         * tst-basic7.c: Allocate memory for the stack.
44         [BZ #5465]
45         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
46         (__pthread_cond_timedwait): Don't use VDSO.
47         Patch by Michal Januszewski.
49 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
51         [BZ #5455]
52         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
53         Allow label before pthread_cleanup_pop.
54         (pthread_cleanup_pop_restore_np): Likewise.
56 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
58         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
59         Store 2 before returning ETIMEDOUT.
61 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
63         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
64         Store 2 before returning ETIMEDOUT.
65         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
66         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
67         (__lll_lock_wait_private): Optimize.
68         (__lll_lock_wait): Likewise.
70 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
72         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
73         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
74         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
76 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
78         [BZ #5240]
79         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
80         If we time out, try one last time to lock the futex to avoid
81         losing a wakeup signal.
82         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
83         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
85         [BZ #5245]
86         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
87         if necessary.
89 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
91         [BZ #5245]
92         * allocatestack.c (allocate_stack): Change ENOMEM error in case
93         mmap failed to EAGAIN.
94         * Makefile (tests): Add tst-basic7.
95         * tst-basic7.c: New file.
97 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
99         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
100         Use __linkin_atfork.
102 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
104         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
105         missing line continuations.
106         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
107         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
109 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
111         [BZ #5220]
112         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
113         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
114         (struct timer): Add next element.
115         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
116         enqueue timer structure into __active_timer_sigev_thread list.
117         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
118         remove timer struct from __active_timer_sigev_thread.
119         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
120         Before using timer structure make sure it is still on the
121         __active_timer_sigev_thread list.  Keep lock until done.
122         Define __active_timer_sigev_thread and
123         __active_timer_sigev_thread_lock.
125 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
127         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
128         Redefine thread_atfork for use of ATFORK_MEM.
129         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
130         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
131         function.
132         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
133         Use atomic operation when removing first element of list.
135 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
137         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
138         routine instead of an alias to __new_sem_post.
140 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
142         * init.c (__pthread_initialize_minimal): Initialize word to appease
143         valgrind.
145 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
147         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
148         libc.so just clear NAME.
149         (__libc_rwlock_fini): Nop inside of libc.so.
150         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
151         all zeros.
153 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
156         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
157         unlocking failed.
158         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
160 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
162         [BZ #4938]
163         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
164         reclaimed stack if necessary.
165         * Makefile (tests): Add tst-tsd6.
166         * tst-tsd6.c: New file.
168 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
170         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
171         Add private argument.
173 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
175         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
176         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
178 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
180         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
181         (__lll_robust_timedlock): Pass private as last argument to
182         __lll_robust_timedlock_wait.
183         (__lll_unlock): Fix a pasto.
185 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
187         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
188         sparc_old_sem): New structs.
189         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
190         (__sem_wait_cleanup): New function.
191         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
192         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
193         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
194         lll_futex_wait.
195         (__old_sem_wait): New function.
196         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
197         nptl/sysdeps/unix/sysv/linux/sparc version.
198         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
199         Likewise.
200         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
201         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
202         (__new_sem_trywait): Use sparc_old_sem structure.
203         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
204         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
205         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
206         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
207         lll_futex_timed_wait.
208         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
209         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
210         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
211         lll_futex_wake.
212         (__old_sem_post): New function.
213         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
214         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
215         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
216         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
217         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
218         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
220 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
222         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
223         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
224         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
225         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
226         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
227         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
228         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
229         Use FUTEX_WAKE_OP.
230         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
231         kernel-features.h and tcb-offsets.h.
232         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
233         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
234         process private.
235         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
236         tcb-offsets.h.
237         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
238         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
239         process private.
240         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
241         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
242         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
243         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
245         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
248 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
250         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
251         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
252         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
253         lll_futex_timed_wait.
255         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
256         __lll_robust_unlock): Rewrite as macros instead of inline functions.
257         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
258         __lll_robust_unlock, __lll_wait_tid): Likewise.
260 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
262         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
263         Fix a pasto.
264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
265         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
266         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
267         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
269         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
270         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
272         kernel-features.h.
273         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
274         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
275         process private.  Switch DW_CFA_advance_loc1 and some
276         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
277         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
278         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
279         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
280         process private.  Switch DW_CFA_advance_loc{1,2} and some
281         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
282         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
283         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
284         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
285         Likewise.
286         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
287         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
288         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
289         Likewise.
290         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
291         (__pthread_cond_broadcast): Compare %r8 instead of
292         dep_mutex-cond_*(%rdi) with $-1.
293         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
294         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
295         of oring.
297 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
299         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
301 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
303         * allocatestack.c: Include kernel-features.h.
304         * pthread_create.c: Likewise.
305         * pthread_mutex_init.c: Likewise.
306         * init.c: Likewise.
307         * pthread_cond_timedwait.c: Likewise.
308         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
309         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
311         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
312         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
314         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
315         Likewise.
316         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
317         Likewise.
318         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
319         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
320         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
321         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
323 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
325         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
326         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
327         byte elements.  One of them is the new __shared element.
328         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
329         adjust names of other padding elements.
330         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
331         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
332         byte elements.  One of them is the new __shared element.
333         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
334         adjust names of other padding elements.
335         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
336         Renamed __pad1 element to __shared, adjust names of other padding
337         elements.
338         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
339         (pthread_rwlock_t): Likewise.
340         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
341         typo.
343 2007-08-09  Anton Blanchard  <anton@samba.org>
345         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
347 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
349         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
350         <kernel-features.h>.
351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
353 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
355         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
356         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
357         dealing with robust mutexes.
358         * pthread_mutex_timedlock.c: Likewise.
359         * pthread_mutex_trylock.c: Likewise.
360         * pthread_mutex_unlock.c: Likewise.
361         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
363 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
365         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
366         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
367         (PTHREAD_MUTEX_PSHARED): Define.
368         * pthread_mutex_init.c (__pthread_mutex_init): Set
369         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
370         mutexes.
371         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
372         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
373         as second argument to lll_lock.
374         (LLL_MUTEX_TRYLOCK): Take mutex as argument
375         instead of its __data.__lock field.
376         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
377         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
378         to lll_robust_lock.
379         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
380         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
381         instead of mutex->__data.__kind directly, pass
382         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
383         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
384         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
385         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
386         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
387         to lll_timedlock, lll_robust_timedlock, lll_unlock and
388         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
389         of mutex->__data.__kind directly.
390         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
391         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
392         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
393         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
394         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
395         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
396         and lll_futex_wake.
397         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
398         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
399         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
400         directly.
401         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
402         Take mutex as argument instead of its __data.__lock field, pass
403         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
404         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
405         __data.__lock field.
406         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
407         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
408         to lll_robust_cond_lock.
409         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
410         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
411         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
412         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
413         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
414         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
415         lll_futex_wait.
416         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
417         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
418         lll_futex_wake.
419         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
420         pshared variable, pass it to lll_lock, lll_unlock,
421         lll_futex_timedwait and lll_futex_wake.
422         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
423         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
424         and lll_futex_wake.
425         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
426         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
427         macro.
428         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
429         lll_futex_wake_unlock): Likewise.
430         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
431         Likewise.
432         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
433         lll_futex_wake_unlock): Likewise.
434         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
435         Likewise.
436         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
437         lll_futex_wake_unlock): Likewise.
438         (lll_futex_wake): Fix a typo.
439         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
440         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
441         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
442         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
443         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
445         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
446         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
447         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
448         (__pthread_cond_timedwait): Likewise.
449         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
450         (__condvar_cleanup, __pthread_cond_wait): Likewise.
452 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
454         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
455         Don't use CGOTSETUP and CGOTRESTORE macros.
456         (CGOTSETUP, CGOTRESTORE): Remove.
457         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
458         @local symbol.
460 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
462         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
463         definitions for private futexes.
464         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
465         kernel-features.h and lowlevellock.h.  Use private futexes if
466         they are available.
467         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
468         (__lll_mutex_lock_wait): Rename to
469         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
470         (__lll_mutex_timedlock_wait): Rename to ...
471         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
472         Don't compile in for libc.so.
473         (__lll_mutex_unlock_wake): Rename to ...
474         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
475         (__lll_timedwait_tid): Use __NR_gettimeofday.
476         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
477         the header from assembler.  Renamed all lll_mutex_* resp.
478         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
479         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
480         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
481         Define.
482         (__lll_lock_wait_private): Add prototype.
483         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
484         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
485         __lll_unlock_wake): Likewise.
486         (lll_lock): Add private argument.  Call __lll_lock_wait_private
487         if private is constant LLL_PRIVATE.
488         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
489         lll_timedlock, lll_robust_timedlock): Add private argument.
490         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
491         if private is constant LLL_PRIVATE.
492         (lll_robust_unlock, lll_robust_dead): Add private argument.
493         (lll_lock_t): Remove.
494         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
495         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
496         lll_cond_wake, lll_cond_broadcast): Remove.
497         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
498         kernel-features.h and lowlevellock.h.
499         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
500         (LOAD_FUTEX_WAIT): Define.
501         (__lll_robust_mutex_lock_wait): Rename to ...
502         (__lll_robust_lock_wait): ... this.  Add private argument.
503         Use LOAD_FUTEX_WAIT macro.
504         (__lll_robust_mutex_timedlock_wait): Rename to ...
505         (__lll_robust_timedlock_wait): ... this.    Add private argument.
506         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
507         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
508         lowlevellock.h.
509         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
510         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
511         __lll_mutex_{lock,unlock}_*.
512         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
513         lowlevellock.h and pthread-errnos.h.
514         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
515         FUTEX_CMP_REQUEUE, EINVAL): Remove.
516         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
517         __lll_mutex_{lock,unlock}_*.
518         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
519         lowlevellock.h and pthread-errnos.h.
520         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
521         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
522         __lll_mutex_{lock,unlock}_*.
523         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
524         lowlevellock.h.
525         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
526         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
527         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
528         (__condvar_tw_cleanup): Likewise.
529         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
530         lowlevellock.h.
531         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
532         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
533         __lll_mutex_{lock,unlock}_*.
534         ( __condvar_w_cleanup): Likewise.
535         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
536         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
537         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
538         lowlevellock.h.
539         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
540         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
541         __lll_mutex_{lock,unlock}_*.
542         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
543         lowlevellock.h.
544         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
545         FUTEX_PRIVATE_FLAG): Remove.
546         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
547         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
548         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
549         lowlevellock.h.
550         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
551         FUTEX_PRIVATE_FLAG): Remove.
552         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
553         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
554         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
555         lowlevellock.h.
556         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
557         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
558         __lll_mutex_{lock,unlock}_*.
559         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
560         lowlevellock.h.
561         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
562         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
563         __lll_mutex_{lock,unlock}_*.
564         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
565         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
566         (__new_sem_post): Use standard initial exec code sequences.
567         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
568         lowlevellock.h.
569         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
570         FUTEX_PRIVATE_FLAG): Remove.
571         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
572         exec code sequences.
573         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
574         (__new_sem_trywait): Use standard initial exec code sequences.
575         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
576         (__new_sem_wait): Use standard initial exec code sequences.
578 2007-07-31  Anton Blanchard  <anton@samba.org>
580         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
581         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
582         atomic_full_barrier.
584 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
586         * allocatestack.c (stack_cache_lock): Change type to int.
587         (get_cached_stack, allocate_stack, __deallocate_stack,
588         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
589         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
590         as second argument to lll_lock and lll_unlock macros on
591         stack_cache_lock.
592         * pthread_create.c (__find_in_stack_list): Likewise.
593         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
594         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
595         as second argument.
596         * descr.h (struct pthread): Change lock and setxid_futex field
597         type to int.
598         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
599         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
600         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
601         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
602         Likewise.
603         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
604         * pthread_cond_init.c (__pthread_cond_init): Likewise.
605         * pthreadP.h (__attr_list_lock): Change type to int.
606         * pthread_attr_init.c (__attr_list_lock): Likewise.
607         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
608         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
609         lll_{,un}lock.
610         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
611         also for lll_futex_{wake,wait}.
612         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
613         a pointer to const.
614         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
615         LLL_SHARED as second argument to lll_{,un}lock.
616         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
617         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
618         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
619         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
620         Likewise.
621         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
622         as second argument to lll_{,un}lock macros on pd->lock.
623         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
624         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
625         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
626         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
627         Likewise.
628         * sysdeps/pthread/createthread.c (do_clone, create_thread):
629         Likewise.
630         * pthread_once.c (once_lock): Change type to int.
631         (__pthread_once): Pass LLL_PRIVATE as second argument to
632         lll_{,un}lock macros on once_lock.
633         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
634         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
635         rwlock->__data.__shared as second argument to them and similarly
636         for lll_futex_w*.
637         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
638         Likewise.
639         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
640         Likewise.
641         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
642         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
643         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
644         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
645         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
646         to lll_{,un}lock macros on __sem_mappings_lock.
647         * sem_open.c (check_add_mapping): Likewise.
648         (__sem_mappings_lock): Change type to int.
649         * semaphoreP.h (__sem_mappings_lock): Likewise.
650         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
651         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
652         instead of lll_*mutex_*, pass LLL_SHARED as last
653         argument.
654         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
655         pass LLL_SHARED as last argument.
656         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
657         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
658         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
659         pass LLL_SHARED as last argument.
660         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
661         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
662         LLL_SHARED as last argument.
663         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
664         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
665         Similarly.
666         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
667         __libc_lock_lock_recursive, __libc_lock_unlock,
668         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
669         argument to lll_{,un}lock.
670         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
671         _IO_lock_unlock): Likewise.
672         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
673         compound literal.
674         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
675         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
676         __fork_lock.
677         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
678         free_mem): Likewise.
679         (__fork_lock): Change type to int.
680         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
681         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
682         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
683         lll_futex_wake.
684         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
685         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
686         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
687         New function.
688         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
689         pass it through to lll_futex_*wait, only compile in when
690         IS_IN_libpthread.
691         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
692         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
693         argument and pass it through to lll_futex_*wait.
694         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
695         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
696         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
697         inline functions to __lll_* resp. __lll_robust_*.
698         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
699         (lll_mutex_dead): Add private argument.
700         (__lll_lock_wait_private): New prototype.
701         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
702         __lll_robust_lock_timedwait): Add private argument to prototypes.
703         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
704         call __lll_lock_wait_private, otherwise pass private to
705         __lll_lock_wait.
706         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
707         __lll_robust_timedlock): Add private argument, pass it to
708         __lll_*wait functions.
709         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
710         call __lll_unlock_wake_private, otherwise pass private to
711         __lll_unlock_wake.
712         (__lll_robust_unlock): Add private argument, pass it to
713         __lll_robust_unlock_wake.
714         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
715         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
716         argument, pass it through to __lll_* inline function.
717         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
718         (lll_lock_t): Remove.
719         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
720         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
721         lll_cond_wake, lll_cond_broadcast): Remove.
722         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
723         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
724         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
725         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
726         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
727         the header from assembler.  Renamed all lll_mutex_* resp.
728         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
729         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
730         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
731         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
732         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
733         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
734         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
735         Remove prototype.
736         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
737         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
738         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
739         (lll_trylock): Likewise, use __lll_trylock_asm, pass
740         MULTIPLE_THREADS_OFFSET as another asm operand.
741         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
742         MULTIPLE_THREADS_OFFSET as last asm operand, call
743         __lll_lock_wait_private if private is constant LLL_PRIVATE,
744         otherwise pass private as another argument to __lll_lock_wait.
745         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
746         lll_timedlock, lll_robust_timedlock): Add private argument, pass
747         private as another argument to __lll_*lock_wait call.
748         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
749         MULTIPLE_THREADS_OFFSET as another asm operand, call
750         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
751         otherwise pass private as another argument to __lll_unlock_wake.
752         (lll_robust_unlock): Add private argument, pass private as another
753         argument to __lll_unlock_wake.
754         (lll_robust_dead): Add private argument, use __lll_private_flag
755         macro.
756         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
757         LLL_MUTEX_LOCK_INITIALIZER.
758         (lll_lock_t): Remove.
759         (LLL_LOCK_INITIALIZER_WAITERS): Define.
760         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
761         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
762         lll_cond_wake, lll_cond_broadcast): Remove.
763         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
764         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
765         2007-05-2{3,9} changes.
766         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
767         kernel-features.h and lowlevellock.h.
768         (LOAD_PRIVATE_FUTEX_WAIT): Define.
769         (LOAD_FUTEX_WAIT): Rewritten.
770         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
771         define.
772         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
773         (__lll_mutex_lock_wait): Rename to ...
774         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
775         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
776         (__lll_mutex_timedlock_wait): Rename to ...
777         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
778         contains private argument.  Don't compile in for libc.so.
779         (__lll_mutex_unlock_wake): Rename to ...
780         (__lll_unlock_wake): ... this.  %ecx contains private argument.
781         Don't compile in for libc.so.
782         (__lll_timedwait_tid): Use __NR_gettimeofday.
783         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
784         kernel-features.h and lowlevellock.h.
785         (LOAD_FUTEX_WAIT): Define.
786         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
787         define.
788         (__lll_robust_mutex_lock_wait): Rename to ...
789         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
790         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
791         macro.
792         (__lll_robust_mutex_timedlock_wait): Rename to ...
793         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
794         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
795         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
796         lowlevellock.h.
797         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
798         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
799         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
800         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
801         to __lll_lock_wait in %edx.
802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
803         Include lowlevellock.h and pthread-errnos.h.
804         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
805         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
806         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
807         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
808         pass LLL_SHARED in %ecx to both __lll_lock_wait and
809         __lll_unlock_wake.
810         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
811         Include lowlevellock.h and pthread-errnos.h.
812         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
813         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
814         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
815         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
816         pass LLL_SHARED in %ecx to both __lll_lock_wait and
817         __lll_unlock_wake.
818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
819         Include lowlevellock.h.
820         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
821         Don't define.
822         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
823         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
824         pass LLL_SHARED in %ecx to both __lll_lock_wait and
825         __lll_unlock_wake.  Use __NR_gettimeofday.
826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
827         Include lowlevellock.h.
828         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
829         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
830         to __lll_*, pass cond_lock address in %edx rather than %ecx to
831         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
832         and __lll_unlock_wake.
833         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
834         Include lowlevellock.h.
835         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
836         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
837         MUTEX(%ebx) address in %edx rather than %ecx to
838         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
839         and __lll_unlock_wake.  Move return value from %ecx to %edx
840         register.
841         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
842         Include lowlevellock.h.
843         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
844         Don't define.
845         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
846         MUTEX(%ebp) address in %edx rather than %ecx to
847         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
848         and __lll_unlock_wake.  Move return value from %ecx to %edx
849         register.  Use __NR_gettimeofday.
850         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
851         Include lowlevellock.h.
852         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
853         Don't define.
854         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
855         MUTEX(%ebp) address in %edx rather than %ecx to
856         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
857         and __lll_unlock_wake.  Move return value from %ecx to %edx
858         register.  Use __NR_gettimeofday.
859         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
860         Include lowlevellock.h.
861         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
862         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
863         MUTEX(%edi) address in %edx rather than %ecx to
864         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
865         and __lll_unlock_wake.
866         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
867         Include lowlevellock.h.
868         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
869         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
870         MUTEX(%ebx) address in %edx rather than %ecx to
871         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
872         and __lll_unlock_wake.  Move return value from %ecx to %edx
873         register.
874         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
875         lowlevellock.h.
876         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
877         define.
878         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
879         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
880         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
881         lowlevellock.h.
882         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
883         (sem_timedwait): Use __NR_gettimeofday.
884         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
885         lowlevellock.h.
886         (LOCK): Don't define.
887         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
888         lowlevellock.h.
889         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
890         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
891         are waiters.
892         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
893         2007-05-2{3,9} changes.
894         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
895         kernel-features.h and lowlevellock.h.
896         (LOAD_PRIVATE_FUTEX_WAIT): Define.
897         (LOAD_FUTEX_WAIT): Rewritten.
898         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
899         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
900         (__lll_mutex_lock_wait): Rename to ...
901         (__lll_lock_wait): ... this.  %esi is now private argument.
902         Don't compile in for libc.so.
903         (__lll_mutex_timedlock_wait): Rename to ...
904         (__lll_timedlock_wait): ... this.  %esi contains private argument.
905         Don't compile in for libc.so.
906         (__lll_mutex_unlock_wake): Rename to ...
907         (__lll_unlock_wake): ... this.  %esi contains private argument.
908         Don't compile in for libc.so.
909         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
910         kernel-features.h and lowlevellock.h.
911         (LOAD_FUTEX_WAIT): Define.
912         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
913         (__lll_robust_mutex_lock_wait): Rename to ...
914         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
915         Use LOAD_FUTEX_WAIT macro.
916         (__lll_robust_mutex_timedlock_wait): Rename to ...
917         (__lll_robust_timedlock_wait): ... this. %esi argument contains
918         private, use LOAD_FUTEX_WAIT macro.
919         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
920         lowlevellock.h.
921         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
922         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
923         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
924         __lll_lock_wait and __lll_unlock_wake.
925         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
926         Include lowlevellock.h and pthread-errnos.h.
927         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
928         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
929         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
930         pass LLL_SHARED in %esi to both __lll_lock_wait and
931         __lll_unlock_wake.
932         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
933         Include lowlevellock.h and pthread-errnos.h.
934         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
935         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
936         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
937         pass LLL_SHARED in %esi to both __lll_lock_wait and
938         __lll_unlock_wake.
939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
940         Include lowlevellock.h.
941         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
942         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
943         pass LLL_SHARED in %esi to both __lll_lock_wait and
944         __lll_unlock_wake.
945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
946         Include lowlevellock.h.
947         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
948         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
949         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
950         and __lll_unlock_wake.
951         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
952         Include lowlevellock.h.
953         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
954         Don't define.
955         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
956         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
957         and __lll_unlock_wake.
958         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
959         Include lowlevellock.h.
960         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
961         Don't define.
962         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
963         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
964         and __lll_unlock_wake.
965         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
966         Include lowlevellock.h.
967         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
968         Don't define.
969         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
970         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
971         and __lll_unlock_wake.
972         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
973         Include lowlevellock.h.
974         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
975         Don't define.
976         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
977         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
978         and __lll_unlock_wake.
979         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
980         Include lowlevellock.h.
981         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
982         Don't define.
983         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
984         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
985         and __lll_unlock_wake.
986         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
987         lowlevellock.h.
988         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
989         define.
990         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
991         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
992         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
993         lowlevellock.h.
994         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
995         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
996         lowlevellock.h.
997         (LOCK): Don't define.
998         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
999         lowlevellock.h.
1000         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1001         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1002         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1003         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1004         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1005         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1006         (__lll_lock_wait_private): New function.
1007         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1008         it to lll_futex_*wait.  Don't compile in for libc.so.
1009         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1010         Remove.
1011         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1012         (struct sparc_pthread_barrier): Remove.
1013         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1014         struct sparc_pthread_barrier.  Pass
1015         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1016         and lll_futex_wait macros.
1017         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1018         Remove.
1019         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1020         Include sparc pthread_barrier_wait.c instead of generic one.
1022 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1024         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1026         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1027         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1028         %ecx.
1029         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1030         (pthread_rwlock_timedwrlock): Likewise.
1031         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1032         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1034 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1036         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1038 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1040         * tst-locale2.c (useless): Add return statement.
1042 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1044         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1045         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1046         * pthread_create.c (start_thread): Likewise.
1047         * init.c (sighandler_setxid): Likewise.
1048         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1049         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1050         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1051         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1052         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1053         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1054         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1055         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1056         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1057         Likewise.
1058         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1059         Likewise.
1060         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1061         Likewise.
1062         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1063         __rtld_notify): Likewise.
1064         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1065         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1066         __pthread_once): Likewise.
1067         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1068         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1069         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1070         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1071         (lll_futex_wait): Add private argument, define as wrapper around
1072         lll_futex_timed_wait.
1073         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1074         use __lll_private_flag macro.
1075         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1076         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1077         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1078         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1079         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1080         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1081         (lll_futex_wait): Add private argument, define as wrapper around
1082         lll_futex_timed_wait.
1083         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1084         use __lll_private_flag macro.
1085         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1086         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1087         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1088         Define.
1089         (lll_futex_timed_wait, lll_futex_wake): Use it.
1090         (lll_private_futex_wait, lll_private_futex_timed_wait,
1091         lll_private_futex_wake): Removed.
1092         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1093         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1094         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1095         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1096         (lll_futex_wait): Add private argument, define as wrapper around
1097         lll_futex_timed_wait.
1098         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1099         use __lll_private_flag macro.
1100         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1101         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1102         to lll_futex_*.
1103         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1104         (lll_private_futex_wait, lll_private_futex_timed_wait,
1105         lll_private_futex_wake): Removed.
1106         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1107         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1108         (lll_private_futex_wait, lll_private_futex_timed_wait,
1109         lll_private_futex_wake): Removed.
1110         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1111         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1112         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1113         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1114         (lll_futex_wait): Add private argument, define as wrapper around
1115         lll_futex_timed_wait.
1116         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1117         use __lll_private_flag macro.
1118         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1119         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1120         to lll_futex_*.
1121         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1122         Define.
1123         (lll_futex_timed_wait, lll_futex_wake): Use it.
1124         (lll_private_futex_wait, lll_private_futex_timed_wait,
1125         lll_private_futex_wake): Removed.
1127 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1129         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1130         of the structure for sparc32.
1132 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1134         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1136 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1138         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1139         code used when private futexes are assumed.
1140         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1141         Likewise.
1143 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1145         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1146         (__lll_private_flag): Define.
1147         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1148         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1149         __lll_private_flag.
1150         (lll_private_futex_wait, lll_private_futex_timedwait,
1151         lll_private_futex_wake): Define as wrapper around non-_private
1152         macros.
1153         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1154         (__lll_private_flag): Define.
1155         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1156         (lll_private_futex_wait, lll_private_futex_timedwait,
1157         lll_private_futex_wake): Define as wrapper around non-_private
1158         macros.
1160 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1162         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1163         parameter to lll_futex_wait call.
1164         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1166         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1167         Replace lll_futex_wait with lll_private_futex_wait.
1168         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1169         Add LLL_SHARED parameter to lll_futex_wake().
1171         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1172         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1173         lll_private_futex_wake.
1174         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1175         bit from private parm before syscall.
1176         (lll_futex_timed_wait): Likewise.
1177         (lll_futex_wake): Likewise.
1178         (lll_futex_wake_unlock): Likewise.
1179         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1180         (lll_robust_mutex_unlock): Likewise.
1181         (lll_mutex_unlock_force): Likewise.
1182         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1184 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1186         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1187         compilation when unconditionally using private futexes.
1188         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1189         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1190         Likewise.
1191         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1192         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1194 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1196         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1197         Define.
1199 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1201         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1202         kernel-features.h.
1204 2007-05-16  Roland McGrath  <roland@redhat.com>
1206         * init.c (__nptl_initial_report_events): New variable.
1207         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1208         to that.
1210 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1212         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1213         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1215 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1217         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1218         implementation.
1220 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1222         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1223         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1224         * pthread_mutex_timedlock.c: Likewise.
1225         * pthread_mutex_trylock.c: Likewise.
1226         * pthread_mutex_unlock.c: Likewise.
1228 2007-06-17  Andreas Schwab  <schwab@suse.de>
1230         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1231         sections.
1233 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1235         * allocatestack.c (allocate_stack): Make code compile if
1236         __ASSUME_PRIVATE_FUTEX is set.
1238 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1240         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1241         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1242         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1243         (__pthread_rwlock_wrlock): Likewise.
1244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1245         (pthread_rwlock_timedrdlock): Likewise.
1246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1247         (pthread_rwlock_timedwrlock): Likewise.
1248         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1249         (__pthread_rwlock_unlock): Likewise.
1251 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1253         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1254         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1255         Split __flags into __flags, __shared, __pad1 and __pad2.
1256         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1257         futexes if they are available.
1258         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1259         in libc-lowlevellock.S allow using private futexes.
1260         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1261         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1262         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1263         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1264         lll_private_futex_timed_wait and lll_private_futex_wake.
1265         (lll_robust_mutex_unlock): Fix typo.
1266         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1267         field in futex command setup.
1268         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1269         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1270         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1271         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1272         if they are available.  Remove clear_once_control.
1273         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1274         futexes if they are available.
1275         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1276         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1277         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1278         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1279         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1280         Wake only when there are waiters.
1281         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1282         support.  Indicate that there are waiters.  Remove unnecessary
1283         extra cancellation test.
1284         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1285         left-over duplication of __sem_wait_cleanup.
1287 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1289         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1290         parameter to lll_futex_wait, lll_futex_timed_wait, and
1291         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1292         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1293         lll_private_futex_wake.
1294         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1295         * allocatestack.c: Adjust use of lll_futex_* macros.
1296         * init.c: Likewise.
1297         * lowlevellock.h: Likewise.
1298         * pthread_barrier_wait.c: Likewise.
1299         * pthread_cond_broadcast.c: Likewise.
1300         * pthread_cond_destroy.c: Likewise.
1301         * pthread_cond_signal.c: Likewise.
1302         * pthread_cond_timedwait.c: Likewise.
1303         * pthread_cond_wait.c: Likewise.
1304         * pthread_create.c: Likewise.
1305         * pthread_mutex_lock.c: Likewise.
1306         * pthread_mutex_setprioceiling.c: Likewise.
1307         * pthread_mutex_timedlock.c: Likewise.
1308         * pthread_mutex_unlock.c: Likewise.
1309         * pthread_rwlock_timedrdlock.c: Likewise.
1310         * pthread_rwlock_timedwrlock.c: Likewise.
1311         * pthread_rwlock_unlock.c: Likewise.
1312         * sysdeps/alpha/tls.h: Likewise.
1313         * sysdeps/i386/tls.h: Likewise.
1314         * sysdeps/ia64/tls.h: Likewise.
1315         * sysdeps/powerpc/tls.h: Likewise.
1316         * sysdeps/pthread/aio_misc.h: Likewise.
1317         * sysdeps/pthread/gai_misc.h: Likewise.
1318         * sysdeps/s390/tls.h: Likewise.
1319         * sysdeps/sh/tls.h: Likewise.
1320         * sysdeps/sparc/tls.h: Likewise.
1321         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1322         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1323         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1324         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1325         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1326         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1327         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1328         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1329         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1330         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1331         Likewise.
1332         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1333         * sysdeps/x86_64/tls.h: Likewise.
1335 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1337         * pthread_getattr_np.c: No need to install a cancellation handler,
1338         this is no cancellation point.
1339         * pthread_getschedparam.c: Likewise.
1340         * pthread_setschedparam.c: Likewise.
1341         * pthread_setschedprio.c: Likewise.
1342         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1343         lll_unlock_wake_cb.
1344         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1345         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1346         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1347         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1348         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1349         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1350         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1351         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1352         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1353         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1354         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1355         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1357         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1358         whether there are more than one thread makes no sense here since
1359         we only call the slow path if the locks are taken.
1360         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1362         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1363         COND_NWAITERS_SHIFT.
1364         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1365         COND_CLOCK_BITS.
1366         * pthread_cond_init.c: Likewise.
1367         * pthread_cond_timedwait.c: Likewise.
1368         * pthread_cond_wait.c: Likewise.
1369         * pthread_condattr_getclock.c: Likewise.
1370         * pthread_condattr_setclock.c: Likewise.
1371         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1373         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1377 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1379         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1380         unistd.h.
1382         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1383         insn suffix.
1384         (THREAD_GSCOPE_GET_FLAG): Remove.
1385         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1386         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1387         changes.
1388         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1389         (THREAD_GSCOPE_GET_FLAG): Remove.
1390         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1391         instead of THREAD_GSCOPE_GET_FLAG.
1392         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1393         it.
1394         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1395         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1396         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1397         THREAD_GSCOPE_WAIT): Define.
1398         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1399         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1400         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1401         THREAD_GSCOPE_WAIT): Define.
1402         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1403         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1404         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1405         THREAD_GSCOPE_WAIT): Define.
1406         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1407         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1408         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1409         THREAD_GSCOPE_WAIT): Define.
1411 2007-05-24  Richard Henderson  <rth@redhat.com>
1413         * descr.h (struct pthread): Add header.gscope_flag.
1414         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1415         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1416         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1417         THREAD_GSCOPE_WAIT): Define.
1419 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1421         * init.c: Make it compile with older kernel headers.
1423         * tst-initializers1.c: Show through exit code which test failed.
1425         * pthread_rwlock_init.c: Also initialize __shared field.
1426         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1427         element in rwlock structure into four byte elements.  One of them is
1428         the new __shared element.
1429         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1430         Likewise.
1431         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1432         __shared, adjust names of other padding elements.
1433         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1434         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1435         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1436         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1437         FUTEX_PRIVATE_FLAG.
1438         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1439         futex to use private operations if possible.
1440         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1441         Likewise.
1442         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1443         Likewise.
1444         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1445         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1446         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1448         Likewise.
1449         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1450         Likewise.
1451         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1454 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1456         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1457         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1458         * pthread_rwlock_timedrdlock.c: Likewise.
1459         * pthread_rwlock_tryrdlock.c: Likewise.
1461         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1462         optimization.
1464         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1465         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1466         duplication of __sem_wait_cleanup.
1468         * allocatestack.c: Revert last change.
1469         * init.c: Likewise.
1470         * sysdeps/i386/tls.h: Likewise.
1471         * sysdeps/x86_64/tls.h: Likewise.
1472         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1473         header structure.
1474         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1476         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1477         Add private field.
1478         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1479         * pthread_barrier_init.c: Set private flag if pshared and private
1480         futexes are supported.
1481         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1482         private field in futex command setup.
1483         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1485 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1487         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1488         support.
1489         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1490         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1491         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1492         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1493         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1495         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1496         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1497         fields in the structure.
1498         (__old_sem_init): New function.
1499         * sem_open.c: Initialize all fields of the structure.
1500         * sem_getvalue.c: Adjust for renamed element.
1501         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1502         (gen-as-const-headers): Add structsem.sym.
1503         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1504         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1505         struct new_sem.  Add struct old_sem.
1506         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1507         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1508         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1509         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1510         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1511         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1512         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1513         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1514         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1515         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1516         * tst-sem10.c: New file.
1517         * tst-sem11.c: New file.
1518         * tst-sem12.c: New file.
1519         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1520         of struct sem.
1522 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1523             Jakub Jelinek  <jakub@redhat.com>
1525         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1526         Move __pthread_enable_asynccancel right before futex syscall.
1527         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1528         Likewise.
1530 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1532         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1533         THREAD_COPY_PRIVATE_FUTEX): Define.
1534         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1535         THREAD_COPY_PRIVATE_FUTEX): Define.
1536         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1537         * init.c (__pthread_initialize_minimal_internal): Use
1538         THREAD_SET_PRIVATE_FUTEX.
1540         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1541         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1542         THREAD_GSCOPE_FLAG_WAIT): Define.
1543         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1544         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1545         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1546         PTR_DEMANGLE.
1547         (THREAD_GSCOPE_GET_FLAG): Define.
1548         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1549         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1550         instead of ->header.gscope_flag directly.
1552 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1554         * init.c (__pthread_initialize_minimal_internal): Check whether
1555         private futexes are available.
1556         * allocatestack.c (allocate_stack): Copy private_futex field from
1557         current thread into the new stack.
1558         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1559         futexes if they are available.
1560         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1561         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1562         in libc-lowlevellock.S allow using private futexes.
1563         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1564         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1565         FUTEX_PRIVATE_FLAG.
1566         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1567         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1568         if they are available.
1569         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1570         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1571         * sysdeps/i386/tcb-offsets.sym: Likewise.
1572         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1573         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1575 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1577         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1578         Remove ptr_wait_lookup_done again.
1579         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1580         (__pthread_initialize_minimal_internal): Initialize
1581         _dl_wait_lookup_done pointer in _rtld_global directly.
1582         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1583         Remove code to code _dl_wait_lookup_done.
1584         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1585         encrypted for now.
1587 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1589         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1590         pthread_mutex_init failed with ENOTSUP.
1592 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1594         * allocatestack.c (__wait_lookup_done): New function.
1595         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1596         Add ptr_wait_lookup_done.
1597         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1598         * pthreadP.h: Declare __wait_lookup_done.
1599         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1600         Define macros to implement reference handling of global scope.
1601         * sysdeps/x86_64/tls.h: Likewise.
1602         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1603         Initialize GL(dl_wait_lookup_done).
1605 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1607         [BZ #4512]
1608         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1609         is detected.
1610         * pthread_mutex_timedlock.c: Likewise.
1611         * pthread_mutex_trylock.c: Likewise.
1612         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1614         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1615         * tst-robust9.c: New file.
1616         * tst-robustpi9.c: New file.
1618         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1619         unnecessary extra cancellation test.
1621 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1623         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1624         extra cancellation test.
1625         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1627 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1629         * descr.h (struct pthread): Rearrange members to fill hole in
1630         64-bit layout.
1632         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1633         (__pthread_setaffinity_new): If syscall was successful and
1634         RESET_VGETCPU_CACHE is defined, use it before returning.
1635         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1637 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1639         [BZ #4455]
1640         * tst-align2.c: Include stackinfo.h.
1641         * tst-getpid1.c: Likewise.
1643 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1645         [BZ #4455]
1646         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1647         * tst-getpid1.c (do_test): Likewise.
1649         [BZ #4456]
1650         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1651         (allocate_stack): Likewise.
1653 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1655         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1656         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1657         (__lll_robust_timedlock_wait): Likewise.
1658         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1660 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1662         [BZ #4465]
1663         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1664         * tst-cancel4.c (tf_fdatasync): New test.
1666 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1668         [BZ #4392]
1669         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1670         check mutexes like normal mutexes.
1672         [BZ #4306]
1673         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1674         Initialize the whole sigevent structure to appease valgrind.
1676 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1678         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1679         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1681 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1683         * tst-locale1.c: Avoid warnings.
1684         * tst-locale2.c: Likewise.
1686 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1688         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1689         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1691 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1693         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1694         __extern_always_inline where appropriate.
1695         * sysdeps/pthread/pthread.h: Likewise.
1697 2007-03-13  Richard Henderson  <rth@redhat.com>
1699         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1700         separate cfi regions for the two subsections.
1702 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1704         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1705         new thread, don't just decrement it.
1706         Patch by Suzuki K P <suzuki@in.ibm.com>.
1708 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1710         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1711         PTHFCT_CALL definition.
1713 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1715         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1716         available, don't use it.
1718 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1720         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1721         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1722         call into the kernel to delay.
1724 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1726         * tst-initializers1.c: We want to test the initializers as seen
1727         outside of libc, so undefined _LIBC.
1729         * pthread_join.c (cleanup): Avoid warning.
1731 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1733         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1734         (__lll_timedwait_tid): Add unwind info.
1736         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1737         function table, mangle the pointers.
1738         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1739         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1740         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1741         demangle pointers before use.
1742         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1743         demangle pointer.
1744         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1745         * sysdeps/pthread/setxid.h: Likewise.
1747 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1749         * tst-rwlock7.c: Show some more information in case of correct
1750         behavior.
1752 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1754         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1755         (lll_futex_timed_wait): Undo part of last change, don't negate
1756         return value.
1758 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1760         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1761         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1763 2006-12-28  David S. Miller  <davem@davemloft.net>
1765         * shlib-versions: Fix sparc64 linux target specification.
1767 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1769         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1770         Adjust include path for pthread_barrier_wait.c move.
1772 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1774         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1775         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1777 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1779         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1780         6 argument cancellable syscalls.
1781         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1782         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1783         6 argument cancellable syscalls.
1784         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1786 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1788         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1789         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1791 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1793         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1794         __sync_lock_release instead of __sync_lock_release_si.
1796 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1798         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1799         Define.
1800         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1801         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1802         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1803         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1804         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1805         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1806         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1807         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1808         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1809         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1810         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1812 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1814         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1815         * pthread_barrier_wait.c: ...here.
1816         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1817         * pthread_cond_broadcast.c: ...here.
1818         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1819         * pthread_cond_signal.c: ...here.
1820         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1821         * pthread_cond_timedwait.c: ...here.
1822         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1823         * pthread_cond_wait.c: ...here.
1824         * sysdeps/pthread/pthread_once.c: Move to...
1825         * pthread_once.c: ...here.
1826         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1827         * pthread_rwlock_rdlock.c: ...here.
1828         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1829         * pthread_rwlock_timedrdlock.c: ...here.
1830         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1831         * pthread_rwlock_timedwrlock.c: ...here.
1832         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1833         * pthread_rwlock_unlock.c: ...here.
1834         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1835         * pthread_rwlock_wrlock.c: ...here.
1836         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1837         * pthread_spin_destroy.c: ...here.
1838         * sysdeps/pthread/pthread_spin_init.c: Move to...
1839         * pthread_spin_init.c: ...here.
1840         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1841         * pthread_spin_unlock.c: ...here.
1842         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1843         * pthread_getcpuclockid.c: ...here.
1845         * init.c: USE_TLS support is now always enabled.
1846         * tst-tls5.h: Likewise.
1847         * sysdeps/alpha/tls.h: Likewise.
1848         * sysdeps/i386/tls.h: Likewise.
1849         * sysdeps/ia64/tls.h: Likewise.
1850         * sysdeps/powerpc/tls.h: Likewise.
1851         * sysdeps/s390/tls.h: Likewise.
1852         * sysdeps/sh/tls.h: Likewise.
1853         * sysdeps/sparc/tls.h: Likewise.
1854         * sysdeps/x86_64/tls.h: Likewise.
1856 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1858         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1859         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1860         failed.
1862         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1863         Define to THREAD_SELF->header.multiple_threads.
1864         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1865         Likewise.
1866         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1867         Likewise.
1868         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1869         (SINGLE_THREAD_P): Likewise.
1870         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1871         (SINGLE_THREAD_P): Likewise.
1872         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1873         (SINGLE_THREAD_P): Likewise.
1874         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1875         (SINGLE_THREAD_P): Likewise.
1876         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1877         Likewise.
1878         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1879         (SINGLE_THREAD_P): Likewise.
1880         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1881         (SINGLE_THREAD_P): Likewise.
1882         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1883         Likewise.
1885 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1887         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1888         by default rather than 2_3_3.
1890 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1892         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1893         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1894         atomic_* instead of catomic_* macros.
1896 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1898         [BZ #3285]
1899         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1900         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1901         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1902         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1903         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1904         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1905         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1906         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1907         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1908         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1909         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1910         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1911         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1913 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1915         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1916         cancelable syscalls with six parameters.
1918         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1919         operations instead of atomic_*.
1921 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1923         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1925 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1927         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1928         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1929         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1930         New file.
1931         * pthread_attr_setstack.c: Allow overwriting the version number of the
1932         new symbol.
1933         * pthread_attr_setstacksize.c: Likewise.
1934         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1935         it.
1936         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1937         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1939 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1941         [BZ #3251]
1942         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1943         Patch by Petr Baudis.
1945 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1947         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1949         * tst-cancel2.c (tf): Loop as long as something was written.
1951 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1953         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1954         mutexes wake all mutexes.
1955         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1956         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1957         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1959 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1961         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1962         to guarantee the thread is always canceled.
1964 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1966         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1967         Include stdlib.h.
1968         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1969         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1970         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1971         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1974 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1976         [BZ #3123]
1977         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1978         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1979         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1982         * Makefile (tests): Add tst-cond22.
1983         * tst-cond22.c: New file.
1985 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1987         [BZ #3124]
1988         * descr.h (struct pthread): Add parent_cancelhandling.
1989         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1990         cancelhandling value to child.
1991         * pthread_create.c (start_thread): If parent thread was canceled
1992         reset the SIGCANCEL mask.
1993         * Makefile (tests): Add tst-cancel25.
1994         * tst-cancel25.c: New file.
1996 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1997             Ulrich Drepper  <drepper@redhat.com>
1999         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2000         counterp if it is already zero.
2001         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2003 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2004             Roland McGrath  <roland@redhat.com>
2006         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2007         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2008         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2009         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2010         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2011         lll_robust_mutex_timedlock, lll_mutex_unlock,
2012         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2013         Add _L_*_ symbols around the subsection.
2014         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2015         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2017 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2018             Roland McGrath  <roland@redhat.com>
2020         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2021         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2022         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2023         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2024         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2025         lll_robust_mutex_timedlock, lll_mutex_unlock,
2026         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2027         Add _L_*_ symbols around the subsection.
2028         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2029         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2031 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2033         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2034         change because it can disturb too much existing code.  If real hard
2035         reader preference is needed we'll introduce another type.
2036         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2037         (pthread_rwlock_timedwrlock): Likewise.
2038         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2039         Likewise.
2041 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2043         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2044         reader preference.
2045         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2046         (pthread_rwlock_timedwrlock): Likewise.
2047         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2048         Likewise.
2050 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2052         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2053         Only define ifdef SHARED.
2055 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2057         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2058         (free_stacks): ...here.
2059         (__free_stack_cache): New function.
2060         * pthreadP.h: Declare __free_stack_cache.
2061         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2062         ptr_freeres.
2063         * init.c (pthread_functions): Initialize ptr_freeres.
2064         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2065         New freeres function.
2067 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2069         [BZ #3018]
2070         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2072 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2074         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2075         _XOPEN_REALTIME_THREADS.
2077 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2079         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2080         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2081         HAVE_CLOCK_GETTIME_VSYSCALL.
2082         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2084 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2086         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2087         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2088         * descr.h (struct priority_protection_data): New type.
2089         (struct pthread): Add tpp field.
2090         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2091         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2092         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2093         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2094         TPP mutexes.
2095         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2096         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2097         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2098         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2099         * tpp.c: New file.
2100         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2101         boosted by TPP.
2102         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2103         * pthread_mutexattr_getprioceiling.c
2104         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2105         in the SCHED_FIFO priority range.
2106         * pthread_mutexattr_setprioceiling.c
2107         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2108         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2109         if mutex is not TPP.  Ceiling is now in __data.__lock.
2110         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2111         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2112         is now in __data.__lock.  Add locking.
2113         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2114         * Makefile (libpthread-routines): Add tpp.
2115         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2116         * tst-tpp.h: New file.
2117         * tst-mutexpp1.c: New file.
2118         * tst-mutexpp6.c: New file.
2119         * tst-mutexpp10.c: New file.
2120         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2121         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2123 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2125         [BZ #2843]
2126         * pthread_join.c (pthread_join): Account for self being canceled
2127         when checking for deadlocks.
2128         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2129         (tf1): Don't print anything after pthread_join returns, this would be
2130         another cancellation point.
2131         (tf2): Likewise.
2132         * tst-join6.c: New file.
2133         * Makefile (tests): Add tst-join6.
2135 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2137         [BZ #2892]
2138         * pthread_setspecific.c (__pthread_setspecific): Check
2139         out-of-range index before checking for unused key.
2141         * sysdeps/pthread/gai_misc.h: New file.
2143 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2145         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2146         file.  Don't use sysctl.
2147         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2148         overwrite the file if this is likely not true.
2150 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2152         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2153         * Makefile (tests): Add tst-getpid3.
2154         * tst-getpid3.c: New file.
2156 2006-07-30  Roland McGrath  <roland@redhat.com>
2158         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2160         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2161         (pause_not_cancel): New macro.
2162         (nanosleep_not_cancel): New macro.
2163         (sigsuspend_not_cancel): New macro.
2164         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2165         nanosleep_not_cancel macro from <not-cancel.h>.
2166         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2167         macro from <not-cancel.h>.
2169 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2170             Jakub Jelinek  <jakub@redhat.com>
2172         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2173         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2174         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2175         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2176         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2177         * pthread_mutex_lock.c: Likewise.
2178         * pthread_mutex_timedlock.c: Likewise.
2179         * pthread_mutex_trylock.c: Likewise.
2180         * pthread_mutex_unlock.c: Likewise.
2181         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2182         all mutexes.
2183         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2184         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2185         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2186         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2187         pthread-pi-defines.sym.
2188         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2189         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2190         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2191         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2192         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2193         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2194         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2195         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2196         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2197         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2198         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2199         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2200         * tst-mutex2.c: Likewise.
2201         * tst-mutex3.c: Likewise.
2202         * tst-mutex4.c: Likewise.
2203         * tst-mutex5.c: Likewise.
2204         * tst-mutex6.c: Likewise.
2205         * tst-mutex7.c: Likewise.
2206         * tst-mutex7a.c: Likewise.
2207         * tst-mutex8.c: Likewise.
2208         * tst-mutex9.c: Likewise.
2209         * tst-robust1.c: Likewise.
2210         * tst-robust7.c: Likewise.
2211         * tst-robust8.c: Likewise.
2212         * tst-mutexpi1.c: New file.
2213         * tst-mutexpi2.c: New file.
2214         * tst-mutexpi3.c: New file.
2215         * tst-mutexpi4.c: New file.
2216         * tst-mutexpi5.c: New file.
2217         * tst-mutexpi6.c: New file.
2218         * tst-mutexpi7.c: New file.
2219         * tst-mutexpi7a.c: New file.
2220         * tst-mutexpi8.c: New file.
2221         * tst-mutexpi9.c: New file.
2222         * tst-robust1.c: New file.
2223         * tst-robust2.c: New file.
2224         * tst-robust3.c: New file.
2225         * tst-robust4.c: New file.
2226         * tst-robust5.c: New file.
2227         * tst-robust6.c: New file.
2228         * tst-robust7.c: New file.
2229         * tst-robust8.c: New file.
2230         * Makefile (tests): Add the new tests.
2232         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2233         * pthread_mutex_destroy.c: Remove unneeded label.
2235 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2237         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2238         computations to compile time.
2240 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2242         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2244 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2246         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2248 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2250         * pthread_key_create.c (__pthread_key_create): Do away with
2251         __pthread_keys_lock.
2253         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2254         (__kernel_cpumask_size): Mark as hidden.
2255         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2257         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2258         * semaphoreP.h (__sem_mappings_lock): Likewise.
2260 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2262         * pthread_atfork.c: Mark __dso_handle as hidden.
2264 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2266         [BZ #2644]
2267         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2268         the reload problem.  Change the one path in pthread_cancel_init
2269         which causes the problem.  Force gcc to reload.  Simplify callers.
2270         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2271         (_Unwind_GetBSP): Undo last patch.
2273 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2275         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2276         function pointer is reloaded after pthread_cancel_init calls.
2278         [BZ #2644]
2279         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2280         pointers are reloaded after pthread_cancel_init calls.
2282 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2284         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2285         __always_inline.
2287 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2289         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2290         Allocate new object which is passed to timer_sigev_thread so that
2291         the timer can be deleted before the new thread is scheduled.
2293 2006-04-26  Roland McGrath  <roland@redhat.com>
2295         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2297 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2299         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2300         suffix for conditional jumps.
2301         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2302         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2303         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2304         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2305         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2306         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2308         * init.c (sigcancel_handler): Compare with correct PID even if the
2309         thread is in the middle of a fork call.
2310         (sighandler_setxid): Likewise.
2311         Reported by Suzuki K P <suzuki@in.ibm.com> .
2313 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2315         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2317 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2319         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2320         fails [Coverity CID 105].
2322 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2324         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2326 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2328         [BZ #2505]
2329         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2330         Define __lll_rel_instr using lwsync.
2332 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2334         * allocatestack.c (allocate_stack): Always initialize robust_head.
2335         * descr.h: Define struct robust_list_head.
2336         (struct pthread): Use robust_list_head in robust mutex list definition.
2337         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2338         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2339         (__pthread_initialize_minimal_internal): Register robust_list with
2340         the kernel.
2341         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2342         Declare __set_robust_list_avail.
2343         * pthread_create.c (start_thread): Register robust_list of new thread.
2344         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2345         waiters.
2346         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2347         number of users, it's unreliable.
2348         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2349         set_robust_list syscall is available.
2350         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2351         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2352         Set robust_head.list_op_pending before trying to lock a robust mutex.
2353         * pthread_mutex_timedlock.c: Likewise.
2354         * pthread_mutex_trylock.c: Likewise.
2355         * pthread_mutex_unlock.c: Likewise for unlocking.
2356         * Makefile (tests): Add tst-robust8.
2357         * tst-robust8.c: New file.
2359 2006-03-08  Andreas Schwab  <schwab@suse.de>
2361         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2362         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2364 2006-03-05  Roland McGrath  <roland@redhat.com>
2366         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2367         and $config_os doesn't match *linux*.
2369 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2371         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2372         Use __syscall_error.
2373         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2374         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2375         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2376         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2377         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2378         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2380 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2382         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2384 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2386         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2387         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2388         mutex.
2389         (__lll_robust_timedlock_wait): Likewise.
2390         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2391         (__lll_robust_lock_wait): Likewise.
2392         (__lll_robust_timedlock_wait): Likewise.
2393         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2394         (__lll_robust_lock_wait): Likewise.
2395         (__lll_robust_timedlock_wait): Likewise.
2397 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2399         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2400         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2401         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2402         lll_robust_mutex_unlock): Define.
2403         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2405 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2407         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2408         instead of <clone.S>.
2410 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2412         * Makefile (libpthread-routines): Add
2413         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2414         and pthread_mutex_[sg]etprioceiling.
2415         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2416         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2417         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2418         pthread_mutex_setprioceiling.
2419         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2420         PTHREAD_PRIO_PROTECT): New enum values.
2421         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2422         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2423         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2424         prototypes.
2425         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2426         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2427         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2428         Define.
2429         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2430         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2431         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2432         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2433         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2434         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2435         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2436         protocol mutexes.
2437         * pthread_mutex_getprioceiling.c: New file.
2438         * pthread_mutex_setprioceiling.c: New file.
2439         * pthread_mutexattr_getprioceiling.c: New file.
2440         * pthread_mutexattr_setprioceiling.c: New file.
2441         * pthread_mutexattr_getprotocol.c: New file.
2442         * pthread_mutexattr_setprotocol.c: New file.
2444 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2446         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2448 2006-02-27  Roland McGrath  <roland@redhat.com>
2450         * sysdeps/pthread/Subdirs: List nptl here too.
2451         * configure (libc_add_on_canonical): New variable.
2453         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2455         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2456         self to get main source tree's file.
2457         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2458         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2459         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2460         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2461         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2462         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2463         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2464         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2465         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2466         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2467         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2468         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2469         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2471         * Makefile: Use $(sysdirs) in vpath directive.
2473         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2474         (CPPFLAGS-timer_routines.c): Likewise.
2476         * Makeconfig (includes): Variable removed.
2478 2006-02-26  Roland McGrath  <roland@redhat.com>
2480         * sysdeps/generic/pt-raise.c: Moved to ...
2481         * pt-raise.c: ... here.
2482         * sysdeps/generic/lowlevellock.h: Moved to ...
2483         * lowlevellock.h: ... here.
2485 2006-02-23  Roland McGrath  <roland@redhat.com>
2487         * descr.h (struct pthread): Add final member `end_padding'.
2488         (PTHREAD_STRUCT_END_PADDING): Use it.
2490 2006-02-20  Roland McGrath  <roland@redhat.com>
2492         * sysdeps/mips: Directory removed, saved in ports repository.
2493         * sysdeps/unix/sysv/linux/mips: Likewise.
2495 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2497         * tst-robust1.c: Add second mutex to check that the mutex list is
2498         handled correctly.
2500 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2502         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2503         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2504         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2505         lll_robust_mutex_unlock): New macros.
2506         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2507         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2508         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2509         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2510         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2512 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2514         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2515         definitions.
2516         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2518 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2520         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2521         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2522         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2523         (lll_robust_mutex_unlock): Likewise.
2525 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2527         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2528         Set robust_list.__next rather than robust_list.
2529         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2530         (__pthread_list_t): New typedef.
2531         (pthread_mutex_t): Replace __next and __prev fields with __list.
2532         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2533         (__pthread_list_t): New typedef.
2534         (pthread_mutex_t): Replace __next and __prev fields with __list.
2535         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2536         (__pthread_list_t, __pthread_slist_t): New typedefs.
2537         (pthread_mutex_t): Replace __next and __prev fields with __list.
2538         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2539         (__pthread_list_t, __pthread_slist_t): New typedefs.
2540         (pthread_mutex_t): Replace __next and __prev fields with __list.
2541         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2542         (__pthread_list_t, __pthread_slist_t): New typedefs.
2543         (pthread_mutex_t): Replace __next and __prev fields with __list.
2544         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2545         (__pthread_slist_t): New typedef.
2546         (pthread_mutex_t): Replace __next field with __list.
2548 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2550         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2551         PTHREAD_MUTEX_OWNERDEAD.
2552         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2553         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2554         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2555         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2556         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2557         to PTHREAD_MUTEX_INCONSISTENT.
2558         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2559         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2560         * pthread_mutex_trylock.c: Likewise.
2561         * pthread_mutex_timedlock.c: Likewise.
2562         * pthread_mutex_unlock.c: Likewise.
2563         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2564         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2565         lowlevelrobustlock.sym.
2566         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2567         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2568         definitions.
2569         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2570         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2571         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2572         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2573         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2575 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2577         * allocatestack.c (allocate_stack): Initialize robust_list.
2578         * init.c (__pthread_initialize_minimal_internal): Likewise.
2579         * descr.h (struct xid_command): Pretty printing.
2580         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2581         robust_list.  Adjust macros.
2582         * pthread_create.c (start_thread): Adjust robust_list handling.
2583         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2584         but the owner for all robust mutex types.
2585         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2586         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2587         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2588         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2590         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2591         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2593 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2595         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2596         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2598 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2600         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2601         Return status.
2602         (lll_futex_timed_wait): Define.
2604 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2606         * tst-cancel4.c: Test ppoll.
2608 2006-01-18  Andreas Jaeger  <aj@suse.de>
2610         [BZ #2167]
2611         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2612         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2613         by Jim Gifford <patches@jg555.com>.
2615 2006-01-13  Richard Henderson  <rth@redhat.com>
2617         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2619 2006-01-10  Roland McGrath  <roland@redhat.com>
2621         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2622         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2623         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2624         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2625         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2626         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2627         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2628         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2629         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2630         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2632 2006-01-09  Roland McGrath  <roland@redhat.com>
2634         * tst-initializers1-c89.c: New file.
2635         * tst-initializers1-c99.c: New file.
2636         * tst-initializers1-gnu89.c: New file.
2637         * tst-initializers1-gnu99.c: New file.
2638         * Makefile (tests): Add them.
2639         (CFLAGS-tst-initializers1-c89.c): New variable.
2640         (CFLAGS-tst-initializers1-c99.c): New variable.
2641         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2642         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2644         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2645         Use __extension__ on anonymous union definition.
2646         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2647         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2648         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2649         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2650         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2652 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2654         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2655         Don't give the union a name because it changes the mangled name.
2656         Instead name the struct for __data.
2657         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2658         Likewise.
2659         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2660         Likewise.
2662 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2664         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2665         stack bias to mc_ftp field.
2667 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2669         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2670         being too clever and reloading the futex value where it shouldn't.
2672 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2674         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2675         correct type.
2677 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2679         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2680         Add cfi directives.
2682 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2684         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2685         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2686         rename in tcbhead_t.
2688         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2689         Don't give the union a name because it changes the mangled name.
2690         Instead name the struct for __data.
2691         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2692         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2693         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2694         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2695         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2696         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2698 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2700         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2701         Return status.
2702         (lll_futex_timed_wait): Define.
2703         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2704         * sysdeps/pthread/aio_misc.h: New file.
2706 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2708         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2710 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2712         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2713         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2714         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2716 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2718         * tst-cancel24.cc: Use C headers instead of C++ headers.
2720 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2722         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2723         sparc-linux configured glibc.
2724         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2725         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2726         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2727         atomic_compare_and_exchange_val_24_acq instead of
2728         atomic_compare_and_exchange_val_acq.
2729         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2730         instead of atomic_exchange_rel.
2731         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2732         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2733         file.
2734         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2735         file.
2736         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2737         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2738         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2739         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2740         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2741         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2742         New file.
2743         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2744         New file.
2745         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2746         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2747         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2748         file.
2749         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2750         file.
2751         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2753 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2755         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2756         mutex initializers.
2758 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2760         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2761         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2762         THREAD_COPY_POINTER_GUARD): Define.
2763         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2764         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2766 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2768         * version.c: Update copyright year.
2770 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2772         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2773         .eh_frame section, use cfi_* directives.
2774         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2776 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2778         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2779         now.
2781 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2783         * sysdeps/pthread/sigaction.c: Removed.
2784         * sigaction.c: New file.
2785         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2787 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2789         * Makefile (tests): Add tst-signal7.
2790         * tst-signal7.c: New file.
2792 2005-12-27  Roland McGrath  <roland@redhat.com>
2794         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2795         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2796         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2797         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2798         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2799         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2800         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2801         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2802         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2803         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2804         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2806 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2808         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2809         and __prev field to pthread_mutex_t.
2810         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2811         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2812         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2813         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2814         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2815         to pthread_mutex_t.
2817 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2819         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2820         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2821         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2822         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2823         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2824         and PTHREAD_MUTEXATTR_FLAG_BITS.
2825         * descr.h (struct pthread): Add robust_list field and define
2826         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2827         * pthread_mutexattr_getrobust.c: New file.
2828         * pthread_mutexattr_setrobust.c: New file.
2829         * pthread_mutex_consistent.c: New file.
2830         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2831         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2832         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2833         Adjust pthread_mutex_t initializers.
2834         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2835         field to pthread_mutex_t.
2836         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2837         and __prev field to pthread_mutex_t.
2838         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2839         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2840         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2841         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2842         * pthread_mutexattr_gettype.c: Likewise.
2843         * pthread_mutexattr_setpshared.c: Likewise.
2844         * pthread_mutexattr_settype.c: Likewise.
2845         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2846         Initialize mutex kind according to robust flag.
2847         * pthread_mutex_lock.c: Implement local robust mutex.
2848         * pthread_mutex_timedlock.c: Likewise.
2849         * pthread_mutex_trylock.c: Likewise.
2850         * pthread_mutex_unlock.c: Likewise.
2851         * pthread_create.c (start_thread): Mark robust mutexes which remained
2852         locked as dead.
2853         * tst-robust1.c: New file.
2854         * tst-robust2.c: New file.
2855         * tst-robust3.c: New file.
2856         * tst-robust4.c: New file.
2857         * tst-robust5.c: New file.
2858         * tst-robust6.c: New file.
2859         * tst-robust7.c: New file.
2860         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2861         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2862         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2863         tst-robust5, tst-robust6, and tst-robust7.
2865         * tst-typesizes.c: New file.
2866         * Makefile (tests): Add tst-typesizes.
2868         * tst-once3.c: More debug output.
2870 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2872         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2873         missing after last change.
2875         * version.c: Update copyright year.
2877 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2879         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2880         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2881         * pthread_mutex_trylock.c: Likewise.
2882         * pthread_mutex_timedlock.c: Likewise.
2883         * pthread_mutex_unlock.c: Likewise.
2885 2005-12-22  Roland McGrath  <roland@redhat.com>
2887         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2888         so that #include_next's search location is not reset to the -I..
2889         directory where <nptl/...> can be found.
2891 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2893         [BZ #1913]
2894         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2895         Fix unwind info.  Remove useless branch prediction prefix.
2896         * tst-cancel24.cc: New file.
2897         * Makefile: Add rules to build and run tst-cancel24.
2899 2005-12-21  Roland McGrath  <roland@redhat.com>
2901         * libc-cancellation.c: Use <> rather than "" #includes.
2902         * pt-cleanup.c: Likewise.
2903         * pthread_create.c: Likewise.
2904         * pthread_join.c: Likewise.
2905         * pthread_timedjoin.c: Likewise.
2906         * pthread_tryjoin.c: Likewise.
2907         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2908         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2909         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2910         * unwind.c: Likewise.
2912 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2914         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2915         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2916         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2917         THREAD_COPY_POINTER_GUARD): Define.
2919 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2921         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2922         rather than one.
2923         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2924         THREAD_COPY_POINTER_GUARD): Define.
2925         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2926         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2927         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2928         THREAD_COPY_POINTER_GUARD): Define.
2929         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2930         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2931         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2932         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2933         Use PTR_DEMANGLE for B0 if defined.
2935 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2937         * pthread_create.c (__pthread_create_2_1): Use
2938         THREAD_COPY_POINTER_GUARD if available.
2939         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2940         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2941         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2942         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2943         * sysdeps/x86_64/tls.h: Likewise.
2945 2005-12-15  Roland McGrath  <roland@redhat.com>
2947         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2949 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2951         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2952         sysdeps/generic.
2953         * errno-loc.c: New file.
2955 2005-12-12  Roland McGrath  <roland@redhat.com>
2957         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2958         adjustments before choosing stack size.  Update minimum stack size
2959         calculation to match allocate_stack change.
2961 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2963         * allocatestack.c (allocate_stack): Don't demand that there is an
2964         additional full page available on the stack beside guard, TLS, the
2965         minimum stack.
2967 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2969         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2970         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2972         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2973         compiling 32-bit code we must define __cleanup_fct_attribute.
2975 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2977         [BZ #1920]
2978         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2979         __attribute__ instead of __attribute.
2980         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2981         (__cleanup_fct_attribute): Likewise.
2983 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2985         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2986         a write barrier before writing libgcc_s_getcfa.
2988 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2990         * sysdeps/unix/sysv/linux/configure: Removed.
2992 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2994         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2995         optional init_array/fini_array support.
2997 2005-10-24  Roland McGrath  <roland@redhat.com>
2999         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3000         versioned_symbol use.
3002 2005-10-16  Roland McGrath  <roland@redhat.com>
3004         * init.c (__pthread_initialize_minimal_internal): Even when using a
3005         compile-time default stack size, apply the minimum that allocate_stack
3006         will require, and round up to page size.
3008 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3010         * Makefile ($(test-modules)): Remove static pattern rule.
3012 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3013             Ulrich Drepper  <drepper@redhat.com>
3015         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3016         alignment in callback function.
3017         * Makefile: Add rules to build and run tst-align3.
3018         * tst-align3.c: New file.
3020 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3022         * allocatestack.c (setxid_signal_thread): Add
3023         INTERNAL_SYSCALL_DECL (err).
3025 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3027         * allocatestack.c (setxid_signal_thread): Need to use
3028         atomic_compare_and_exchange_bool_acq.
3030 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3031             Jakub Jelinek  <jakub@redhat.com>
3033         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3034         CANCEL_RESTMASK.
3035         (struct pthread): Move specific_used field to avoid padding.
3036         Add setxid_futex field.
3037         * init.c (sighandler_setxid): Reset setxid flag and release the
3038         setxid futex.
3039         * allocatestack.c (setxid_signal_thread): New function.  Broken
3040         out of the bodies of the two loops in __nptl_setxid.  For undetached
3041         threads check whether they are exiting and if yes, don't send a signal.
3042         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3043         * pthread_create.c (start_thread): For undetached threads, check
3044         whether setxid bit is set.  If yes, wait until signal has been
3045         processed.
3047         * allocatestack.c (STACK_VARIABLES): Initialize them.
3048         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3050 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3052         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3053         waiters, awake all waiters on the associated mutex.
3055 2005-09-22  Roland McGrath  <roland@redhat.com>
3057         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3058         ../sysdeps/x86_64/hp-timing.h).
3060 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3062         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3063         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3064         (lll_futex_wake_unlock): Define.
3065         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3066         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3067         (lll_futex_wake_unlock): Define.
3068         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3069         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3070         (lll_futex_wake_unlock): Define.
3071         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3072         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3073         (lll_futex_wake_unlock): Define.
3074         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3075         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3076         (lll_futex_wake_unlock): Define.
3077         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3078         lll_futex_wake_unlock.
3079         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3080         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3081         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3082         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3083         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3084         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3086 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3088         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3089         Fix typo in register name.
3091 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3093         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3094         Use __sigfillset.  Document that sigfillset does the right thing wrt
3095         to SIGSETXID.
3097 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3099         [BZ #1102]
3100         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3101         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3102         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3103         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3104         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3105         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3106         in the structure.
3107         * Makefile (tests): Add tst-initializers1.
3108         (CFLAGS-tst-initializers1.c): Set.
3109         * tst-initializers1.c: New test.
3111 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3113         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3114         Make sure __flags are located at offset 48 from the start of the
3115         structure.
3117 2005-07-02  Roland McGrath  <roland@redhat.com>
3119         * Makeconfig: Comment fix.
3121 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3123         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3124         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3125         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3126         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3127         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3128         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3129         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3130         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3131         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3132         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3134 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3136         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3137         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3138         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3139         fields.
3140         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3141         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3142         field.  Put in sysinfo field unconditionally.
3143         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3144         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3145         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3146         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3147         fields.
3148         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3149         * pthread_create.c (__pthread_create_2_1): Use
3150         THREAD_COPY_STACK_GUARD macro.
3151         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3152         tests.
3153         * tst-stackguard1.c: New file.
3154         * tst-stackguard1-static.c: New file.
3156 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3158         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3159         Invoke CGOTSETUP and CGOTRESTORE.
3160         (CGOTSETUP, CGOTRESTORE): Define.
3162 2005-05-29  Richard Henderson  <rth@redhat.com>
3164         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3165         (tf_write, tf_writev): Use it.
3166         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3167         the system minimum.
3169 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3171         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3172         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3173         __librt_*_asynccancel@local.
3175 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3177         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3178         all occurrences of JUMPTARGET.  Instead append @local to labels.
3180 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3182         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3183         size/alignment of struct pthread rather than tcbhead_t.
3184         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3185         Likewise.
3186         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3187         Likewise.
3188         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3189         Likewise.
3191 2005-05-19  Richard Henderson  <rth@redhat.com>
3193         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3194         __sync_val_compare_and_swap, not explicit _si variant.
3195         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3197 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3199         [BZ #915]
3200         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3202 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3204         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3205         .eh_frame section, use cfi_* directives.
3207 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3209         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3210         of "" includes.
3212 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3214         [BZ #1075]
3215         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3216         aio_write blocks.
3218 2005-04-27  Roland McGrath  <roland@redhat.com>
3220         * Makefile (tests): Remove tst-clock2.
3222         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3223         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3224         translating to the kernel clockid_t for our own process/thread clock.
3226         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3228 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3230         * old_pthread_cond_init.c: Include <errno.h>.
3231         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3232         process shared or uses clock other than CLOCK_REALTIME.
3233         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3235 2005-04-13  David S. Miller  <davem@davemloft.net>
3237         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3238         * sysdeps/sparc/sparc64/clone.S: New file.
3240 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3242         [BZ #1102]
3243         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3244         __inline instead of inline.
3245         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3247 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3249         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3250         functionally equivalent, but shorter instructions.
3251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3252         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3253         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3254         Likewise.
3255         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3256         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3257         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3258         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3259         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3260         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3261         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3262         Likewise.
3263         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3264         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3265         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3266         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3267         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3269 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3271         * sysdeps/mips/Makefile: New file.
3272         * sysdeps/mips/nptl-sysdep.S: New file.
3273         * sysdeps/mips/tcb-offsets.sym: New file.
3274         * sysdeps/mips/pthread_spin_lock.S: New file.
3275         * sysdeps/mips/pthread_spin_trylock.S: New file.
3276         * sysdeps/mips/pthreaddef.h: New file.
3277         * sysdeps/mips/tls.h: New file.
3278         * sysdeps/mips/jmpbuf-unwind.h: New file.
3279         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3280         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3281         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3282         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3283         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3284         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3285         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3286         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3287         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3288         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3290 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3292         [BZ #1112]
3293         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3294         variable to scerr.
3296 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3298         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3300 2005-02-25  Roland McGrath  <roland@redhat.com>
3302         * alloca_cutoff.c: Correct license text.
3303         * tst-unload.c: Likewise.
3304         * sysdeps/pthread/allocalim.h: Likewise.
3305         * sysdeps/pthread/pt-initfini.c: Likewise.
3306         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3307         * sysdeps/pthread/bits/sigthread.h: Likewise.
3308         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3309         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3311 2005-02-16  Roland McGrath  <roland@redhat.com>
3313         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3314         Use unsigned int * for ptr_nthreads.
3316 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3318         [BZ #721]
3319         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3320         gcc4.
3322 2005-02-07  Richard Henderson  <rth@redhat.com>
3324         [BZ #787]
3325         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3326         argument.
3328 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3330         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3331         order of arguments in invocation of atomic_add_zero.
3333 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3335         [BZ #737]
3336         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3337         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3338         at least gotntpoff relocation and addition.
3339         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3340         Likewise.
3341         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3342         Likewise.
3343         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3344         Likewise.
3346 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3348         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3349         entry for static tls deallocation fix.
3350         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3351         also contains information whether the memory pointed to is static
3352         TLS or not.
3353         * sysdeps/i386/tls.h: Likewise.
3354         * sysdeps/ia64/tls.h: Likewise.
3355         * sysdeps/powerpc/tls.h: Likewise.
3356         * sysdeps/s390/tls.h: Likewise.
3357         * sysdeps/sh/tls.h: Likewise.
3358         * sysdeps/sparc/tls.h: Likewise.
3359         * sysdeps/x86_64/tls.h: Likewise.
3361 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3363         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3365 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3367         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3368         %esp.
3369         * Makefile (tests): Add tst-align2.
3370         * tst-align2.c: New test.
3371         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3372         -mpreferred-stack-boundary=4.
3374 2004-12-18  Roland McGrath  <roland@redhat.com>
3376         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3377         New file removed withdrawn for the moment.
3379 2004-12-17  Richard Henderson  <rth@redhat.com>
3381         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3382         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3384 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3386         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3387         Increased PTHREAD_STACK_MIN.
3389         * tst-context1.c (stacks): Use bigger stack size.
3391 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3393         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3394         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3396 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3398         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3399         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3400         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3402 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3404         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3406 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3408         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3409         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3411         * tst-getpid1.c: If child crashes, report this first.  Print which
3412         signal.
3414 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3416         * init.c (__pthread_initialize_minimal_internal): Also unblock
3417         SIGSETXID.
3419 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3421         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3422         _POSIX_THREAD_CPUTIME): Define to 0.
3423         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3424         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3425         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3426         __timer_signal_thread_tclk): Remove.
3427         (init_module): Remove their initialization.
3428         (thread_cleanup): Remove their cleanup assertions.
3429         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3430         __timer_signal_thread_tclk): Remove.
3431         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3432         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3433         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3435 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3437         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3438         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3440         * Makefile (tests): Add tst-getpid2.
3441         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3442         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3443         * tst-getpid2.c: New test.
3445 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3447         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3449 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3451         * Makefile (tests): Add tst-getpid1.
3452         * tst-getpid1.c: New file.
3453         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3454         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3456 2004-12-02  Roland McGrath  <roland@redhat.com>
3458         * Makefile (libpthread-nonshared): Variable removed.
3459         ($(objpfx)libpthread_nonshared.a): Target removed.
3460         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3461         These are now handled by generic magic from
3462         libpthread-static-only-routines being set.
3464 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3466         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3467         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3468         _POSIX_THREAD_PRIO_PROTECT): Define.
3469         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3470         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3471         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3473 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3475         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3476         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3477         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3478         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3479         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3480         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3481         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3483 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3485         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3487         * Makefile (libpthread-routines): Add pthread_setschedprio.
3488         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3489         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3490         * pthread_setschedprio.c: New file.
3492 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3494         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3495         * pthread_cancel.c (pthread_create): Likewise.
3497         * Makefile (libpthread-routines): Add vars.
3498         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3499         * init.c (__default_stacksize, __is_smp): Remove.
3500         * vars.c: New file.
3501         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3502         and define a wrapper macro.
3503         (PTHREAD_STATIC_FN_REQUIRE): Define.
3504         * allocatestack.c (__find_thread_by_id): Undefine.
3505         * pthread_create (__pthread_keys): Remove.
3506         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3507         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3508         PTHREAD_STATIC_FN_REQUIRE.
3510 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3512         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3513         parameter to REGISTER macro.
3515 2004-11-17  Roland McGrath  <roland@redhat.com>
3517         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3518         Make sure SIGCANCEL is blocked as well.
3520 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3522         * sysdeps/pthread/setxid.h: New file.
3523         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3524         (struct xid_command): Add forward decl.
3525         (struct pthread_functions): Change return type of __nptl_setxid hook
3526         to int.
3527         * pthreadP.h (__nptl_setxid): Change return type to int.
3528         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3529         calling thread, return its return value and set errno on failure.
3530         * descr.h (struct xid_command): Change id type to long array.
3532         * Makefile: Add rules to build and test tst-setuid1 and
3533         tst-setuid1-static.
3534         * tst-setuid1.c: New test.
3535         * tst-setuid1-static.c: New test.
3537 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3539         * Makefile (tests): Add tst-exit3.
3540         * tst-exit3.c: New test.
3542 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3544         * Makefile (tests): Add tst-exit2.
3545         * tst-exit2.c: New file.
3547 2004-11-09  Roland McGrath  <roland@redhat.com>
3549         [BZ #530]
3550         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3551         here, before calling clone.
3552         * pthread_create.c (start_thread): Don't do it here.
3554 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3556         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3558 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3560         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3561         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3562         assembler warning.
3564 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3566         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3567         if sched_priority is not between minprio and maxprio.
3569 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3571         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3572         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3574         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3575         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3577 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3579         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3580         not-cancelable I/O functions.
3582 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3584         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3585         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3586         make sure 2 is stored in the futex and we looked at the old value.
3587         Fix a few other problems to return the correct value.
3589 2004-10-14  Richard Henderson  <rth@redhat.com>
3591         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3592         make gcc4 happy.
3594 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3596         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3597         of pthread-functions.h and pthreaddef.h.
3598         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3600         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3601         Change __data.__nwaiters from int to unsigned int.
3603         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3604         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3606         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3607         before return type.
3609         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3610         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3612 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3614         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3615         test fails, remove message queue.
3616         (tf_msgsnd): Likewise.
3618 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3620         * tst-clock1.c: Change #ifdef to #if defined.
3621         * tst-clock2.c: Likewise.
3622         * tst-cond11.c: Likewise.
3624         * sysdeps/pthread/timer_create.c (timer_create): Use
3625         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3626         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3627         THREAD_CPUTIME.
3629 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3631         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3632         _POSIX_THREAD_CPUTIME): Define to 0.
3634 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3636         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3637         and _POSIX_THREAD_CPUTIME to zero.
3638         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3639         * tst-barrier2.c: Fix testing for POSIX feature.
3640         * tst-clock1.c: Likewise.
3641         * tst-clock2.c: Likewise.
3642         * tst-cond11.c: Likewise.
3643         * tst-cond4.c: Likewise.
3644         * tst-cond6.c: Likewise.
3645         * tst-flock2.c: Likewise.
3646         * tst-mutex4.c: Likewise.
3647         * tst-mutex9.c: Likewise.
3648         * tst-rwlock12.c: Likewise.
3649         * tst-rwlock4.c: Likewise.
3650         * tst-signal1.c: Likewise.
3651         * tst-spin2.c: Likewise.
3652         * sysdeps/pthread/posix-timer.h: Likewise.
3653         * sysdeps/pthread/timer_create.c: Likewise.
3654         * sysdeps/pthread/timer_routines.c: Likewise.
3656 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3658         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3659         (__lll_mutex_timedlock_wait): Address futex correctly.
3661         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3662         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3663         make sure 2 is stored in the futex and we looked at the old value.
3664         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3665         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3666         which might very well made the code not working at all before.
3667         [BZ #417]
3669 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3671         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3672         allow SIGSETXID to be sent.
3673         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3674         for SIGSETXID to be defined.
3675         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3676         SIGSETXID cannot be blocked.
3678         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3679         Add __extension__ to long long types.
3680         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3681         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3682         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3683         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3684         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3685         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3686         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3688 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3690         * descr.h (struct pthread): Add stopped_start field.
3691         * sysdeps/pthread/createthread.c (create_thread): Set
3692         start_stopped flag in descriptor for new thread appropriately.
3693         * pthread_create.c (start_thread): Only take lock to be stopped on
3694         startup if stopped_start flag says so.
3696 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3698         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3699         is created detached and if yes, do not try to free the stack in case
3700         the thread creation failed.
3701         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3702         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3703         case there has been no error.  [BZ #405]
3705         * pthread_create.c (start_thread): Don't wait for scheduler data
3706         etc to be set at the beginning of the function.  The cancellation
3707         infrastructure must have been set up.  And enable async
3708         cancellation before potentially going to sleep.  [BZ #401]
3710 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3712         * Versions: Remove exports for pthread_set*id_np functions.
3713         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3714         for now.
3715         * Makefile: Don't build pthread_set*id code for now.
3717 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3719         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3720         internal use.
3721         * allocatestack.c (__nptl_setxid): New function.
3722         * descr.h (struct xid_command): Define type.
3723         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3724         (sighandler_setxid): New function.
3725         (__pthread_initialize_minimal): Register sighandler_setxid for
3726         SIGCANCEL.
3727         * pt-allocrtsig.c: Update comment.
3728         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3729         Declare __nptl_setxid.
3730         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3731         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3732         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3733         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3734         and pthread_setresuid_np.
3735         * pthread_setgid_np.c: New file.
3736         * pthread_setuid_np.c: New file.
3737         * pthread_setegid_np.c: New file.
3738         * pthread_seteuid_np.c: New file.
3739         * pthread_setregid_np.c: New file.
3740         * pthread_setreuid_np.c: New file.
3741         * pthread_setresgid_np.c: New file.
3742         * pthread_setresuid_np.c: New file.
3743         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3744         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3745         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3746         and pthread_setresuid_np.
3747         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3748         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3749         pthread_setregid, and pthread_setresgid.
3751 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3753         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3754         ENOMEM when out of memory.
3756 2004-09-10  Roland McGrath  <roland@redhat.com>
3758         [BZ #379]
3759         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3760         code, since we don't try to use the broken CLONE_STOPPED any more.
3761         * pthread_create.c (start_thread): Likewise.
3763 2004-09-15  Richard Henderson  <rth@redhat.com>
3765         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3767 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3769         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3770         (__libc_unwind_longjmp): Delete macro and declare as function.
3771         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3772         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3773         nptl directory.
3774         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3775         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3776         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3778 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3780         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3781         for __USE_XOPEN2K.
3782         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3783         types also for __USE_XOPEN2K.
3784         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3785         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3786         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3787         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3788         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3789         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3790         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3791         [BZ #320]
3793 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3795         * sysdeps/pthread/pthread.h
3796         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3797         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3798         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3799         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3800         [BZ #375]
3802 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3804         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3805         PSEUDO to be used with . prefix.
3807         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3808         Use atomic_increment instead of atomic_exchange_and_add.
3809         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3810         Likewise.
3811         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3812         Likewise.
3813         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3814         Likewise.
3816         * allocatestack.c (allocate_stack): Use atomic_increment_val
3817         instead of atomic_exchange_and_add.
3818         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3819         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3820         Likewise.
3821         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3822         Likewise.
3824         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3825         the initialization function might throw.
3827 2005-09-05  Richard Henderson  <rth@redhat.com>
3829         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3830         Move definition inside libpthread, libc, librt check.  Provide
3831         definition for rtld.
3833 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3835         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3836         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3837         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3838         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3839         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3840         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3841         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3842         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3843         * unwind.c: Use it.
3845         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3846         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3847         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3848         Likewise.
3849         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3850         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3851         this is the last waiter, signal pthread_cond_destroy caller and
3852         avoid using the pthread_cond_t structure after unlock.
3853         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3854         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3855         Read clock type from the least significant bits of __nwaiters instead
3856         of __clock.
3857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3858         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3860 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3862         [BZ #342]
3863         * Makefile (tests): Add tst-cond20 and tst-cond21.
3864         * tst-cond20.c: New test.
3865         * tst-cond21.c: New test.
3866         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3867         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3868         it unsigned int.
3869         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3870         Likewise.
3871         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3872         (pthread_cond_t): Likewise.
3873         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3874         Likewise.
3875         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3876         Likewise.
3877         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3878         Likewise.
3879         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3880         (cond_nwaiters): New.
3881         (clock_bits): New.
3882         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3883         if there are waiters not signalled yet.
3884         Wait until all already signalled waiters wake up.
3885         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3886         __nwaiters.  If pthread_cond_destroy has been called and this is the
3887         last waiter, signal pthread_cond_destroy caller and avoid using
3888         the pthread_cond_t structure after unlock.
3889         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3890         decrement it when leaving.  If pthread_cond_destroy has been called
3891         and this is the last waiter, signal pthread_cond_destroy caller.
3892         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3893         Likewise.  Read clock type from the least significant bits of
3894         __nwaiters instead of __clock.
3895         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3896         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3897         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3898         clock type just from the last COND_CLOCK_BITS bits of value.
3899         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3900         instead of __clock, just from second bit of condattr's value.
3902 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3904         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3905         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3906         != 64.
3907         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3909 2004-08-15  Roland McGrath  <roland@frob.com>
3911         * pthread_atfork.c: Update copyright terms including special exception
3912         for these trivial files, which are statically linked into executables
3913         that use dynamic linking for the significant library code.
3915 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3917         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3918         pthread_rwlock_rdlock.
3919         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3920         Decrease __nr_readers_queued after reacquiring lock.
3921         * sysdeps/pthread/pthread_rwlock_timedrdlock
3922         (pthread_rwlock_timedrdlock): Likewise.
3923         Reported by Bob Cook <bobcook47@hotmail.com>.
3925 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3927         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3928         before pthread_barrier_wait.
3930 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3933         Remove unnecessary exception handling data.
3935 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3937         [BZ #284]
3938         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3939         instead of clockid_t.
3941 2004-07-21  Roland McGrath  <roland@redhat.com>
3943         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3945 2004-07-19  Roland McGrath  <roland@redhat.com>
3947         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3949 2004-07-02  Roland McGrath  <roland@redhat.com>
3951         * configure: Don't exit.
3953 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3955         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3956         (__pthread_cond_timedwait): Check for invalid nanosecond in
3957         timeout value.
3959 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3961         * Makefile: Add rules to build and run tst-fini1.
3962         * tst-fini1.c: New file.
3963         * tst-fini1mod.c: New file.
3965 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3967         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3968         if no cancellation support is needed.
3969         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3970         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3971         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3972         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3973         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3974         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3975         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3976         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3977         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3979         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3980         only if not already defined.
3982 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3984         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3985         constraint "m" instead of "0" for futex.
3987         * shlib-versions: Add powerpc64-.*-linux.*.
3989 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3991         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3992         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3993         for valid tv_nsec.
3994         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3995         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3996         bits.
3998 2004-06-29  Roland McGrath  <roland@redhat.com>
4000         * Banner: NPTL no longer has its own version number.
4001         * Makefile (nptl-version): Variable removed.
4002         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4003         using $(version), the glibc version number.
4005 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4007         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4008         Fix branch offset for a PLT entry.
4009         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4010         Likewise.
4011         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4012         Likewise.
4013         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4014         Likewise.
4015         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4016         Likewise.
4018 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4020         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4021         unconditionally.
4023 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4025         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4026         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4027         instead of tv_sec.
4028         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4029         (pthread_rwlock_timedrdlock): Likewise.
4031 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4033         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4034         Set __r7 to val, not mutex.
4036 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4038         * Makefile: Add rules to build tst-rwlock14.
4039         * tst-rwlock14.c: New file.
4041 2004-06-24  Boris Hu  <boris.hu@intel.com>
4043         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4044         check.
4045         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4047 2004-06-19  Andreas Jaeger  <aj@suse.de>
4049         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4050         assembler in last patch.
4052 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4054         * sysdeps/pthread/pthread_cond_timedwait.c
4055         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4056         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4057         (__pthread_cond_timedwait): Check for invalid nanosecond in
4058         timeout value.
4059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4060         * tst-cond19.c: New file.
4061         * Makefile: Add rules to build and run tst-cond19.
4063 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4065         * tst-context1.c (GUARD_PATTERN): Defined.
4066         (tst_context_t): Define struct containing ucontext_t & guard words.
4067         (ctx): Declare as an array of tst_context_t.
4068         (fct): Verify uc_link & guard words are still valid.
4069         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4071 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4073         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4074         Add __data.__futex field, reshuffle __data.__clock.
4075         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4076         (__pthread_cond_signal): Increment __futex at the same time as
4077         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4078         address of low 32-bits of __wakeup_seq to futex syscall.
4079         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4080         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4081         releasing internal lock to FUTEX_WAIT.
4082         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4083         (__pthread_cond_timedwait): Likewise.
4084         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4085         (FUTEX_CMP_REQUEUE): Define.
4086         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4087         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4088         Pass __futex value from before the unlock and __futex address instead
4089         of address of low 32-bits of __wakeup_seq to futex syscall.
4090         Fallback to FUTEX_WAKE all on any errors.
4092 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4094         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4095         comment typo.
4096         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4097         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4098         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4099         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4100         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4102 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4104         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4105         Add memory clobber to inline assembly.
4106         (__lll_mutex_trylock): Likewise.
4107         (__lll_mutex_cond_trylock): Likewise.
4109 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4111         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4112         Pass val argument as 6th system call argument in %r7.
4114 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4116         * Makefile (tests): Add tst-cond16.
4117         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4118         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4119         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4120         Add __data.__futex field, reshuffle __data.__clock.
4121         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4122         (__pthread_cond_signal): Increment __futex at the same time as
4123         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4124         address of low 32-bits of __wakeup_seq to futex syscall.
4125         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4126         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4127         releasing internal lock to FUTEX_WAIT.
4128         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4129         (__pthread_cond_timedwait): Likewise.
4130         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4131         (FUTEX_CMP_REQUEUE): Define.
4132         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4133         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4134         Pass __futex value from before the unlock and __futex address instead
4135         of address of low 32-bits of __wakeup_seq to futex syscall.
4136         Fallback to FUTEX_WAKE all on any errors.
4137         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4138         Define.
4139         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4140         internally.  Return non-zero if error, zero if success.
4141         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4142         Add __data.__futex field, reshuffle __data.__clock.
4143         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4144         Define.
4145         (lll_futex_requeue): Add val argument, return 1 unconditionally
4146         for the time being.
4147         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4148         Add __data.__futex field, reshuffle __data.__clock.
4149         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4150         Define.
4151         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4152         internally.  Return non-zero if error, zero if success.
4153         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4154         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4155         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4156         Define.
4157         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4158         internally.  Return non-zero if error, zero if success.
4159         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4160         Add __data.__futex field, reshuffle __data.__clock.
4161         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4162         Define.
4163         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4164         internally.  Return non-zero if error, zero if success.
4165         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4166         Add __data.__futex field, reshuffle __data.__clock.
4167         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4168         Add __data.__futex field, reshuffle __data.__clock.
4169         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4170         Increment __futex at the same time as __wakeup_seq or __total_seq.
4171         Pass address of __futex instead of address of low 32-bits of
4172         __wakeup_seq to futex syscall.
4173         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4174         Pass __futex value from before releasing internal lock
4175         to FUTEX_WAIT.
4176         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4177         Likewise.  Avoid unnecessary shadowing of variables.
4178         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4179         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4180         unlock and __futex address instead of address of low 32-bits of
4181         __wakeup_seq to futex_requeue macro, adjust for new return value
4182         meaning.
4183         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4184         (__pthread_cond_signal): Increment __futex at the same time as
4185         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4186         address of low 32-bits of __wakeup_seq to futex syscall.
4187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4188         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4189         releasing internal lock to FUTEX_WAIT.
4190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4191         (__pthread_cond_timedwait): Likewise.
4192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4193         (FUTEX_CMP_REQUEUE): Define.
4194         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4195         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4196         Pass __futex value from before the unlock and __futex address instead
4197         of address of low 32-bits of __wakeup_seq to futex syscall.
4198         Fallback to FUTEX_WAKE all on any errors.
4200 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4202         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4203         Add nop to align the end of critical section.
4204         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4206 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4208         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4209         Add __broadcast_seq field.
4210         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4211         all waiters as woken with woken_seq and bump broadcast counter.
4212         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4213         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4214         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4215         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4217 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4220         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4221         Reported by Kaz Kojima.
4223 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4225         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4227 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4229         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4230         __broadcast_seq with bc_seq after acquiring internal lock instead of
4231         before it.
4233 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4235         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4236         compilation.
4237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4238         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4239         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4240         (pthread_cond_t): Add __data.__broadcast_seq field.
4241         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4242         (FRAME_SIZE): Define.
4243         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4244         Comment typo fixes.
4245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4246         Define.
4247         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4248         typo fixes.
4249         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4250         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4251         fixes.
4253 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4255         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4256         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4257         Add __broadcast_seq field.
4258         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4259         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4260         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4261         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4262         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4264         all waiters as woken with woken_seq and bump broadcast counter.
4265         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4267         __broadcast_seq field.
4268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4269         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4270         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4271         * pthread_cond_init.c: Initialize __broadcast_seq field.
4272         * Makefile (tests): Add tst-cond17 and tst-cond18.
4273         Add .NOTPARALLEL goal.
4274         * tst-cond16.c: New file.  From Jakub.
4275         * tst-cond17.c: New file.  From Jakub.
4276         * tst-cond18.c: New file.  From Jakub.
4278 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4280         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4281         unwind info.
4283         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4284         Parametrize frame size.  Correct some unwind info.
4285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4287 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4289         * tst-stack3.c: Note testing functionality beyond POSIX.
4291 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4293         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4294         Change conditional from ifdef to if.
4296 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4298         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4299         SYSDEP_CANCEL_ERROR): Define.
4300         (PSEUDO): Use it.
4302 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4304         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4306 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4308         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4310 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4312         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4313         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4314         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4315         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4317 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4319         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4320         thread has all signals blocked.
4322 2004-04-18  Andreas Jaeger  <aj@suse.de>
4324         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4325         (SEM_VALUE_MAX): Add missing brace.
4327 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4329         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4330         in rt subdir.
4331         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4332         * sysdeps/pthread/tst-mqueue8x.c: New test.
4333         * tst-cancel4.c: Update comment about message queues.
4335         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4336         return it_value { 0, 0 }.
4337         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4338         like SIGEV_SIGNAL.
4339         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4340         assertion for SIGEV_NONE.
4341         (thread_attr_compare): Compare all attributes, not just a partial
4342         subset.
4344 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4346         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4348 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4350         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4351         Just use a plain number.
4352         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4353         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4354         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4355         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4356         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4357         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4358         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4360 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4362         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4363         frame info.
4364         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4366 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4368         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4369         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4370         of calling sigwaitinfo.
4372 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4374         * allocatestack.c (allocate_stack): Set reported_guardsize
4375         unconditionally.
4376         * pthread_getattr_np.c (pthread_getattr_np): Use
4377         reported_guardsize instead of guardsize.
4378         * descr.h (struct pthread): Add reported_guardsize field.
4380 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4382         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4384 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4386         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4388 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4390         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4391         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4392         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4393         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4394         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4395         Define.
4396         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4397         (_POSIX_MESSAGE_PASSING): Define.
4398         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4399         (_POSIX_MESSAGE_PASSING): Define.
4400         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4401         (_POSIX_MESSAGE_PASSING): Define.
4403 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4405         * tst-context1.c (fct): Check whether correct stack is used.
4407 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4409         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4410         matching constraints for asm mem parameters.
4412         * tst-clock2.c (tf): Don't define unless needed.
4414 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4416         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4417         $(gnulib).
4419 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4421         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4422         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4423         * pthreadP.h: Declare __nptl_deallocate_tsd.
4424         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4425         Adjust caller.
4427         * Makefile (tests): Add tst-tsd5.
4428         * tst-tsd5.c: New file.
4430 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4432         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4433         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4434         is SHLIB_COMPAT check.
4435         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4436         (__pthread_attr_getaffinity_old): Likewise.
4437         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4438         (__pthread_getaffinity_old): Likewise.
4439         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4440         (__pthread_setaffinity_old): Likewise.
4442 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4444         * allocatestack.c (_make_stacks_executable): Call
4445         _dl_make_stack_executable first.
4447 2004-03-24  Roland McGrath  <roland@redhat.com>
4449         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4450         constraint instead of "0".
4452 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4454         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4455         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4457         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4458         code to avoid warning.
4460 2004-03-24  Andreas Jaeger  <aj@suse.de>
4462         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4463         (__pthread_attr_setaffinity_old): Remove const.
4465 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4467         * sysdeps/unix/sysv/linux/smp.h: New file.
4468         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4469         * init.c: Define __is_smp.
4470         (__pthread_initialize_minimal_internal): Call is_smp_system to
4471         initialize __is_smp.
4472         * pthreadP.h: Declare __is_smp.
4473         Define MAX_ADAPTIVE_COUNT is necessary.
4474         * pthread_mutex_init.c: Add comment regarding __spins field.
4475         * pthread_mutex_lock.c: Implement adaptive mutex type.
4476         * pthread_mutex_timedlock.c: Likewise.
4477         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4478         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4479         Add __spins field.
4480         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4481         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4482         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4483         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4484         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4485         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4486         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4487         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4488         lll_mutex_cond_trylock.
4489         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4490         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4491         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4492         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4493         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4494         Define BUSY_WAIT_NOP.
4495         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4496         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4498         * tst-mutex5.c: Add support for testing adaptive mutexes.
4499         * tst-mutex7.c: Likewise.
4500         * tst-mutex5a.c: New file.
4501         * tst-mutex7a.c: New file.
4502         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4504         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4505         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4506         vgettimeofday call might destroy the content.
4508         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4509         @pause in the loop.
4511         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4512         No need to restrict type of ret.  Make it int.  Add comment.
4514         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4515         Remove unnecessary setne instruction.
4517 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4519         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4520         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4521         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4522         If realloc fails, break out of the loop.
4524 2004-03-20  Andreas Jaeger  <aj@suse.de>
4526         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4527         (__pthread_setaffinity_old): Fix interface.
4528         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4529         (__pthread_getaffinity_old): Likewise.
4531         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4532         (__pthread_setaffinity_new): Remove duplicate declaration.
4534 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4536         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4537         the return value to a safe register.
4538         (CDISABLE): Set the function argument correctly.
4540 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4542         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4543         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4544         Rewrite so that only one locked memory operation per round is needed.
4545         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4546         (pthread_barrier_wait): After wakeup, release lock only when the
4547         last thread stopped using the barrier object.
4548         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4549         (__pthread_cond_wait): Don't store mutex address if the current
4550         value is ~0l.  Add correct cleanup support and unwind info.
4551         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4552         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4553         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4554         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4555         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4556         Add correct cleanup support and unwind info.
4557         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4558         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4559         information for syscall wrappers.
4561 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4563         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4564         cpusetsize field, remove next.
4565         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4566         parameter for size of the CPU set.
4567         (pthread_setaffinity_np): Likewise.
4568         (pthread_attr_getaffinity_np): Likewise.
4569         (pthread_attr_setaffinity_np): Likewise.
4570         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4571         interface change, keep compatibility code.
4572         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4573         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4574         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4575         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4576         __pthread_getaffinity_np.
4577         * Versions: Add version for changed interfaces.
4578         * tst-attr3.c: Adjust test for interface change.
4579         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4580         increasing buffer sizes.
4581         * pthread_attr_destroy.c: Remove unused list handling.
4582         * pthread_attr_init.c: Likewise.
4584 2004-03-17  Roland McGrath  <roland@redhat.com>
4586         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4587         first argument to clock_getres so we ever enable kernel timers.
4589 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4591         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4593 2004-03-12  Richard Henderson  <rth@redhat.com>
4595         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4596         oldvalue from CENABLE to CDISABLE.
4598 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4600         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4601         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4602         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4603         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4605 2004-03-11  Richard Henderson  <rth@redhat.com>
4607         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4608         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4609         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4611 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4613         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4614         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4615         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4617 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4619         * forward.c (__pthread_cond_broadcast_2_0,
4620         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4621         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4622         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4624 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4626         * sysdeps/sh/tcb-offsets.sym: Add PID.
4627         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4628         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4630 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4632         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4633         include <sysdep-cancel.h>, vfork is no cancellation point.
4634         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4635         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4636         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4638 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4640         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4641         libc_hidden_def.
4642         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4643         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4644         Likewise.
4645         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4646         Likewise.
4647         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4648         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4649         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4650         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4651         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4653         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4654         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4655         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4656         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4657         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4658         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4660         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4661         a local register for saving old PID.  Negate PID in parent upon exit.
4663         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4664         tcb-offsets.h.
4665         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4666         before syscall, set to the old value in the parent afterwards.
4667         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4668         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4669         tcb-offsets.h.
4670         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4671         before syscall, set to the old value in the parent afterwards.
4672         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4673         * sysdeps/s390/tcb-offsets.sym: Add PID.
4675         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4676         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4677         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4678         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4679         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4680         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4682 2004-03-10  Andreas Schwab  <schwab@suse.de>
4684         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4685         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4686         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4688 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4690         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4691         * tst-cancel21.c (do_one_test): Likewise.
4692         Reported by Gordon Jin <gordon.jin@intel.com>.
4694 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4696         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4697         if non-zero and set to INT_MIN if zero.
4698         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4699         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4700         (SAVE_PID, RESTORE_PID): Define.
4701         (__vfork): Use it.
4702         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4703         Use relative path to avoid including NPTL i386/vfork.S.
4704         (SAVE_PID, RESTORE_PID): Define.
4705         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4706         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4707         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4708         tst-vfork2x.
4709         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4710         * tst-vfork1.c: New test.
4711         * tst-vfork2.c: New test.
4712         * tst-vfork1x.c: New test.
4713         * tst-vfork2x.c: New test.
4715 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4717         * sysdeps/i386/tcb-offsets.sym: Add PID.
4718         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4719         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4720         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4722 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4724         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4726 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4728         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4729         _rtld_global_ro.
4731 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4733         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4734         _rtld_global_ro.
4736         * tst-once4.c: Remove unnecessary macro definition.
4738         * tst-mutex7.c (do_test): Limit thread stack size.
4739         * tst-once2.c (do_test): Likewise.
4740         * tst-tls3.c (do_test): Likewise.
4741         * tst-tls1.c (do_test): Likewise.
4742         * tst-signal3.c (do_test): Likewise.
4743         * tst-kill6.c (do_test): Likewise.
4744         * tst-key4.c (do_test): Likewise.
4745         * tst-join4.c (do_test): Likewise.
4746         * tst-fork1.c (do_test): Likewise.
4747         * tst-context1.c (do_test): Likewise.
4748         * tst-cond2.c (do_test): Likewise.
4749         * tst-cond10.c (do_test): Likewise.
4750         * tst-clock2.c (do_test): Likewise.
4751         * tst-cancel10.c (do_test): Likewise.
4752         * tst-basic2.c (do_test): Likewise.
4753         * tst-barrier4.c (do_test): Likewise.
4755 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4757         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4759 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4761         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4762         (__pthread_cond_timedwait): Optimize wakeup test.
4763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4764         (__pthread_cond_wait): Likewise.
4765         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4766         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4767         Likewise.
4769 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4771         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4772         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4773         the atomic instruction needed.
4774         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4775         (__lll_mutex_lock_wait): Likewise.
4777 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4779         * Makefile (tests): Add tst-cond14 and tst-cond15.
4780         * tst-cond14.c: New file.
4781         * tst-cond15.c: New file.
4783 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4785         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4786         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4787         needs to be implemented differently to be useful.
4789 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4791         * pthread_attr_setschedparam.c: Don't test priority against limits
4792         here.  Set ATTR_FLAG_SCHED_SET flag.
4793         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4794         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4795         from parent thread to child.  If attribute is used and scheduling
4796         parameters are not inherited, copy parameters from attribute or
4797         compute them.  Check priority value.
4798         * pthread_getschedparam.c: If the parameters aren't known yet get
4799         them from the kernel.
4800         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4801         ATTR_FLAG_POLICY_SET flag for thread.
4802         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4803         and ATTR_FLAG_POLICY_SET.
4805         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4807         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4808         fail if stack address hasn't been set.  Just return 0.
4810 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4812         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4813         libpthread for the files in this list.
4814         (CFLAGS-tst-unload): Removed.
4815         * tst-unload.c (do_test): Don't use complete path for
4816         LIBPHREAD_SO.
4818         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4819         tst-_res1mod2.
4821 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4823         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4824         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4825         operation per round is needed.
4826         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4827         (__lll_mutex_lock_wait): Likewise.
4829 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4831         * tst-cancel9.c (cleanup): Don't print to stderr.
4833 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4835         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4837 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4839         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4840         (__syscall_error_handler2): Call CDISABLE.
4841         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4842         (__syscall_error_handler2): Call CDISABLE.
4844         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4845         Release lock before the loop, don't reacquire it.
4847         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4849 2004-02-19  Andreas Schwab  <schwab@suse.de>
4851         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4852         Fix last change.
4854 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4856         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4857         (pthread_barrier_wait): After wakeup, release lock only when the
4858         last thread stopped using the barrier object.
4859         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4860         (pthread_barrier_wait): Likewise.
4861         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4862         Likewise.
4863         * Makefile (tests): Add tst-barrier4.
4864         * tst-barrier4.c: New file.
4866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4867         (__pthread_cond_timedwait): Perform timeout test while holding
4868         internal lock to prevent wakeup race.
4869         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4870         * sysdeps/pthread/pthread_cond_timedwait.c
4871         (__pthread_cond_timedwait): Likewise.
4872         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4873         (__pthread_cond_timedwait): Likewise.
4875 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4877         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4878         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4879         * Makefile (tests): Add tst-rwlock13.
4880         * tst-rwlock13.c: New test.
4882 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4884         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4885         (__condvar_tw_cleanup): Little optimization.
4886         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4888 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4890         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4891         libpthread as "lib" parameter to SHLIB_COMPAT.
4892         (__novmx_siglongjmp): Fix typo in function name.
4893         (__novmx_longjmp): Fix typo in function name.
4895 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4897         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4898         __builtin_expect.
4900         * sysdeps/generic/pt-longjmp.c: Moved to...
4901         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4903 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4905         * Makefile (libpthread-routines): Add pt-cleanup.
4906         * pt-longjmp.c: Removed.
4907         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4908         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4909         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4910         Version longjmp, siglongjmp for GLIBC_2.3.4.
4911         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4913 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4915         * sysdeps/pthread/pthread_cond_timedwait.c
4916         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4917         Reuse code.  Add __builtin_expects.
4919         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4920         (__pthread_cond_timedwait): Get internal lock in case timeout has
4921         passed before the futex syscall.
4922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4924 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4926         * allocatestack.c: Pretty printing.
4928         * sysdeps/pthread/createthread.c (create_thread): Don't add
4929         CLONE_DETACHED bit if it is not necessary.
4931 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4933         * pthread_getattr_np.c: Include ldsodefs.h.
4935 2004-01-16  Richard Henderson  <rth@redhat.com>
4937         * allocatestack.c: Don't declare __libc_stack_end.
4938         * init.c (__pthread_initialize_minimal_internal): Likewise.
4939         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4941 2004-01-15  Richard Henderson  <rth@redhat.com>
4943         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4944         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4945         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4946         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4947         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4948         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4949         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4950         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4952 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4954         * init.c (pthread_functions): Make array const.
4956 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4958         * allocatestack.c (__make_stacks_executable): Change interface.
4959         Check parameters.  Pass parameter on to libc counterpart.
4960         * pthreadP.h: Change declaration.
4962 2004-01-13  Richard Henderson  <rth@redhat.com>
4964         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4965         prototype form.
4966         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4967         Likewise.
4969         * sysdeps/alpha/Makefile: New file.
4970         * sysdeps/alpha/tcb-offsets.sym: New file.
4971         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4972         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4974         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4975         on powerpc version.
4977 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4979         * Makefile (tests): Add tst-backtrace1.
4980         * tst-backtrace1.c: New test.
4982 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4984         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4985         register as second parameter to the REGISTER macro.
4986         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4987         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4988         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4989         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4990         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4991         of thread register as second parameter to REGISTER macro in 64 case.
4993 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4995         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4996         (CFLAGS-getpid.o): Defined.
4997         (CFLAGS-getpid.os): Defined.
4999 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5001         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5002         returned for main thread does not overlap with any other VMA.
5003         Patch by Jakub Jelinek.
5005 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5007         * tst-raise1.c: Include stdio.h.
5009 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5011         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5012         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5013         If pid is 0, set it to selftid.
5014         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5015         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5016         != 0, return self->tid without doing a syscall.
5017         * descr.h (struct pthread): Move pid field after tid.
5019         * Makefile (tests): Add tst-raise1.
5020         * tst-raise1.c: New file.
5022 2003-12-23  Roland McGrath  <roland@redhat.com>
5024         * tst-oddstacklimit.c: New file.
5025         * Makefile (tests): Add it.
5026         (tst-oddstacklimit-ENV): New variable.
5028         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5029         value up to page size for __default_stacksize.
5031 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5033         * Makefile (tests): Add tst-eintr5.
5034         * tst-eintr5.c: New file.
5036         * eintr.c (eintr_source): Prevent sending signal to self.
5038         * tst-eintr2.c (tf1): Improve error message.
5040 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5042         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5043         * sysdeps/unix/sysv/linux/getpid.c: New file.
5044         * pthread_cancel.c: Add comment explaining use of PID field.
5045         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5046         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5047         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5048         temporarily to signal the field must not be relied on and updated
5049         by getpid().
5050         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5051         temporarily negative.
5052         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5054 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5056         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5057         (eintr_source): If ARG != NULL, use pthread_kill.
5058         * tst-eintr1.c: Adjust for this change.
5059         * tst-eintr2.c: Likewise.
5060         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5061         * tst-eintr3.c: New file.
5062         * tst-eintr4.c: New file.
5064 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5066         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5067         if CANCELSTATE_BITMASK is set.
5068         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5069         Likewise.
5071         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5072         (tests-reverse): Add tst-cancel23.
5073         * tst-cancel22.c: New test.
5074         * tst-cancel23.c: New test.
5076 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5078         * tst-eintr1.c: Better error messages.
5080         * Makefile (tests): Add tst-eintr2.
5081         * tst-eintr2.c: New file.
5083 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5085         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5086         (CFLAGS-tst-cancelx21.c): Set.
5087         * tst-cancel21.c: New test.
5088         * tst-cancelx21.c: New test.
5090         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5091         comparison operand.
5092         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5093         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5094         * pt-longjmp.c: Include jmpbuf-unwind.h.
5095         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5096         _JMPBUF_UNWINDS.  Adjust compared pointers.
5097         * init.c (__pthread_initialize_minimal_internal): Initialize
5098         pd->stackblock_size.
5099         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5100         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5101         * sysdeps/i386/jmpbuf-unwind.h: New file.
5102         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5103         * sysdeps/s390/jmpbuf-unwind.h: New file.
5104         * sysdeps/sh/jmpbuf-unwind.h: New file.
5105         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5106         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5107         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5108         (_JMPBUF_CFA_UNWINDS): Remove.
5109         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5111 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5113         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5114         (CFLAGS-tst-cancelx20.c): Set.
5115         * tst-cancel20.c: New test.
5116         * tst-cancelx20.c: New test.
5118 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5120         * init.c (__pthread_initialize_minimal_internal): Don't treat
5121         architectures with separate register stack special here when
5122         computing default stack size.
5124 2003-12-17  Roland McGrath  <roland@redhat.com>
5126         * Makefile (tst-cancelx7-ARGS): New variable.
5127         Reportd by Greg Schafer <gschafer@zip.com.au>.
5129 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5131         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5132         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5133         (tst-stack3-ENV): Set.
5134         ($(objpfx)tst-stack3-mem): New.
5135         * tst-stack3.c: New test.
5137 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5139         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5140         Add unwind directives.  Drop unused .regstk directive.
5141         (_fini_EPILOG_BEGINS): Add unwind directives.
5143 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5145         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5146         Assume parameter is a pointer.
5147         (lll_futex_wake): Likewise.
5148         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5149         Likewise.
5150         (lll_futex_wake): Likewise.
5151         Reported by Boris Hu.
5152         * sysdeps/unix/sysv/linux/unregister-atfork.c
5153         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5155         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5157 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5159         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5160         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5161         __rtld_lock_initialize for ld.so lock.
5162         Patch in part by Adam Li <adam.li@intel.com>.
5164 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5166         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5167         in $(gnulib).  Also, remove stale comment.
5169 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5171         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5172         advantage of new syscall stub and optimize accordingly.
5174         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5175         from SYS_futex, to match expectations of
5176         sysdep.h:DO_INLINE_SYSCALL.
5177         (lll_futex_clobbers): Remove.
5178         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5179         (lll_futex_wake): Likewise.
5180         (lll_futex_requeue): Likewise.
5181         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5182         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5183         Jelinek).
5184         (__lll_mutex_lock): Likewise.
5185         (__lll_mutex_cond_lock): Likewise.
5186         (__lll_mutex_timed_lock): Likewise.
5187         (__lll_mutex_unlock): Likewise.
5188         (__lll_mutex_unlock_force): Likewise.
5190         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5191         comes before the include of <sysdep.h>.
5192         (THREAD_SELF_SYSINFO): New macro.
5193         (THREAD_SYSINFO): Likewise.
5194         (INIT_SYSINFO): New macro.
5195         (TLS_INIT_TP): Call INIT_SYSINFO.
5197         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5199         * sysdeps/pthread/createthread.c (create_thread): Use
5200         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5201         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5202         THREAD_SELF_SYSINFO instead of open code.
5203         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5204         (THREAD_SYSINFO): Likewise.
5206         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5208         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5210 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5212         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5213         instead of .init.  Patch by David Mosberger.
5215 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5217         * sysdeps/pthread/configure.in: Remove broken declaration in C
5218         cleanup handling check.
5220 2003-11-30  Andreas Jaeger  <aj@suse.de>
5222         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5223         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5224         Likewise.
5226 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5228         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5229         * pthread_attr_destroy.c: Include shlib-compat.h.
5230         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5231         is set in iattr->flags.
5232         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5234 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5236         * Makefile (distribute): Add tst-cleanup4aux.c.
5238         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5239         include.
5241 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5243         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5244         pthread_cond_signal.
5246         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5247         store mutex address if the current value is ~0l.
5248         * sysdeps/pthread/pthread_cond_timedwait.c
5249         (__pthread_cond_timedwait): Likewise.
5250         * sysdeps/pthread/pthread_cond_broadcast.c
5251         (__pthread_cond_broadcast): Don't use requeue for pshared
5252         condvars.
5254         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5255         (__pthread_cond_wait): Don't store mutex address if the current
5256         value is ~0l.
5257         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5258         (__pthread_cond_timedwait): Likewise.
5259         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5260         (__pthread_cond_broadcast): Don't use requeue for pshared
5261         condvars.
5263         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5264         element with ~0l for pshared condvars, with NULL otherwise.
5266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5267         (__pthread_cond_wait): Don't store mutex address if the current
5268         value is ~0l.
5269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5270         (__pthread_cond_timedwait): Likewise.
5271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5272         (__pthread_cond_broadcast): Don't use requeue for pshared
5273         condvars.
5275         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5276         * tst-cond12.c: New file.
5277         * tst-cond13.c: New file.
5279 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5281         * sysdeps/pthread/configure.in: Make missing forced unwind support
5282         fatal.
5284 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5286         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5288 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5290         * Makefile: Add magic to clean up correctly.
5292 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5294         * unwind.c (FRAME_LEFT): Define.
5295         (unwind_stop): Handle old style cleanups here.
5296         (__pthread_unwind): Handle old style cleanups only if
5297         !HAVE_FORCED_UNWIND.
5298         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5299         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5300         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5301         ($(objpfx)tst-cleanupx4): Likewise.
5302         * tst-cleanup4.c: New test.
5303         * tst-cleanup4aux.c: New.
5304         * tst-cleanupx4.c: New test.
5306 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5308         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5309         lll_mutex_*lock macros to skip atomic operations on some archs.
5311 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5313         * sysdeps/pthread/tst-timer.c (main): Initialize
5314         sigev2.sigev_value as well.
5316 2003-10-15  Roland McGrath  <roland@redhat.com>
5318         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5319         is missing.
5320         * sysdeps/pthread/configure: Regenerated.
5322 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5324         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5325         locking macros.  No distinction between normal and mutex locking
5326         anymore.
5327         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5328         Merge bits from lowlevelmutex.S we still need.
5329         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5330         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5331         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5332         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5333         new mutex implementation.
5334         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5335         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5336         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5337         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5338         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5339         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5340         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5341         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5342         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5343         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5344         symbol for entry point to avoid cancellation.
5346 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5348         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5349         changes.
5350         (SAVE_OLDTYPE_0): Fix a typo.
5352 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5354         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5355         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5357 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5359         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5360         correct offset.
5362 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5364         * Makefile (tests): Add tst-cancel19.
5365         * tst-cancel19.c: New test.
5367 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5369         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5370         restoring of the old cancellation type.
5372 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5374         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5376 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5378         * sysdeps/pthread/malloc-machine.h: New file
5380 2003-09-24  Roland McGrath  <roland@redhat.com>
5382         * allocatestack.c (__make_stacks_executable): Don't ignore return
5383         value from _dl_make_stack_executable.
5385 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5387         * allocatestack.c (__make_stacks_executable): Also change
5388         permission of the currently unused stacks.
5390         * allocatestack.c (change_stack_perm): Split out from
5391         __make_stacks_executable.
5392         (allocate_stack): If the required permission changed between the time
5393         we started preparing the stack and queueing it, change the permission.
5394         (__make_stacks_executable): Call change_stack_perm.
5396         * Makefile: Build tst-execstack-mod locally.
5397         * tst-execstack-mod.c: New file.
5399 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5401         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5403 2003-09-23  Roland McGrath  <roland@redhat.com>
5405         * tst-execstack.c: New file.
5406         * Makefile (tests): Add it.
5407         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5408         (LDFLAGS-tst-execstack): New variable.
5410         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5411         whether to use PROT_EXEC for stack mmap.
5412         (__make_stacks_executable): New function.
5413         * pthreadP.h: Declare it.
5414         * init.c (__pthread_initialize_minimal_internal): Set
5415         GL(dl_make_stack_executable_hook) to that.
5417 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5419         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5420         recommendation from AMD re avoidance of lock prefix.
5422 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5424         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5425         lll_futex_timed_wait instead of lll_futex_wait.
5426         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5427         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5428         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5429         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5430         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5431         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5432         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5433         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5434         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5435         Completely revamp the locking macros.  No distinction between
5436         normal and mutex locking anymore.
5437         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5438         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5439         __lll_lock_timedwait): Fix prototypes.
5440         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5441         __lll_lock_timedwait): Likewise.
5442         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5443         macros, add __builtin_expect.
5444         (lll_mutex_timedlock): Likewise.  Fix return value.
5445         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5446         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5447         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5448         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5449         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5450         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5451         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5452         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5454 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5456         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5457         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5458         operation if possible.
5460         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5461         like jumping over the lock prefix.
5463 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5465         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5466         locking macros.  No distinction between normal and mutex locking
5467         anymore.
5468         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5469         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5470         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5471         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5472         locking.  Merge bits from lowlevelmutex.S we still need.
5473         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5474         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5475         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5476         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5477         * Makefile (routines): Remove libc-lowlevelmutex.
5478         (libpthread-rountines): Remove lowlevelmutex.
5479         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5480         for new mutex implementation.
5481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5484         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5486         Likewise.
5487         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5488         Likewise.
5489         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5491         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5493         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5495         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5496         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5497         Likewise.
5498         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5499         Likewise.
5500         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5501         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5503         Don't use requeue.
5504         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5505         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5507 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5509         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5510         in parameters of asm with output parameters.
5512         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5513         type of DECR parameter to int.
5514         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5516 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5518         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5519         guardsize for each thread.
5521 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5523         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5524         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5525         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5527         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5528         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5529         NULL.
5530         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5531         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5532         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5533         (pthread_getaffinity_np): Add hidden_def.
5535         * Makefile (tests): Add tst-attr3.
5536         * tst-attr3.c: New test.
5538         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5540 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5542         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5543         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5545 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5547         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5548         * tst-align.c: Include tst-stack-align.h.
5549         (tf, do_test): Use TEST_STACK_ALIGN macro.
5551 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5553         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5554         variable.
5556 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5558         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5559         stack-related values for the initial thread.
5561 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5563         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5565 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5567         * pthread_mutex_lock.c: Minor code rearrangements.
5569 2003-09-05  Roland McGrath  <roland@redhat.com>
5571         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5572         Instead, include ../nptl_db/db_info.c to do its magic.
5573         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5574         (__pthread_pthread_key_2ndlevel_size): Likewise.
5575         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5576         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5577         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5578         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5579         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5580         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5581         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5582         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5583         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5584         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5585         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5586         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5587         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5588         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5589         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5590         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5591         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5593 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5595         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5596         of pthread_t to be compatible with LT.
5597         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5598         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5599         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5600         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5601         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5602         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5603         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5605 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5607         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5609 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5611         * unwind-forcedunwind.c: Move to...
5612         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5613         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5614         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5615         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5616         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5617         * unwind.c: Include jmpbuf-unwind.h.
5618         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5620 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5622         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5623         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5624         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5625         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5626         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5627         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5628         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5629         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5630         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5631         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5632         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5633         function.
5634         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5635         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5636         * Makefile (tests): Add tst-stack2.
5637         * tst-stack2.c: New test.
5638         * tst-stack1.c: Include limits.h and sys/param.h.
5639         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5641         * pthread_condattr_setpshared.c: Include errno.h.
5642         (pthread_condattr_setpshared): Return EINVAL if pshared
5643         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5645         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5646         defined symbol for entry point to avoid cancellation.
5647         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5648         Likewise.
5649         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5650         Likewise.
5651         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5652         Likewise.
5653         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5654         Likewise.
5655         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5656         Likewise.
5657         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5658         __close_nocancel, __read_nocancel, __write_nocancel,
5659         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5660         libpthread.so or librt.so, define to corresponding function
5661         without _nocancel suffix.
5662         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5663         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5664         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5666         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5668 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5670         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5671         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5673         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5674         in subsections has a symbol associated with it.
5676         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5677         defined symbol for entry point to avoid cancellation.
5678         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5680 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5682         * Makefile (tests): Add tst-tls5.
5683         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5684         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5685         ($(objpfx)tst-tls5): New.
5686         ($(objpfx)tst-tls6.out): Likewise.
5687         (tests): Depend on $(objpfx)tst-tls6.out.
5688         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5689         (do_test): Check pthread_self () return value alignment.
5690         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5691         (tf): Check pthread_self () return value alignment.
5692         * tst-tls5.c: New test.
5693         * tst-tls5.h: New.
5694         * tst-tls5mod.c: New.
5695         * tst-tls5moda.c: New.
5696         * tst-tls5modb.c: New.
5697         * tst-tls5modc.c: New.
5698         * tst-tls5modd.c: New.
5699         * tst-tls5mode.c: New.
5700         * tst-tls5modf.c: New.
5701         * tst-tls6.sh: New test.
5703         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5704         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5705         * init.c (pthread_functions): Initialize them.
5706         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5707         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5708         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5709         pthread_cond_timedwait@@GLIBC_2.3.2.
5711 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5713         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5714         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5715         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5716         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5717         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5718         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5720         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5722         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5723         _POSIX_THREAD_PRIORITY_SCHEDULING.
5724         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5726 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5728         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5729         nested function, use static inline function from libio.h.
5730         Code by Richard Henderson.
5732         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5733         weak.
5735 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5737         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5738         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5739         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5740         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5741         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5742         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5743         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5744         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5745         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5746         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5747         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5748         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5749         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5750         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5751         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5752         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5753         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5754         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5755         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5756         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5757         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5758         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5759         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5760         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5761         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5762         * sysdeps/sparc/tls.h: New file.
5763         * sysdeps/sparc/tcb-offsets.sym: New file.
5764         * sysdeps/sparc/Makefile: New file.
5765         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5766         * init.c [__sparc__] (__NR_set_tid_address): Define.
5768 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5770         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5771         _IO_release_lock): Define.
5773 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5775         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5776         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5778 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5780         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5781         (__pthread_cleanup_class): Add missing return types of member
5782         functions.
5784 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5786         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5787         (lll_mutex_unlock_force): Add memory barrier between store and futex
5788         syscall.
5790 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5792         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5793         tempmsg in first loop.
5795 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5797         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5798         _POSIX_THREAD_PRIORITY_SCHEDULING.
5799         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5801 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5803         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5804         (__rtld_lock_default_lock_recursive,
5805         __rtld_lock_default_unlock_recursive): Define.
5806         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5807         __rtld_lock_unlock_recursive): Define using
5808         GL(_dl_rtld_*lock_recursive).
5809         * init.c (__pthread_initialize_minimal_internal): Initialize
5810         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5811         Lock GL(_dl_load_lock) the same number of times as
5812         GL(_dl_load_lock) using non-mt implementation was nested.
5814         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5815         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5817 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5819         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5820         PIPE_BUF.
5822 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5824         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5826 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5828         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5829         to first syscall error check.  Move syscall error check for tkill
5830         into __ASSUME_CLONE_STOPPED #ifdef.
5832 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5834         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5835         is not defined, do explicit synchronization.
5836         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5837         is not defined also unlock pd->lock for non-debugging case in case
5838         it is necessary.
5839         * pthread_create.c (start_thread): Always get and release pd->lock
5840         if __ASSUME_CLONE_STOPPED is not defined.
5841         (start_thread_debug): Removed.  Adjust users.
5842         * allocatestack.c (allocate_stack): Always initialize lock if
5843         __ASSUME_CLONE_STOPPED is not defined.
5844         * Makefile (tests): Add tst-sched1.
5845         * tst-sched1.c: New file.
5847         * sysdeps/pthread/createthread.c (do_clone): Only use
5848         sched_setschduler and pass correct parameters.
5850 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5852         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5853         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5854         PTHREAD_STACK_MIN in comments.
5856 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5858         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5859         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5860         argument.
5861         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5862         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5863         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5864         (__pthread_cleanup_upto): Fix prototype.
5865         (_longjmp_unwind): Adjust caller.
5866         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5867         Change second argument to const struct pointer.
5868         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5869         * tst-sem9.c (main): Likewise.
5870         * unwind.c: Include string.h for strlen prototype.
5872 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5875         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5876         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5877         Define HAVE_CMOV.
5878         Patch by Nicholas Miell <nmiell@attbi.com>.
5880 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5882         * init.c (__pthread_initialize_minimal_internal): Initialize
5883         GL(dl_init_static_tls).
5884         * pthreadP.h (__pthread_init_static_tls): New prototype.
5885         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5886         New functions.
5887         * Makefile (tests): Add tst-tls4.
5888         (modules-names): Add tst-tls4moda and tst-tls4modb.
5889         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5890         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5891         tst-tls4modb.so.
5892         * tst-tls4.c: New file.
5893         * tst-tls4moda.c: New file.
5894         * tst-tls4modb.c: New file.
5896 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5898         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5899         before __timer_dealloc.
5900         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5901         Don't call list_unlink.
5903 2003-07-29  Roland McGrath  <roland@redhat.com>
5905         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5907 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5909         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5910         Don't reuse struct aiocb A if it failed.
5911         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5912         not just one byte, as that does not block.
5914 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5916         * sysdeps/pthread/unwind-resume.c: New file.
5917         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5918         unwind-resume in csu subdir.
5919         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5920         exceptions.
5921         (librt-sysdep_routines, librt-shared-only-routines): Add
5922         rt-unwind-resume.
5923         * sysdeps/pthread/rt-unwind-resume.c: New file.
5924         * unwind-forcedunwind.c: New file.
5925         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5926         (libpthread-shared-only-routines): Likewise.
5927         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5928         * pthreadP.h (pthread_cancel_init): New prototype.
5929         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5931         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5932         attr argument const struct pthread_attr *.
5934         * res.c (__res_state): Return __resp.
5935         * descr.h: Include resolv.h.
5936         (struct pthread): Add res field.
5937         * pthread_create.c: Include resolv.h.
5938         (start_thread): Initialize __resp.
5939         * Makefile (tests): Add tst-_res1.
5940         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5941         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5942         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5943         libpthread.
5944         * tst-_res1.c: New file.
5945         * tst-_res1mod1.c: New file.
5946         * tst-_res1mod2.c: New file.
5948 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5950         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5952         * Makefile: Define various *-no-z-defs variables for test DSOs
5953         which has undefined symbols.
5955 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5957         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5958         Retry if the stwcx fails to store once_control.
5960 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5962         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5963         pthread_attr_setaffinity.
5964         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5965         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5966         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5967         * pthread_attr_destroy.c: Free cpuset element if allocated.
5968         * pthread_create.c: Pass iattr as additional parameter to
5969         create_thread.
5970         * sysdeps/pthread/createthread.c: If attribute is provided and
5971         a new thread is created with affinity set or scheduling parameters,
5972         start thread with CLONE_STOPPED.
5973         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5974         pthread_attr_setaffinity.
5975         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5976         cpuset element.
5978 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5980         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5982 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5984         * sysdeps/pthread/configure.in: Require CFI directives also for
5985         ppc and s390.
5987 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5989         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5990         Add cfi directives.
5992 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5994         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5995         CLEANUP_JMP_BUF.
5996         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5997         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5998         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5999         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6000         not self pointer in __writer.  Compare with TID to determine
6001         deadlocks.
6002         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6003         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6004         Likewise.
6005         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6006         Likewise.
6007         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6008         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6009         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6010         macros also when compiling librt.
6012 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6014         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6015         -fasynchronous-unwind-tables.
6016         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6017         (PSEUDO): Add cfi directives.
6018         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6019         Likewise.
6020         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6021         Likewise.
6023 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6025         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6026         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6027         * unwind.c (__pthread_unwind_next): Add hidden_def.
6028         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6029         Likewise.
6030         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6031         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6032         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6033         Likewise.
6034         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6035         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6036         Likewise.
6037         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6038         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6039         __pthread_unregister_cancel and __pthread_unwind_next.
6041 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6043         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6044         different symbol for the cancellation syscall wrapper and
6045         non-cancellation syscall wrapper.
6046         (PSEUDO_END): Define.
6048 2003-07-05  Richard Henderson  <rth@redhat.com>
6050         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6051         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6052         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6053         return actual return value from the syscall, not 0.
6055 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6057         * descr.h (struct pthread): Add pid field.
6058         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6059         (__reclaim_stacks): Likewise.
6060         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6061         also check for PID of the signal source.
6062         (__pthread_initialize_minimal_internal): Also initialize pid field
6063         of initial thread's descriptor.
6064         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6065         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6066         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6067         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6068         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6070 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6072         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6073         Fix use of parameter.
6074         (__libc_cleanup_pop): Likewise.
6076 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6078         * init.c (sigcancel_handler): Change parameters to match handler
6079         for SA_SIGACTION.  Check signal number and code to recognize
6080         invalid invocations.
6082 2003-07-03  Roland McGrath  <roland@redhat.com>
6084         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6085         Apply sizeof (struct pthread) bias to r13 value.
6087 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6089         * sysdeps/pthread/configure.in: Require CFI directives.
6091         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6092         definition.
6093         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6094         libpthread compilation.
6095         * unwind.c (__pthread_unwind): Add hidden_def.
6096         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6098 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6100         * libc-cancellation.c (__libc_cleanup_routine): Define.
6101         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6102         (__pthread_cleanup_pop): Define.
6104 2003-07-01  Richard Henderson  <rth@redhat.com>
6106         * sysdeps/alpha/elf/pt-initfini.c: New file.
6107         * sysdeps/alpha/pthread_spin_lock.S: New file.
6108         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6109         * sysdeps/alpha/pthreaddef.h: New file.
6110         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6111         * sysdeps/alpha/tls.h: New file.
6112         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6113         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6114         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6115         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6116         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6117         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6118         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6119         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6120         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6121         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6123 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6125         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6126         cleanup support and unwind info.
6128 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6130         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6131         Use correct cleanup handler registration.  Add unwind info.
6132         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6133         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6134         * tst-once3.c: Add cleanup handler and check it is called.
6135         * tst-once4.c: Likewise.
6136         * tst-oncex3.c: New file.
6137         * tst-oncex4.c: New file.
6138         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6140 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6142         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6144 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6146         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6147         (tf_msgsnd): Likewise.
6149         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6150         premature returns a bit more.
6152 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6154         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6155         definition to the front.
6157         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6158         the cleanup functions to make the names unique.  Fix dwarf opcode
6159         un unwind table.
6160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6161         functions to make the names unique.  Fix CFA offset for two blocks.
6163 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6165         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6166         missing closing braces.
6167         Patch by Christophe Saout <christophe@saout.de>.
6169 2003-06-24  Roland McGrath  <roland@redhat.com>
6171         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6173 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6175         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6176         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6178         * pthreadP.h: Declare __find_thread_by_id.
6179         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6180         * pthread_clock_gettime.c: Allow using other thread's clock.
6181         * pthread_clock_settime.c: Likewise.
6182         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6183         * Makefile: Add rules to build and run tst-clock2.
6184         * tst-clock2.c: New file.
6186 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6188         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6189         to use exception-based cleanup handler.
6190         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6192         * tst-cond8.c (ch): Announce that we are done.
6194         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6196         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6197         Also test aio_suspend with timeout value.
6199 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6201         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6202         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6203         attribute_hidden.
6205         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6206         (__pthread_mutex_lock_internal): Likewise.
6207         (__pthread_mutex_unlock_internal): Likewise.
6208         (__pthread_mutex_unlock_usercnt): Declare.
6209         * pthread_mutex_destroy.c: Always fail if used in any way.
6210         * pthread_mutex_init.c: Update comment.
6211         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6212         * pthread_mutex_timedlock.c: Adjust __nusers.
6213         * pthread_mutex_trylock.c: Adjust __nusers.
6214         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6215         and public interfaces are wrapper with pass additional parameter.
6216         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6217         parameter zero.
6218         * tst-mutex8.c: New file.
6219         * Makefile (tests): Add tst-mutex8.
6220         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6221         __pthread_mutex_unlock_usercnt.
6222         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6227         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6228         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6229         Add __nusers.
6230         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6231         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6232         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6233         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6234         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6236         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6237         * pthread_mutex_timedlock.c: Likewise.
6238         * pthread_mutex_trylock.c: Adjust __nusers.
6239         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6240         * tst-mutex9.c: New file.
6241         * Makefile (tests): Add tst-mutex9.
6242         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6243         * sysdeps/ia64/tls.h: Likewise.
6244         * sysdeps/powerpc/tls.h: Likewise.
6245         * sysdeps/s390/tls.h: Likewise.
6246         * sysdeps/sh/tls.h: Likewise.
6247         * sysdeps/x86_64/tls.h: Likewise.
6248         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6249         Change type of __owner.
6250         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6251         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6252         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6253         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6254         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6256 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6258         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6259         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6261         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6262         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6263         instead of nr to lll_futex_wake.  Only set errno and return -1
6264         if err < 0.
6266         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6267         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6268         return actual return value from the syscall, not 0.
6270 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6272         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6273         find a random value.
6274         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6275         errno==EIDRM.
6277         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6278         compat_timer_settime.
6279         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6280         compat_timer_gettime.
6281         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6282         compat_timer_getoverrun.
6283         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6284         compat_timer_delete.
6286         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6287         error-checking mutex detect busy mutexes.
6289 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6291         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6292         Add ax to clobber list.
6293         (lll_mutex_cond_lock): Likewise.
6294         (lll_mutex_unlock): Likewise.
6295         (lll_lock): Likewise.
6296         (lll_unlock): Likewise.
6298         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6299         * tst-cancel18.c: New file.
6300         * tst-cancelx18.c: New file.
6302         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6303         and tcdrain.
6305         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6306         * tst-cancel17.c: New file.
6307         * tst-cancelx17.c: New file.
6309         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6310         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6311         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6313         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6315 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6317         * sysdeps/pthread/createthread.c (create_thread): Set
6318         header.multiple_threads unconditionally.
6319         * allocatestack.c (allocate_stack): Likewise.
6320         * descr.h (struct pthread): Add header.multiple_threads
6321         unconditionally.
6322         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6323         Define for librt.  #error if neither libpthread, libc nor librt.
6324         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6325         Likewise.
6326         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6327         CDISABLE): Likewise.
6328         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6329         CDISABLE): Likewise.
6330         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6331         CDISABLE): Likewise.
6332         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6333         CDISABLE): Likewise.  Access header.multiple_threads outside of
6334         libc and libpthread.
6335         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6336         Likewise.
6337         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6338         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6340 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6342         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6343         Also test early cancellation before the thread reaches the cancellation
6344         point.
6346         * Makefile: Compile forward.c with exceptions.
6348         * sysdeps/unix/sysv/linux/sleep.c: New file.
6350 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6352         * Makefile: Add CFLAGS definition to compile function wrappers
6353         duplicated from libc with exceptions.
6354         * tst-cancel4.c: Also check cancellation handlers.
6356         * Makefile: Add rules to build and run tst-cancel16 and
6357         tst-cancelx16.  Add missing CFLAGS definitions.
6358         * tst-cancel16.c: New file.
6359         * tst-cancelx16.c: New file.
6361 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6363         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6364         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6365         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6366         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6368         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6369         (LIBC_CANCEL_RESET): Likewise.
6370         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6371         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6372         librt-cancellation.
6373         (CFLAGS-libcrt-cancellation.c): Define.
6374         * sysdeps/pthread/librt-cancellation.c: New file.
6375         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6376         macros also when compiling librt.
6377         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6378         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6379         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6380         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6381         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6382         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6383         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6385         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6386         compat_timer_create.
6388 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6390         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6392         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6393         __register_atfork.
6394         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6395         Add libc_hidden_def.
6397 2003-06-13  Roland McGrath  <roland@redhat.com>
6399         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6400         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6402 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6404         * allocatestack.c (queue_stack): Always inline.
6405         * ptreadhP.h (__do_cancel): Likewise.
6407 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6409         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6410         a typo.
6412 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6415         (__pthread_cond_signal): Remove incorrect second addition for
6416         cond_lock!=0.
6418 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6421         (__pthread_cond_signal): Use correct futex pointer in
6422         __lll_mutex_lock_wait call.
6424         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6425         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6427 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6429         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6430         cancelable.
6431         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6432         Likewise.
6434         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6435         hand-written CFI generation code.  Since ENTRY/END also initiated
6436         CFI frames this caused two CFI sets to be generated.
6438 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6440         * cleanup_routine.c: New file.
6441         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6442         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6443         cleanup handling.
6444         * Makefile (libpthread-routines): Add cleanup_routine.
6445         Add more CFLAGS variables to compile with exceptions.  Add comments
6446         why which file needs unwind tables.
6447         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6448         tests.
6449         * tst-cancelx1.c: New file.
6450         * tst-cancelx2.c: New file.
6451         * tst-cancelx3.c: New file.
6452         * tst-cancelx4.c: New file.
6453         * tst-cancelx5.c: New file.
6454         * tst-cancelx6.c: New file.
6455         * tst-cancelx7.c: New file.
6456         * tst-cancelx8.c: New file.
6457         * tst-cancelx9.c: New file.
6458         * tst-cancelx10.c: New file.
6459         * tst-cancelx11.c: New file.
6460         * tst-cancelx12.c: New file.
6461         * tst-cancelx13.c: New file.
6462         * tst-cancelx14.c: New file.
6463         * tst-cancelx15.c: New file.
6464         * tst-cleanupx0.c: New file.
6465         * tst-cleanupx0.expect: New file.
6466         * tst-cleanupx1.c: New file.
6467         * tst-cleanupx2.c: New file.
6468         * tst-cleanupx3.c: New file.
6470         * tst-cleanup0.c: Make standard compliant.
6471         * tst-cleanup1.c: Likewise.
6473         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6474         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6475         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6476         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6477         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6478         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6479         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6480         CLEANUP_JMP_BUF.
6481         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6482         * tst-cancel12.c: New file.
6483         * tst-cancel13.c: New file.
6484         * tst-cancel14.c: New file.
6485         * tst-cancel15.c: New file.
6486         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6487         and tst-cancel15.
6489         * tst-cancel1.c: Add some comments.
6491         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6492         timeout correctly.
6494 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6496         * Makefile (CFLAGS-pthread_cancel.c): Define.
6498 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6500         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6501         Change type of __writer element to int.
6502         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6503         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6504         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6505         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6506         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6507         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6508         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6509         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6510         Compare with TID to determine deadlocks.
6511         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6512         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6513         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6514         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6516         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6517         Likewise.
6518         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6519         Likewise.
6520         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6521         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6522         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6523         Likewise.
6524         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6525         Likewise.
6526         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6527         * Makefile (tests): Add tst-rwlock12.
6528         * tst-rwlock12.c: New file.
6530 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6532         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6533         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6534         Remove bogus hidden_proto.
6535         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6536         Likewise.
6537         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6538         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6539         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6540         ___lll_mutex_timedlock): Likewise.
6542 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6545         (__pthread_cond_signal): Add some code to eventually handle
6546         cond_lock!=0.
6548 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6550         * Makefile (tests): Add tst-exec4.
6551         (tst-exec4-ARGS): Define.
6552         * tst-exec4.c: New file.
6554 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6556         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6557         Also fail if tv_nsec < 0.
6558         (__lll_timedwait_tid): Likewise.
6559         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6560         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6561         Likewise.
6562         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6563         Likewise.
6564         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6565         Likewise.
6566         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6567         Likewise.
6568         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6569         Likewise.
6570         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6571         Likewise.
6573         * Makefile (tests): Add tst-sem8 and tst-sem9.
6574         * tst-sem8.c: New file.
6575         * tst-sem9.c: New file.
6576         * sem_open.c: Fix creation of in_use record if the file exists but
6577         no internal record.
6579         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6580         definitions.
6582         * sysdeps/pthread/timer_create.c (timer_create): In case
6583         evp==NULL, assign timer ID to sival_ptr.
6585         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6586         struct pthread_unwind_buf *.
6587         (struct pthread): Likewise for cleanup_jmp_buf element.
6589         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6590         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6591         * unwind.c (__pthread_unwind_next): Likewise.
6593 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6595         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6596         (lll_futex_timed_wait): Use int for futex value parameter.
6597         (lll_futex_wake): Likewise.
6598         (lll_futex_requeue): Likewise.
6600         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6601         Replace one memory operation with one register operation.
6603         * tst-join4.c (do_test): Fix error message.
6605         * tst-rwlock6.c (do_test): Use correct format specifier.
6607         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6608         (__lll_mutex_lock_wait): Replace one memory operation with one
6609         register operation.
6610         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6611         (__lll_mutex_lock_wait): Likewise.
6613         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6614         (__lll_mutex_cond_lock): Add one to value parameter of
6615         __lll_lock_wait to reflect reality in the futex syscall.
6616         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6617         (lll_mutex_cond_lock): Likewise.
6619 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6621         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6622         New function.
6623         (lll_mutex_cond_lock): Define.
6625 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6627         * Makefile (tests): Add tst-signal6.
6628         * tst-signal6.c: New file.
6630         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6631         (__lll_mutex_unlock_force): New function
6632         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6634         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6635         (__lll_mutex_unlock_force): New function.
6636         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6638         * tst-rwlock7.c (do_test): Use correct format specifier.
6640         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6641         Find break parameter in correct asm argument.
6643 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6645         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6646         Remove out4.
6647         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6648         error occured.
6649         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6650         Add __mutex.
6651         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6652         lll_futex_requeue, lll_mutex_unlock_force): Define.
6654 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6656         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6657         (pthread_cond_t): Add __mutex.
6658         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6659         lll_futex_requeue, lll_mutex_unlock_force): Define.
6661 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6663         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6664         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6665         Add __mutex field.
6666         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6667         Define.
6668         (lll_futex_wait, lll_futex_wake): Define.
6669         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6670         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6671         FUTEX_REQUEUE instead of FUTEX_WAIT.
6672         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6673         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6674         mutex which was used in condvar structure.  Call
6675         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6676         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6679         include tcb-offsets.h.  Read wakeup value in locked region.
6680         Use the value of gbr register as THREAD_ID.
6681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6682         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6683         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6685         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6686         macros.
6688 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6690         * sysdeps/pthread/pthread_cond_broadcast.c
6691         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6693 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6695         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6696         typo in register name.
6697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6698         correctly.  Actually use requeue.  Little optimization.
6699         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6700         mutex address early.  Handle cancellation state as 32-bit value.
6701         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6702         Remove unnecessary label.
6704 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6706         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6707         instead of FUTEX_WAIT.
6708         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6712         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6713         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6714         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6715         of __pthread_mutex_lock_internal.
6716         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6717         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6718         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6719         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6720         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6721         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6722         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6723         Add pthread_mutex_cond_lock.
6724         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6725         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6726         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6727         lll_mutex_cond_lock.
6728         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6729         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6730         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6731         Add __mutex field.
6732         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6733         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6735         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6736         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6738         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6739         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6740         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6741         macro don't define aliases.
6743         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6744         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6745         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6746         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6748         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6749         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6750         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6751         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6753 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6755         * sem_open.c: Fix one endless loop.  Implement correct semantics
6756         wrt opening the same semaphore more then once.
6757         * sem_close.c: Adjust for sem_open change.
6758         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6759         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6760         * Makefile (tests): Add tst-sem7.
6761         * tst-sem7.c: New file.
6763 2003-05-16  Roland McGrath  <roland@redhat.com>
6765         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6766         uninitialized variable braino.
6768 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6770         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6771         test for syscall availability.
6773         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6774         __no_posix_timers to -1 if the syscalls don't exist.
6776         * pthread_join.c (pthread_join): Set tid field of the joined
6777         thread to -1.  This isn't necessary but helps to recognize some
6778         error conditions with almost no cost.
6780         * allocatestack.c (FREE_P): Also negative values indicate an
6781         unused stack.
6783         * unwind.c: Include <unistd.h>.
6785 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6787         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6789 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6791         * Makefile (crti-objs, crtn-objs): New variables.
6792         (omit-deps, extra-objs): Add crtn.
6793         ($(objpfx)libpthread.so): Depend on both crti and crtn
6794         and links to them in multidir.
6795         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6797 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6799         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6800         (lll_mutex_unlock): Use atomic_exchange_rel.
6802 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6804         * cond-perf.c (cons): Add missing locking around setting of alldone.
6806 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6808         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6809         related macros.
6810         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6812 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6814         * tst-sem6.c: New file.
6815         * Makefile (tests): Add tst-sem6.
6817         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6818         Use atomic_exchange_rel instead of atomic_exchange.
6819         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6820         Likewise.
6822         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6823         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6824         vsyscall is possible.
6826         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6827         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6828         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6829         pthread_setaffinity_np.
6830         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6831         and pthread_setaffinity_np.
6832         * Makefile (libpthread-routines): Add pthread_getaffinity and
6833         pthread_setaffinity.
6835         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6836         use it in case mmap to allocate the stack fails.
6837         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6838         ARCH_MAP_FLAGS here.
6839         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6840         ARCH_RETRY_MMAP.
6842 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6844         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6845         handler implementation.  It is now lockless in fork().
6846         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6847         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6848         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6849         declare the __fork_*_lists.
6850         (struct fork_handler): Include pointers to all three functions.
6851         Add next, refcntr and need_signal elements.
6852         (__fork_handlers): New declaration.
6853         (__register_atfork_malloc): Remove declaration.
6854         (HAVE_register_atfork_malloc): Remove definition.
6855         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6856         __pthread_child_handler variable.
6857         (__libc_pthread_init): Use __register_atfork instead of explicitly
6858         adding to the list.
6859         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6860         and lll_futex_wake.
6861         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6863         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6864         function must never be reached.
6866         * cond-perf.c: New file.
6868 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6870         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6872 2003-05-04  Roland McGrath  <roland@redhat.com>
6874         * Makefile ($(objpfx)../libc.so): New target.
6876 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6878         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6879         (pthread_condattr_t): Size is only an int, don't use long for
6880         alignment.
6881         (pthread_mutexattr_t): Likewise.
6882         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6883         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6884         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6886 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6888         * sysdeps/i386/tls.h: Define THREAD_ID.
6889         * sysdeps/ia64/tls.h: Likewise.
6890         * sysdeps/powerpc/tls.h: Likewise.
6891         * sysdeps/s390/tls.h: Likewise.
6892         * sysdeps/sh/tls.h: Likewise.
6893         * sysdeps/x86_64/tls.h: Likewise.
6894         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6895         record ownership.
6896         * pthread_mutex_timedlock.c: Likewise.
6897         * pthread_mutex_trylock.c: Likewise.
6898         * pthread_mutex_unlock.c: Likewise.
6899         * pthread_rwlock_trywrlock.c: Likewise.
6900         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6901         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6902         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6903         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6905         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6906         flag.
6908 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6910         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6911         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6912         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6913         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6914         Make __align long long instead of long.
6915         (pthread_rwlock_t): Formatting.
6916         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6917         (pthread_rwlock_t): Formatting.
6918         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6919         (pthread_cond_t): Make __align long long instead of long.
6920         (pthread_rwlock_t): Move __flags field to the same position as in
6921         linuxthreads.
6923 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6925         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6926         * tst-rwlock7.c (do_test): Likewise.
6928 2003-04-26  Roland McGrath  <roland@redhat.com>
6930         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6932 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6934         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6935         sizeof (struct pthread).
6936         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6937         1 struct pthread.
6938         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6939         to 0.
6940         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6941         struct pthread.
6942         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6943         to 32-bit bytes.
6944         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6945         tcbp.
6946         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6947         unneccessarily.
6948         (NO_TLS_OFFSET): Define.
6949         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6950         add TLS_TCB_SIZE unnecessarily.
6952 2003-04-22  Roland McGrath  <roland@redhat.com>
6954         * Makeconfig (shared-thread-library): Reverse link order to work
6955         around linker bug.
6957 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6959         * semaphore.h: Fix typo in comment.
6961 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6963         * sysdeps/pthread/sigfillset.c: New file.
6965         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6966         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6967         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6968         * sysdeps/pthread/sigaction.c: Likewise.
6969         * sysdeps/pthread/sigprocmask.c: New file.
6970         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6971         __SIGRTMIN+1.
6972         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6973         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6974         in this case.
6976 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6978         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6979         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6981         * sysdeps/unix/sysv/linux/unregister-atfork.c
6982         (__unregister_atfork): Don't free memory not allocated dynamically.
6984         * semaphore.h: Remove __THROW marker from cancellation points.
6985         * nptl/sysdeps/pthread/pthread.h: Likewise.
6987 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6989         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6990         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6991         __THROW.
6993 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6995         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6997 2003-04-15  Roland McGrath  <roland@redhat.com>
6999         * forward.c (__pthread_unwind): Tweak to avoid warning.
7001 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7003         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7005 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7008         overflow CFA advance instructions.
7009         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7011 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7013         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7014         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7015         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7016         defined.
7018         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7019         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7020         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7021         DW_CFA_advance_loc for .Laddl-.Lsubl.
7023 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7025         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7026         position-independent unwind data for static libraries.
7027         Add missing unwind info.  Add comments.
7029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7030         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7034 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7036         * Makefile: Make sure all cancellation points are compiled with
7037         exception and asynchronous unwind tables.
7039         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7040         which mishandles loading of global object addresses in PIC.
7041         (THREAD_SETMEM_NC): Likewise.
7043 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7045         * pthread.h: Define new data structure for cleanup buffer.  Declare
7046         new cleanup handler interfaces.
7047         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7048         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7049         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7050         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7051         it.  Declare old cleanup handler installation functions.
7052         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7053         handling.
7054         * cleanup_defer.c: Likewise.
7055         * cleanup_compat.c: New file.  Old cleanup code.
7056         * cleanup_def_compat.c: New file.  Old cleanup code.
7057         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7058         if own thread descriptor.
7059         * unwind.c: New file.
7060         * forward.c: Add __pthread_unwind.
7061         * init.c (pthread_functions): Add __pthread_unwind.
7062         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7063         Add ptr___pthread_unwind.
7064         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7065         and unwind function.
7066         * Makefile (libpthread-routines): Add cleanup_compat,
7067         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7068         table generation if necessary.
7069         * version.c: Record whether unwind support is compiled in.
7070         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7071         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7072         handler interfaces.
7073         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7074         complication to generate unwind information for syscall wrappers.
7075         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7076         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7077         __cleanup_fct_attribute.
7079         * Makefile: Add rules to build and run tst-cleanup0.
7080         * tst-cleanup0.c: New file.
7081         * tst-cleanup0.expect: New file.
7083         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7084         caller.  Optimize to avoid often unecessary local variable.
7086 2003-04-11  Roland McGrath  <roland@redhat.com>
7088         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7089         sets variable `multidir'; include that.
7090         (generated): Add it.
7091         ($(objpfx)$(multidir)/crti.o): New target.
7092         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7094 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7096         * tst-attr2.c (do_test): Add cast to avoid warning.
7097         * tst-mutex4.c (do_test): Likewise.
7099 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7101         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7102         in child.
7104 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7106         * Makefile (tests): Add tst-detach1.
7107         * tst-detach1.c: New file.
7109 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7111         * sysdeps/pthread/pthread.h: Remove duplicate
7112         pthread_cleanup_{push,pop} definitions.
7114         * tst-barrier2.c: Eliminate warnings.
7115         * tst-cancel4.c: Likewise.
7116         * tst-cond4.c: Likewise.
7117         * tst-cond6.c: Likewise.
7118         * tst-detach1.c: Likewise.
7119         * tst-rwlock4.c: Likewise.
7120         * tst-rwlock6.c: Likewise.
7121         * tst-rwlock7.c: Likewise.
7122         * tst-sem3.c: Likewise.
7123         * tst-spin2.c: Likewise.
7124         * tst-umask1.c: Likewise.
7126 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7128         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7130 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7132         * descr.h (struct pthread): Move cancelhandling member to the front.
7134 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7136         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7137         malloc_parent, and malloc_child statically.
7138         (__register_atfork_malloc): New function.
7139         (free_mem): Don't free any of the malloc_* variables on the list.
7140         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7141         Define HAVE_register_atfork_malloc.
7143 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7145         * sysdeps/pthread/createthread.c (create_thread): Add some more
7146         comments explaining when to set multiple_threads and when not.
7148         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7149         THREAD_ATOMIC_BIT_SET if not already defined.
7150         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7151         THREAD_ATOMIC_BIT_SET:
7152         * sysdeps/x86_64/tls.h: Likewise.
7153         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7154         THREAD_ATOMIC_CMPXCHG_VAL.
7155         (_pthread_cleanup_pop_restore): Likewise.
7156         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7157         (__pthread_enable_asynccancel_2): Likewise.
7158         (__pthread_disable_asynccancel): Likewise.
7159         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7160         (__libc_disable_asynccancel): Likewise.
7161         * init.c (sigcancel_handler): Likewise.
7162         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7163         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7165 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7167         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7168         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7169         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7170         * Makefile (tests): Add tst-cancel11.
7171         * tst-cancel11.c: New file.
7173 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7175         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7176         round, not the first.  Use specific_used flag instead of local
7177         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7178         (__free_tcb): Don't call deallocate_tsd here.
7179         (start_thread): Call deallocate_tsd here.
7180         * pthread_setspecific.c: Set specific_used flag really only when
7181         needed.
7182         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7183         * tst-tsd3.c: New file.
7184         * tst-tsd4.c: New file.
7186 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7188         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7189         Use atomic_exchange_and_add instead of __lll_add.
7190         (__lll_mutex_timedlock): Likewise.
7191         Patch by Ian Wienand.
7193 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7195         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7196         (SINGLE_THREAD_P): Fix typo.
7197         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7199 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7201         * Makefile (tests): Add tst-align.
7202         * tst-align.c: New file.
7203         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7205         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7206         function correctly.
7208         * tst-tsd2.c: Add casts to avoid warnings.
7210 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7212         * descr.h (struct pthread): Move most often used elements to the front.
7214 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7216         * Makefile (libpthread-routines): Add pthread_atfork.
7217         (libpthread-static-only-routines): Add pthread_atfork.
7219 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7221         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7222         of TLS_DTV_AT_TP.
7223         (INSTALL_DTV): Add parens.
7224         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7225         Use passed descr instead of THREAD_SELF.
7226         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7227         (__lll_mutex_timedlock_wait): Correct expected value after
7228         spurious wakeup.
7229         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7230         Release lock before waking up the waiters.
7231         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7232         criteria.  Reorderstruct passed to cleanup handler.  Fix
7233         handling of cancellation and failung pthread_mutex_unlock call.
7234         Use __pthread_enable_asynccancel_2 instead of
7235         __pthread_enable_asynccancel.
7236         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7237         Return result of lock re-get if it fails.
7238         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7239         for __pthread_cleanup_push.
7240         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7241         completely broken rwlock implementation.
7242         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7243         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7245         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7247         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7248         versioned_symbol macro.
7249         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7250         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7252 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7254         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7255         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7256         and __helper_tid.
7257         (struct timer): Remove th and bar field.
7258         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7259         debugging code.  Create only one helper thread.
7260         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7261         helper thread.
7262         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7263         Renamed.  Define statically.  Use thread info from siginfo.
7264         (__helper_once): New variable.
7265         (__helper_tid): New variable.
7266         (__reset_helper_control): New function.
7267         (__start_helper_thread): New function.
7269         * pthread_create.c (start_thread): Don't use setjmp inside
7270         __builtin_expect to work around gcc bug.
7272         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7273         timer_delete syscall fails, but not with ENOSYS, set
7274         __no_posix_timers.
7276         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7277         (timer_settime): Fix typo.
7278         * sysdeps/unix/sysv/linux/timer_getoverr.c
7279         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7281 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7283         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7284         offset of cleanupbuf.__prev.
7286 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7288         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7289         of included file.
7291 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7293         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7294         NULL provide default definition to syscall.
7296 2003-03-25  Roland McGrath  <roland@redhat.com>
7298         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7299         (timer_id2ptr): Fix typo.
7301 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7303         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7304         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7305         * sysdeps/ia64/pthreaddef.h: Likewise.
7306         * sysdeps/powerpc/pthreaddef.h: Likewise.
7307         * sysdeps/s390/pthreaddef.h: Likewise.
7308         * sysdeps/sh/pthreaddef.h: Likewise.
7309         * sysdeps/x86_64/pthreaddef.h: Likewise.
7310         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7311         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7312         being changed.
7313         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7314         SIGTIMER is not unblocked.
7315         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7316         RT signal taken.
7317         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7318         be send.
7319         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7320         pass pointer through as ID.
7321         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7322         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7323         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7324         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7325         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7326         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7327         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7328         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7329         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7330         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7331         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7332         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7333         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7334         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7335         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7336         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7337         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7338         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7339         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7340         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7341         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7342         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7343         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7344         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7345         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7346         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7347         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7348         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7349         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7350         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7351         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7352         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7353         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7355         * pthreadP.h: Remove FRAME_LEFT definition.
7356         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7357         already left frame.  Programs which have this problem are not POSIX
7358         compliant.
7359         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7361 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7363         * sysdeps/pthread/tst-timer.c: Check return values of the
7364         functions we test.
7366 2003-03-23  Roland McGrath  <roland@redhat.com>
7368         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7369         * tst-tls3mod.c: Likewise.
7370         * tst-tls1.c: Likewise.
7371         * tst-tls2.c: Likewise.
7373         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7374         undefined behavior.
7376         * tst-join5.c (tf1, tf2): Add a cast.
7378         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7380         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7381         Don't test anything.
7382         * tst-cond4.c: Likewise.
7383         * tst-cond6.c: Likewise.
7384         * tst-flock2.c: Likewise.
7385         * tst-mutex4.c: Likewise.
7386         * tst-rwlock4.c: Likewise.
7387         * tst-signal1.c: Likewise.
7388         * tst-spin2.c: Likewise.
7389         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7391         * tst-mutex4.c: Use test-skeleton.c.
7392         * tst-spin2.c: Likewise.
7393         * tst-sysconf.c: Likewise.
7394         * tst-barrier2.c: Likewise.
7395         * tst-cond4.c: Likewise.
7396         * tst-cond6.c: Likewise.
7397         * tst-rwlock4.c: Likewise.
7398         * tst-unload.c: Likewise.
7399         * tst-flock2.c (do_test): Use return instead of exit.
7401 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7403         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7405 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7407         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7408         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7409         instead of __lll_compare_and_swap.
7410         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7411         Likewise.
7412         Removed definition if __lll_compare_and_swap.
7414         * cancellation.c: Adjust for new form of compare&exchange macros.
7415         * cleanup_defer.c: Likewise.
7416         * init.c: Likewise.
7417         * libc-cancellation.c: Likewise.
7418         * old_pthread_cond_broadcast.c: Likewise.
7419         * old_pthread_cond_signal.c: Likewise.
7420         * old_pthread_cond_timedwait.c: Likewise.
7421         * old_pthread_cond_wait.c: Likewise.
7422         * pthread_cancel.c: Likewise.
7423         * pthread_create.c: Likewise.
7424         * pthread_detach.c: Likewise.
7425         * pthread_join.c: Likewise.
7426         * pthread_key_delete.c: Likewise.
7427         * pthread_setcancelstate.c: Likewise.
7428         * pthread_setcanceltype.c: Likewise.
7429         * pthread_timedjoin.c: Likewise.
7430         * pthread_tryjoin.c: Likewise.
7431         * sysdeps/pthread/createthread.c: Likewise.
7433 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7435         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7436         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7437         definitions.  Replace uses with calls to atomic_* functions.
7438         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7439         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7440         __lll_test_and_set calls with atomic_exchange_and_add and
7441         atomic_exchange calls respectively.
7442         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7443         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7444         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7445         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7446         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7447         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7448         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7450         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7451         returns the old value.
7453 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7455         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7456         int for variable OLDVAL and correct inline assembler contraint.
7457         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7458         type int for variable OLD.
7460         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7461         only for s390-32.
7462         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7463         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7464         instead of multiple_threads field in the TCB.
7466 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7468         * sysdeps/i386/i686/bits/atomic.h: Removed.
7469         * sysdeps/i386/i586/bits/atomic.h: Removed.
7470         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7471         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7472         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7473         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7474         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7475         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7476         * atomic.h: Removed.  Moved to glibc.
7478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7479         support for clock selection.
7481         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7482         signalling waiters.
7484 2003-03-18  Roland McGrath  <roland@redhat.com>
7486         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7487         Add __lll_rel_instr first.  Add memory clobber.
7488         (lll_mutex_unlock): Use __lll_test_and_set.
7489         From Paul Mackerras <paulus@samba.org>.
7491         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7492         unconditionally.
7493         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7494         (SINGLE_THREAD_P):  Add `header.' prefix.
7495         From Paul Mackerras <paulus@samba.org>.
7497         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7498         pthread_timedjoin_np to ...
7499         (libpthread: GLIBC_2.3.3): ... here.
7500         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7502         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7503         Avoid shadowing VAL variable.
7505         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7506         New macro.
7508 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7510         * Makefile (tests): Add tst-cond11.
7511         * tst-cond11.c: New file.
7513         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7514         struct passed to cleanup handler to eliminate one more
7515         instruction.
7516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7518         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7519         (pthrad_cond_t): Replace __unused field with __clock.
7521         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7522         waken all waiters in cleanup handler.
7523         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7524         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7526         * pthread_condattr_getclock.c: New file.
7527         * pthread_condattr_setclock.c: New file.
7528         * sysdeps/pthread/pthread.h: Declare these new functions.
7529         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7530         * Makefile (libpthread-routines): Add the new functions.
7531         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7532         Renamed field to value.  Document use of the bits.
7533         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7534         change.
7535         * pthread_condattr_setpshared.c: Likewise.
7536         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7537         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7538         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7539         Add __clock field.
7540         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7541         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7542         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7543         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7545         Implement clock selection.
7546         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7547         * pthread-errnos.sym: Add ENOSYS.
7548         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7549         _POSIX_CLOCK_SELECTION.
7550         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7553         invalid .size directive.
7555 2003-03-17  Roland McGrath  <roland@redhat.com>
7557         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7558         Formatting tweaks.
7560 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7562         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7563         Use __lll_add instead of spelling it out.  Use protected symbol names.
7564         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7565         Use __lll_add.
7566         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7567         Renamed from lll_compare_and_swap.  Use new name where necessary.
7568         (__lll_add): Defined.
7569         (__lll_dec_if_positive): Defined.
7570         (__lll_test_and_set): Defined.
7571         * sysdeps/ia64/pthread_spin_init.c: Removed.
7572         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7573         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7574         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7575         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7576         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7577         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7578         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7579         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7580         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7581         __sync_lock_release_si.
7582         Patch by Jakub Jelinek.
7584         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7585         Fix timeout handling.
7586         (__lll_timedwait_tid): Likewise.
7587         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7588         Patch by Jakub Jelinek.
7590         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7592 2003-03-17  Roland McGrath  <roland@redhat.com>
7594         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7595         * sysdeps/pthread/pthread_spin_init.c: New file.
7596         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7597         * sysdeps/powerpc/Makefile: New file.
7598         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7599         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7600         * sysdeps/powerpc/pthreaddef.h: New file.
7601         * sysdeps/powerpc/tcb-offsets.sym: New file.
7602         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7603         * sysdeps/powerpc/tls.h: New file.
7604         * sysdeps/powerpc/bits/atomic.h: New file.
7605         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7606         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7607         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7609         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7610         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7611         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7612         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7613         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7614         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7615         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7616         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7617         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7618         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7619         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7620         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7621         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7622         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7623         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7625         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7626         not gettimeofday.
7627         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7628         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7629         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7630         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7631         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7633 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7635         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7636         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7637         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7639         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7641 2003-03-16  Roland McGrath  <roland@redhat.com>
7643         * tst-fork4.c: Include <string.h>.
7644         * tst-signal2.c: Likewise.
7645         * tst-mutex5.c (do_test): exit -> return.
7646         * tst-mutex2.c: Include <stdlib.h>.
7648 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7650         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7651         (__lll_mutex_timedlock_wait): Correct expected value after
7652         spurious wakeup.  Otherwise we would never wait again.
7654         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7655         zone versus inline asm stupidity.  Use correct instructions.
7657         * tst-rwlock6.c: Add some more status output.
7659 2003-03-15  Roland McGrath  <roland@redhat.com>
7661         * sysdeps/pthread/configure.in: New file.
7662         * sysdeps/pthread/configure: New file (generated).
7664 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7666         * allocatestack.c (allocate_stack): Store the exact stack size of
7667         user allocated stacks.
7669 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7671         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7672         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7673         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7674         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7675         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7676         Use `header.' prefix.
7677         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7679 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7681         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7682         __builtin_frame_address, use stack pointer.
7684         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7685         instead of __builtin_frame_pointer.
7687 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7689         * tst-basic1.c (do_test): Add cast to avoid warning.
7690         * tst-basic2.c (do_test): Likewise.
7692         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7693         amount of stack correction.
7695         * tst-fork4.c: Use test-skeleton.c.
7697 2003-03-14  Roland McGrath  <roland@redhat.com>
7699         * init.c: Fix typo "#eli" for "#else".
7701 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7703         * allocatestack.c (__stack_user): Use hidden_data_def.
7704         * pthread_create.c (__pthread_keys): Likewise.
7706         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7708 2003-03-14  Roland McGrath  <roland@redhat.com>
7710         * tst-fork4.c: New file.
7711         * Makefile (tests): Add it.
7713         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7714         we always define the padding space.
7715         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7716         stopped supporting its own extensions fully.
7717         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7718         struct also called `header', so `header.multiple_threads' is the field
7719         name to use on all machines.
7720         * allocatestack.c (allocate_stack): Use `header.' prefix.
7721         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7722         * pthread_create.c (__pthread_create_2_1): Likewise.
7723         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7724         (THREAD_SELF): Likewise.
7725         * sysdeps/x86_64/tls.h: Likewise.
7726         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7727         (SINGLE_THREAD_P): Likewise.
7728         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7729         (SINGLE_THREAD_P): Likewise.
7730         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7731         (SINGLE_THREAD_P): Likewise.
7733         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7734         value directly.
7736 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7738         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7739         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7741         * pthread_create.c (start_thread): setjmp is expected to return 0.
7743         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7744         (THREAD_GETMEM_NC): Likewise.
7746 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7748         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7749         and the size of the stack which must be allocated is a multiple,
7750         allocate one more page.
7751         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7752         MULTI_PAGE_ALIASING.
7754 2003-03-13  Roland McGrath  <roland@redhat.com>
7756         * pthread_create.c (start_thread): Set EXITING_BIT after the
7757         event-reporting (and destructors), not before.
7759 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7761         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7762         lll_futex_wake): Declare register variables as long int instead of
7763         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7764         Make syscall arguments clobbered by the syscall.
7765         (lll_futex_wait): Define using lll_futex_timed_wait.
7767         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7768         to void *.
7770         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7771         PPID if [! NDEBUG].
7773         * allocatestack.c (nptl_ncreated): Only declare if
7774         COLORING_INCREMENT != 0.
7776         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7777         (__libc_enable_asynccancel_2): Remove prototype.
7779         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7780         ctid to match kernel.
7782 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7784         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7785         libc_multiple_threads.
7786         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7787         __libc_multiple_threads to...
7788         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7790         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7791         versioning.
7792         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7793         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7795         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7796         (__pthread_once_internal): Define.
7798         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7799         macros instead of .symver directly.
7800         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7801         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7803         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7804         * sysdeps/x86_64/tcb-offsets.sym: New file.
7805         * sysdeps/x86_64/Makefile: New file.
7807         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7809         to access own pthread_t in TCB.
7810         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7811         Likewise.
7812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7813         Likewise.
7814         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7816 2003-03-12  Roland McGrath  <roland@redhat.com>
7818         * pthread-errnos.sym: New file.
7819         * Makefile (gen-as-const-headers): New variable, list that file.
7820         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7821         header <pthread-errnos.h> instead of defining errno values here.
7822         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7823         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7824         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7825         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7826         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7827         Likewise.
7828         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7829         Likewise.
7830         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7832         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7833         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7834         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7835         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7836         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7837         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7838         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7839         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7840         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7841         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7842         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7843         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7844         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7845         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7847         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7848         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7850         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7851         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7852         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7853         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7854         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7855         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7856         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7858         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7859         CLONE_CHILD_SETTID worked.
7861 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7863         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7864         file.
7865         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7866         file.
7868         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7869         (pthread_cond_t): Add padding.
7871         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7872         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7873         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7875         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7876         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7877         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7878         (__pthread_rwlock_timedrdlock): Likewise.
7879         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7880         (__pthread_rwlock_wrlock): Likewise.
7881         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7882         (__pthread_rwlock_rdlock): Likewise.
7884         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7886         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7887         result of lock re-get if it fails.
7889 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7891         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7892         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7893         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7894         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7895         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7896         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7897         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7898         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7899         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7900         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7902         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7903         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7905         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7906         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7907         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7908         (create_thread): Likewise.
7909         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7910         * init.c (__pthread_initialize_minimal_internal): Initialize
7911         __libc_multiple_threads_ptr if necessary.
7912         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7913         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7914         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7915         __libc_multiple_threads.
7916         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7917         necessary.
7919         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7920         (THREAD_SETMEM_NC): Likewise.
7922         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7923         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7924         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7925         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7927         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7928         Eliminate one entire instruction.
7930         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7931         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7933         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7934         instead of __pthread_enable_asynccancel.
7935         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7936         (__pthread_cond_wait): Likewise.
7937         * sysdeps/pthread/pthread_cond_timedwait.c
7938         (__pthread_cond_timedwait): Likewise.
7939         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7941         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7942         (__condvar_cleanup): Wake up all waiters in case we got signaled
7943         after being woken up but before disabling asynchronous
7944         cancellation.
7945         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7946         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7947         (__condvar_cleanup): Likewise.
7949         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7950         Make it an error if architecture has no #if case.  Add x86-64.
7952         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7953         pt-initfini.s generation.
7955         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7956         (TLS_INIT_TP): Fix typo.
7958 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7960         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7961         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7963         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7964         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7965         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7966         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7967         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7968         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7969         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7970         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7972 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7974         * sysdeps/pthread/pthread_cond_timedwait.c
7975         (__pthread_cond_timedwait): Return the result of the final
7976         locking.  If it succeeds, the regular function return value.
7978         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7979         Return result of the final locking.
7980         * version.c (__nptl_main): Work around problems with the strange
7981         INTERNAL_SYSCALL macro on ppc32.
7982         * init.c (__pthread_initialize_minimal_internal): Unblock
7983         SIGCANCEL in case the parent blocked it.
7984         Reported by Paul Mackerras <paulus@samba.org>.
7986         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7987         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7988         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7990 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7992         * sysdeps/pthread/pthread_cond_timedwait.c
7993         (__pthread_cond_timedwait): Unlock and fail if
7994         __pthread_mutex_unlock_internal failed.
7996         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7997         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7998         Use ARCH_CLONE.
7999         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8000         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8001         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8002         ALLOCATE_STACK): New macros.
8003         (TLS_TPADJ): New macro.
8004         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8005         (allocate_stack): Handle TLS_DTV_AT_TP and
8006         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8007         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8008         Don't set PD->self.
8009         * init.c [__ia64__] (__NR_set_tid_address): Define.
8011         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8012         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8013         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8014         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8015         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8016         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8017         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8018         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8019         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8020         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8021         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8022         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8023         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8024         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8025         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8026         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8027         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8028         * sysdeps/ia64/bits/atomic.h: New file.
8029         * sysdeps/ia64/Makefile: New file.
8030         * sysdeps/ia64/pthread_spin_init.c: New file.
8031         * sysdeps/ia64/pthread_spin_lock.c: New file.
8032         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8033         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8034         * sysdeps/ia64/pthreaddef.h: New file.
8035         * sysdeps/ia64/tcb-offsets.sym: New file.
8036         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8037         * sysdeps/ia64/tls.h: New file.
8039         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8040         to syscall instead of no arguments.
8042 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8044         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8045         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8046         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8047         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8049         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8050         unused code.
8052         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8054         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8055         lowlevelbarrier.sym.
8056         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8057         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8058         Include lowlevelbarrier.h and don't define offsets locally.
8059         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8061         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8062         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8063         (__lll_mutex_timedlock_wait): Likewise.
8064         (lll_mutex_lock): Adjust asm for that.
8065         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8066         (lll_lock): Adjust asm for operand order change.
8067         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8068         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8070         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8071         Reverse order of parameters.
8072         (__lll_timedwait_tid): Remove regparms attribute.
8073         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8074         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8076         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8077         (__lll_timedwait_tid): Remove one unnecessary instruction.
8079         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8080         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8081         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8082         lowlevelmutex.S.
8084         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8085         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8086         for NOT_IN_libc.
8087         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8088         lowlevellock.S.
8090         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8091         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8092         for libc.so.
8093         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8094         define LOCK here (if UP is not defined).  The actual code is in
8095         lowlevelmutex.S.
8097         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8098         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8099         __lll_timedwait_tid for libc.so.
8100         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8101         define LOCK here (if UP is not defined).  The actual code is in
8102         lowlevellock.S.
8104         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8105         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8106         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8107         instead of lowlevelsem.h.
8108         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8109         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8110         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8112         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8113         lowlevelrwlock.sym.
8114         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8115         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8116         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8118         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8119         register loading.
8120         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8121         last changed.  D'oh.
8123         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8125         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8126         of __libc_locking_needed.
8127         (lll_trylock): Initialize %eax to zero.
8129         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8130         pthread_cond_t definition.
8132 2003-03-10  Roland McGrath  <roland@redhat.com>
8134         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8135         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8136         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8137         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8138         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8140         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8141         Instead of setting PD->multiple_threads, set globals
8142         __pthread_multiple_threads and __libc_multiple_threads.
8143         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8144         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8145         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8147         * descr.h (struct pthread): Conditionalize first member on
8148         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8149         containing an anonymous tcbhead_t.  Move `list' member out.
8150         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8151         * allocatestack.c: Remove use of `header.data.' prefix.
8152         * pthread_create.c: Likewise.
8153         * init.c (__pthread_initialize_minimal_internal): Likewise.
8154         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8155         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8156         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8157         * sysdeps/x86_64/tls.h: Likewise.
8158         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8159         (SINGLE_THREAD_P): Likewise.
8160         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8161         (SINGLE_THREAD_P): Likewise.
8162         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8163         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8165 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8167         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8169         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8170         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8172         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8173         leftovers from the ia32 code.
8175         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8176         memory load.
8177         (clear_once_control): Don't load %esi.
8179         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8180         handling.
8182         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8184         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8185         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8187         * Makefile (tests): Add tst-cond10.
8188         * tst-cond10.c: New file.
8190 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8192         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8193         * tst-signal3.c (do_test): Likewise.
8194         * tst-sem5.c (do_test): Likewise.
8195         * tst-kill6.c (do_test): Likewise.
8196         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8198         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8199         of inc/dec.
8200         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8201         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8202         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8203         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8204         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8205         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8206         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8207         Likewise.
8208         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8209         Likewise.
8210         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8212         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8213         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8215         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8216         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8217         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8219         * allocatestack.c (allocate_stack): If mprotect() fails free the
8220         TLS memory.
8222 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8224         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8226         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8227         lll_wake_tid.  This was used only to work around kernel limits in
8228         the early days.
8229         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8230         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8231         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8232         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8234         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8235         (__pthread_initialize_minimal_internal): Change initialization of
8236         __static_tls_align_m1 appropriately.
8237         * pthreadP.h (__static_tls_align_m1): Renamed from
8238         __static_tls_align.
8239         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8240         instead of __static_tls_align-1.
8242 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8244         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8246         * pthread_create.c: Define __pthread_keys using nocommon
8247         attribute, not by placing it explicitly in bss.
8248         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8250         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8251         Use it in mmap call to allocate stacks.
8253         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8255         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8256         result of the thread function.
8258 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8260         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8261         version is just fine.
8263         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8264         (__pthread_child_handler): Renamed from pthread_child_handler,
8265         exported, and marked hidden.  Change all users.
8266         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8267         free __pthread_child_handler from child list.
8269 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8271         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8273         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8274         Fix handling of cancellation and failing pthread_mutex_unlock call.
8275         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8276         (__pthread_cond_wait): Likewise.
8278         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8279         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8280         lll_futex_timed_wait call.
8281         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8282         (pthread_rwlock_timedwrlock): Likewise.
8284         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8285         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8286         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8288         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8289         check of lll_futex_wake return value.
8291 2003-03-03  Roland McGrath  <roland@redhat.com>
8293         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8295         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8296         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8297         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8299 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8301         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8302         error for CPU clocks.
8304         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8305         _POSIX_MONOTONIC_CLOCK.
8306         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8308         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8309         recent kernels.
8311 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8313         * descr.h (struct pthread): Move cleanup field to the front.
8315 2003-03-01  Roland McGrath  <roland@redhat.com>
8317         * sem_open.c (sem_open): Braino fix.
8319 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8321         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8323         __pthread_cleanup_pop functionality.
8324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8326         * descr.h (struct pthread): Move tid field to the front now that
8327         it is often used.
8329         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8330         (__lll_mutex_timedlock_wait): Remove.
8331         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8332         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8333         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8334         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8335         (lll_unlock_wake_cb): Don't save and restore %esi.
8336         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8337         %esi.
8338         (__lll_timedwait_tid): Add alignment.
8339         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8340         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8341         %esi.
8342         (__lll_timedwait_tid): Removed.
8343         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8344         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8345         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8346         (pthread_barrier_wait): Don't save, load, and restore %esi for
8347         last thread.
8348         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8349         (__pthread_cond_signal): Don't save, load, and restore %esi.
8350         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8351         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8352         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8353         Don't save, load, and restore %esi.
8355 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8357         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8358         Release lock before waking up the waiters.
8360         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8362         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8363         (reader_thread): Likewise.
8365         * sysdeps/pthread/pthread_rwlock_unlock.c
8366         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8367         to wake up readers if there are none.
8369         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8370         Release internal lock before wake threads.
8372 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8374         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8375         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8376         predefined.
8377         * tst-rwlock9.c: Likewise.
8378         * tst-rwlock10.c: New file.
8379         * tst-rwlock11.c: New file.
8381         * Makefile (tests): Add tst-dlsym1.
8382         * tst-dlsym1.c: New file.
8384         * init.c (__pthread_initialize_minimal_internal): Set
8385         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8386         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8388 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8390         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8392         * tst-cond2.c: Fix sychronization with child.
8394         * tst-rwlock8.c (reader_thread): Remove unused variable.
8396         * Makefile: Add rules to build and run tst-tls3.
8397         * tst-tls3.c: New file.
8398         * tst-tls3mod.c: New file.
8400         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8401         * tst-rwlock8.c: New file.
8402         * tst-rwlock9.c: New file.
8403         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8404         complete broken rwlock implementation.
8405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8406         Likewise.
8407         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8408         Likewise.
8409         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8410         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8411         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8412         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8413         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8414         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8415         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8417 2003-02-23  Roland McGrath  <roland@redhat.com>
8419         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8421 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8423         * Makefile (tests): Add tst-context1.
8424         * tst-context1.c: New file.
8426         * Makefile (tests): Add tst-tls1 and tst-tls2.
8427         * tst-tls1.c: New file.
8428         * tst-tls2.c: New file.
8430         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8431         for failed cmpxchg.
8433         * pthread_create.c (start_thread): Set EXITING_BIT early.
8435         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8436         (THREAD_GETMEM_NC): Likewise.
8438 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8440         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8441         off 3 more bytes by using offset-less instructions when possible.
8443         * Makefile: Add dependency for $(objpfx)version.d.
8445         * eintr.c (eintr_source): Add unnecessary return but the compiler
8446         insists.
8448         * tst-kill3.c: Include <unistd.h>.
8450 2003-02-21  Roland McGrath  <roland@redhat.com>
8452         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8454 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8456         * Makefile (tests): Add tst-eintr1.
8457         (distribute): Add eintr.c.
8458         * tst-eintr1.c: New file.
8459         * eintr.c: New file.
8461         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8463         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8464         Disallow sending SIGCANCEL.
8466         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8467         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8468         * tst-kill1.c: New file.
8469         * tst-kill2.c: New file.
8470         * tst-kill3.c: New file.
8471         * tst-kill5.c: New file.
8472         * tst-kill6.c: New file.
8473         * tst-basic7.c: Renamed to...
8474         * tst-kill4.c: ...this.
8476 2003-02-21  Roland McGrath  <roland@redhat.com>
8478         * Makefile (install-lib-ldscripts): New variable.
8480 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8482         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8483         * pthread_cancel.c: Use INVALID_TD_P.
8484         * pthread_detach.c: Likewise.
8485         * pthread_getschedparam.c: Likewise.
8486         * pthread_setschedparam.c: Likewise.
8487         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8488         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8489         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8490         * pthread_timedjoin.c: Likewise.
8492         * tst-basic7.c: Include <signal.h>.
8494         * pthread_join.c (pthread_join): Limited checking for invalid
8495         descriptors.
8496         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8498 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8500         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8501         beginning of the loop.  Clear the entire first block of TSD.
8502         * Makefile (tests): Add tst-key4.
8503         * tst-key4.c: New file.
8505 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8507         * Makefile (tests): Add tst-basic7.
8508         * tst-basic7.c: New file.
8510         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8511         Add some more __builtin_expect.
8513         * pthreadP.h: Define dummy version of DEBUGGING_P.
8515 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8517         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8518         _POSIX_THREAD_PRIORITY_SCHEDULING.
8519         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8520         _XOPEN_REALTIME_THREADS.
8521         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8523         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8524         kernel returns EINVAL for PID <= 0, work around it.
8526         * Makefile (tests): Add tst-signal5.
8527         * tst-signal5.c: New file.
8529         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8530         and LOGIN_NAME_MAX.
8532         * tst-cancel1.c (tf): Block all signals.
8534         * Makefile (tests): Add tst-basic6.
8535         * tst-basic6.c: New file.
8537         * tst-basic1.c: Add test for process ID.
8539         * Makefile (tests): Add tst-cancel10.
8540         * tst-cancel10.c: New file.
8542         * Makefile (tests): Add tst-signal4.
8543         * tst-signal4.c: New file.
8545         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8546         __sigismember instead of sigismember.  Add __builtin_expect.
8548 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8550         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8551         pthread_setcancelstate, and pthread_rwlock_setpshared.
8553         * tst-cancel7.c (do_test): Make sure the pid file exists before
8554         canceling the thread.
8556         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8557         pthread_rwlock_timedrdlock tests.
8558         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8559         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8560         Check for invalid tv_nsec field.
8561         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8562         Likewise.
8564         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8565         recursive mutex of overflow.
8567         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8569         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8570         going into an endless loop.
8571         * Makefile (tests): Add tst-cancel9.
8572         * tst-cancel9.c: New file.
8574         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8576 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8578         * tst-mutex5.c (do_test): Add more timedlock tests.
8580         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8581         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8583         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8584         use INLINE_SYSCALL.  Error number is returned, not -1.
8586         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8587         and __deallocate_stack with internal_function.
8588         * pthread_create.c: Adjust definitions appropriately.
8589         * allocatestack.c: Likewise.
8591         * pthread_join.c: Add one more __builtin_expect.
8592         * pthread_timedjoin.c: Likewise.
8594         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8595         not data of sequence number does not match.
8596         Add one __builtin_expect.
8598         * Makefile (tests): Add tst-clock1.
8599         * tst-clock1.c: New file.
8601         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8602         negative arguments.
8603         * Makefile (tests): Add tst-basic5.
8604         * tst-basic5.c: New file.
8606 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8608         * Makefile (tests): Add tst-basic4.
8609         * tst-basic4.c: New file.
8611         * pthreadP.h: Add declaraction for __nptl_nthreads.
8612         * pthread_create.c: Define __nptl_nthreads
8613         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8614         after thread is done.  If then zero, call exit(0).
8615         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8616         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8617         * init.c (pthread_functions): Initialize ptr_nthreads.
8618         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8619         (__reclaim_stacks): Decrement __nptl_nthreads.
8620         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8621         Define.
8622         * Makefile (tests): Add tst-basic3.
8623         * tst-basic3.c: New file.
8625         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8626         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8627         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8628         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8629         if asynchronous canceling is enabled.
8630         * pthread_join.c (pthread_join): When recognizing circular joins,
8631         take into account the other thread might be already canceled.
8632         * Makefile (tests): Add tst-join5.
8633         * tst-join5.c: New file.
8635         * Makefile (tests): Add tst-join4.
8636         * tst-join4.c: New file.
8638 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8640         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8642 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8644         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8645         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8646         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8647         warning.
8648         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8649         to avoid warning.
8650         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8651         error if lll_futex_wake failed.
8653 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8655         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8656         handling of cancellation and failung pthread_mutex_unlock call.
8657         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8658         * Makefile (tests): Add tst-cond8 and tst-cond9.
8659         * tst-cond8.c: New file.
8660         * tst-cond9.c: New file.
8662         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8664         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8665         non-standard initializers with __USE_GNU.
8667         * Makefile (tests): Add tst-cleanup3.
8668         * tst-cleanup3.c: New file.
8670 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8672         * Makefile (tests): Add tst-attr1 and tst-attr2.
8673         * tst-attr1.c: New file.
8674         * tst-attr2.c: New file.
8676         * Makefile: Add rules to build and run tst-atfork2 test.
8677         * tst-atfork2.c: New file.
8678         * tst-atfork2mod.c: New file.
8680         * sysdeps/unix/sysv/linux/unregister-atfork.c
8681         (__unregister_atfork): Free the memory allocated for the handlers
8682         after removing them from the lists.
8684         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8685         cleanup function.
8687         * tst-atfork1.c (do_test): Wait for the child we forked.
8688         Report error in child.
8690         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8692         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8694 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8696         * Makefile (tests): Add tst-cancel8.
8697         * tst-cancel8.c: New file.
8699         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8700         clearing of control variable.
8701         * Makefile (tests): Add tst-once3 and tst-once4.
8702         * tst-once3.c: New file.
8703         * tst-once4.c: New file.
8705 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8707         * sysdeps/sh/Makefile: New file.
8708         * sysdeps/sh/bits/atomic.h: New file.
8709         * sysdeps/sh/pthread_spin_init.c: New file.
8710         * sysdeps/sh/pthread_spin_lock.c: New file.
8711         * sysdeps/sh/pthread_spin_trylock.S: New file.
8712         * sysdeps/sh/pthread_spin_unlock.S: New file.
8713         * sysdeps/sh/pthreaddef.h: New file.
8714         * sysdeps/sh/tcb-offsets.sym: New file.
8715         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8716         * sysdeps/sh/tls.h: New file.
8717         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8718         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8719         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8720         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8721         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8722         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8723         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8724         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8725         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8726         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8727         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8728         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8729         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8730         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8731         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8732         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8733         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8734         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8735         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8736         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8737         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8738         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8739         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8740         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8741         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8742         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8743         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8744         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8745         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8746         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8748 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8750         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8751         according to POSIX.
8753         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8755 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8757         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8758         (TLS_GET_FS): New #define.
8759         (TLS_SET_FS): New #define.
8760         Correct value of __NR_set_thread_area.
8762         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8764 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8766         * Makefile (tests): Add tst-popen1.
8767         * tst-popen1.c: New file.
8769         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8770         but inactive generalization.
8771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8773         Minor optimization, remove one instruction.
8774         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8776 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8778         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8780 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8782         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8783         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8784         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8785         * sysdeps/pthread/pthread_cond_signal.c: New file.
8786         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8787         * sysdeps/pthread/pthread_cond_wait.c: New file.
8788         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8789         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8790         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8791         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8792         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8793         * sysdeps/s390/Makefile: New file.
8794         * sysdeps/s390/bits/atomic.h: New file.
8795         * sysdeps/s390/pthread_spin_init.c: New file.
8796         * sysdeps/s390/pthread_spin_lock.c: New file.
8797         * sysdeps/s390/pthread_spin_trylock.c: New file.
8798         * sysdeps/s390/pthread_spin_unlock.c: New file.
8799         * sysdeps/s390/pthreaddef.h: New file.
8800         * sysdeps/s390/tcb-offsets.sym: New file.
8801         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8802         * sysdeps/s390/tls.h: New file.
8803         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8804         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8805         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8806         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8807         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8808         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8809         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8810         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8811         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8812         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8813         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8814         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8815         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8816         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8817         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8818         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8819         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8820         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8821         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8822         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8823         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8824         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8825         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8827 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8829         * atomic.h: Add a couple more default implementations.
8830         (atomic_compare_and_exchange_acq): Use
8831         __arch_compare_and_exchange_32_acq in return value definition.  It
8832         always exists.
8833         (atomic_bit_set): Renamed from atomic_set_bit.
8834         Add missing atomic_ prefixes.
8836         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8837         thread library is available, use correct value to mark initialized
8838         once variable.
8840 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8842         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8843         __sysconf to determine pagesize.
8845         * pthread_create.c: Include <atomic.h>.
8846         * allocatestack.c (allocate_stack): Implement coloring of the
8847         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8848         size minus one.  Adjust users.
8849         * sysdeps/i386/i686/Makefile: New file.
8851 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8853         * allocatestack.c: Improve comment throughout the file.
8855         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8856         (__lll_lock_wait): Add branch prediction.
8857         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8858         (__lll_lock_wait): Likewise.
8859         (lll_unlock_wake_cb): Removed.
8861 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8863         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8864         _POSIX_THREAD_PRIORITY_SCHEDULING.
8866 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8868         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8869         Fix return type of ptr___pthread_getspecific.
8871 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8873         * Makefile (tests): Add tst-umask1.
8874         (tst-umask1-ARGS): Define.
8875         * tst-umask1.c: New file.
8877 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8879         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8880         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8881         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8882         pthread_rwlock_unlock.
8883         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8884         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8885         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8886         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8888         New file.
8889         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8890         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8891         New file.
8892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8893         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8894         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8895         New file.
8896         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8897         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8898         New file.
8899         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8900         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8901         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8902         New file.
8903         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8904         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8905         New file.
8906         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8908         * Makefile (libpthread-routines): Remove lowlevelcond and
8909         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8910         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8911         and pthread_cond_broadcast.
8912         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8913         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8914         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8915         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8916         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8917         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8918         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8919         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8920         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8921         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8922         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8924         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8925         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8926         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8927         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8928         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8929         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8930         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8931         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8932         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8933         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8934         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8935         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8936         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8937         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8938         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8939         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8940         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8941         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8942         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8944         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8945         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8946         of the code is moved to ...
8947         * sysdeps/pthread/createthread.c: ...here.  New file.
8949 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8951         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8952         (__new_sem_post): Clear %eax before returning.
8953         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8955         * Makefile (tests): Add tst-cleanup2.
8956         * tst-cleanup2.c: New file.
8958         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8959         Interpret first parameter correctly.
8961 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8963         * Makefile (headers): Add bits/semaphore.h.
8965 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8967         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8968         if not SHARED.
8970 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8972         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8973         must be used and mapping failed.
8974         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8976         * Makefile (CFLAGS-pthread_self.os): Define this, not
8977         CFLAGS-pthread_self.c.
8979 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8981         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8982         lll_unlock_wake_cb.
8984         * Makefile (libpthread-routines): Add version.  Add rules to build
8985         version.os and banner.h.
8986         * version.c: New file.
8988 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8990         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8991         the alias unconditional.
8992         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8994 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8996         * Makefile (CFLAGS-pthread_self.c): New definition.
8998 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9000         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9001         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9002         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9003         * init.c (__pthread_initialize_minimal_internal): Likewise.
9005 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9007         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9009         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9010         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9011         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9012         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9013         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9014         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9016 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9018         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9019         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9020         * tst-cancel-wrappers.sh: Remove all exceptions.
9022 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9024         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9025         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9027         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9028         Use __libc_pthread_functions array if SHARED.
9030         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9031         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9033         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9034         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9035         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9036         __libc_ptf_call instead of __libc_maybe_call.
9037         (PTF): New #define.
9038         (__libc_cleanup_region_start): Wrap function name with PTF call.
9039         (__libc_cleanup_region_end): Likewise.
9040         (__libc_cleanup_end): Likewise.
9042         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9043         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9044         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9045         * pthreadP.h: Add prototypes.
9047         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9048         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9049         __pthread_rwlock_unlock aliases.
9050         * pthreadP.h: Add prototypes for new aliases.
9052         * pthreadP.h (struct pthead_functions): Moved to...
9053         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9054         * init.c (pthread_functions): Add initializers for new elements.
9056         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9057         __pthread_cleanup_pop_restore aliases.
9058         * pthreadP.h: Add prototypes.
9060         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9061         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9062         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9063         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9064         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9065         * pthreadP.h: Adjust prototypes and callers.
9067 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9069         * Makefile (tests): Add tst-cancel7.
9070         (tst-cancel7-ARGS): New variable.
9071         * tst-cancel7.c: New file.
9073         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9074         around gcc defficiencies.
9075         * old_pthread_cond_signal.c: Likewise.
9076         * old_pthread_cond_timedwait.c: Likewise.
9077         * old_pthread_cond_wait.c: Likewise.
9079         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9081 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9083         * Makefile (tests): Add tst-cond7.
9084         * tst-cond7.c: New file.
9086         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9087         (condvar_cleanup): Get condvar address from the right place.
9089         * atomic.h: Correct definitions of atomic_full_barrier,
9090         atomic_read_barrier, atomic_write_barrier.
9092         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9093         race-free.
9094         * old_pthread_cond_signal.c: Likewise.
9095         * old_pthread_cond_timedwait.c: Likewise.
9096         * old_pthread_cond_wait.c: Likewise.
9098 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9100         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9102 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9104         * pthreadP.h (pthread_cond_2_0_t): New type.
9105         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9106         Use new type for the 2.0 condvar function prototypes.
9107         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9108         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9109         parameter.
9110         * old_pthread_cond_destroy.c: Likewise.
9111         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9112         * old_pthread_cond_signal.c: Likewise.
9113         * old_pthread_cond_timedwait.c: Likewise.
9114         * old_pthread_cond_wait.c: Likewise.
9116         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9117         (__pthread_cond_wait): Don't save cancellation mode and seq value
9118         in same location.
9120         * herrno.c (__h_errno_location): Don't define as weak.
9122 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9124         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9125         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9126         and pthread_cond_wait.
9127         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9128         Renamed to...
9129         (__pthread_cond_broadcast_2_0): ... this.
9130         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9131         Renamed to...
9132         (__pthread_cond_destroy_2_0): ... this.
9133         * old_pthread_cond_init.c (__old_pthread_cond_init):
9134         Renamed to...
9135         (__pthread_cond_init_2_0): ... this.
9136         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9137         Renamed to...
9138         (__pthread_cond_signal_2_0): ... this.
9139         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9140         Renamed to...
9141         (__pthread_cond_wait_2_0): ... this.
9142         * pthread_cond_destroy.c: Include shlib-compat.h.
9143         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9144         * pthread_cond_init.c: Include shlib-compat.h.
9145         (pthread_cond_init): Change strong_alias into versioned_symbol.
9146         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9147         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9148         fields.
9149         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9150         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9151         __pthread_cond_wait_2_0): New prototypes.
9152         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9153         __old_pthread_cond_init, __old_pthread_cond_signal,
9154         __old_pthread_cond_wait): Removed.
9155         * init.c: Include shlib-compat.h.
9156         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9157         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9158         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9159         ptr___pthread_cond_*_2_0 fields.
9160         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9161         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9163         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9164         LIBC_SIGACTION was not yet defined.
9165         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9166         [!defined LIBC_SIGACTION] (__sigaction): New function and
9167         libc_hidden_weak.
9168         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9169         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9171 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9173         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9175 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9177         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9178         New, larger type definition.
9179         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9180         implementation.
9181         * Versions [libpthread]: Add definitions for new pthread_cond_*
9182         interfaces for version GLIBC_2.3.2.
9183         * pthread_cond_init.c: Update initialization for new type definition.
9184         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9185         pthread_cond_timedwait, pthread_cond_signal, and
9186         pthread_cond_broadcast.  Add old_pthread_cond_init,
9187         old_pthread_cond_destroy, old_pthread_cond_wait,
9188         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9189         old_pthread_cond_broadcast.
9190         * old_pthread_cond_broadcast.c: New file.
9191         * old_pthread_cond_destroy.c: New file.
9192         * old_pthread_cond_init.c: New file.
9193         * old_pthread_cond_signal.c: New file.
9194         * old_pthread_cond_timedwait.c: New file.
9195         * old_pthread_cond_wait.c: New file.
9196         * pthreadP.h: Add prototypes for the compatibility interfaces.
9198         * pthread_cond_destroy.c: Don't include <errno.h>.
9200 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9202         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9203         unnecessary zero offset when addressing MUTEX.
9205 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9207         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9208         __register_atfork.
9209         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9210         for __register_atfork.
9212 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9214         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9215         instead of ASSEMBLER test macro.
9217         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9218         __libc_current_sigrtmax): Add libc_hidden_def.
9220         * sysdeps/pthread/list.h: Remove assert.h include.
9222 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9224         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9225         __pthread_initialize_minimal_internal not
9226         __pthread_initialize_minimal.
9228 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9230         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9231         __pthread_initialize_minimal as hidden.
9233         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9234         constructor.
9236 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9238         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9239         $(common-objpfx)format.lds, include that into the output script.
9240         Fix comment.
9241         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9243 2002-12-28  Andreas Jaeger  <aj@suse.de>
9245         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9246         nsec resolution changes.
9247         (xstat64_conv): Likewise.
9248         (xstat32_conv): Likewise.
9249         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9250         struct kernel_stat.
9251         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9252         structs stat and stat64.
9253         * time/time.h (__timespec_defined): Define for __USE_MISC.
9254         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9256 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9258         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9259         argument.
9260         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9261         (pthread_exit): Use strong_alias to avoid warnings.
9262         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9263         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9264         ptr___pthread_attr_init_2_*.
9265         * init.c (pthread_functions): Adjust.
9267 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9269         * forward.c: Make all functions available by default again.  It
9270         caused too much trouble.
9272         * pt-siglongjmp.c: Removed.
9274 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9276         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9277         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9278         * sysdeps/i386/Makefile: New file.
9279         * sysdeps/i386/tcb-offsets.sym: New file.
9280         * sysdeps/pthread/tcb-offsets.h: New file.
9281         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9282         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9284         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9285         __register_atfork...
9286         (GLIBC_2.3.2): ...here.
9288 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9290         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9291         pthread_attr_setstackaddr with __attribute_deprecated__.
9293 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9295         * pt-system.c (system): Remove cancellation handling.
9296         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9297         cancellation routines.
9299 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9301         * descr.h: Include <dl-sysdep.h>.
9302         (struct pthread): Move header.data.list to the back of the struct.
9303         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9304         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9305         (SYSINFO_OFFSEET): Likewise.
9307 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9309         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9310         Define.
9311         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9312         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9313         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9314         (USE_DL_SYSINFO): Undef.
9316 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9318         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9319         $(common-objpfx)libc.so.
9320         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9321         it is bigger than pipe buffer size even on arches with bigger
9322         page size.
9323         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9325 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9327         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9328         correct errno access for case that USE___THREAD is not defined.
9330 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9332         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9333         Patch by Marijn Ros <marijn@mad.scientist.com>.
9335 2002-12-22  Roland McGrath  <roland@redhat.com>
9337         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9339 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9341         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9343 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9345         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9346         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9347         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9349         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9350         of int $0x80.
9351         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9352         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9353         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9354         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9355         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9356         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9357         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9358         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9360         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9361         sysenter.
9362         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9364         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9366         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9367         in new TCB.
9368         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9369         that sysinfo is properly initialized.
9370         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9371         to 1 only for ld.so.
9373         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9374         RTLD_CORRECT_DYNAMIC_WEAK.
9376 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9378         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9379         Use return 0 as 6th argument to FORWARD4.
9380         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9382 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9384         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9385         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9386         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9387         (INIT_SYSINFO): New #define.
9388         (TLS_TP_INIT): Use INIT_SYSINFO.
9389         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9390         At test to make sure SYSINFO_OFFSET value is correct.
9391         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9393 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9395         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9396         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9397         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9398         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9399         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9400         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9401         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9403 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9405         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9406         macro instead of using int $0x80 directly.
9408         * sysdeps/pthread/bits/stdio-lock.h: New file.
9409         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9410         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9411         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9412         * Makefile (routines): Add libc-lowlevelmutex.
9414         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9415         __i686.get_pc_thunk.dx.
9417 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9419         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9420         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9421         ($(objpfx)tst-cancel-wrappers.out): New rule.
9422         * tst-cancel-wrappers.sh: New test.
9423         * tst-locale1.c: Include signal.h.
9424         (uselocale): Test static linking of __libc_current_sigrt*.
9426 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9428         * Makefile (tests): Add tst-cancel6.
9429         * tst-cancel6.c: New file
9431 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9433         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9434         Define meaningfully for assembler as well.
9435         * pthreadP.h (struct pthread_functions): Remove
9436         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9437         and ptr_pthread_attr_init_2_1 fields.
9438         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9439         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9440         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9441         (FORWARD3): Define using FORWARD4.
9442         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9443         versions.
9444         * pt-system.c: Remove duplicate stdlib.h include.
9446 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9448         * sem_init.c: Define sem_init@GLIBC_2.0.
9449         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9450         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9452         * flockfile.c: Moved to...
9453         * sysdeps/pthread/flockfile.c: ...here.  New file.
9454         * funlockfile.c: Moved to...
9455         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9456         * ftrylockfile.c: Moved to...
9457         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9459 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9461         * libc-cancellation.c: Guard both function with
9462         #if !defined NOT_IN_libc.
9463         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9464         automatically provided pthread wrappers.
9465         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9466         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9467         nor in libpthread.
9468         * pt-open.c: Removed.
9469         * pt-fcntl.c: Removed.
9470         * pt-fsync.c: Removed.
9471         * pt-lseek.c: Removed.
9472         * pt-msgrcv.c: Removed.
9473         * pt-msgsnd.c: Removed.
9474         * pt-msync.c: Removed.
9475         * pt-nanosleep.c: Removed.
9476         * pt-open64.c: Removed.
9477         * pt-pause.c: Removed.
9478         * pt-pread.c: Removed.
9479         * pt-pread64.c: Removed.
9480         * pt-pwrite.c: Removed.
9481         * pt-pwrite64.c: Removed.
9482         * pt-read.c: Removed.
9483         * pt-recv.c: Removed.
9484         * pt-recvfrom.c: Removed.
9485         * pt-recvmsg.c: Removed.
9486         * pt-send.c: Removed.
9487         * pt-sendto.c: Removed.
9488         * pt-sigtimedwait.c: Removed.
9489         * pt-sigwait.c: Removed.
9490         * pt-wait.c: Removed.
9491         * pt-waitpid.c: Removed.
9492         * pt-write.c: Removed.
9493         * pt-accept.c: Removed.
9494         * pt-close.c: Removed.
9495         * pt-connect.c: Removed.
9496         * pt-lseek64.c: Removed.
9497         * pt-sendmsg.c: Removed.
9498         * pt-tcdrain.c: Removed.
9500 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9502         * init.c (__pthread_initialize_minimal_internal): Renamed from
9503         __pthread_initialize_minimal.  Make old name an alias.  This
9504         converts a normal relocation into a relative relocation.
9506         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9508         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9509         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9510         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9511         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9512         pt-sigwaitinfo, pt-waitid, and pt-writev.
9513         * pt-creat.c: Removed.
9514         * pt-poll.c: Removed.
9515         * pt-pselect.c: Removed.
9516         * pt-readv.c: Removed.
9517         * pt-select.c: Removed.
9518         * pt-sigpause.c: Removed.
9519         * pt-sigsuspend.c: Removed.
9520         * pt-sigwaitinfo.c: Removed.
9521         * pt-waitid.c: Removed.
9522         * pt-writev.c: Removed.
9524         * init.c (pthread_functions): New variable.
9525         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9526         (or NULL) to __libc_pthread_init.
9527         * forward.c: Rewrite to use __libc:pthread_functions array to get
9528         function addresses.
9529         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9530         prototype.
9531         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9532         Take new parameter.  Copy content of variable pointed to by it
9533         to __libc_pthread_init.
9535         * pthreadP.h (struct pthread_functions): New type.
9536         (__libc_pthread_init): Declare.
9538         * pthread_attr_destroy.c: Add namespace protected alias.
9539         * pthread_attr_getdetachstate.c: Likewise.
9540         * pthread_attr_getinheritsched.c: Likewise.
9541         * pthread_attr_getschedparam.c: Likewise.
9542         * pthread_attr_getschedpolicy.c: Likewise.
9543         * pthread_attr_getscope.c: Likewise.
9544         * pthread_attr_setdetachstate.c: Likewise.
9545         * pthread_attr_setinheritsched.c: Likewise.
9546         * pthread_attr_setschedparam.c: Likewise.
9547         * pthread_attr_setschedpolicy.c: Likewise.
9548         * pthread_attr_setscope.c: Likewise.
9549         * pthread_cond_broadcast.c: Likewise.
9550         * pthread_cond_destroy.c: Likewise.
9551         * pthread_cond_init.c: Likewise.
9552         * pthread_cond_signal.c: Likewise.
9553         * pthread_cond_wait.c: Likewise.
9554         * pthread_condattr_destroy.c: Likewise.
9555         * pthread_condattr_init.c: Likewise.
9556         * pthread_equal.c: Likewise.
9557         * pthread_exit.c: Likewise.
9558         * pthread_getschedparam.c: Likewise.
9559         * pthread_self.c: Likewise.
9560         * pthread_setcancelstate.c: Likewise.
9561         * pthread_setschedparam.c: Likewise.
9562         * pthread_mutex_destroy.c: Likewise.
9563         * pthread_mutex_init.c: Likewise.
9564         * pthreadP.h: Add prototypes for the aliases.
9566         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9567         multiple_threads member in correct TCB to 1.
9569         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9570         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9571         member of thread decriptor, otherwise return unconditionally 1.
9573 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9575         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9576         regular Linux version.  Remove file.
9577         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9578         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9579         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9580         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9581         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9582         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9583         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9584         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9585         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9586         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9587         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9588         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9589         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9590         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9591         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9592         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9593         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9594         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9595         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9596         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9597         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9598         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9599         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9600         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9601         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9602         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9603         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9604         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9605         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9606         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9608 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9610         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9611         * sysdeps/unix/sysv/linux/open.c: Removed.
9612         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9613         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9614         * sysdeps/unix/sysv/linux/msync.c: Removed.
9615         * sysdeps/unix/sysv/linux/read.c: Removed.
9616         * sysdeps/unix/sysv/linux/close.c: Removed.
9617         * sysdeps/unix/sysv/linux/creat.c: Removed.
9618         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9619         * sysdeps/unix/sysv/linux/pause.c: Removed.
9620         * sysdeps/unix/sysv/linux/select.c: Removed.
9621         * sysdeps/unix/sysv/linux/write.c: Removed.
9623 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9625         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9626         element in TCB to see whether locking is needed.
9628         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9629         MULTIPLE_THREADS_OFFSET value is correct.
9631         * sysdeps/unix/sysv/linux/close.c: New file.
9632         * sysdeps/unix/sysv/linux/connect.S: New file.
9633         * sysdeps/unix/sysv/linux/creat.c: New file.
9634         * sysdeps/unix/sysv/linux/fsync.c: New file.
9635         * sysdeps/unix/sysv/linux/llseek.c: New file.
9636         * sysdeps/unix/sysv/linux/lseek.c: New file.
9637         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9638         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9639         * sysdeps/unix/sysv/linux/msync.c: New file.
9640         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9641         * sysdeps/unix/sysv/linux/open.c: New file.
9642         * sysdeps/unix/sysv/linux/open64.c: New file.
9643         * sysdeps/unix/sysv/linux/pause.c: New file.
9644         * sysdeps/unix/sysv/linux/poll.c: New file.
9645         * sysdeps/unix/sysv/linux/pread.c: New file.
9646         * sysdeps/unix/sysv/linux/pread64.c: New file.
9647         * sysdeps/unix/sysv/linux/pselect.c: New file.
9648         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9649         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9650         * sysdeps/unix/sysv/linux/readv.c: New file.
9651         * sysdeps/unix/sysv/linux/recv.S: New file.
9652         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9653         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9654         * sysdeps/unix/sysv/linux/select.c: New file.
9655         * sysdeps/unix/sysv/linux/send.S: New file.
9656         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9657         * sysdeps/unix/sysv/linux/sendto.S: New file.
9658         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9659         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9660         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9661         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9662         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9663         * sysdeps/unix/sysv/linux/system.c: New file.
9664         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9665         * sysdeps/unix/sysv/linux/wait.c: New file.
9666         * sysdeps/unix/sysv/linux/waitid.c: New file.
9667         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9668         * sysdeps/unix/sysv/linux/writev.c: New file.
9669         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9671         * pt-readv.c: Fix comment.
9673 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9675         * tst-cleanup1.c: Include stdlib.h.
9677         * tst-cancel5.c: New test.
9678         * Makefile (tests): Add tst-cancel5.
9679         (tst-cancel5): Link against libc.so libpthread.so in that order.
9681 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9683         * forward.c (test_loaded): Prevent recursive calls.
9685         * Makefile (routines): Add libc-cancellation.
9686         * libc-cancellation.c: New file.
9687         * descr.h (struct pthread): Add multiple_threads field.
9688         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9689         new thread descriptor to 1.
9690         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9691         Initialize multiple_thread field after successful thread creation.
9692         * cancellation.c (__do_cancel): Move to pthreadP.h.
9693         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9694         (__pthread_disable_asynccancel): Add internal_function attribute.
9695         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9696         * pthread_setcancelstate.c: Likewise.
9697         * pthread_setcanceltype.c: Likewise.
9698         * pthread_exit.c: Likewise.
9699         * pthreadP.h (CANCELLATION_P): Likewise.
9700         (__do_cancel): Define as static inline.
9701         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9702         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9703         declarations.
9704         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9705         fields.  Define MULTIPLE_THREADS_OFFSET.
9706         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9707         declaration.
9708         * sysdeps/unix/sysv/linux/accept.S: New file.
9709         * sysdeps/unix/sysv/linux/read.c: New file.
9710         * sysdeps/unix/sysv/linux/write.c: New file.
9711         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9712         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9713         initialization of __libc_locking_needed.
9714         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9715         __libc_locking_needed, use multiple_threads field in TCB.
9716         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9718 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9720         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9721         version.
9722         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9724         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9725         access to __libc_locking_needed for PIC.
9727 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9729         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9730         declare for libc.so.
9731         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9732         expression.
9733         (__libc_lock_lock): Put into statement expression.
9734         (__libc_lock_unlock): Remove trailing semicolon.
9735         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9737 2002-12-12  Roland McGrath  <roland@redhat.com>
9739         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9740         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9742 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9744         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9745         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9746         Initialize __libc_locking_needed.
9747         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9748         instead of __register_pthread_fork_handler.
9749         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9750         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9751         fork-gen with libc_pthread_init.
9752         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9753         of __register_pthread_fork_handler.
9754         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9755         of __register_pthread_fork_handler.
9756         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9757         __libc_locking_needed to determine whether lock prefix can be avoided.
9758         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9760 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9762         * Makefile (tests): Add tst-cleanup1.
9763         * tst-cleanup1.c: New file.
9764         * cancellation.c (__cleanup_thread): Removed.
9765         (__do_cancel): Remove call to __cleanup_thread.
9766         * pthreadP.h: Remove __cleanup_thread prorotype.
9768         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9769         Remember function and argument even if cancellation handler
9770         function is not available.
9771         (__libc_cleanup_region_end): Execute registered function directly if
9772         pthread functions are not available.
9773         (__libc_cleanup_end): Likewise.
9775         * init.c (__pthread_initialize_minimal): Fix initialization in
9776         static lib by preventing gcc from being too clever.
9778 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9780         * init.c (__pthread_initialize_minimal): Remove unneccesary
9781         sigaddset call.
9783         * Makefile (tests): We can run tst-locale2 now.
9785 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9787         * Versions: Remove duplicated sigwait entry.
9789 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9791         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9792         inside libpthread.
9794         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9796         * pthreadP.h: Declare __pthread_enable_asynccancel and
9797         __pthread_disable_asynccancel.
9798         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9799         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9800         * cancellation.c (__pthread_enable_asynccancel): New function.
9801         (__pthread_disable_asynccancel): New function.
9802         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9803         * pt-close.c: Likewise.
9804         * pt-connect.c: Likewise.
9805         * pt-creat.c: Likewise.
9806         * pt-fcntl.c: Likewise.
9807         * pt-fsync.c: Likewise.
9808         * pt-lseek.c: Likewise.
9809         * pt-lseek64.c: Likewise.
9810         * pt-msgrcv.c: Likewise.
9811         * pt-msgsnd.c: Likewise.
9812         * pt-msync.c: Likewise.
9813         * pt-nanosleep.c: Likewise.
9814         * pt-open.c: Likewise.
9815         * pt-open64.c: Likewise.
9816         * pt-pause.c: Likewise.
9817         * pt-poll.c: Likewise.
9818         * pt-pread.c: Likewise.
9819         * pt-pread64.c: Likewise.
9820         * pt-pselect.c: Likewise.
9821         * pt-pwrite.c: Likewise.
9822         * pt-pwrite64.c: Likewise.
9823         * pt-read.c: Likewise.
9824         * pt-readv.c: Likewise.
9825         * pt-recv.c: Likewise.
9826         * pt-recvfrom.c: Likewise.
9827         * pt-recvmsg.c: Likewise.
9828         * pt-select.c: Likewise.
9829         * pt-send.c: Likewise.
9830         * pt-sendmsg.c: Likewise.
9831         * pt-sendto.c: Likewise.
9832         * pt-sigpause.c: Likewise.
9833         * pt-sigsuspend.c: Likewise.
9834         * pt-sigtimedwait.c: Likewise.
9835         * pt-sigwait.c: Likewise.
9836         * pt-sigwaitinfo.c: Likewise.
9837         * pt-system.c: Likewise.
9838         * pt-tcdrain.c: Likewise.
9839         * pt-wait.c: Likewise.
9840         * pt-waitid.c: Likewise.
9841         * pt-waitpid.c: Likewise.
9842         * pt-write.c: Likewise.
9843         * pt-writev.c: Likewise.
9844         * pthread_join.c: Likewise.
9845         * pthread_timedjoin.c: Likewise.
9847         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9848         (__xpg_sigpause): New function.
9849         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9851 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9853         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9855         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9856         _GI_pthread_cleanup_pop to pthreadP.h.
9858         * ftrylockfile.c: Use _IO_lock_trylock instead of
9859         pthread_mutex_trylock.
9861         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9862         (CANCEL_RESET): Likewise.
9863         (__pthread_setcanceltype_): Declare.
9864         (__pthread_mutex_lock_internal): Declare.
9865         (__pthread_mutex_unlock_internal): Declare.
9866         (__pthread_once_internal): Declare.
9867         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9868         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9870         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9871         and pthread_mutex_unlock.
9872         * pthread_cond_wait.c: Likewise.
9873         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9874         * pthread_mutex_unlock.c: Likewise.
9876         * pthread_setcanceltype.c: Add additional alias
9877         __pthread_setcanceltype.
9879         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9880         * sem_open.c (sem_open): Likewise.
9881         Use __libc_open, __libc_write, and __libc_close instead of
9882         open, write, and close respectively.
9884         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9885         Rewrite as statement expression since it must return a value.
9887         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9888         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9889         __pthread_kill.
9891         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9892         alias __pthread_once_internal.
9894         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9896 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9898         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9899         * tst-stdio1.c: New file.
9900         * tst-stdio2.c: New file.
9902         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9904         * Makefile (tests): Comment out tst-locale2 for now.
9905         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9907         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9908         -D_IO_MTSAFE_IO.
9909         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9910         Use _IO_lock_init instead of explicit assignment.
9912         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9913         Define __libc_lock_* and __libc_lock_recursive macros with
9914         lowlevellock macros, not pthread mutexes.
9916         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9917         of pthread_mutex_lock.
9918         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9919         instead of pthread_mutex_unlock.
9921 2002-12-06  Roland McGrath  <roland@redhat.com>
9923         * allocatestack.c (__stack_user): Use uninitialized defn.
9924         * init.c (__pthread_initialize_minimal): Initialize it here.
9926 2002-12-05  Roland McGrath  <roland@redhat.com>
9928         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9929         string.
9930         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9932         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9933         missing & here too.
9935 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9937         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9938         lowlevellock.
9939         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9940         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9941         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9942         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9943         for __libc_lock_* macros.
9944         * Makefile (routines): Add libc-lowlevellock.
9946 2002-10-09  Roland McGrath  <roland@redhat.com>
9948         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9949         Under [__PIC__], call the function via the pointer fetched for
9950         comparison rather than a call by name that uses the PLT.
9951         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9952         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9953         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9954         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9955         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9957 2002-12-04  Roland McGrath  <roland@redhat.com>
9959         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9961         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9962         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9964         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9966 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9968         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9969         a completely opaque, non-integer type.
9970         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9972 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9974         * sysdeps/i386/tls.h: Include stdlib.h.
9975         * sysdeps/x86_64/tls.h: Likewise.
9977 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9979         * Makefile (tests): Add tst-locale2.
9980         (tests-static): Likewise.
9981         * tst-locale2.c: New file.
9983         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9984         volatile and add memory clobbers to lock operations.
9986 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9988         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9989         * sysdeps/i386/i486/bits/atomic.h: New file.
9990         * sysdeps/i386/i586/bits/atomic.h: New file.
9991         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9992         include i486 version.
9993         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9994         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9995         Patch by Marijn Ros <marijn@mad.scientist.com>.
9997         * allocatestack.c (get_cached_stack): Don't crash if we first
9998         found a stack with a larger size then needed.
9999         Reported by Hui Huang <hui.huang@sun.com>.
10001         * Makefile (tests): Add tst-sysconf.
10002         * tst-sysconf.c: New file.
10004         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10005         PTHREAD_THREADS_MAX.
10007 2002-12-02  Roland McGrath  <roland@redhat.com>
10009         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10010         Declare using hidden_proto instead of attribute_hidden, so there are
10011         non-.hidden static symbols for gdb to find.
10012         (__pthread_keys): Likewise.
10013         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10014         * allocatestack.c (__stack_user): Likewise.
10015         * pthread_create.c (__pthread_keys): Likewise.
10016         (__nptl_threads_events, __nptl_last_event): Make these static instead
10017         of hidden.
10018         * pthread_key_create.c (__pthread_pthread_keys_max,
10019         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10021 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10023         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10024         statically.
10025         * tst-locale1.c: New file.
10027         * pthread_cond_timedwait.c: Include <stdlib.h>.
10029         * Makefile (tests): Add tst-fork2 and tst-fork3.
10030         * tst-fork2.c: New file.
10031         * tst-fork3.c: New file.
10033 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10035         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10037         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10038         require it to 200112L.
10040         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10041         instruction only if HAVE_CMOV is defined.
10042         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10044         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10046         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10048         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10050         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10052 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10054         * sysdeps/x86_64/bits/atomic.h: New file.
10056         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10057         16-bit operations.
10059         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10060         possible since gettid cannot fail.
10062         * sysdeps/x86_64/pthreaddef.h: New file.
10064         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10066         * sysdeps/x86_64/pthread_spin_init.c: New file.
10067         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10068         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10069         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10071         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10072         Add missing lock prefix.  Minute optimization.
10074         * tst-spin2.c (main): Also check successful trylock call.
10076         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10077         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10079         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10080         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10082         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10083         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10084         value in case of an error.  Add support for INTERNAL_SYSCALL.
10086         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10087         value in case of an error.
10089         * sysdeps/x86_64/tls.h: New file.
10091 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10093         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10094         takes the array member name and the index as parameters.
10095         (THREAD_SETMEM_NC): Likewise.
10096         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10097         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10098         interfaces.
10100         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10101         to decide which code to use.
10102         (THREAD_SETMEM_NC): Likewise.
10104         * allocatestack.c (queue_stack): Don't remove stack from list here.
10105         Do it in the caller.  Correct condition to prematurely terminate
10106         loop to free stacks.
10107         (__deallocate_stack): Remove stack from list here.
10109 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10111         * Makefile (tests): Add tst-stack1.
10112         * tst-stack1.c: New file.
10114         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10115         provided stack.
10117         * pthread_attr_getstack.c: Return bottom of the thread area.
10119 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10121         * Makefile (libpthread-routines): Add pt-allocrtsig and
10122         pthread_kill_other_threads.
10123         * pt-allocrtsig.c: New file.
10124         * pthread_kill_other_threads.c: New file.
10125         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10126         all three functions.
10127         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10128         allocrtsig.
10129         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10130         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10131         and __libc_allocate_rtsig_private.
10132         * Versions (libpthread): Export pthread_kill_other_threads_np,
10133         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10135 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10137         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10138         the end of the stack.  Adjust computations.
10139         When mprotect call fails dequeue stack and free it.
10140         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10141         attribute.
10142         * pthread_getattr_np.c: Likewise.
10144         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10145         surprises.
10147 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10149         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10150         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10152 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10154         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10155         * pthread_setspecific.c: Likewise.
10157 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10159         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10160         definitions.  Get them from the official place.
10161         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10163         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10164         Use new CLONE_ flags in clone() calls.
10166         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10167         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10169         * Versions: Add pthread_* functions for libc.
10170         * forward.c: New file.
10172         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10173         errno-loc.
10174         * herrno.c: New file.
10175         * res.c: New file.
10177         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10178         sem_trywait, and sem_timedwait.  Add herrno and res.
10179         * sem_init.c: Don't initialize lock and waiters members.
10180         * sem_open.c: Likewise.
10181         * sem_post.c: Removed.
10182         * sem_wait.c: Removed.
10183         * sem_trywait.c: Removed.
10184         * sem_timedwait.c: Removed.
10185         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10186         Includes full implementations of sem_post, sem_wait, sem_trywait,
10187         and sem_timedwait.
10188         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10189         for new implementation.
10190         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10191         and waiters fields.
10193         * tst-sem3.c: Improve error message.
10194         * tst-signal3.c: Likewise.
10196         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10197         to tell the kernel about the termination futex and to initialize tid
10198         member.  Don't initialize main_thread.
10199         * descr.h (struct pthread): Remove main_thread member.
10200         * cancelllation.c (__do_cancel): Remove code handling main thread.
10201         The main thread is not special anymore.
10203         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10204         size of the stacks to stack_cache_actsize.
10206         * pt-readv.c: Add missing "defined".
10207         * pt-sigwait.c: Likewise.
10208         * pt-writev.c: Likewise.
10210 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10212         * Versions: Export __connect from libpthread.
10213         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10215         * Makefile (libpthread-routines): Add pt-raise.
10216         * sysdeps/unix/sysv/linux/raise.c: New file.
10217         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10218         * sysdeps/generic/pt-raise.c: New file.
10220         * pthread_cond_init.c: Initialize all data elements of the condvar
10221         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10223         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10224         * pthread_create.c: Likewise.
10226         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10227         * tst-key1.c: New file.
10228         * tst-key2.c: New file.
10229         * tst-key3.c: New file.
10231         * Versions: Export pthread_detach for version GLIBC_2.0.
10232         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10234 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10236         * pthread_key_create.c: Terminate search after an unused key was found.
10237         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10239         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10240         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10242 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10244         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10245         dynamic lookup for errno in PIC.
10247         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10248         release the stack lock as soon as possible.
10249         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10250         the static TLS block.
10251         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10253         * cancellation.c: Renamed from cancelation.c.
10254         * Makefile: Adjust accordingly.
10255         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10256         * cleanup_defer.c: Use CANCELLATION_P.
10257         * pthread_testcancel.c: Likewise.
10258         * descr.h: Fix spelling in comments.
10259         * init.c: Likewise.
10260         * pthread_getattr_np.c: Likewise.
10261         * pthread_getschedparam.c: Likewise.
10262         * pthread_setschedparam.c: Likewise.
10263         * Versions: Likewise.
10265         * pt-pselect.c: New file.
10266         * Makefile (libpthread-routines): Add pt-pselect.
10267         * Versions: Add pselect.
10269         * tst-cancel4.c: New file.
10270         * Makefile (tests): Add tst-cancel4.
10272 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10274         * pthread_mutex_lock.c: Always record lock ownership.
10275         * pthread_mutex_timedlock.c: Likewise.
10276         * pthread_mutex_trylock.c: Likewise.
10278         * pt-readv.c: New file.
10279         * pt-writev.c: New file.
10280         * pt-creat.c: New file.
10281         * pt-msgrcv.c: New file.
10282         * pt-msgsnd.c: New file.
10283         * pt-poll.c: New file.
10284         * pt-select.c: New file.
10285         * pt-sigpause.c: New file.
10286         * pt-sigsuspend.c: New file.
10287         * pt-sigwait.c: New file.
10288         * pt-sigwaitinfo.c: New file.
10289         * pt-waitid.c: New file.
10290         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10291         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10292         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10293         * Versions: Add all the new functions.
10295         * tst-exit1.c: New file.
10296         * Makefile (tests): Add tst-exit1.
10298         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10300 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10302         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10304         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10305         call.  pthread_join is an official cancellation point.
10306         * pthread_timedjoin.c: Likewise.
10308         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10309         and the condvar's mutex are retrieved.
10310         * pthread_cond_timedwait.c: Likewise.
10311         Reported by dice@saros.East.Sun.COM.
10313 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10315         * pthreadP.h: Cut out all type definitions and move them...
10316         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10317         * pthreadP.h: Include <internaltypes.h>.
10319         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10320         performance tweaks.
10322         * sem_trywait.c: Shuffle #includes around to get right order.
10323         * sem_timedwait.c: Likewise.
10324         * sem_post.c: Likewise.
10325         * sem_wait.c: Likewise.
10327         * nptl 0.3 released.
10329         * Makefile (tests): Add tst-signal3.
10330         * tst-signal3.c: New file.
10332 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10334         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10335         the asms modify the sem object.
10336         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10338         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10339         the actual members.
10340         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10341         * semaphoreP.h: Include pthreadP.h.
10342         * sem_getvalue.c: Adjust to sem_t change.
10343         * sem_init.c: Likewise.
10344         * sem_open.c: Likewise.
10345         * sem_post.c: Likewise.
10346         * sem_timedwait.c: Likewise.
10347         * sem_trywait.c: Likewise.
10348         * sem_wait.c: Likewise.
10350 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10352         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10353         * tst-basic2.c: New file.
10354         * tst-exec1.c: New file.
10355         * tst-exec2.c: New file.
10356         * tst-exec3.c: New file.
10358         * tst-fork1.c: Remove extra */.
10360         * nptl 0.2 released.  The API for IA-32 is complete.