Updated to fedora-glibc-20080201T1017
[glibc.git] / nptl / ChangeLog
blob1be97bab710a56f16dd96b7a8ca52f7ea30fe0ab
1 2008-01-31  Roland McGrath  <roland@redhat.com>
3         * Makefile (omit-deps): Variable removed.
5 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
7         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
8         unnecessary addr32 prefix.
10 2008-01-29  Roland McGrath  <roland@redhat.com>
12         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
14 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
16         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
18 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
20         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
21         a scratch register.
22         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
23         (__lll_lock_wait_private): Fix typo.
24         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
25         (pthread_barrier_wait): Likewise.  Adjust XADD use.
26         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
27         Adjust XADD use.
28         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
29         (pthread_rwlock_timedrdlock): Return correct return value.
30         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
31         (pthread_rwlock_timedwrlock): Likewise.
33 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
35         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
36         thread returns the program exits with an error code.
38 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
40         * pthread-errnos.sym: Add EOVERFLOW.
41         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
42         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
43         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
44         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
46 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
48         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
49         parameter.  Passed it as permission to mmap.
50         * allocatestack.c (allocate_stack): Pass prot as second parameter
51         to ARCH_RETRY_MMAP.
53 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
55         * tst-basic7.c: Allocate memory for the stack.
57         [BZ #5465]
58         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
59         (__pthread_cond_timedwait): Don't use VDSO.
60         Patch by Michal Januszewski.
62 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
64         [BZ #5455]
65         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
66         Allow label before pthread_cleanup_pop.
67         (pthread_cleanup_pop_restore_np): Likewise.
69 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
71         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
72         Store 2 before returning ETIMEDOUT.
74 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
76         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
77         Store 2 before returning ETIMEDOUT.
78         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
79         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
80         (__lll_lock_wait_private): Optimize.
81         (__lll_lock_wait): Likewise.
83 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
85         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
86         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
87         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
89 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
91         [BZ #5240]
92         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
93         If we time out, try one last time to lock the futex to avoid
94         losing a wakeup signal.
95         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
96         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
98         [BZ #5245]
99         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
100         if necessary.
102 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
104         [BZ #5245]
105         * allocatestack.c (allocate_stack): Change ENOMEM error in case
106         mmap failed to EAGAIN.
107         * Makefile (tests): Add tst-basic7.
108         * tst-basic7.c: New file.
110 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
112         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
113         Use __linkin_atfork.
115 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
117         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
118         missing line continuations.
119         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
120         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
122 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
124         [BZ #5220]
125         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
126         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
127         (struct timer): Add next element.
128         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
129         enqueue timer structure into __active_timer_sigev_thread list.
130         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
131         remove timer struct from __active_timer_sigev_thread.
132         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
133         Before using timer structure make sure it is still on the
134         __active_timer_sigev_thread list.  Keep lock until done.
135         Define __active_timer_sigev_thread and
136         __active_timer_sigev_thread_lock.
138 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
140         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
141         Redefine thread_atfork for use of ATFORK_MEM.
142         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
143         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
144         function.
145         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
146         Use atomic operation when removing first element of list.
148 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
150         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
151         routine instead of an alias to __new_sem_post.
153 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
155         * init.c (__pthread_initialize_minimal): Initialize word to appease
156         valgrind.
158 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
160         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
161         libc.so just clear NAME.
162         (__libc_rwlock_fini): Nop inside of libc.so.
163         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
164         all zeros.
166 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
168         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
169         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
170         unlocking failed.
171         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
173 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
175         [BZ #4938]
176         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
177         reclaimed stack if necessary.
178         * Makefile (tests): Add tst-tsd6.
179         * tst-tsd6.c: New file.
181 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
183         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
184         Add private argument.
186 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
189         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
191 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
193         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
194         (__lll_robust_timedlock): Pass private as last argument to
195         __lll_robust_timedlock_wait.
196         (__lll_unlock): Fix a pasto.
198 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
200         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
201         sparc_old_sem): New structs.
202         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
203         (__sem_wait_cleanup): New function.
204         (__new_sem_wait): 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_wait.
208         (__old_sem_wait): New function.
209         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
210         nptl/sysdeps/unix/sysv/linux/sparc version.
211         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
212         Likewise.
213         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
214         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
215         (__new_sem_trywait): Use sparc_old_sem structure.
216         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
217         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
218         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
219         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
220         lll_futex_timed_wait.
221         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
222         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
223         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
224         lll_futex_wake.
225         (__old_sem_post): New function.
226         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
227         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
228         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
229         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
230         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
231         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
233 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
235         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
236         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
237         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
238         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
239         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
240         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
241         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
242         Use FUTEX_WAKE_OP.
243         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
244         kernel-features.h and tcb-offsets.h.
245         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
246         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
247         process private.
248         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
249         tcb-offsets.h.
250         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
251         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
252         process private.
253         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
254         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
255         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
256         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
257         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
258         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
259         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
261 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
263         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
264         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
265         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
266         lll_futex_timed_wait.
268         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
269         __lll_robust_unlock): Rewrite as macros instead of inline functions.
270         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
271         __lll_robust_unlock, __lll_wait_tid): Likewise.
273 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
275         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
276         Fix a pasto.
277         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
278         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
279         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
280         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
282         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
283         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
284         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
285         kernel-features.h.
286         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
287         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
288         process private.  Switch DW_CFA_advance_loc1 and some
289         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
290         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
291         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
292         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
293         process private.  Switch DW_CFA_advance_loc{1,2} and some
294         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
295         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
296         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
297         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
298         Likewise.
299         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
300         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
301         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
302         Likewise.
303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
304         (__pthread_cond_broadcast): Compare %r8 instead of
305         dep_mutex-cond_*(%rdi) with $-1.
306         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
307         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
308         of oring.
310 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
312         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
314 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
316         * allocatestack.c: Include kernel-features.h.
317         * pthread_create.c: Likewise.
318         * pthread_mutex_init.c: Likewise.
319         * init.c: Likewise.
320         * pthread_cond_timedwait.c: Likewise.
321         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
322         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
323         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
324         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
325         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
326         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
327         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
328         Likewise.
329         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
330         Likewise.
331         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
332         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
333         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
334         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
336 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
338         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
339         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
340         byte elements.  One of them is the new __shared element.
341         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
342         adjust names of other padding elements.
343         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
344         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
345         byte elements.  One of them is the new __shared element.
346         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
347         adjust names of other padding elements.
348         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
349         Renamed __pad1 element to __shared, adjust names of other padding
350         elements.
351         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
352         (pthread_rwlock_t): Likewise.
353         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
354         typo.
356 2007-08-09  Anton Blanchard  <anton@samba.org>
358         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
360 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
363         <kernel-features.h>.
364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
366 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
368         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
369         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
370         dealing with robust mutexes.
371         * pthread_mutex_timedlock.c: Likewise.
372         * pthread_mutex_trylock.c: Likewise.
373         * pthread_mutex_unlock.c: Likewise.
374         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
376 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
378         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
379         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
380         (PTHREAD_MUTEX_PSHARED): Define.
381         * pthread_mutex_init.c (__pthread_mutex_init): Set
382         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
383         mutexes.
384         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
385         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
386         as second argument to lll_lock.
387         (LLL_MUTEX_TRYLOCK): Take mutex as argument
388         instead of its __data.__lock field.
389         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
390         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
391         to lll_robust_lock.
392         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
393         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
394         instead of mutex->__data.__kind directly, pass
395         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
396         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
397         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
398         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
399         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
400         to lll_timedlock, lll_robust_timedlock, lll_unlock and
401         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
402         of mutex->__data.__kind directly.
403         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
404         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
405         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
406         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
407         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
408         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
409         and lll_futex_wake.
410         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
411         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
412         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
413         directly.
414         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
415         Take mutex as argument instead of its __data.__lock field, pass
416         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
417         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
418         __data.__lock field.
419         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
420         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
421         to lll_robust_cond_lock.
422         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
423         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
424         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
425         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
426         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
427         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
428         lll_futex_wait.
429         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
430         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
431         lll_futex_wake.
432         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
433         pshared variable, pass it to lll_lock, lll_unlock,
434         lll_futex_timedwait and lll_futex_wake.
435         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
436         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
437         and lll_futex_wake.
438         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
439         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
440         macro.
441         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
442         lll_futex_wake_unlock): Likewise.
443         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
444         Likewise.
445         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
446         lll_futex_wake_unlock): Likewise.
447         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
448         Likewise.
449         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
450         lll_futex_wake_unlock): Likewise.
451         (lll_futex_wake): Fix a typo.
452         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
453         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
454         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
455         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
456         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
457         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
458         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
459         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
461         (__pthread_cond_timedwait): Likewise.
462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
463         (__condvar_cleanup, __pthread_cond_wait): Likewise.
465 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
467         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
468         Don't use CGOTSETUP and CGOTRESTORE macros.
469         (CGOTSETUP, CGOTRESTORE): Remove.
470         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
471         @local symbol.
473 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
475         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
476         definitions for private futexes.
477         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
478         kernel-features.h and lowlevellock.h.  Use private futexes if
479         they are available.
480         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
481         (__lll_mutex_lock_wait): Rename to
482         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
483         (__lll_mutex_timedlock_wait): Rename to ...
484         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
485         Don't compile in for libc.so.
486         (__lll_mutex_unlock_wake): Rename to ...
487         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
488         (__lll_timedwait_tid): Use __NR_gettimeofday.
489         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
490         the header from assembler.  Renamed all lll_mutex_* resp.
491         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
492         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
493         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
494         Define.
495         (__lll_lock_wait_private): Add prototype.
496         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
497         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
498         __lll_unlock_wake): Likewise.
499         (lll_lock): Add private argument.  Call __lll_lock_wait_private
500         if private is constant LLL_PRIVATE.
501         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
502         lll_timedlock, lll_robust_timedlock): Add private argument.
503         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
504         if private is constant LLL_PRIVATE.
505         (lll_robust_unlock, lll_robust_dead): Add private argument.
506         (lll_lock_t): Remove.
507         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
508         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
509         lll_cond_wake, lll_cond_broadcast): Remove.
510         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
511         kernel-features.h and lowlevellock.h.
512         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
513         (LOAD_FUTEX_WAIT): Define.
514         (__lll_robust_mutex_lock_wait): Rename to ...
515         (__lll_robust_lock_wait): ... this.  Add private argument.
516         Use LOAD_FUTEX_WAIT macro.
517         (__lll_robust_mutex_timedlock_wait): Rename to ...
518         (__lll_robust_timedlock_wait): ... this.    Add private argument.
519         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
520         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
521         lowlevellock.h.
522         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
523         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
524         __lll_mutex_{lock,unlock}_*.
525         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
526         lowlevellock.h and pthread-errnos.h.
527         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
528         FUTEX_CMP_REQUEUE, EINVAL): Remove.
529         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
530         __lll_mutex_{lock,unlock}_*.
531         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
532         lowlevellock.h and pthread-errnos.h.
533         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
534         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
535         __lll_mutex_{lock,unlock}_*.
536         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
537         lowlevellock.h.
538         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
539         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
540         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
541         (__condvar_tw_cleanup): Likewise.
542         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
543         lowlevellock.h.
544         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
545         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
546         __lll_mutex_{lock,unlock}_*.
547         ( __condvar_w_cleanup): Likewise.
548         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
549         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
550         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
551         lowlevellock.h.
552         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
553         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
554         __lll_mutex_{lock,unlock}_*.
555         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
556         lowlevellock.h.
557         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
558         FUTEX_PRIVATE_FLAG): Remove.
559         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
560         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
561         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
562         lowlevellock.h.
563         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
564         FUTEX_PRIVATE_FLAG): Remove.
565         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
566         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
567         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
568         lowlevellock.h.
569         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
570         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
571         __lll_mutex_{lock,unlock}_*.
572         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
573         lowlevellock.h.
574         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
575         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
576         __lll_mutex_{lock,unlock}_*.
577         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
578         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
579         (__new_sem_post): Use standard initial exec code sequences.
580         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
581         lowlevellock.h.
582         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
583         FUTEX_PRIVATE_FLAG): Remove.
584         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
585         exec code sequences.
586         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
587         (__new_sem_trywait): Use standard initial exec code sequences.
588         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
589         (__new_sem_wait): Use standard initial exec code sequences.
591 2007-07-31  Anton Blanchard  <anton@samba.org>
593         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
594         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
595         atomic_full_barrier.
597 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
599         * allocatestack.c (stack_cache_lock): Change type to int.
600         (get_cached_stack, allocate_stack, __deallocate_stack,
601         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
602         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
603         as second argument to lll_lock and lll_unlock macros on
604         stack_cache_lock.
605         * pthread_create.c (__find_in_stack_list): Likewise.
606         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
607         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
608         as second argument.
609         * descr.h (struct pthread): Change lock and setxid_futex field
610         type to int.
611         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
612         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
613         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
614         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
615         Likewise.
616         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
617         * pthread_cond_init.c (__pthread_cond_init): Likewise.
618         * pthreadP.h (__attr_list_lock): Change type to int.
619         * pthread_attr_init.c (__attr_list_lock): Likewise.
620         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
621         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
622         lll_{,un}lock.
623         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
624         also for lll_futex_{wake,wait}.
625         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
626         a pointer to const.
627         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
628         LLL_SHARED as second argument to lll_{,un}lock.
629         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
630         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
631         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
632         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
633         Likewise.
634         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
635         as second argument to lll_{,un}lock macros on pd->lock.
636         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
637         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
638         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
639         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
640         Likewise.
641         * sysdeps/pthread/createthread.c (do_clone, create_thread):
642         Likewise.
643         * pthread_once.c (once_lock): Change type to int.
644         (__pthread_once): Pass LLL_PRIVATE as second argument to
645         lll_{,un}lock macros on once_lock.
646         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
647         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
648         rwlock->__data.__shared as second argument to them and similarly
649         for lll_futex_w*.
650         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
651         Likewise.
652         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
653         Likewise.
654         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
655         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
656         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
657         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
658         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
659         to lll_{,un}lock macros on __sem_mappings_lock.
660         * sem_open.c (check_add_mapping): Likewise.
661         (__sem_mappings_lock): Change type to int.
662         * semaphoreP.h (__sem_mappings_lock): Likewise.
663         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
664         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
665         instead of lll_*mutex_*, pass LLL_SHARED as last
666         argument.
667         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
668         pass LLL_SHARED as last argument.
669         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
670         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
671         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
672         pass LLL_SHARED as last argument.
673         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
674         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
675         LLL_SHARED as last argument.
676         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
677         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
678         Similarly.
679         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
680         __libc_lock_lock_recursive, __libc_lock_unlock,
681         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
682         argument to lll_{,un}lock.
683         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
684         _IO_lock_unlock): Likewise.
685         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
686         compound literal.
687         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
688         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
689         __fork_lock.
690         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
691         free_mem): Likewise.
692         (__fork_lock): Change type to int.
693         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
694         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
695         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
696         lll_futex_wake.
697         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
698         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
699         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
700         New function.
701         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
702         pass it through to lll_futex_*wait, only compile in when
703         IS_IN_libpthread.
704         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
705         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
706         argument and pass it through to lll_futex_*wait.
707         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
708         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
709         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
710         inline functions to __lll_* resp. __lll_robust_*.
711         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
712         (lll_mutex_dead): Add private argument.
713         (__lll_lock_wait_private): New prototype.
714         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
715         __lll_robust_lock_timedwait): Add private argument to prototypes.
716         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
717         call __lll_lock_wait_private, otherwise pass private to
718         __lll_lock_wait.
719         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
720         __lll_robust_timedlock): Add private argument, pass it to
721         __lll_*wait functions.
722         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
723         call __lll_unlock_wake_private, otherwise pass private to
724         __lll_unlock_wake.
725         (__lll_robust_unlock): Add private argument, pass it to
726         __lll_robust_unlock_wake.
727         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
728         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
729         argument, pass it through to __lll_* inline function.
730         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
731         (lll_lock_t): Remove.
732         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
733         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
734         lll_cond_wake, lll_cond_broadcast): Remove.
735         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
736         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
737         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
738         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
739         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
740         the header from assembler.  Renamed all lll_mutex_* resp.
741         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
742         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
743         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
744         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
745         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
746         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
747         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
748         Remove prototype.
749         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
750         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
751         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
752         (lll_trylock): Likewise, use __lll_trylock_asm, pass
753         MULTIPLE_THREADS_OFFSET as another asm operand.
754         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
755         MULTIPLE_THREADS_OFFSET as last asm operand, call
756         __lll_lock_wait_private if private is constant LLL_PRIVATE,
757         otherwise pass private as another argument to __lll_lock_wait.
758         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
759         lll_timedlock, lll_robust_timedlock): Add private argument, pass
760         private as another argument to __lll_*lock_wait call.
761         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
762         MULTIPLE_THREADS_OFFSET as another asm operand, call
763         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
764         otherwise pass private as another argument to __lll_unlock_wake.
765         (lll_robust_unlock): Add private argument, pass private as another
766         argument to __lll_unlock_wake.
767         (lll_robust_dead): Add private argument, use __lll_private_flag
768         macro.
769         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
770         LLL_MUTEX_LOCK_INITIALIZER.
771         (lll_lock_t): Remove.
772         (LLL_LOCK_INITIALIZER_WAITERS): Define.
773         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
774         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
775         lll_cond_wake, lll_cond_broadcast): Remove.
776         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
777         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
778         2007-05-2{3,9} changes.
779         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
780         kernel-features.h and lowlevellock.h.
781         (LOAD_PRIVATE_FUTEX_WAIT): Define.
782         (LOAD_FUTEX_WAIT): Rewritten.
783         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
784         define.
785         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
786         (__lll_mutex_lock_wait): Rename to ...
787         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
788         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
789         (__lll_mutex_timedlock_wait): Rename to ...
790         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
791         contains private argument.  Don't compile in for libc.so.
792         (__lll_mutex_unlock_wake): Rename to ...
793         (__lll_unlock_wake): ... this.  %ecx contains private argument.
794         Don't compile in for libc.so.
795         (__lll_timedwait_tid): Use __NR_gettimeofday.
796         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
797         kernel-features.h and lowlevellock.h.
798         (LOAD_FUTEX_WAIT): Define.
799         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
800         define.
801         (__lll_robust_mutex_lock_wait): Rename to ...
802         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
803         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
804         macro.
805         (__lll_robust_mutex_timedlock_wait): Rename to ...
806         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
807         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
808         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
809         lowlevellock.h.
810         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
811         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
812         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
813         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
814         to __lll_lock_wait in %edx.
815         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
816         Include lowlevellock.h and pthread-errnos.h.
817         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
818         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
819         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
820         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
821         pass LLL_SHARED in %ecx to both __lll_lock_wait and
822         __lll_unlock_wake.
823         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
824         Include lowlevellock.h and pthread-errnos.h.
825         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
826         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
827         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
828         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
829         pass LLL_SHARED in %ecx to both __lll_lock_wait and
830         __lll_unlock_wake.
831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
832         Include lowlevellock.h.
833         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
834         Don't define.
835         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
836         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
837         pass LLL_SHARED in %ecx to both __lll_lock_wait and
838         __lll_unlock_wake.  Use __NR_gettimeofday.
839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
840         Include lowlevellock.h.
841         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
842         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
843         to __lll_*, pass cond_lock address in %edx rather than %ecx to
844         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
845         and __lll_unlock_wake.
846         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
847         Include lowlevellock.h.
848         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
849         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
850         MUTEX(%ebx) address in %edx rather than %ecx to
851         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
852         and __lll_unlock_wake.  Move return value from %ecx to %edx
853         register.
854         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
855         Include lowlevellock.h.
856         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
857         Don't define.
858         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
859         MUTEX(%ebp) address in %edx rather than %ecx to
860         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
861         and __lll_unlock_wake.  Move return value from %ecx to %edx
862         register.  Use __NR_gettimeofday.
863         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
864         Include lowlevellock.h.
865         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
866         Don't define.
867         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
868         MUTEX(%ebp) address in %edx rather than %ecx to
869         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
870         and __lll_unlock_wake.  Move return value from %ecx to %edx
871         register.  Use __NR_gettimeofday.
872         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
873         Include lowlevellock.h.
874         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
875         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
876         MUTEX(%edi) address in %edx rather than %ecx to
877         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
878         and __lll_unlock_wake.
879         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
880         Include lowlevellock.h.
881         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
882         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
883         MUTEX(%ebx) address in %edx rather than %ecx to
884         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
885         and __lll_unlock_wake.  Move return value from %ecx to %edx
886         register.
887         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
888         lowlevellock.h.
889         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
890         define.
891         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
892         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
893         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
894         lowlevellock.h.
895         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
896         (sem_timedwait): Use __NR_gettimeofday.
897         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
898         lowlevellock.h.
899         (LOCK): Don't define.
900         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
901         lowlevellock.h.
902         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
903         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
904         are waiters.
905         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
906         2007-05-2{3,9} changes.
907         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
908         kernel-features.h and lowlevellock.h.
909         (LOAD_PRIVATE_FUTEX_WAIT): Define.
910         (LOAD_FUTEX_WAIT): Rewritten.
911         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
912         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
913         (__lll_mutex_lock_wait): Rename to ...
914         (__lll_lock_wait): ... this.  %esi is now private argument.
915         Don't compile in for libc.so.
916         (__lll_mutex_timedlock_wait): Rename to ...
917         (__lll_timedlock_wait): ... this.  %esi contains private argument.
918         Don't compile in for libc.so.
919         (__lll_mutex_unlock_wake): Rename to ...
920         (__lll_unlock_wake): ... this.  %esi contains private argument.
921         Don't compile in for libc.so.
922         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
923         kernel-features.h and lowlevellock.h.
924         (LOAD_FUTEX_WAIT): Define.
925         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
926         (__lll_robust_mutex_lock_wait): Rename to ...
927         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
928         Use LOAD_FUTEX_WAIT macro.
929         (__lll_robust_mutex_timedlock_wait): Rename to ...
930         (__lll_robust_timedlock_wait): ... this. %esi argument contains
931         private, use LOAD_FUTEX_WAIT macro.
932         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
933         lowlevellock.h.
934         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
935         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
936         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
937         __lll_lock_wait and __lll_unlock_wake.
938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
939         Include lowlevellock.h and pthread-errnos.h.
940         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
941         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
942         (__pthread_cond_broadcast): 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_signal.S:
946         Include lowlevellock.h and pthread-errnos.h.
947         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
948         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
949         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
950         pass LLL_SHARED in %esi to both __lll_lock_wait and
951         __lll_unlock_wake.
952         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
953         Include lowlevellock.h.
954         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
955         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
956         pass LLL_SHARED in %esi to both __lll_lock_wait and
957         __lll_unlock_wake.
958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
959         Include lowlevellock.h.
960         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
961         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
962         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
963         and __lll_unlock_wake.
964         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
965         Include lowlevellock.h.
966         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
967         Don't define.
968         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
969         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
970         and __lll_unlock_wake.
971         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
972         Include lowlevellock.h.
973         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
974         Don't define.
975         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
976         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
977         and __lll_unlock_wake.
978         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
979         Include lowlevellock.h.
980         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
981         Don't define.
982         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
983         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
984         and __lll_unlock_wake.
985         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
986         Include lowlevellock.h.
987         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
988         Don't define.
989         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
990         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
991         and __lll_unlock_wake.
992         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
993         Include lowlevellock.h.
994         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
995         Don't define.
996         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
997         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
998         and __lll_unlock_wake.
999         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1000         lowlevellock.h.
1001         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1002         define.
1003         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1004         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1005         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1006         lowlevellock.h.
1007         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1008         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1009         lowlevellock.h.
1010         (LOCK): Don't define.
1011         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1012         lowlevellock.h.
1013         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1014         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1015         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1016         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1017         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1018         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1019         (__lll_lock_wait_private): New function.
1020         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1021         it to lll_futex_*wait.  Don't compile in for libc.so.
1022         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1023         Remove.
1024         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1025         (struct sparc_pthread_barrier): Remove.
1026         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1027         struct sparc_pthread_barrier.  Pass
1028         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1029         and lll_futex_wait macros.
1030         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1031         Remove.
1032         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1033         Include sparc pthread_barrier_wait.c instead of generic one.
1035 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1037         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1040         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1041         %ecx.
1042         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1043         (pthread_rwlock_timedwrlock): Likewise.
1044         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1045         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1047 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1049         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1051 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1053         * tst-locale2.c (useless): Add return statement.
1055 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1057         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1058         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1059         * pthread_create.c (start_thread): Likewise.
1060         * init.c (sighandler_setxid): Likewise.
1061         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1062         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1063         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1064         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1065         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1066         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1067         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1068         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1069         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1070         Likewise.
1071         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1072         Likewise.
1073         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1074         Likewise.
1075         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1076         __rtld_notify): Likewise.
1077         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1078         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1079         __pthread_once): Likewise.
1080         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1081         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1082         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1083         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1084         (lll_futex_wait): Add private argument, define as wrapper around
1085         lll_futex_timed_wait.
1086         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1087         use __lll_private_flag macro.
1088         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1089         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1090         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1091         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1092         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1093         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1094         (lll_futex_wait): Add private argument, define as wrapper around
1095         lll_futex_timed_wait.
1096         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1097         use __lll_private_flag macro.
1098         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1099         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1100         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1101         Define.
1102         (lll_futex_timed_wait, lll_futex_wake): Use it.
1103         (lll_private_futex_wait, lll_private_futex_timed_wait,
1104         lll_private_futex_wake): Removed.
1105         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1106         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1107         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1108         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1109         (lll_futex_wait): Add private argument, define as wrapper around
1110         lll_futex_timed_wait.
1111         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1112         use __lll_private_flag macro.
1113         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1114         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1115         to lll_futex_*.
1116         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1117         (lll_private_futex_wait, lll_private_futex_timed_wait,
1118         lll_private_futex_wake): Removed.
1119         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1120         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1121         (lll_private_futex_wait, lll_private_futex_timed_wait,
1122         lll_private_futex_wake): Removed.
1123         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1124         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1125         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1126         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1127         (lll_futex_wait): Add private argument, define as wrapper around
1128         lll_futex_timed_wait.
1129         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1130         use __lll_private_flag macro.
1131         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1132         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1133         to lll_futex_*.
1134         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1135         Define.
1136         (lll_futex_timed_wait, lll_futex_wake): Use it.
1137         (lll_private_futex_wait, lll_private_futex_timed_wait,
1138         lll_private_futex_wake): Removed.
1140 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1142         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1143         of the structure for sparc32.
1145 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1147         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1149 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1151         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1152         code used when private futexes are assumed.
1153         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1154         Likewise.
1156 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1158         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1159         (__lll_private_flag): Define.
1160         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1161         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1162         __lll_private_flag.
1163         (lll_private_futex_wait, lll_private_futex_timedwait,
1164         lll_private_futex_wake): Define as wrapper around non-_private
1165         macros.
1166         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1167         (__lll_private_flag): Define.
1168         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1169         (lll_private_futex_wait, lll_private_futex_timedwait,
1170         lll_private_futex_wake): Define as wrapper around non-_private
1171         macros.
1173 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1175         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1176         parameter to lll_futex_wait call.
1177         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1179         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1180         Replace lll_futex_wait with lll_private_futex_wait.
1181         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1182         Add LLL_SHARED parameter to lll_futex_wake().
1184         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1185         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1186         lll_private_futex_wake.
1187         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1188         bit from private parm before syscall.
1189         (lll_futex_timed_wait): Likewise.
1190         (lll_futex_wake): Likewise.
1191         (lll_futex_wake_unlock): Likewise.
1192         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1193         (lll_robust_mutex_unlock): Likewise.
1194         (lll_mutex_unlock_force): Likewise.
1195         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1197 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1200         compilation when unconditionally using private futexes.
1201         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1202         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1203         Likewise.
1204         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1205         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1207 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1209         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1210         Define.
1212 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1214         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1215         kernel-features.h.
1217 2007-05-16  Roland McGrath  <roland@redhat.com>
1219         * init.c (__nptl_initial_report_events): New variable.
1220         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1221         to that.
1223 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1225         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1226         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1228 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1230         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1231         implementation.
1233 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1235         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1236         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1237         * pthread_mutex_timedlock.c: Likewise.
1238         * pthread_mutex_trylock.c: Likewise.
1239         * pthread_mutex_unlock.c: Likewise.
1241 2007-06-17  Andreas Schwab  <schwab@suse.de>
1243         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1244         sections.
1246 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1248         * allocatestack.c (allocate_stack): Make code compile if
1249         __ASSUME_PRIVATE_FUTEX is set.
1251 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1253         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1254         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1255         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1256         (__pthread_rwlock_wrlock): Likewise.
1257         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1258         (pthread_rwlock_timedrdlock): Likewise.
1259         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1260         (pthread_rwlock_timedwrlock): Likewise.
1261         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1262         (__pthread_rwlock_unlock): Likewise.
1264 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1266         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1267         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1268         Split __flags into __flags, __shared, __pad1 and __pad2.
1269         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1270         futexes if they are available.
1271         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1272         in libc-lowlevellock.S allow using private futexes.
1273         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1274         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1275         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1276         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1277         lll_private_futex_timed_wait and lll_private_futex_wake.
1278         (lll_robust_mutex_unlock): Fix typo.
1279         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1280         field in futex command setup.
1281         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1282         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1283         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1284         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1285         if they are available.  Remove clear_once_control.
1286         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1287         futexes if they are available.
1288         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1289         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1290         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1291         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1292         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1293         Wake only when there are waiters.
1294         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1295         support.  Indicate that there are waiters.  Remove unnecessary
1296         extra cancellation test.
1297         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1298         left-over duplication of __sem_wait_cleanup.
1300 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1302         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1303         parameter to lll_futex_wait, lll_futex_timed_wait, and
1304         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1305         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1306         lll_private_futex_wake.
1307         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1308         * allocatestack.c: Adjust use of lll_futex_* macros.
1309         * init.c: Likewise.
1310         * lowlevellock.h: Likewise.
1311         * pthread_barrier_wait.c: Likewise.
1312         * pthread_cond_broadcast.c: Likewise.
1313         * pthread_cond_destroy.c: Likewise.
1314         * pthread_cond_signal.c: Likewise.
1315         * pthread_cond_timedwait.c: Likewise.
1316         * pthread_cond_wait.c: Likewise.
1317         * pthread_create.c: Likewise.
1318         * pthread_mutex_lock.c: Likewise.
1319         * pthread_mutex_setprioceiling.c: Likewise.
1320         * pthread_mutex_timedlock.c: Likewise.
1321         * pthread_mutex_unlock.c: Likewise.
1322         * pthread_rwlock_timedrdlock.c: Likewise.
1323         * pthread_rwlock_timedwrlock.c: Likewise.
1324         * pthread_rwlock_unlock.c: Likewise.
1325         * sysdeps/alpha/tls.h: Likewise.
1326         * sysdeps/i386/tls.h: Likewise.
1327         * sysdeps/ia64/tls.h: Likewise.
1328         * sysdeps/powerpc/tls.h: Likewise.
1329         * sysdeps/pthread/aio_misc.h: Likewise.
1330         * sysdeps/pthread/gai_misc.h: Likewise.
1331         * sysdeps/s390/tls.h: Likewise.
1332         * sysdeps/sh/tls.h: Likewise.
1333         * sysdeps/sparc/tls.h: Likewise.
1334         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1335         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1336         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1337         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1338         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1339         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1340         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1341         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1342         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1343         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1344         Likewise.
1345         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1346         * sysdeps/x86_64/tls.h: Likewise.
1348 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1350         * pthread_getattr_np.c: No need to install a cancellation handler,
1351         this is no cancellation point.
1352         * pthread_getschedparam.c: Likewise.
1353         * pthread_setschedparam.c: Likewise.
1354         * pthread_setschedprio.c: Likewise.
1355         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1356         lll_unlock_wake_cb.
1357         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1358         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1359         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1360         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1361         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1362         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1363         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1364         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1365         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1366         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1367         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1368         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1370         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1371         whether there are more than one thread makes no sense here since
1372         we only call the slow path if the locks are taken.
1373         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1375         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1376         COND_NWAITERS_SHIFT.
1377         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1378         COND_CLOCK_BITS.
1379         * pthread_cond_init.c: Likewise.
1380         * pthread_cond_timedwait.c: Likewise.
1381         * pthread_cond_wait.c: Likewise.
1382         * pthread_condattr_getclock.c: Likewise.
1383         * pthread_condattr_setclock.c: Likewise.
1384         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1387         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1390 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1392         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1393         unistd.h.
1395         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1396         insn suffix.
1397         (THREAD_GSCOPE_GET_FLAG): Remove.
1398         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1399         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1400         changes.
1401         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1402         (THREAD_GSCOPE_GET_FLAG): Remove.
1403         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1404         instead of THREAD_GSCOPE_GET_FLAG.
1405         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1406         it.
1407         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1408         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1409         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1410         THREAD_GSCOPE_WAIT): Define.
1411         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1412         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1413         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1414         THREAD_GSCOPE_WAIT): Define.
1415         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1416         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1417         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1418         THREAD_GSCOPE_WAIT): Define.
1419         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1420         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1421         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1422         THREAD_GSCOPE_WAIT): Define.
1424 2007-05-24  Richard Henderson  <rth@redhat.com>
1426         * descr.h (struct pthread): Add header.gscope_flag.
1427         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1428         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1429         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1430         THREAD_GSCOPE_WAIT): Define.
1432 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1434         * init.c: Make it compile with older kernel headers.
1436         * tst-initializers1.c: Show through exit code which test failed.
1438         * pthread_rwlock_init.c: Also initialize __shared field.
1439         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1440         element in rwlock structure into four byte elements.  One of them is
1441         the new __shared element.
1442         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1443         Likewise.
1444         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1445         __shared, adjust names of other padding elements.
1446         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1447         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1448         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1449         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1450         FUTEX_PRIVATE_FLAG.
1451         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1452         futex to use private operations if possible.
1453         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1454         Likewise.
1455         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1456         Likewise.
1457         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1458         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1460         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1461         Likewise.
1462         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1463         Likewise.
1464         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1465         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1467 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1469         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1470         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1471         * pthread_rwlock_timedrdlock.c: Likewise.
1472         * pthread_rwlock_tryrdlock.c: Likewise.
1474         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1475         optimization.
1477         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1478         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1479         duplication of __sem_wait_cleanup.
1481         * allocatestack.c: Revert last change.
1482         * init.c: Likewise.
1483         * sysdeps/i386/tls.h: Likewise.
1484         * sysdeps/x86_64/tls.h: Likewise.
1485         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1486         header structure.
1487         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1489         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1490         Add private field.
1491         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1492         * pthread_barrier_init.c: Set private flag if pshared and private
1493         futexes are supported.
1494         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1495         private field in futex command setup.
1496         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1498 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1500         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1501         support.
1502         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1503         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1504         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1505         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1506         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1508         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1509         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1510         fields in the structure.
1511         (__old_sem_init): New function.
1512         * sem_open.c: Initialize all fields of the structure.
1513         * sem_getvalue.c: Adjust for renamed element.
1514         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1515         (gen-as-const-headers): Add structsem.sym.
1516         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1517         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1518         struct new_sem.  Add struct old_sem.
1519         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1520         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1521         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1522         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1523         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1524         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1525         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1526         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1527         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1528         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1529         * tst-sem10.c: New file.
1530         * tst-sem11.c: New file.
1531         * tst-sem12.c: New file.
1532         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1533         of struct sem.
1535 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1536             Jakub Jelinek  <jakub@redhat.com>
1538         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1539         Move __pthread_enable_asynccancel right before futex syscall.
1540         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1541         Likewise.
1543 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1545         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1546         THREAD_COPY_PRIVATE_FUTEX): Define.
1547         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1548         THREAD_COPY_PRIVATE_FUTEX): Define.
1549         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1550         * init.c (__pthread_initialize_minimal_internal): Use
1551         THREAD_SET_PRIVATE_FUTEX.
1553         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1554         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1555         THREAD_GSCOPE_FLAG_WAIT): Define.
1556         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1557         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1558         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1559         PTR_DEMANGLE.
1560         (THREAD_GSCOPE_GET_FLAG): Define.
1561         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1562         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1563         instead of ->header.gscope_flag directly.
1565 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1567         * init.c (__pthread_initialize_minimal_internal): Check whether
1568         private futexes are available.
1569         * allocatestack.c (allocate_stack): Copy private_futex field from
1570         current thread into the new stack.
1571         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1572         futexes if they are available.
1573         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1574         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1575         in libc-lowlevellock.S allow using private futexes.
1576         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1577         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1578         FUTEX_PRIVATE_FLAG.
1579         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1580         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1581         if they are available.
1582         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1583         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1584         * sysdeps/i386/tcb-offsets.sym: Likewise.
1585         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1586         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1588 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1590         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1591         Remove ptr_wait_lookup_done again.
1592         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1593         (__pthread_initialize_minimal_internal): Initialize
1594         _dl_wait_lookup_done pointer in _rtld_global directly.
1595         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1596         Remove code to code _dl_wait_lookup_done.
1597         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1598         encrypted for now.
1600 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1602         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1603         pthread_mutex_init failed with ENOTSUP.
1605 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1607         * allocatestack.c (__wait_lookup_done): New function.
1608         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1609         Add ptr_wait_lookup_done.
1610         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1611         * pthreadP.h: Declare __wait_lookup_done.
1612         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1613         Define macros to implement reference handling of global scope.
1614         * sysdeps/x86_64/tls.h: Likewise.
1615         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1616         Initialize GL(dl_wait_lookup_done).
1618 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1620         [BZ #4512]
1621         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1622         is detected.
1623         * pthread_mutex_timedlock.c: Likewise.
1624         * pthread_mutex_trylock.c: Likewise.
1625         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1627         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1628         * tst-robust9.c: New file.
1629         * tst-robustpi9.c: New file.
1631         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1632         unnecessary extra cancellation test.
1634 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1636         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1637         extra cancellation test.
1638         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1640 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1642         * descr.h (struct pthread): Rearrange members to fill hole in
1643         64-bit layout.
1645         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1646         (__pthread_setaffinity_new): If syscall was successful and
1647         RESET_VGETCPU_CACHE is defined, use it before returning.
1648         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1650 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1652         [BZ #4455]
1653         * tst-align2.c: Include stackinfo.h.
1654         * tst-getpid1.c: Likewise.
1656 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1658         [BZ #4455]
1659         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1660         * tst-getpid1.c (do_test): Likewise.
1662         [BZ #4456]
1663         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1664         (allocate_stack): Likewise.
1666 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1668         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1669         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1670         (__lll_robust_timedlock_wait): Likewise.
1671         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1673 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1675         [BZ #4465]
1676         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1677         * tst-cancel4.c (tf_fdatasync): New test.
1679 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1681         [BZ #4392]
1682         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1683         check mutexes like normal mutexes.
1685         [BZ #4306]
1686         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1687         Initialize the whole sigevent structure to appease valgrind.
1689 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1691         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1692         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1694 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1696         * tst-locale1.c: Avoid warnings.
1697         * tst-locale2.c: Likewise.
1699 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1701         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1702         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1704 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1706         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1707         __extern_always_inline where appropriate.
1708         * sysdeps/pthread/pthread.h: Likewise.
1710 2007-03-13  Richard Henderson  <rth@redhat.com>
1712         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1713         separate cfi regions for the two subsections.
1715 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1717         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1718         new thread, don't just decrement it.
1719         Patch by Suzuki K P <suzuki@in.ibm.com>.
1721 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1723         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1724         PTHFCT_CALL definition.
1726 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1728         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1729         available, don't use it.
1731 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1733         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1734         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1735         call into the kernel to delay.
1737 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1739         * tst-initializers1.c: We want to test the initializers as seen
1740         outside of libc, so undefined _LIBC.
1742         * pthread_join.c (cleanup): Avoid warning.
1744 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1746         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1747         (__lll_timedwait_tid): Add unwind info.
1749         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1750         function table, mangle the pointers.
1751         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1752         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1753         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1754         demangle pointers before use.
1755         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1756         demangle pointer.
1757         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1758         * sysdeps/pthread/setxid.h: Likewise.
1760 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1762         * tst-rwlock7.c: Show some more information in case of correct
1763         behavior.
1765 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1767         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1768         (lll_futex_timed_wait): Undo part of last change, don't negate
1769         return value.
1771 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1774         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1776 2006-12-28  David S. Miller  <davem@davemloft.net>
1778         * shlib-versions: Fix sparc64 linux target specification.
1780 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1782         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1783         Adjust include path for pthread_barrier_wait.c move.
1785 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1787         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1788         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1790 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1792         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1793         6 argument cancellable syscalls.
1794         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1795         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1796         6 argument cancellable syscalls.
1797         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1799 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1801         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1802         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1804 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1806         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1807         __sync_lock_release instead of __sync_lock_release_si.
1809 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1811         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1812         Define.
1813         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1814         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1815         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1816         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1817         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1818         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1819         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1820         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1821         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1822         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1823         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1825 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1827         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1828         * pthread_barrier_wait.c: ...here.
1829         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1830         * pthread_cond_broadcast.c: ...here.
1831         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1832         * pthread_cond_signal.c: ...here.
1833         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1834         * pthread_cond_timedwait.c: ...here.
1835         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1836         * pthread_cond_wait.c: ...here.
1837         * sysdeps/pthread/pthread_once.c: Move to...
1838         * pthread_once.c: ...here.
1839         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1840         * pthread_rwlock_rdlock.c: ...here.
1841         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1842         * pthread_rwlock_timedrdlock.c: ...here.
1843         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1844         * pthread_rwlock_timedwrlock.c: ...here.
1845         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1846         * pthread_rwlock_unlock.c: ...here.
1847         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1848         * pthread_rwlock_wrlock.c: ...here.
1849         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1850         * pthread_spin_destroy.c: ...here.
1851         * sysdeps/pthread/pthread_spin_init.c: Move to...
1852         * pthread_spin_init.c: ...here.
1853         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1854         * pthread_spin_unlock.c: ...here.
1855         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1856         * pthread_getcpuclockid.c: ...here.
1858         * init.c: USE_TLS support is now always enabled.
1859         * tst-tls5.h: Likewise.
1860         * sysdeps/alpha/tls.h: Likewise.
1861         * sysdeps/i386/tls.h: Likewise.
1862         * sysdeps/ia64/tls.h: Likewise.
1863         * sysdeps/powerpc/tls.h: Likewise.
1864         * sysdeps/s390/tls.h: Likewise.
1865         * sysdeps/sh/tls.h: Likewise.
1866         * sysdeps/sparc/tls.h: Likewise.
1867         * sysdeps/x86_64/tls.h: Likewise.
1869 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1871         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1872         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1873         failed.
1875         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1876         Define to THREAD_SELF->header.multiple_threads.
1877         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1878         Likewise.
1879         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1880         Likewise.
1881         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1882         (SINGLE_THREAD_P): Likewise.
1883         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1884         (SINGLE_THREAD_P): Likewise.
1885         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1886         (SINGLE_THREAD_P): Likewise.
1887         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1888         (SINGLE_THREAD_P): Likewise.
1889         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1890         Likewise.
1891         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1892         (SINGLE_THREAD_P): Likewise.
1893         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1894         (SINGLE_THREAD_P): Likewise.
1895         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1896         Likewise.
1898 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1900         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1901         by default rather than 2_3_3.
1903 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1905         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1906         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1907         atomic_* instead of catomic_* macros.
1909 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1911         [BZ #3285]
1912         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1913         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1914         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1915         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1916         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1917         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1918         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1919         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1920         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1921         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1922         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1923         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1924         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1926 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1928         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1929         cancelable syscalls with six parameters.
1931         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1932         operations instead of atomic_*.
1934 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1936         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1938 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1940         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1941         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1942         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1943         New file.
1944         * pthread_attr_setstack.c: Allow overwriting the version number of the
1945         new symbol.
1946         * pthread_attr_setstacksize.c: Likewise.
1947         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1948         it.
1949         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1950         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1952 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1954         [BZ #3251]
1955         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1956         Patch by Petr Baudis.
1958 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1960         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1962         * tst-cancel2.c (tf): Loop as long as something was written.
1964 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1966         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1967         mutexes wake all mutexes.
1968         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1969         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1970         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1972 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1974         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1975         to guarantee the thread is always canceled.
1977 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1979         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1980         Include stdlib.h.
1981         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1982         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1985         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1987 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1989         [BZ #3123]
1990         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1991         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1994         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1995         * Makefile (tests): Add tst-cond22.
1996         * tst-cond22.c: New file.
1998 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2000         [BZ #3124]
2001         * descr.h (struct pthread): Add parent_cancelhandling.
2002         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2003         cancelhandling value to child.
2004         * pthread_create.c (start_thread): If parent thread was canceled
2005         reset the SIGCANCEL mask.
2006         * Makefile (tests): Add tst-cancel25.
2007         * tst-cancel25.c: New file.
2009 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2010             Ulrich Drepper  <drepper@redhat.com>
2012         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2013         counterp if it is already zero.
2014         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2016 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2017             Roland McGrath  <roland@redhat.com>
2019         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2020         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2021         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2022         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2023         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2024         lll_robust_mutex_timedlock, lll_mutex_unlock,
2025         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2026         Add _L_*_ symbols around the subsection.
2027         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2028         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2030 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2031             Roland McGrath  <roland@redhat.com>
2033         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2034         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2035         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2036         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2037         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2038         lll_robust_mutex_timedlock, lll_mutex_unlock,
2039         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2040         Add _L_*_ symbols around the subsection.
2041         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2042         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2044 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2046         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2047         change because it can disturb too much existing code.  If real hard
2048         reader preference is needed we'll introduce another type.
2049         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2050         (pthread_rwlock_timedwrlock): Likewise.
2051         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2052         Likewise.
2054 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2056         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2057         reader preference.
2058         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2059         (pthread_rwlock_timedwrlock): Likewise.
2060         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2061         Likewise.
2063 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2065         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2066         Only define ifdef SHARED.
2068 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2070         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2071         (free_stacks): ...here.
2072         (__free_stack_cache): New function.
2073         * pthreadP.h: Declare __free_stack_cache.
2074         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2075         ptr_freeres.
2076         * init.c (pthread_functions): Initialize ptr_freeres.
2077         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2078         New freeres function.
2080 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2082         [BZ #3018]
2083         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2085 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2087         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2088         _XOPEN_REALTIME_THREADS.
2090 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2092         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2093         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2094         HAVE_CLOCK_GETTIME_VSYSCALL.
2095         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2097 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2099         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2100         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2101         * descr.h (struct priority_protection_data): New type.
2102         (struct pthread): Add tpp field.
2103         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2104         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2105         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2106         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2107         TPP mutexes.
2108         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2109         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2110         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2111         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2112         * tpp.c: New file.
2113         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2114         boosted by TPP.
2115         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2116         * pthread_mutexattr_getprioceiling.c
2117         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2118         in the SCHED_FIFO priority range.
2119         * pthread_mutexattr_setprioceiling.c
2120         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2121         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2122         if mutex is not TPP.  Ceiling is now in __data.__lock.
2123         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2124         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2125         is now in __data.__lock.  Add locking.
2126         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2127         * Makefile (libpthread-routines): Add tpp.
2128         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2129         * tst-tpp.h: New file.
2130         * tst-mutexpp1.c: New file.
2131         * tst-mutexpp6.c: New file.
2132         * tst-mutexpp10.c: New file.
2133         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2134         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2136 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2138         [BZ #2843]
2139         * pthread_join.c (pthread_join): Account for self being canceled
2140         when checking for deadlocks.
2141         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2142         (tf1): Don't print anything after pthread_join returns, this would be
2143         another cancellation point.
2144         (tf2): Likewise.
2145         * tst-join6.c: New file.
2146         * Makefile (tests): Add tst-join6.
2148 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2150         [BZ #2892]
2151         * pthread_setspecific.c (__pthread_setspecific): Check
2152         out-of-range index before checking for unused key.
2154         * sysdeps/pthread/gai_misc.h: New file.
2156 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2158         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2159         file.  Don't use sysctl.
2160         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2161         overwrite the file if this is likely not true.
2163 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2165         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2166         * Makefile (tests): Add tst-getpid3.
2167         * tst-getpid3.c: New file.
2169 2006-07-30  Roland McGrath  <roland@redhat.com>
2171         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2173         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2174         (pause_not_cancel): New macro.
2175         (nanosleep_not_cancel): New macro.
2176         (sigsuspend_not_cancel): New macro.
2177         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2178         nanosleep_not_cancel macro from <not-cancel.h>.
2179         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2180         macro from <not-cancel.h>.
2182 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2183             Jakub Jelinek  <jakub@redhat.com>
2185         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2186         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2187         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2188         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2189         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2190         * pthread_mutex_lock.c: Likewise.
2191         * pthread_mutex_timedlock.c: Likewise.
2192         * pthread_mutex_trylock.c: Likewise.
2193         * pthread_mutex_unlock.c: Likewise.
2194         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2195         all mutexes.
2196         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2198         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2199         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2200         pthread-pi-defines.sym.
2201         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2202         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2203         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2204         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2205         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2206         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2207         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2208         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2209         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2210         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2211         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2212         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2213         * tst-mutex2.c: Likewise.
2214         * tst-mutex3.c: Likewise.
2215         * tst-mutex4.c: Likewise.
2216         * tst-mutex5.c: Likewise.
2217         * tst-mutex6.c: Likewise.
2218         * tst-mutex7.c: Likewise.
2219         * tst-mutex7a.c: Likewise.
2220         * tst-mutex8.c: Likewise.
2221         * tst-mutex9.c: Likewise.
2222         * tst-robust1.c: Likewise.
2223         * tst-robust7.c: Likewise.
2224         * tst-robust8.c: Likewise.
2225         * tst-mutexpi1.c: New file.
2226         * tst-mutexpi2.c: New file.
2227         * tst-mutexpi3.c: New file.
2228         * tst-mutexpi4.c: New file.
2229         * tst-mutexpi5.c: New file.
2230         * tst-mutexpi6.c: New file.
2231         * tst-mutexpi7.c: New file.
2232         * tst-mutexpi7a.c: New file.
2233         * tst-mutexpi8.c: New file.
2234         * tst-mutexpi9.c: New file.
2235         * tst-robust1.c: New file.
2236         * tst-robust2.c: New file.
2237         * tst-robust3.c: New file.
2238         * tst-robust4.c: New file.
2239         * tst-robust5.c: New file.
2240         * tst-robust6.c: New file.
2241         * tst-robust7.c: New file.
2242         * tst-robust8.c: New file.
2243         * Makefile (tests): Add the new tests.
2245         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2246         * pthread_mutex_destroy.c: Remove unneeded label.
2248 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2250         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2251         computations to compile time.
2253 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2255         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2257 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2259         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2261 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2263         * pthread_key_create.c (__pthread_key_create): Do away with
2264         __pthread_keys_lock.
2266         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2267         (__kernel_cpumask_size): Mark as hidden.
2268         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2270         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2271         * semaphoreP.h (__sem_mappings_lock): Likewise.
2273 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2275         * pthread_atfork.c: Mark __dso_handle as hidden.
2277 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2279         [BZ #2644]
2280         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2281         the reload problem.  Change the one path in pthread_cancel_init
2282         which causes the problem.  Force gcc to reload.  Simplify callers.
2283         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2284         (_Unwind_GetBSP): Undo last patch.
2286 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2288         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2289         function pointer is reloaded after pthread_cancel_init calls.
2291         [BZ #2644]
2292         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2293         pointers are reloaded after pthread_cancel_init calls.
2295 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2297         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2298         __always_inline.
2300 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2302         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2303         Allocate new object which is passed to timer_sigev_thread so that
2304         the timer can be deleted before the new thread is scheduled.
2306 2006-04-26  Roland McGrath  <roland@redhat.com>
2308         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2310 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2312         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2313         suffix for conditional jumps.
2314         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2315         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2316         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2317         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2318         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2319         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2321         * init.c (sigcancel_handler): Compare with correct PID even if the
2322         thread is in the middle of a fork call.
2323         (sighandler_setxid): Likewise.
2324         Reported by Suzuki K P <suzuki@in.ibm.com> .
2326 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2328         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2330 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2332         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2333         fails [Coverity CID 105].
2335 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2337         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2339 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2341         [BZ #2505]
2342         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2343         Define __lll_rel_instr using lwsync.
2345 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2347         * allocatestack.c (allocate_stack): Always initialize robust_head.
2348         * descr.h: Define struct robust_list_head.
2349         (struct pthread): Use robust_list_head in robust mutex list definition.
2350         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2351         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2352         (__pthread_initialize_minimal_internal): Register robust_list with
2353         the kernel.
2354         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2355         Declare __set_robust_list_avail.
2356         * pthread_create.c (start_thread): Register robust_list of new thread.
2357         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2358         waiters.
2359         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2360         number of users, it's unreliable.
2361         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2362         set_robust_list syscall is available.
2363         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2364         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2365         Set robust_head.list_op_pending before trying to lock a robust mutex.
2366         * pthread_mutex_timedlock.c: Likewise.
2367         * pthread_mutex_trylock.c: Likewise.
2368         * pthread_mutex_unlock.c: Likewise for unlocking.
2369         * Makefile (tests): Add tst-robust8.
2370         * tst-robust8.c: New file.
2372 2006-03-08  Andreas Schwab  <schwab@suse.de>
2374         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2375         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2377 2006-03-05  Roland McGrath  <roland@redhat.com>
2379         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2380         and $config_os doesn't match *linux*.
2382 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2384         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2385         Use __syscall_error.
2386         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2387         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2388         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2389         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2390         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2391         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2393 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2395         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2397 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2399         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2400         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2401         mutex.
2402         (__lll_robust_timedlock_wait): Likewise.
2403         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2404         (__lll_robust_lock_wait): Likewise.
2405         (__lll_robust_timedlock_wait): Likewise.
2406         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2407         (__lll_robust_lock_wait): Likewise.
2408         (__lll_robust_timedlock_wait): Likewise.
2410 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2412         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2413         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2414         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2415         lll_robust_mutex_unlock): Define.
2416         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2418 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2420         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2421         instead of <clone.S>.
2423 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2425         * Makefile (libpthread-routines): Add
2426         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2427         and pthread_mutex_[sg]etprioceiling.
2428         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2429         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2430         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2431         pthread_mutex_setprioceiling.
2432         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2433         PTHREAD_PRIO_PROTECT): New enum values.
2434         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2435         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2436         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2437         prototypes.
2438         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2439         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2440         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2441         Define.
2442         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2443         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2444         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2445         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2446         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2447         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2448         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2449         protocol mutexes.
2450         * pthread_mutex_getprioceiling.c: New file.
2451         * pthread_mutex_setprioceiling.c: New file.
2452         * pthread_mutexattr_getprioceiling.c: New file.
2453         * pthread_mutexattr_setprioceiling.c: New file.
2454         * pthread_mutexattr_getprotocol.c: New file.
2455         * pthread_mutexattr_setprotocol.c: New file.
2457 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2459         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2461 2006-02-27  Roland McGrath  <roland@redhat.com>
2463         * sysdeps/pthread/Subdirs: List nptl here too.
2464         * configure (libc_add_on_canonical): New variable.
2466         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2468         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2469         self to get main source tree's file.
2470         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2471         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2472         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2473         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2474         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2475         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2476         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2477         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2478         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2479         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2480         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2481         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2482         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2484         * Makefile: Use $(sysdirs) in vpath directive.
2486         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2487         (CPPFLAGS-timer_routines.c): Likewise.
2489         * Makeconfig (includes): Variable removed.
2491 2006-02-26  Roland McGrath  <roland@redhat.com>
2493         * sysdeps/generic/pt-raise.c: Moved to ...
2494         * pt-raise.c: ... here.
2495         * sysdeps/generic/lowlevellock.h: Moved to ...
2496         * lowlevellock.h: ... here.
2498 2006-02-23  Roland McGrath  <roland@redhat.com>
2500         * descr.h (struct pthread): Add final member `end_padding'.
2501         (PTHREAD_STRUCT_END_PADDING): Use it.
2503 2006-02-20  Roland McGrath  <roland@redhat.com>
2505         * sysdeps/mips: Directory removed, saved in ports repository.
2506         * sysdeps/unix/sysv/linux/mips: Likewise.
2508 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2510         * tst-robust1.c: Add second mutex to check that the mutex list is
2511         handled correctly.
2513 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2515         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2516         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2517         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2518         lll_robust_mutex_unlock): New macros.
2519         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2520         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2521         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2522         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2523         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2525 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2527         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2528         definitions.
2529         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2531 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2533         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2534         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2535         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2536         (lll_robust_mutex_unlock): Likewise.
2538 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2540         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2541         Set robust_list.__next rather than robust_list.
2542         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2543         (__pthread_list_t): New typedef.
2544         (pthread_mutex_t): Replace __next and __prev fields with __list.
2545         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2546         (__pthread_list_t): New typedef.
2547         (pthread_mutex_t): Replace __next and __prev fields with __list.
2548         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2549         (__pthread_list_t, __pthread_slist_t): New typedefs.
2550         (pthread_mutex_t): Replace __next and __prev fields with __list.
2551         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2552         (__pthread_list_t, __pthread_slist_t): New typedefs.
2553         (pthread_mutex_t): Replace __next and __prev fields with __list.
2554         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2555         (__pthread_list_t, __pthread_slist_t): New typedefs.
2556         (pthread_mutex_t): Replace __next and __prev fields with __list.
2557         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2558         (__pthread_slist_t): New typedef.
2559         (pthread_mutex_t): Replace __next field with __list.
2561 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2563         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2564         PTHREAD_MUTEX_OWNERDEAD.
2565         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2566         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2567         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2568         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2569         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2570         to PTHREAD_MUTEX_INCONSISTENT.
2571         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2572         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2573         * pthread_mutex_trylock.c: Likewise.
2574         * pthread_mutex_timedlock.c: Likewise.
2575         * pthread_mutex_unlock.c: Likewise.
2576         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2577         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2578         lowlevelrobustlock.sym.
2579         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2580         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2581         definitions.
2582         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2583         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2584         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2585         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2586         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2588 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2590         * allocatestack.c (allocate_stack): Initialize robust_list.
2591         * init.c (__pthread_initialize_minimal_internal): Likewise.
2592         * descr.h (struct xid_command): Pretty printing.
2593         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2594         robust_list.  Adjust macros.
2595         * pthread_create.c (start_thread): Adjust robust_list handling.
2596         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2597         but the owner for all robust mutex types.
2598         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2599         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2600         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2601         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2603         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2604         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2606 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2608         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2609         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2611 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2613         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2614         Return status.
2615         (lll_futex_timed_wait): Define.
2617 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2619         * tst-cancel4.c: Test ppoll.
2621 2006-01-18  Andreas Jaeger  <aj@suse.de>
2623         [BZ #2167]
2624         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2625         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2626         by Jim Gifford <patches@jg555.com>.
2628 2006-01-13  Richard Henderson  <rth@redhat.com>
2630         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2632 2006-01-10  Roland McGrath  <roland@redhat.com>
2634         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2635         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2636         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2637         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2638         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2639         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2640         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2641         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2642         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2643         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2645 2006-01-09  Roland McGrath  <roland@redhat.com>
2647         * tst-initializers1-c89.c: New file.
2648         * tst-initializers1-c99.c: New file.
2649         * tst-initializers1-gnu89.c: New file.
2650         * tst-initializers1-gnu99.c: New file.
2651         * Makefile (tests): Add them.
2652         (CFLAGS-tst-initializers1-c89.c): New variable.
2653         (CFLAGS-tst-initializers1-c99.c): New variable.
2654         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2655         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2657         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2658         Use __extension__ on anonymous union definition.
2659         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2660         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2661         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2662         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2663         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2665 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2667         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2668         Don't give the union a name because it changes the mangled name.
2669         Instead name the struct for __data.
2670         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2671         Likewise.
2672         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2673         Likewise.
2675 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2677         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2678         stack bias to mc_ftp field.
2680 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2682         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2683         being too clever and reloading the futex value where it shouldn't.
2685 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2687         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2688         correct type.
2690 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2692         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2693         Add cfi directives.
2695 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2697         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2698         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2699         rename in tcbhead_t.
2701         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2702         Don't give the union a name because it changes the mangled name.
2703         Instead name the struct for __data.
2704         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2705         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2706         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2707         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2708         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2709         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2711 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2713         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2714         Return status.
2715         (lll_futex_timed_wait): Define.
2716         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2717         * sysdeps/pthread/aio_misc.h: New file.
2719 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2721         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2723 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2725         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2726         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2727         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2729 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2731         * tst-cancel24.cc: Use C headers instead of C++ headers.
2733 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2735         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2736         sparc-linux configured glibc.
2737         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2738         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2739         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2740         atomic_compare_and_exchange_val_24_acq instead of
2741         atomic_compare_and_exchange_val_acq.
2742         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2743         instead of atomic_exchange_rel.
2744         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2745         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2746         file.
2747         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2748         file.
2749         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2750         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2751         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2752         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2753         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2754         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2755         New file.
2756         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2757         New file.
2758         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2759         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2760         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2761         file.
2762         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2763         file.
2764         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2766 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2768         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2769         mutex initializers.
2771 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2773         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2774         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2775         THREAD_COPY_POINTER_GUARD): Define.
2776         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2777         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2779 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2781         * version.c: Update copyright year.
2783 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2785         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2786         .eh_frame section, use cfi_* directives.
2787         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2789 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2791         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2792         now.
2794 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2796         * sysdeps/pthread/sigaction.c: Removed.
2797         * sigaction.c: New file.
2798         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2800 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2802         * Makefile (tests): Add tst-signal7.
2803         * tst-signal7.c: New file.
2805 2005-12-27  Roland McGrath  <roland@redhat.com>
2807         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2808         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2809         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2810         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2811         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2812         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2813         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2814         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2815         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2816         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2817         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2819 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2821         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2822         and __prev field to pthread_mutex_t.
2823         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2824         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2825         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2826         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2827         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2828         to pthread_mutex_t.
2830 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2832         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2833         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2834         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2835         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2836         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2837         and PTHREAD_MUTEXATTR_FLAG_BITS.
2838         * descr.h (struct pthread): Add robust_list field and define
2839         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2840         * pthread_mutexattr_getrobust.c: New file.
2841         * pthread_mutexattr_setrobust.c: New file.
2842         * pthread_mutex_consistent.c: New file.
2843         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2844         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2845         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2846         Adjust pthread_mutex_t initializers.
2847         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2848         field to pthread_mutex_t.
2849         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2850         and __prev field to pthread_mutex_t.
2851         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2852         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2853         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2854         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2855         * pthread_mutexattr_gettype.c: Likewise.
2856         * pthread_mutexattr_setpshared.c: Likewise.
2857         * pthread_mutexattr_settype.c: Likewise.
2858         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2859         Initialize mutex kind according to robust flag.
2860         * pthread_mutex_lock.c: Implement local robust mutex.
2861         * pthread_mutex_timedlock.c: Likewise.
2862         * pthread_mutex_trylock.c: Likewise.
2863         * pthread_mutex_unlock.c: Likewise.
2864         * pthread_create.c (start_thread): Mark robust mutexes which remained
2865         locked as dead.
2866         * tst-robust1.c: New file.
2867         * tst-robust2.c: New file.
2868         * tst-robust3.c: New file.
2869         * tst-robust4.c: New file.
2870         * tst-robust5.c: New file.
2871         * tst-robust6.c: New file.
2872         * tst-robust7.c: New file.
2873         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2874         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2875         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2876         tst-robust5, tst-robust6, and tst-robust7.
2878         * tst-typesizes.c: New file.
2879         * Makefile (tests): Add tst-typesizes.
2881         * tst-once3.c: More debug output.
2883 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2885         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2886         missing after last change.
2888         * version.c: Update copyright year.
2890 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2892         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2893         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2894         * pthread_mutex_trylock.c: Likewise.
2895         * pthread_mutex_timedlock.c: Likewise.
2896         * pthread_mutex_unlock.c: Likewise.
2898 2005-12-22  Roland McGrath  <roland@redhat.com>
2900         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2901         so that #include_next's search location is not reset to the -I..
2902         directory where <nptl/...> can be found.
2904 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2906         [BZ #1913]
2907         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2908         Fix unwind info.  Remove useless branch prediction prefix.
2909         * tst-cancel24.cc: New file.
2910         * Makefile: Add rules to build and run tst-cancel24.
2912 2005-12-21  Roland McGrath  <roland@redhat.com>
2914         * libc-cancellation.c: Use <> rather than "" #includes.
2915         * pt-cleanup.c: Likewise.
2916         * pthread_create.c: Likewise.
2917         * pthread_join.c: Likewise.
2918         * pthread_timedjoin.c: Likewise.
2919         * pthread_tryjoin.c: Likewise.
2920         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2921         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2922         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2923         * unwind.c: Likewise.
2925 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2927         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2928         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2929         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2930         THREAD_COPY_POINTER_GUARD): Define.
2932 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2934         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2935         rather than one.
2936         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2937         THREAD_COPY_POINTER_GUARD): Define.
2938         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2939         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2940         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2941         THREAD_COPY_POINTER_GUARD): Define.
2942         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2943         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2944         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2945         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2946         Use PTR_DEMANGLE for B0 if defined.
2948 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2950         * pthread_create.c (__pthread_create_2_1): Use
2951         THREAD_COPY_POINTER_GUARD if available.
2952         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2953         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2954         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2955         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2956         * sysdeps/x86_64/tls.h: Likewise.
2958 2005-12-15  Roland McGrath  <roland@redhat.com>
2960         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2962 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2964         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2965         sysdeps/generic.
2966         * errno-loc.c: New file.
2968 2005-12-12  Roland McGrath  <roland@redhat.com>
2970         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2971         adjustments before choosing stack size.  Update minimum stack size
2972         calculation to match allocate_stack change.
2974 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2976         * allocatestack.c (allocate_stack): Don't demand that there is an
2977         additional full page available on the stack beside guard, TLS, the
2978         minimum stack.
2980 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2982         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2983         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2985         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2986         compiling 32-bit code we must define __cleanup_fct_attribute.
2988 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2990         [BZ #1920]
2991         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2992         __attribute__ instead of __attribute.
2993         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2994         (__cleanup_fct_attribute): Likewise.
2996 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2998         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2999         a write barrier before writing libgcc_s_getcfa.
3001 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3003         * sysdeps/unix/sysv/linux/configure: Removed.
3005 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3007         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3008         optional init_array/fini_array support.
3010 2005-10-24  Roland McGrath  <roland@redhat.com>
3012         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3013         versioned_symbol use.
3015 2005-10-16  Roland McGrath  <roland@redhat.com>
3017         * init.c (__pthread_initialize_minimal_internal): Even when using a
3018         compile-time default stack size, apply the minimum that allocate_stack
3019         will require, and round up to page size.
3021 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3023         * Makefile ($(test-modules)): Remove static pattern rule.
3025 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3026             Ulrich Drepper  <drepper@redhat.com>
3028         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3029         alignment in callback function.
3030         * Makefile: Add rules to build and run tst-align3.
3031         * tst-align3.c: New file.
3033 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3035         * allocatestack.c (setxid_signal_thread): Add
3036         INTERNAL_SYSCALL_DECL (err).
3038 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3040         * allocatestack.c (setxid_signal_thread): Need to use
3041         atomic_compare_and_exchange_bool_acq.
3043 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3044             Jakub Jelinek  <jakub@redhat.com>
3046         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3047         CANCEL_RESTMASK.
3048         (struct pthread): Move specific_used field to avoid padding.
3049         Add setxid_futex field.
3050         * init.c (sighandler_setxid): Reset setxid flag and release the
3051         setxid futex.
3052         * allocatestack.c (setxid_signal_thread): New function.  Broken
3053         out of the bodies of the two loops in __nptl_setxid.  For undetached
3054         threads check whether they are exiting and if yes, don't send a signal.
3055         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3056         * pthread_create.c (start_thread): For undetached threads, check
3057         whether setxid bit is set.  If yes, wait until signal has been
3058         processed.
3060         * allocatestack.c (STACK_VARIABLES): Initialize them.
3061         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3063 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3065         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3066         waiters, awake all waiters on the associated mutex.
3068 2005-09-22  Roland McGrath  <roland@redhat.com>
3070         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3071         ../sysdeps/x86_64/hp-timing.h).
3073 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3075         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3076         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3077         (lll_futex_wake_unlock): Define.
3078         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3079         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3080         (lll_futex_wake_unlock): Define.
3081         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3082         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3083         (lll_futex_wake_unlock): Define.
3084         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3085         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3086         (lll_futex_wake_unlock): Define.
3087         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3088         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3089         (lll_futex_wake_unlock): Define.
3090         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3091         lll_futex_wake_unlock.
3092         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3093         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3094         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3095         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3096         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3097         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3099 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3101         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3102         Fix typo in register name.
3104 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3106         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3107         Use __sigfillset.  Document that sigfillset does the right thing wrt
3108         to SIGSETXID.
3110 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
3112         * tst-stackguard1.c (do_test): Likewise.
3114 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
3116         * tst-stackguard1.c (do_test): Don't fail if the poor man's
3117         randomization doesn't work well enough.
3119 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3121         [BZ #1102]
3122         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3123         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3124         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3125         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3126         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3127         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3128         in the structure.
3129         * Makefile (tests): Add tst-initializers1.
3130         (CFLAGS-tst-initializers1.c): Set.
3131         * tst-initializers1.c: New test.
3133 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3135         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3136         Make sure __flags are located at offset 48 from the start of the
3137         structure.
3139 2005-07-02  Roland McGrath  <roland@redhat.com>
3141         * Makeconfig: Comment fix.
3143 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3145         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3146         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3147         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3148         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3149         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3150         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3151         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3152         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3153         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3154         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3156 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3158         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3159         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3160         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3161         fields.
3162         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3163         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3164         field.  Put in sysinfo field unconditionally.
3165         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3166         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3167         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3168         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3169         fields.
3170         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3171         * pthread_create.c (__pthread_create_2_1): Use
3172         THREAD_COPY_STACK_GUARD macro.
3173         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3174         tests.
3175         * tst-stackguard1.c: New file.
3176         * tst-stackguard1-static.c: New file.
3178 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3180         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3181         Invoke CGOTSETUP and CGOTRESTORE.
3182         (CGOTSETUP, CGOTRESTORE): Define.
3184 2005-05-29  Richard Henderson  <rth@redhat.com>
3186         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3187         (tf_write, tf_writev): Use it.
3188         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3189         the system minimum.
3191 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3193         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3194         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3195         __librt_*_asynccancel@local.
3197 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3199         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3200         all occurrences of JUMPTARGET.  Instead append @local to labels.
3202 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3204         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3205         size/alignment of struct pthread rather than tcbhead_t.
3206         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3207         Likewise.
3208         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3209         Likewise.
3210         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3211         Likewise.
3213 2005-05-19  Richard Henderson  <rth@redhat.com>
3215         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3216         __sync_val_compare_and_swap, not explicit _si variant.
3217         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3219 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3221         [BZ #915]
3222         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3224 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3226         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3227         .eh_frame section, use cfi_* directives.
3229 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3231         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3232         of "" includes.
3234 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3236         [BZ #1075]
3237         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3238         aio_write blocks.
3240 2005-04-27  Roland McGrath  <roland@redhat.com>
3242         * Makefile (tests): Remove tst-clock2.
3244         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3245         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3246         translating to the kernel clockid_t for our own process/thread clock.
3248         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3250 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3252         * old_pthread_cond_init.c: Include <errno.h>.
3253         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3254         process shared or uses clock other than CLOCK_REALTIME.
3255         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3257 2005-04-13  David S. Miller  <davem@davemloft.net>
3259         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3260         * sysdeps/sparc/sparc64/clone.S: New file.
3262 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3264         [BZ #1102]
3265         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3266         __inline instead of inline.
3267         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3269 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3271         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3272         functionally equivalent, but shorter instructions.
3273         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3274         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3275         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3276         Likewise.
3277         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3278         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3279         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3280         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3282         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3283         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3284         Likewise.
3285         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3286         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3287         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3288         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3289         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3291 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3293         * sysdeps/mips/Makefile: New file.
3294         * sysdeps/mips/nptl-sysdep.S: New file.
3295         * sysdeps/mips/tcb-offsets.sym: New file.
3296         * sysdeps/mips/pthread_spin_lock.S: New file.
3297         * sysdeps/mips/pthread_spin_trylock.S: New file.
3298         * sysdeps/mips/pthreaddef.h: New file.
3299         * sysdeps/mips/tls.h: New file.
3300         * sysdeps/mips/jmpbuf-unwind.h: New file.
3301         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3302         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3303         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3304         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3305         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3306         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3307         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3308         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3309         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3310         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3312 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3314         [BZ #1112]
3315         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3316         variable to scerr.
3318 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3320         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3322 2005-02-25  Roland McGrath  <roland@redhat.com>
3324         * alloca_cutoff.c: Correct license text.
3325         * tst-unload.c: Likewise.
3326         * sysdeps/pthread/allocalim.h: Likewise.
3327         * sysdeps/pthread/pt-initfini.c: Likewise.
3328         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3329         * sysdeps/pthread/bits/sigthread.h: Likewise.
3330         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3331         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3333 2005-02-16  Roland McGrath  <roland@redhat.com>
3335         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3336         Use unsigned int * for ptr_nthreads.
3338 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3340         [BZ #721]
3341         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3342         gcc4.
3344 2005-02-07  Richard Henderson  <rth@redhat.com>
3346         [BZ #787]
3347         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3348         argument.
3350 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3352         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3353         order of arguments in invocation of atomic_add_zero.
3355 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3357         [BZ #737]
3358         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3359         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3360         at least gotntpoff relocation and addition.
3361         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3362         Likewise.
3363         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3364         Likewise.
3365         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3366         Likewise.
3368 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3370         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3371         entry for static tls deallocation fix.
3372         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3373         also contains information whether the memory pointed to is static
3374         TLS or not.
3375         * sysdeps/i386/tls.h: Likewise.
3376         * sysdeps/ia64/tls.h: Likewise.
3377         * sysdeps/powerpc/tls.h: Likewise.
3378         * sysdeps/s390/tls.h: Likewise.
3379         * sysdeps/sh/tls.h: Likewise.
3380         * sysdeps/sparc/tls.h: Likewise.
3381         * sysdeps/x86_64/tls.h: Likewise.
3383 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3385         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3387 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3389         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3390         %esp.
3391         * Makefile (tests): Add tst-align2.
3392         * tst-align2.c: New test.
3393         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3394         -mpreferred-stack-boundary=4.
3396 2004-12-18  Roland McGrath  <roland@redhat.com>
3398         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3399         New file removed withdrawn for the moment.
3401 2004-12-17  Richard Henderson  <rth@redhat.com>
3403         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3404         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3406 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3408         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3409         Increased PTHREAD_STACK_MIN.
3411         * tst-context1.c (stacks): Use bigger stack size.
3413 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3415         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3416         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3418 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3420         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3421         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3422         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3424 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3426         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3428 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3430         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3431         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3433         * tst-getpid1.c: If child crashes, report this first.  Print which
3434         signal.
3436 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3438         * init.c (__pthread_initialize_minimal_internal): Also unblock
3439         SIGSETXID.
3441 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3443         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3444         _POSIX_THREAD_CPUTIME): Define to 0.
3445         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3446         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3447         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3448         __timer_signal_thread_tclk): Remove.
3449         (init_module): Remove their initialization.
3450         (thread_cleanup): Remove their cleanup assertions.
3451         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3452         __timer_signal_thread_tclk): Remove.
3453         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3454         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3455         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3457 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3459         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3460         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3462         * Makefile (tests): Add tst-getpid2.
3463         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3464         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3465         * tst-getpid2.c: New test.
3467 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3469         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3471 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3473         * Makefile (tests): Add tst-getpid1.
3474         * tst-getpid1.c: New file.
3475         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3476         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3478 2004-12-02  Roland McGrath  <roland@redhat.com>
3480         * Makefile (libpthread-nonshared): Variable removed.
3481         ($(objpfx)libpthread_nonshared.a): Target removed.
3482         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3483         These are now handled by generic magic from
3484         libpthread-static-only-routines being set.
3486 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3488         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3489         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3490         _POSIX_THREAD_PRIO_PROTECT): Define.
3491         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3492         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3493         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3495 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3497         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3498         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3499         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3500         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3501         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3502         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3503         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3505 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3507         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3509         * Makefile (libpthread-routines): Add pthread_setschedprio.
3510         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3511         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3512         * pthread_setschedprio.c: New file.
3514 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3516         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3517         * pthread_cancel.c (pthread_create): Likewise.
3519         * Makefile (libpthread-routines): Add vars.
3520         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3521         * init.c (__default_stacksize, __is_smp): Remove.
3522         * vars.c: New file.
3523         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3524         and define a wrapper macro.
3525         (PTHREAD_STATIC_FN_REQUIRE): Define.
3526         * allocatestack.c (__find_thread_by_id): Undefine.
3527         * pthread_create (__pthread_keys): Remove.
3528         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3529         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3530         PTHREAD_STATIC_FN_REQUIRE.
3532 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3534         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3535         parameter to REGISTER macro.
3537 2004-11-17  Roland McGrath  <roland@redhat.com>
3539         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3540         Make sure SIGCANCEL is blocked as well.
3542 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3544         * sysdeps/pthread/setxid.h: New file.
3545         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3546         (struct xid_command): Add forward decl.
3547         (struct pthread_functions): Change return type of __nptl_setxid hook
3548         to int.
3549         * pthreadP.h (__nptl_setxid): Change return type to int.
3550         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3551         calling thread, return its return value and set errno on failure.
3552         * descr.h (struct xid_command): Change id type to long array.
3554         * Makefile: Add rules to build and test tst-setuid1 and
3555         tst-setuid1-static.
3556         * tst-setuid1.c: New test.
3557         * tst-setuid1-static.c: New test.
3559 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3561         * Makefile (tests): Add tst-exit3.
3562         * tst-exit3.c: New test.
3564 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3566         * Makefile (tests): Add tst-exit2.
3567         * tst-exit2.c: New file.
3569 2004-11-09  Roland McGrath  <roland@redhat.com>
3571         [BZ #530]
3572         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3573         here, before calling clone.
3574         * pthread_create.c (start_thread): Don't do it here.
3576 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3578         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3580 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3582         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3583         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3584         assembler warning.
3586 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3588         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3589         if sched_priority is not between minprio and maxprio.
3591 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3593         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3594         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3596         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3597         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3599 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3601         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3602         not-cancelable I/O functions.
3604 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3606         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3607         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3608         make sure 2 is stored in the futex and we looked at the old value.
3609         Fix a few other problems to return the correct value.
3611 2004-10-14  Richard Henderson  <rth@redhat.com>
3613         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3614         make gcc4 happy.
3616 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3618         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3619         of pthread-functions.h and pthreaddef.h.
3620         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3622         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3623         Change __data.__nwaiters from int to unsigned int.
3625         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3626         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3628         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3629         before return type.
3631         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3632         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3634 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3636         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3637         test fails, remove message queue.
3638         (tf_msgsnd): Likewise.
3640 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3642         * tst-clock1.c: Change #ifdef to #if defined.
3643         * tst-clock2.c: Likewise.
3644         * tst-cond11.c: Likewise.
3646         * sysdeps/pthread/timer_create.c (timer_create): Use
3647         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3648         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3649         THREAD_CPUTIME.
3651 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3653         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3654         _POSIX_THREAD_CPUTIME): Define to 0.
3656 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3658         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3659         and _POSIX_THREAD_CPUTIME to zero.
3660         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3661         * tst-barrier2.c: Fix testing for POSIX feature.
3662         * tst-clock1.c: Likewise.
3663         * tst-clock2.c: Likewise.
3664         * tst-cond11.c: Likewise.
3665         * tst-cond4.c: Likewise.
3666         * tst-cond6.c: Likewise.
3667         * tst-flock2.c: Likewise.
3668         * tst-mutex4.c: Likewise.
3669         * tst-mutex9.c: Likewise.
3670         * tst-rwlock12.c: Likewise.
3671         * tst-rwlock4.c: Likewise.
3672         * tst-signal1.c: Likewise.
3673         * tst-spin2.c: Likewise.
3674         * sysdeps/pthread/posix-timer.h: Likewise.
3675         * sysdeps/pthread/timer_create.c: Likewise.
3676         * sysdeps/pthread/timer_routines.c: Likewise.
3678 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3680         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3681         (__lll_mutex_timedlock_wait): Address futex correctly.
3683         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3684         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3685         make sure 2 is stored in the futex and we looked at the old value.
3686         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3687         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3688         which might very well made the code not working at all before.
3689         [BZ #417]
3691 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3693         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3694         allow SIGSETXID to be sent.
3695         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3696         for SIGSETXID to be defined.
3697         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3698         SIGSETXID cannot be blocked.
3700         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3701         Add __extension__ to long long types.
3702         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3703         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3704         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3705         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3706         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3707         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3708         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3710 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3712         * descr.h (struct pthread): Add stopped_start field.
3713         * sysdeps/pthread/createthread.c (create_thread): Set
3714         start_stopped flag in descriptor for new thread appropriately.
3715         * pthread_create.c (start_thread): Only take lock to be stopped on
3716         startup if stopped_start flag says so.
3718 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3720         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3721         is created detached and if yes, do not try to free the stack in case
3722         the thread creation failed.
3723         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3724         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3725         case there has been no error.  [BZ #405]
3727         * pthread_create.c (start_thread): Don't wait for scheduler data
3728         etc to be set at the beginning of the function.  The cancellation
3729         infrastructure must have been set up.  And enable async
3730         cancellation before potentially going to sleep.  [BZ #401]
3732 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3734         * Versions: Remove exports for pthread_set*id_np functions.
3735         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3736         for now.
3737         * Makefile: Don't build pthread_set*id code for now.
3739 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3741         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3742         internal use.
3743         * allocatestack.c (__nptl_setxid): New function.
3744         * descr.h (struct xid_command): Define type.
3745         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3746         (sighandler_setxid): New function.
3747         (__pthread_initialize_minimal): Register sighandler_setxid for
3748         SIGCANCEL.
3749         * pt-allocrtsig.c: Update comment.
3750         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3751         Declare __nptl_setxid.
3752         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3753         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3754         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3755         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3756         and pthread_setresuid_np.
3757         * pthread_setgid_np.c: New file.
3758         * pthread_setuid_np.c: New file.
3759         * pthread_setegid_np.c: New file.
3760         * pthread_seteuid_np.c: New file.
3761         * pthread_setregid_np.c: New file.
3762         * pthread_setreuid_np.c: New file.
3763         * pthread_setresgid_np.c: New file.
3764         * pthread_setresuid_np.c: New file.
3765         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3766         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3767         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3768         and pthread_setresuid_np.
3769         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3770         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3771         pthread_setregid, and pthread_setresgid.
3773 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3775         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3776         ENOMEM when out of memory.
3778 2004-09-10  Roland McGrath  <roland@redhat.com>
3780         [BZ #379]
3781         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3782         code, since we don't try to use the broken CLONE_STOPPED any more.
3783         * pthread_create.c (start_thread): Likewise.
3785 2004-09-15  Richard Henderson  <rth@redhat.com>
3787         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3789 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3791         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3792         (__libc_unwind_longjmp): Delete macro and declare as function.
3793         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3794         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3795         nptl directory.
3796         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3797         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3798         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3800 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3802         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3803         for __USE_XOPEN2K.
3804         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3805         types also for __USE_XOPEN2K.
3806         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3807         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3808         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3809         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3810         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3811         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3812         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3813         [BZ #320]
3815 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3817         * sysdeps/pthread/pthread.h
3818         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3819         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3820         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3821         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3822         [BZ #375]
3824 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3826         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3827         PSEUDO to be used with . prefix.
3829         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3830         Use atomic_increment instead of atomic_exchange_and_add.
3831         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3832         Likewise.
3833         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3834         Likewise.
3835         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3836         Likewise.
3838         * allocatestack.c (allocate_stack): Use atomic_increment_val
3839         instead of atomic_exchange_and_add.
3840         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3841         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3842         Likewise.
3843         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3844         Likewise.
3846         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3847         the initialization function might throw.
3849 2005-09-05  Richard Henderson  <rth@redhat.com>
3851         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3852         Move definition inside libpthread, libc, librt check.  Provide
3853         definition for rtld.
3855 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3857         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3858         waiters, awake all waiters on the associated mutex.
3860 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3862         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3863         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3864         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3865         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3866         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3867         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3868         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3869         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3870         * unwind.c: Use it.
3872         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3873         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3874         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3875         Likewise.
3876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3877         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3878         this is the last waiter, signal pthread_cond_destroy caller and
3879         avoid using the pthread_cond_t structure after unlock.
3880         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3882         Read clock type from the least significant bits of __nwaiters instead
3883         of __clock.
3884         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3885         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3887 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3889         [BZ #342]
3890         * Makefile (tests): Add tst-cond20 and tst-cond21.
3891         * tst-cond20.c: New test.
3892         * tst-cond21.c: New test.
3893         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3894         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3895         it unsigned int.
3896         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3897         Likewise.
3898         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3899         (pthread_cond_t): Likewise.
3900         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3901         Likewise.
3902         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3903         Likewise.
3904         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3905         Likewise.
3906         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3907         (cond_nwaiters): New.
3908         (clock_bits): New.
3909         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3910         if there are waiters not signalled yet.
3911         Wait until all already signalled waiters wake up.
3912         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3913         __nwaiters.  If pthread_cond_destroy has been called and this is the
3914         last waiter, signal pthread_cond_destroy caller and avoid using
3915         the pthread_cond_t structure after unlock.
3916         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3917         decrement it when leaving.  If pthread_cond_destroy has been called
3918         and this is the last waiter, signal pthread_cond_destroy caller.
3919         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3920         Likewise.  Read clock type from the least significant bits of
3921         __nwaiters instead of __clock.
3922         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3923         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3924         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3925         clock type just from the last COND_CLOCK_BITS bits of value.
3926         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3927         instead of __clock, just from second bit of condattr's value.
3929 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3931         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3932         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3933         != 64.
3934         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3936 2004-08-15  Roland McGrath  <roland@frob.com>
3938         * pthread_atfork.c: Update copyright terms including special exception
3939         for these trivial files, which are statically linked into executables
3940         that use dynamic linking for the significant library code.
3942 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3944         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3945         pthread_rwlock_rdlock.
3946         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3947         Decrease __nr_readers_queued after reacquiring lock.
3948         * sysdeps/pthread/pthread_rwlock_timedrdlock
3949         (pthread_rwlock_timedrdlock): Likewise.
3950         Reported by Bob Cook <bobcook47@hotmail.com>.
3952 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3954         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3955         before pthread_barrier_wait.
3957 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3960         Remove unnecessary exception handling data.
3962 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3964         [BZ #284]
3965         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3966         instead of clockid_t.
3968 2004-07-21  Roland McGrath  <roland@redhat.com>
3970         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3972 2004-07-19  Roland McGrath  <roland@redhat.com>
3974         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3976 2004-07-02  Roland McGrath  <roland@redhat.com>
3978         * configure: Don't exit.
3980 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3982         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3983         (__pthread_cond_timedwait): Check for invalid nanosecond in
3984         timeout value.
3986 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3988         * Makefile: Add rules to build and run tst-fini1.
3989         * tst-fini1.c: New file.
3990         * tst-fini1mod.c: New file.
3992 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3994         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3995         if no cancellation support is needed.
3996         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3997         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3998         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3999         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4000         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4001         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4002         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4003         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4004         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4006         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4007         only if not already defined.
4009 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4011         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4012         constraint "m" instead of "0" for futex.
4014         * shlib-versions: Add powerpc64-.*-linux.*.
4016 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4018         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4019         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4020         for valid tv_nsec.
4021         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4022         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4023         bits.
4025 2004-06-29  Roland McGrath  <roland@redhat.com>
4027         * Banner: NPTL no longer has its own version number.
4028         * Makefile (nptl-version): Variable removed.
4029         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4030         using $(version), the glibc version number.
4032 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4034         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4035         Fix branch offset for a PLT entry.
4036         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4037         Likewise.
4038         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4039         Likewise.
4040         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4041         Likewise.
4042         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4043         Likewise.
4045 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4047         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4048         unconditionally.
4050 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4052         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4053         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4054         instead of tv_sec.
4055         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4056         (pthread_rwlock_timedrdlock): Likewise.
4058 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4060         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4061         Set __r7 to val, not mutex.
4063 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4065         * Makefile: Add rules to build tst-rwlock14.
4066         * tst-rwlock14.c: New file.
4068 2004-06-24  Boris Hu  <boris.hu@intel.com>
4070         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4071         check.
4072         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4074 2004-06-19  Andreas Jaeger  <aj@suse.de>
4076         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4077         assembler in last patch.
4079 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4081         * sysdeps/pthread/pthread_cond_timedwait.c
4082         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4084         (__pthread_cond_timedwait): Check for invalid nanosecond in
4085         timeout value.
4086         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4087         * tst-cond19.c: New file.
4088         * Makefile: Add rules to build and run tst-cond19.
4090 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4092         * tst-context1.c (GUARD_PATTERN): Defined.
4093         (tst_context_t): Define struct containing ucontext_t & guard words.
4094         (ctx): Declare as an array of tst_context_t.
4095         (fct): Verify uc_link & guard words are still valid.
4096         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4098 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4100         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4101         Add __data.__futex field, reshuffle __data.__clock.
4102         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4103         (__pthread_cond_signal): Increment __futex at the same time as
4104         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4105         address of low 32-bits of __wakeup_seq to futex syscall.
4106         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4107         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4108         releasing internal lock to FUTEX_WAIT.
4109         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4110         (__pthread_cond_timedwait): Likewise.
4111         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4112         (FUTEX_CMP_REQUEUE): Define.
4113         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4114         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4115         Pass __futex value from before the unlock and __futex address instead
4116         of address of low 32-bits of __wakeup_seq to futex syscall.
4117         Fallback to FUTEX_WAKE all on any errors.
4119 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4121         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4122         comment typo.
4123         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4124         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4125         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4126         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4127         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4129 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4131         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4132         Add memory clobber to inline assembly.
4133         (__lll_mutex_trylock): Likewise.
4134         (__lll_mutex_cond_trylock): Likewise.
4136 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4138         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4139         Pass val argument as 6th system call argument in %r7.
4141 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4143         * Makefile (tests): Add tst-cond16.
4144         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4145         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4146         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4147         Add __data.__futex field, reshuffle __data.__clock.
4148         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4149         (__pthread_cond_signal): Increment __futex at the same time as
4150         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4151         address of low 32-bits of __wakeup_seq to futex syscall.
4152         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4153         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4154         releasing internal lock to FUTEX_WAIT.
4155         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4156         (__pthread_cond_timedwait): Likewise.
4157         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4158         (FUTEX_CMP_REQUEUE): Define.
4159         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4160         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4161         Pass __futex value from before the unlock and __futex address instead
4162         of address of low 32-bits of __wakeup_seq to futex syscall.
4163         Fallback to FUTEX_WAKE all on any errors.
4164         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4165         Define.
4166         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4167         internally.  Return non-zero if error, zero if success.
4168         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4169         Add __data.__futex field, reshuffle __data.__clock.
4170         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4171         Define.
4172         (lll_futex_requeue): Add val argument, return 1 unconditionally
4173         for the time being.
4174         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4175         Add __data.__futex field, reshuffle __data.__clock.
4176         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4177         Define.
4178         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4179         internally.  Return non-zero if error, zero if success.
4180         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4181         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4182         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4183         Define.
4184         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4185         internally.  Return non-zero if error, zero if success.
4186         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4187         Add __data.__futex field, reshuffle __data.__clock.
4188         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4189         Define.
4190         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4191         internally.  Return non-zero if error, zero if success.
4192         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4193         Add __data.__futex field, reshuffle __data.__clock.
4194         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4195         Add __data.__futex field, reshuffle __data.__clock.
4196         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4197         Increment __futex at the same time as __wakeup_seq or __total_seq.
4198         Pass address of __futex instead of address of low 32-bits of
4199         __wakeup_seq to futex syscall.
4200         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4201         Pass __futex value from before releasing internal lock
4202         to FUTEX_WAIT.
4203         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4204         Likewise.  Avoid unnecessary shadowing of variables.
4205         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4206         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4207         unlock and __futex address instead of address of low 32-bits of
4208         __wakeup_seq to futex_requeue macro, adjust for new return value
4209         meaning.
4210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4211         (__pthread_cond_signal): Increment __futex at the same time as
4212         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4213         address of low 32-bits of __wakeup_seq to futex syscall.
4214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4215         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4216         releasing internal lock to FUTEX_WAIT.
4217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4218         (__pthread_cond_timedwait): Likewise.
4219         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4220         (FUTEX_CMP_REQUEUE): Define.
4221         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4222         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4223         Pass __futex value from before the unlock and __futex address instead
4224         of address of low 32-bits of __wakeup_seq to futex syscall.
4225         Fallback to FUTEX_WAKE all on any errors.
4227 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4229         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4230         Add nop to align the end of critical section.
4231         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4233 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4235         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4236         Add __broadcast_seq field.
4237         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4238         all waiters as woken with woken_seq and bump broadcast counter.
4239         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4240         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4241         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4242         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4244 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4247         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4248         Reported by Kaz Kojima.
4250 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4252         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4254 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4256         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4257         __broadcast_seq with bc_seq after acquiring internal lock instead of
4258         before it.
4260 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4262         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4263         compilation.
4264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4265         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4266         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4267         (pthread_cond_t): Add __data.__broadcast_seq field.
4268         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4269         (FRAME_SIZE): Define.
4270         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4271         Comment typo fixes.
4272         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4273         Define.
4274         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4275         typo fixes.
4276         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4277         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4278         fixes.
4280 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4282         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4283         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4284         Add __broadcast_seq field.
4285         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4286         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4287         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4288         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4289         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4290         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4291         all waiters as woken with woken_seq and bump broadcast counter.
4292         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4294         __broadcast_seq field.
4295         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4296         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4297         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4298         * pthread_cond_init.c: Initialize __broadcast_seq field.
4299         * Makefile (tests): Add tst-cond17 and tst-cond18.
4300         Add .NOTPARALLEL goal.
4301         * tst-cond16.c: New file.  From Jakub.
4302         * tst-cond17.c: New file.  From Jakub.
4303         * tst-cond18.c: New file.  From Jakub.
4305 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4307         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4308         unwind info.
4310         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4311         Parametrize frame size.  Correct some unwind info.
4312         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4314 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4316         * tst-stack3.c: Note testing functionality beyond POSIX.
4318 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4320         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4321         Change conditional from ifdef to if.
4323 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4325         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4326         SYSDEP_CANCEL_ERROR): Define.
4327         (PSEUDO): Use it.
4329 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4331         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4333 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4335         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4337 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4339         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4340         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4341         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4342         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4344 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4346         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4347         thread has all signals blocked.
4349 2004-04-18  Andreas Jaeger  <aj@suse.de>
4351         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4352         (SEM_VALUE_MAX): Add missing brace.
4354 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4356         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4357         in rt subdir.
4358         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4359         * sysdeps/pthread/tst-mqueue8x.c: New test.
4360         * tst-cancel4.c: Update comment about message queues.
4362         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4363         return it_value { 0, 0 }.
4364         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4365         like SIGEV_SIGNAL.
4366         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4367         assertion for SIGEV_NONE.
4368         (thread_attr_compare): Compare all attributes, not just a partial
4369         subset.
4371 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4373         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4375 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4377         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4378         Just use a plain number.
4379         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4380         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4381         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4382         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4383         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4384         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4385         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4387 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4389         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4390         frame info.
4391         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4393 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4395         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4396         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4397         of calling sigwaitinfo.
4399 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4401         * allocatestack.c (allocate_stack): Set reported_guardsize
4402         unconditionally.
4403         * pthread_getattr_np.c (pthread_getattr_np): Use
4404         reported_guardsize instead of guardsize.
4405         * descr.h (struct pthread): Add reported_guardsize field.
4407 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4409         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4411 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4413         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4415 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4417         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4418         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4419         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4420         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4421         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4422         Define.
4423         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4424         (_POSIX_MESSAGE_PASSING): Define.
4425         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4426         (_POSIX_MESSAGE_PASSING): Define.
4427         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4428         (_POSIX_MESSAGE_PASSING): Define.
4430 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4432         * tst-context1.c (fct): Check whether correct stack is used.
4434 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4436         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4437         matching constraints for asm mem parameters.
4439         * tst-clock2.c (tf): Don't define unless needed.
4441 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4443         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4444         $(gnulib).
4446 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4448         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4449         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4450         * pthreadP.h: Declare __nptl_deallocate_tsd.
4451         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4452         Adjust caller.
4454         * Makefile (tests): Add tst-tsd5.
4455         * tst-tsd5.c: New file.
4457 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4459         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4460         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4461         is SHLIB_COMPAT check.
4462         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4463         (__pthread_attr_getaffinity_old): Likewise.
4464         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4465         (__pthread_getaffinity_old): Likewise.
4466         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4467         (__pthread_setaffinity_old): Likewise.
4469 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4471         * allocatestack.c (_make_stacks_executable): Call
4472         _dl_make_stack_executable first.
4474 2004-03-24  Roland McGrath  <roland@redhat.com>
4476         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4477         constraint instead of "0".
4479 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4481         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4482         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4484         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4485         code to avoid warning.
4487 2004-03-24  Andreas Jaeger  <aj@suse.de>
4489         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4490         (__pthread_attr_setaffinity_old): Remove const.
4492 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4494         * sysdeps/unix/sysv/linux/smp.h: New file.
4495         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4496         * init.c: Define __is_smp.
4497         (__pthread_initialize_minimal_internal): Call is_smp_system to
4498         initialize __is_smp.
4499         * pthreadP.h: Declare __is_smp.
4500         Define MAX_ADAPTIVE_COUNT is necessary.
4501         * pthread_mutex_init.c: Add comment regarding __spins field.
4502         * pthread_mutex_lock.c: Implement adaptive mutex type.
4503         * pthread_mutex_timedlock.c: Likewise.
4504         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4505         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4506         Add __spins field.
4507         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4508         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4509         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4510         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4511         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4512         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4513         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4514         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4515         lll_mutex_cond_trylock.
4516         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4517         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4518         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4519         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4520         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4521         Define BUSY_WAIT_NOP.
4522         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4523         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4525         * tst-mutex5.c: Add support for testing adaptive mutexes.
4526         * tst-mutex7.c: Likewise.
4527         * tst-mutex5a.c: New file.
4528         * tst-mutex7a.c: New file.
4529         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4531         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4532         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4533         vgettimeofday call might destroy the content.
4535         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4536         @pause in the loop.
4538         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4539         No need to restrict type of ret.  Make it int.  Add comment.
4541         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4542         Remove unnecessary setne instruction.
4544 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4546         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4547         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4548         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4549         If realloc fails, break out of the loop.
4551 2004-03-20  Andreas Jaeger  <aj@suse.de>
4553         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4554         (__pthread_setaffinity_old): Fix interface.
4555         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4556         (__pthread_getaffinity_old): Likewise.
4558         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4559         (__pthread_setaffinity_new): Remove duplicate declaration.
4561 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4563         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4564         the return value to a safe register.
4565         (CDISABLE): Set the function argument correctly.
4567 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4569         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4570         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4571         Rewrite so that only one locked memory operation per round is needed.
4572         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4573         (pthread_barrier_wait): After wakeup, release lock only when the
4574         last thread stopped using the barrier object.
4575         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4576         (__pthread_cond_wait): Don't store mutex address if the current
4577         value is ~0l.  Add correct cleanup support and unwind info.
4578         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4579         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4580         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4581         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4582         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4583         Add correct cleanup support and unwind info.
4584         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4585         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4586         information for syscall wrappers.
4588 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4590         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4591         cpusetsize field, remove next.
4592         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4593         parameter for size of the CPU set.
4594         (pthread_setaffinity_np): Likewise.
4595         (pthread_attr_getaffinity_np): Likewise.
4596         (pthread_attr_setaffinity_np): Likewise.
4597         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4598         interface change, keep compatibility code.
4599         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4600         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4601         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4602         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4603         __pthread_getaffinity_np.
4604         * Versions: Add version for changed interfaces.
4605         * tst-attr3.c: Adjust test for interface change.
4606         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4607         increasing buffer sizes.
4608         * pthread_attr_destroy.c: Remove unused list handling.
4609         * pthread_attr_init.c: Likewise.
4611 2004-03-17  Roland McGrath  <roland@redhat.com>
4613         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4614         first argument to clock_getres so we ever enable kernel timers.
4616 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4618         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4620 2004-03-12  Richard Henderson  <rth@redhat.com>
4622         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4623         oldvalue from CENABLE to CDISABLE.
4625 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4627         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4628         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4629         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4630         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4632 2004-03-11  Richard Henderson  <rth@redhat.com>
4634         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4635         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4636         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4638 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4640         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4641         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4642         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4644 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4646         * forward.c (__pthread_cond_broadcast_2_0,
4647         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4648         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4649         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4651 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4653         * sysdeps/sh/tcb-offsets.sym: Add PID.
4654         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4655         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4657 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4659         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4660         include <sysdep-cancel.h>, vfork is no cancellation point.
4661         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4662         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4663         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4665 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4667         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4668         libc_hidden_def.
4669         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4670         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4671         Likewise.
4672         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4673         Likewise.
4674         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4675         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4676         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4677         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4678         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4680         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4681         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4682         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4683         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4684         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4685         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4687         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4688         a local register for saving old PID.  Negate PID in parent upon exit.
4690         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4691         tcb-offsets.h.
4692         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4693         before syscall, set to the old value in the parent afterwards.
4694         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4695         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4696         tcb-offsets.h.
4697         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4698         before syscall, set to the old value in the parent afterwards.
4699         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4700         * sysdeps/s390/tcb-offsets.sym: Add PID.
4702         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4703         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4704         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4705         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4706         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4707         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4709 2004-03-10  Andreas Schwab  <schwab@suse.de>
4711         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4712         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4713         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4715 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4717         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4718         * tst-cancel21.c (do_one_test): Likewise.
4719         Reported by Gordon Jin <gordon.jin@intel.com>.
4721 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4723         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4724         if non-zero and set to INT_MIN if zero.
4725         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4726         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4727         (SAVE_PID, RESTORE_PID): Define.
4728         (__vfork): Use it.
4729         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4730         Use relative path to avoid including NPTL i386/vfork.S.
4731         (SAVE_PID, RESTORE_PID): Define.
4732         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4733         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4734         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4735         tst-vfork2x.
4736         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4737         * tst-vfork1.c: New test.
4738         * tst-vfork2.c: New test.
4739         * tst-vfork1x.c: New test.
4740         * tst-vfork2x.c: New test.
4742 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4744         * sysdeps/i386/tcb-offsets.sym: Add PID.
4745         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4746         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4747         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4749 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4751         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4753 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4755         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4756         _rtld_global_ro.
4758 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4760         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4761         _rtld_global_ro.
4763         * tst-once4.c: Remove unnecessary macro definition.
4765         * tst-mutex7.c (do_test): Limit thread stack size.
4766         * tst-once2.c (do_test): Likewise.
4767         * tst-tls3.c (do_test): Likewise.
4768         * tst-tls1.c (do_test): Likewise.
4769         * tst-signal3.c (do_test): Likewise.
4770         * tst-kill6.c (do_test): Likewise.
4771         * tst-key4.c (do_test): Likewise.
4772         * tst-join4.c (do_test): Likewise.
4773         * tst-fork1.c (do_test): Likewise.
4774         * tst-context1.c (do_test): Likewise.
4775         * tst-cond2.c (do_test): Likewise.
4776         * tst-cond10.c (do_test): Likewise.
4777         * tst-clock2.c (do_test): Likewise.
4778         * tst-cancel10.c (do_test): Likewise.
4779         * tst-basic2.c (do_test): Likewise.
4780         * tst-barrier4.c (do_test): Likewise.
4782 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4784         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4786 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4788         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4789         (__pthread_cond_timedwait): Optimize wakeup test.
4790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4791         (__pthread_cond_wait): Likewise.
4792         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4793         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4794         Likewise.
4796 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4798         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4799         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4800         the atomic instruction needed.
4801         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4802         (__lll_mutex_lock_wait): Likewise.
4804 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4806         * Makefile (tests): Add tst-cond14 and tst-cond15.
4807         * tst-cond14.c: New file.
4808         * tst-cond15.c: New file.
4810 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4812         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4813         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4814         needs to be implemented differently to be useful.
4816 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4818         * pthread_attr_setschedparam.c: Don't test priority against limits
4819         here.  Set ATTR_FLAG_SCHED_SET flag.
4820         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4821         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4822         from parent thread to child.  If attribute is used and scheduling
4823         parameters are not inherited, copy parameters from attribute or
4824         compute them.  Check priority value.
4825         * pthread_getschedparam.c: If the parameters aren't known yet get
4826         them from the kernel.
4827         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4828         ATTR_FLAG_POLICY_SET flag for thread.
4829         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4830         and ATTR_FLAG_POLICY_SET.
4832         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4834         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4835         fail if stack address hasn't been set.  Just return 0.
4837 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4839         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4840         libpthread for the files in this list.
4841         (CFLAGS-tst-unload): Removed.
4842         * tst-unload.c (do_test): Don't use complete path for
4843         LIBPHREAD_SO.
4845         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4846         tst-_res1mod2.
4848 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4850         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4851         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4852         operation per round is needed.
4853         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4854         (__lll_mutex_lock_wait): Likewise.
4856 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4858         * tst-cancel9.c (cleanup): Don't print to stderr.
4860 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4862         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4864 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4866         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4867         (__syscall_error_handler2): Call CDISABLE.
4868         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4869         (__syscall_error_handler2): Call CDISABLE.
4871         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4872         Release lock before the loop, don't reacquire it.
4874         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4876 2004-02-19  Andreas Schwab  <schwab@suse.de>
4878         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4879         Fix last change.
4881 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4883         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4884         (pthread_barrier_wait): After wakeup, release lock only when the
4885         last thread stopped using the barrier object.
4886         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4887         (pthread_barrier_wait): Likewise.
4888         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4889         Likewise.
4890         * Makefile (tests): Add tst-barrier4.
4891         * tst-barrier4.c: New file.
4893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4894         (__pthread_cond_timedwait): Perform timeout test while holding
4895         internal lock to prevent wakeup race.
4896         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4897         * sysdeps/pthread/pthread_cond_timedwait.c
4898         (__pthread_cond_timedwait): Likewise.
4899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4900         (__pthread_cond_timedwait): Likewise.
4902 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4904         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4905         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4906         * Makefile (tests): Add tst-rwlock13.
4907         * tst-rwlock13.c: New test.
4909 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4912         (__condvar_tw_cleanup): Little optimization.
4913         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4915 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4917         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4918         libpthread as "lib" parameter to SHLIB_COMPAT.
4919         (__novmx_siglongjmp): Fix typo in function name.
4920         (__novmx_longjmp): Fix typo in function name.
4922 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4924         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4925         __builtin_expect.
4927         * sysdeps/generic/pt-longjmp.c: Moved to...
4928         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4930 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4932         * Makefile (libpthread-routines): Add pt-cleanup.
4933         * pt-longjmp.c: Removed.
4934         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4935         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4936         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4937         Version longjmp, siglongjmp for GLIBC_2.3.4.
4938         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4940 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4942         * sysdeps/pthread/pthread_cond_timedwait.c
4943         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4944         Reuse code.  Add __builtin_expects.
4946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4947         (__pthread_cond_timedwait): Get internal lock in case timeout has
4948         passed before the futex syscall.
4949         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4951 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4953         * allocatestack.c: Pretty printing.
4955         * sysdeps/pthread/createthread.c (create_thread): Don't add
4956         CLONE_DETACHED bit if it is not necessary.
4958 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4960         * pthread_getattr_np.c: Include ldsodefs.h.
4962 2004-01-16  Richard Henderson  <rth@redhat.com>
4964         * allocatestack.c: Don't declare __libc_stack_end.
4965         * init.c (__pthread_initialize_minimal_internal): Likewise.
4966         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4968 2004-01-15  Richard Henderson  <rth@redhat.com>
4970         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4971         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4972         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4973         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4974         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4975         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4976         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4977         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4979 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4981         * init.c (pthread_functions): Make array const.
4983 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4985         * allocatestack.c (__make_stacks_executable): Change interface.
4986         Check parameters.  Pass parameter on to libc counterpart.
4987         * pthreadP.h: Change declaration.
4989 2004-01-13  Richard Henderson  <rth@redhat.com>
4991         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4992         prototype form.
4993         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4994         Likewise.
4996         * sysdeps/alpha/Makefile: New file.
4997         * sysdeps/alpha/tcb-offsets.sym: New file.
4998         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4999         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5001         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5002         on powerpc version.
5004 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5006         * Makefile (tests): Add tst-backtrace1.
5007         * tst-backtrace1.c: New test.
5009 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5011         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5012         register as second parameter to the REGISTER macro.
5013         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5014         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5015         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5016         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5017         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5018         of thread register as second parameter to REGISTER macro in 64 case.
5020 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5022         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5023         (CFLAGS-getpid.o): Defined.
5024         (CFLAGS-getpid.os): Defined.
5026 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5028         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5029         returned for main thread does not overlap with any other VMA.
5030         Patch by Jakub Jelinek.
5032 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5034         * tst-raise1.c: Include stdio.h.
5036 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5038         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5039         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5040         If pid is 0, set it to selftid.
5041         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5042         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5043         != 0, return self->tid without doing a syscall.
5044         * descr.h (struct pthread): Move pid field after tid.
5046         * Makefile (tests): Add tst-raise1.
5047         * tst-raise1.c: New file.
5049 2003-12-23  Roland McGrath  <roland@redhat.com>
5051         * tst-oddstacklimit.c: New file.
5052         * Makefile (tests): Add it.
5053         (tst-oddstacklimit-ENV): New variable.
5055         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5056         value up to page size for __default_stacksize.
5058 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5060         * Makefile (tests): Add tst-eintr5.
5061         * tst-eintr5.c: New file.
5063         * eintr.c (eintr_source): Prevent sending signal to self.
5065         * tst-eintr2.c (tf1): Improve error message.
5067 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5069         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5070         * sysdeps/unix/sysv/linux/getpid.c: New file.
5071         * pthread_cancel.c: Add comment explaining use of PID field.
5072         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5073         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5074         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5075         temporarily to signal the field must not be relied on and updated
5076         by getpid().
5077         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5078         temporarily negative.
5079         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5081 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5083         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5084         (eintr_source): If ARG != NULL, use pthread_kill.
5085         * tst-eintr1.c: Adjust for this change.
5086         * tst-eintr2.c: Likewise.
5087         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5088         * tst-eintr3.c: New file.
5089         * tst-eintr4.c: New file.
5091 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5093         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5094         if CANCELSTATE_BITMASK is set.
5095         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5096         Likewise.
5098         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5099         (tests-reverse): Add tst-cancel23.
5100         * tst-cancel22.c: New test.
5101         * tst-cancel23.c: New test.
5103 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5105         * tst-eintr1.c: Better error messages.
5107         * Makefile (tests): Add tst-eintr2.
5108         * tst-eintr2.c: New file.
5110 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5112         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5113         (CFLAGS-tst-cancelx21.c): Set.
5114         * tst-cancel21.c: New test.
5115         * tst-cancelx21.c: New test.
5117         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5118         comparison operand.
5119         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5120         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5121         * pt-longjmp.c: Include jmpbuf-unwind.h.
5122         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5123         _JMPBUF_UNWINDS.  Adjust compared pointers.
5124         * init.c (__pthread_initialize_minimal_internal): Initialize
5125         pd->stackblock_size.
5126         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5127         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5128         * sysdeps/i386/jmpbuf-unwind.h: New file.
5129         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5130         * sysdeps/s390/jmpbuf-unwind.h: New file.
5131         * sysdeps/sh/jmpbuf-unwind.h: New file.
5132         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5133         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5134         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5135         (_JMPBUF_CFA_UNWINDS): Remove.
5136         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5138 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5140         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5141         (CFLAGS-tst-cancelx20.c): Set.
5142         * tst-cancel20.c: New test.
5143         * tst-cancelx20.c: New test.
5145 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5147         * init.c (__pthread_initialize_minimal_internal): Don't treat
5148         architectures with separate register stack special here when
5149         computing default stack size.
5151 2003-12-17  Roland McGrath  <roland@redhat.com>
5153         * Makefile (tst-cancelx7-ARGS): New variable.
5154         Reportd by Greg Schafer <gschafer@zip.com.au>.
5156 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5158         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5159         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5160         (tst-stack3-ENV): Set.
5161         ($(objpfx)tst-stack3-mem): New.
5162         * tst-stack3.c: New test.
5164 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5166         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5167         Add unwind directives.  Drop unused .regstk directive.
5168         (_fini_EPILOG_BEGINS): Add unwind directives.
5170 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5172         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5173         Assume parameter is a pointer.
5174         (lll_futex_wake): Likewise.
5175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5176         Likewise.
5177         (lll_futex_wake): Likewise.
5178         Reported by Boris Hu.
5179         * sysdeps/unix/sysv/linux/unregister-atfork.c
5180         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5182         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5184 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5186         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5187         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5188         __rtld_lock_initialize for ld.so lock.
5189         Patch in part by Adam Li <adam.li@intel.com>.
5191 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5193         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5194         in $(gnulib).  Also, remove stale comment.
5196 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5198         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5199         advantage of new syscall stub and optimize accordingly.
5201         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5202         from SYS_futex, to match expectations of
5203         sysdep.h:DO_INLINE_SYSCALL.
5204         (lll_futex_clobbers): Remove.
5205         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5206         (lll_futex_wake): Likewise.
5207         (lll_futex_requeue): Likewise.
5208         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5209         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5210         Jelinek).
5211         (__lll_mutex_lock): Likewise.
5212         (__lll_mutex_cond_lock): Likewise.
5213         (__lll_mutex_timed_lock): Likewise.
5214         (__lll_mutex_unlock): Likewise.
5215         (__lll_mutex_unlock_force): Likewise.
5217         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5218         comes before the include of <sysdep.h>.
5219         (THREAD_SELF_SYSINFO): New macro.
5220         (THREAD_SYSINFO): Likewise.
5221         (INIT_SYSINFO): New macro.
5222         (TLS_INIT_TP): Call INIT_SYSINFO.
5224         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5226         * sysdeps/pthread/createthread.c (create_thread): Use
5227         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5228         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5229         THREAD_SELF_SYSINFO instead of open code.
5230         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5231         (THREAD_SYSINFO): Likewise.
5233         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5235         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5237 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5239         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5240         instead of .init.  Patch by David Mosberger.
5242 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5244         * sysdeps/pthread/configure.in: Remove broken declaration in C
5245         cleanup handling check.
5247 2003-11-30  Andreas Jaeger  <aj@suse.de>
5249         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5250         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5251         Likewise.
5253 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5255         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5256         * pthread_attr_destroy.c: Include shlib-compat.h.
5257         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5258         is set in iattr->flags.
5259         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5261 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5263         * Makefile (distribute): Add tst-cleanup4aux.c.
5265         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5266         include.
5268 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5270         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5271         pthread_cond_signal.
5273         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5274         store mutex address if the current value is ~0l.
5275         * sysdeps/pthread/pthread_cond_timedwait.c
5276         (__pthread_cond_timedwait): Likewise.
5277         * sysdeps/pthread/pthread_cond_broadcast.c
5278         (__pthread_cond_broadcast): Don't use requeue for pshared
5279         condvars.
5281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5282         (__pthread_cond_wait): Don't store mutex address if the current
5283         value is ~0l.
5284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5285         (__pthread_cond_timedwait): Likewise.
5286         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5287         (__pthread_cond_broadcast): Don't use requeue for pshared
5288         condvars.
5290         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5291         element with ~0l for pshared condvars, with NULL otherwise.
5293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5294         (__pthread_cond_wait): Don't store mutex address if the current
5295         value is ~0l.
5296         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5297         (__pthread_cond_timedwait): Likewise.
5298         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5299         (__pthread_cond_broadcast): Don't use requeue for pshared
5300         condvars.
5302         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5303         * tst-cond12.c: New file.
5304         * tst-cond13.c: New file.
5306 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5308         * sysdeps/pthread/configure.in: Make missing forced unwind support
5309         fatal.
5311 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5313         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5315 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5317         * Makefile: Add magic to clean up correctly.
5319 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5321         * unwind.c (FRAME_LEFT): Define.
5322         (unwind_stop): Handle old style cleanups here.
5323         (__pthread_unwind): Handle old style cleanups only if
5324         !HAVE_FORCED_UNWIND.
5325         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5326         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5327         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5328         ($(objpfx)tst-cleanupx4): Likewise.
5329         * tst-cleanup4.c: New test.
5330         * tst-cleanup4aux.c: New.
5331         * tst-cleanupx4.c: New test.
5333 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5335         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5336         lll_mutex_*lock macros to skip atomic operations on some archs.
5338 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5340         * sysdeps/pthread/tst-timer.c (main): Initialize
5341         sigev2.sigev_value as well.
5343 2003-10-15  Roland McGrath  <roland@redhat.com>
5345         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5346         is missing.
5347         * sysdeps/pthread/configure: Regenerated.
5349 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5351         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5352         locking macros.  No distinction between normal and mutex locking
5353         anymore.
5354         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5355         Merge bits from lowlevelmutex.S we still need.
5356         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5357         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5358         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5359         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5360         new mutex implementation.
5361         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5362         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5363         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5364         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5365         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5366         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5367         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5368         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5369         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5370         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5371         symbol for entry point to avoid cancellation.
5373 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5375         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5376         changes.
5377         (SAVE_OLDTYPE_0): Fix a typo.
5379 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5381         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5382         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5384 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5386         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5387         correct offset.
5389 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5391         * Makefile (tests): Add tst-cancel19.
5392         * tst-cancel19.c: New test.
5394 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5396         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5397         restoring of the old cancellation type.
5399 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5401         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5403 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5405         * sysdeps/pthread/malloc-machine.h: New file
5407 2003-09-24  Roland McGrath  <roland@redhat.com>
5409         * allocatestack.c (__make_stacks_executable): Don't ignore return
5410         value from _dl_make_stack_executable.
5412 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5414         * allocatestack.c (__make_stacks_executable): Also change
5415         permission of the currently unused stacks.
5417         * allocatestack.c (change_stack_perm): Split out from
5418         __make_stacks_executable.
5419         (allocate_stack): If the required permission changed between the time
5420         we started preparing the stack and queueing it, change the permission.
5421         (__make_stacks_executable): Call change_stack_perm.
5423         * Makefile: Build tst-execstack-mod locally.
5424         * tst-execstack-mod.c: New file.
5426 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5428         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5430 2003-09-23  Roland McGrath  <roland@redhat.com>
5432         * tst-execstack.c: New file.
5433         * Makefile (tests): Add it.
5434         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5435         (LDFLAGS-tst-execstack): New variable.
5437         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5438         whether to use PROT_EXEC for stack mmap.
5439         (__make_stacks_executable): New function.
5440         * pthreadP.h: Declare it.
5441         * init.c (__pthread_initialize_minimal_internal): Set
5442         GL(dl_make_stack_executable_hook) to that.
5444 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5446         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5447         recommendation from AMD re avoidance of lock prefix.
5449 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5451         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5452         lll_futex_timed_wait instead of lll_futex_wait.
5453         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5454         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5455         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5456         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5457         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5458         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5459         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5460         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5461         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5462         Completely revamp the locking macros.  No distinction between
5463         normal and mutex locking anymore.
5464         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5465         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5466         __lll_lock_timedwait): Fix prototypes.
5467         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5468         __lll_lock_timedwait): Likewise.
5469         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5470         macros, add __builtin_expect.
5471         (lll_mutex_timedlock): Likewise.  Fix return value.
5472         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5473         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5474         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5475         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5476         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5477         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5478         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5479         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5481 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5483         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5484         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5485         operation if possible.
5487         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5488         like jumping over the lock prefix.
5490 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5492         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5493         locking macros.  No distinction between normal and mutex locking
5494         anymore.
5495         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5496         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5497         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5498         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5499         locking.  Merge bits from lowlevelmutex.S we still need.
5500         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5501         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5502         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5503         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5504         * Makefile (routines): Remove libc-lowlevelmutex.
5505         (libpthread-rountines): Remove lowlevelmutex.
5506         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5507         for new mutex implementation.
5508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5510         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5512         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5513         Likewise.
5514         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5515         Likewise.
5516         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5518         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5519         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5520         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5521         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5522         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5523         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5524         Likewise.
5525         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5526         Likewise.
5527         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5528         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5530         Don't use requeue.
5531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5532         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5534 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5536         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5537         in parameters of asm with output parameters.
5539         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5540         type of DECR parameter to int.
5541         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5543 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5545         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5546         guardsize for each thread.
5548 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5550         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5551         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5552         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5554         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5555         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5556         NULL.
5557         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5558         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5559         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5560         (pthread_getaffinity_np): Add hidden_def.
5562         * Makefile (tests): Add tst-attr3.
5563         * tst-attr3.c: New test.
5565         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5567 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5569         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5570         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5572 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5574         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5575         * tst-align.c: Include tst-stack-align.h.
5576         (tf, do_test): Use TEST_STACK_ALIGN macro.
5578 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5580         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5581         variable.
5583 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5585         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5586         stack-related values for the initial thread.
5588 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5590         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5592 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5594         * pthread_mutex_lock.c: Minor code rearrangements.
5596 2003-09-05  Roland McGrath  <roland@redhat.com>
5598         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5599         Instead, include ../nptl_db/db_info.c to do its magic.
5600         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5601         (__pthread_pthread_key_2ndlevel_size): Likewise.
5602         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5603         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5604         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5605         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5606         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5607         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5608         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5609         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5610         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5611         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5612         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5613         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5614         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5615         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5616         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5617         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5618         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5620 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5622         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5623         of pthread_t to be compatible with LT.
5624         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5625         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5626         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5627         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5628         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5629         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5630         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5632 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5634         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5636 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5638         * unwind-forcedunwind.c: Move to...
5639         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5640         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5641         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5642         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5643         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5644         * unwind.c: Include jmpbuf-unwind.h.
5645         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5647 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5649         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5650         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5651         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5652         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5653         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5654         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5655         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5656         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5657         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5658         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5659         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5660         function.
5661         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5662         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5663         * Makefile (tests): Add tst-stack2.
5664         * tst-stack2.c: New test.
5665         * tst-stack1.c: Include limits.h and sys/param.h.
5666         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5668         * pthread_condattr_setpshared.c: Include errno.h.
5669         (pthread_condattr_setpshared): Return EINVAL if pshared
5670         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5672         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5673         defined symbol for entry point to avoid cancellation.
5674         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5675         Likewise.
5676         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5677         Likewise.
5678         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5679         Likewise.
5680         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5681         Likewise.
5682         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5683         Likewise.
5684         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5685         __close_nocancel, __read_nocancel, __write_nocancel,
5686         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5687         libpthread.so or librt.so, define to corresponding function
5688         without _nocancel suffix.
5689         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5690         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5691         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5693         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5695 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5697         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5698         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5700         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5701         in subsections has a symbol associated with it.
5703         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5704         defined symbol for entry point to avoid cancellation.
5705         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5707 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5709         * Makefile (tests): Add tst-tls5.
5710         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5711         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5712         ($(objpfx)tst-tls5): New.
5713         ($(objpfx)tst-tls6.out): Likewise.
5714         (tests): Depend on $(objpfx)tst-tls6.out.
5715         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5716         (do_test): Check pthread_self () return value alignment.
5717         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5718         (tf): Check pthread_self () return value alignment.
5719         * tst-tls5.c: New test.
5720         * tst-tls5.h: New.
5721         * tst-tls5mod.c: New.
5722         * tst-tls5moda.c: New.
5723         * tst-tls5modb.c: New.
5724         * tst-tls5modc.c: New.
5725         * tst-tls5modd.c: New.
5726         * tst-tls5mode.c: New.
5727         * tst-tls5modf.c: New.
5728         * tst-tls6.sh: New test.
5730         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5731         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5732         * init.c (pthread_functions): Initialize them.
5733         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5734         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5735         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5736         pthread_cond_timedwait@@GLIBC_2.3.2.
5738 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5740         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5741         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5742         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5743         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5744         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5745         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5747         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5749         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5750         _POSIX_THREAD_PRIORITY_SCHEDULING.
5751         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5753 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5755         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5756         nested function, use static inline function from libio.h.
5757         Code by Richard Henderson.
5759         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5760         weak.
5762 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5764         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5765         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5766         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5767         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5768         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5769         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5770         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5771         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5772         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5773         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5774         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5775         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5776         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5777         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5778         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5779         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5780         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5781         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5782         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5783         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5784         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5785         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5786         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5787         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5788         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5789         * sysdeps/sparc/tls.h: New file.
5790         * sysdeps/sparc/tcb-offsets.sym: New file.
5791         * sysdeps/sparc/Makefile: New file.
5792         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5793         * init.c [__sparc__] (__NR_set_tid_address): Define.
5795 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5797         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5798         _IO_release_lock): Define.
5800 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5802         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5803         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5805 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5807         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5808         (__pthread_cleanup_class): Add missing return types of member
5809         functions.
5811 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5813         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5814         (lll_mutex_unlock_force): Add memory barrier between store and futex
5815         syscall.
5817 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5819         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5820         tempmsg in first loop.
5822 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5824         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5825         _POSIX_THREAD_PRIORITY_SCHEDULING.
5826         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5828 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5830         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5831         (__rtld_lock_default_lock_recursive,
5832         __rtld_lock_default_unlock_recursive): Define.
5833         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5834         __rtld_lock_unlock_recursive): Define using
5835         GL(_dl_rtld_*lock_recursive).
5836         * init.c (__pthread_initialize_minimal_internal): Initialize
5837         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5838         Lock GL(_dl_load_lock) the same number of times as
5839         GL(_dl_load_lock) using non-mt implementation was nested.
5841         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5842         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5844 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5846         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5847         PIPE_BUF.
5849 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5851         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5853 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5855         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5856         to first syscall error check.  Move syscall error check for tkill
5857         into __ASSUME_CLONE_STOPPED #ifdef.
5859 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5861         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5862         is not defined, do explicit synchronization.
5863         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5864         is not defined also unlock pd->lock for non-debugging case in case
5865         it is necessary.
5866         * pthread_create.c (start_thread): Always get and release pd->lock
5867         if __ASSUME_CLONE_STOPPED is not defined.
5868         (start_thread_debug): Removed.  Adjust users.
5869         * allocatestack.c (allocate_stack): Always initialize lock if
5870         __ASSUME_CLONE_STOPPED is not defined.
5871         * Makefile (tests): Add tst-sched1.
5872         * tst-sched1.c: New file.
5874         * sysdeps/pthread/createthread.c (do_clone): Only use
5875         sched_setschduler and pass correct parameters.
5877 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5879         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5880         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5881         PTHREAD_STACK_MIN in comments.
5883 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5885         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5886         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5887         argument.
5888         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5889         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5890         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5891         (__pthread_cleanup_upto): Fix prototype.
5892         (_longjmp_unwind): Adjust caller.
5893         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5894         Change second argument to const struct pointer.
5895         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5896         * tst-sem9.c (main): Likewise.
5897         * unwind.c: Include string.h for strlen prototype.
5899 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5902         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5903         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5904         Define HAVE_CMOV.
5905         Patch by Nicholas Miell <nmiell@attbi.com>.
5907 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5909         * init.c (__pthread_initialize_minimal_internal): Initialize
5910         GL(dl_init_static_tls).
5911         * pthreadP.h (__pthread_init_static_tls): New prototype.
5912         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5913         New functions.
5914         * Makefile (tests): Add tst-tls4.
5915         (modules-names): Add tst-tls4moda and tst-tls4modb.
5916         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5917         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5918         tst-tls4modb.so.
5919         * tst-tls4.c: New file.
5920         * tst-tls4moda.c: New file.
5921         * tst-tls4modb.c: New file.
5923 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5925         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5926         before __timer_dealloc.
5927         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5928         Don't call list_unlink.
5930 2003-07-29  Roland McGrath  <roland@redhat.com>
5932         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5934 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5936         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
5937         if __need_struct_pthread_size, instead define lll_lock_t.
5939 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5941         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5942         Don't reuse struct aiocb A if it failed.
5943         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5944         not just one byte, as that does not block.
5946 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5948         * sysdeps/pthread/unwind-resume.c: New file.
5949         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5950         unwind-resume in csu subdir.
5951         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5952         exceptions.
5953         (librt-sysdep_routines, librt-shared-only-routines): Add
5954         rt-unwind-resume.
5955         * sysdeps/pthread/rt-unwind-resume.c: New file.
5956         * unwind-forcedunwind.c: New file.
5957         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5958         (libpthread-shared-only-routines): Likewise.
5959         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5960         * pthreadP.h (pthread_cancel_init): New prototype.
5961         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5963         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5964         attr argument const struct pthread_attr *.
5966         * res.c (__res_state): Return __resp.
5967         * descr.h: Include resolv.h.
5968         (struct pthread): Add res field.
5969         * pthread_create.c: Include resolv.h.
5970         (start_thread): Initialize __resp.
5971         * Makefile (tests): Add tst-_res1.
5972         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5973         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5974         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5975         libpthread.
5976         * tst-_res1.c: New file.
5977         * tst-_res1mod1.c: New file.
5978         * tst-_res1mod2.c: New file.
5980 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5982         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5984         * Makefile: Define various *-no-z-defs variables for test DSOs
5985         which has undefined symbols.
5987 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5989         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5990         Retry if the stwcx fails to store once_control.
5992 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5994         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5995         pthread_attr_setaffinity.
5996         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5997         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5998         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5999         * pthread_attr_destroy.c: Free cpuset element if allocated.
6000         * pthread_create.c: Pass iattr as additional parameter to
6001         create_thread.
6002         * sysdeps/pthread/createthread.c: If attribute is provided and
6003         a new thread is created with affinity set or scheduling parameters,
6004         start thread with CLONE_STOPPED.
6005         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6006         pthread_attr_setaffinity.
6007         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6008         cpuset element.
6010 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6012         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6014 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6016         * sysdeps/pthread/configure.in: Require CFI directives also for
6017         ppc and s390.
6019 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6021         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6022         Add cfi directives.
6024 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6026         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6027         CLEANUP_JMP_BUF.
6028         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6029         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6030         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6031         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6032         not self pointer in __writer.  Compare with TID to determine
6033         deadlocks.
6034         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6035         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6036         Likewise.
6037         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6038         Likewise.
6039         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6040         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6041         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6042         macros also when compiling librt.
6044 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6046         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6047         -fasynchronous-unwind-tables.
6048         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6049         (PSEUDO): Add cfi directives.
6050         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6051         Likewise.
6052         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6053         Likewise.
6055 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6057         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6058         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6059         * unwind.c (__pthread_unwind_next): Add hidden_def.
6060         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6061         Likewise.
6062         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6063         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6064         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6065         Likewise.
6066         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6067         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6068         Likewise.
6069         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6070         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6071         __pthread_unregister_cancel and __pthread_unwind_next.
6073 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6075         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6076         different symbol for the cancellation syscall wrapper and
6077         non-cancellation syscall wrapper.
6078         (PSEUDO_END): Define.
6080 2003-07-05  Richard Henderson  <rth@redhat.com>
6082         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6083         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6084         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6085         return actual return value from the syscall, not 0.
6087 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6089         * descr.h (struct pthread): Add pid field.
6090         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6091         (__reclaim_stacks): Likewise.
6092         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6093         also check for PID of the signal source.
6094         (__pthread_initialize_minimal_internal): Also initialize pid field
6095         of initial thread's descriptor.
6096         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6097         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6098         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6099         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6100         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6102 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6104         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6105         Fix use of parameter.
6106         (__libc_cleanup_pop): Likewise.
6108 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6110         * init.c (sigcancel_handler): Change parameters to match handler
6111         for SA_SIGACTION.  Check signal number and code to recognize
6112         invalid invocations.
6114 2003-07-03  Roland McGrath  <roland@redhat.com>
6116         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6117         Apply sizeof (struct pthread) bias to r13 value.
6119 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6121         * sysdeps/pthread/configure.in: Require CFI directives.
6123         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6124         definition.
6125         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6126         libpthread compilation.
6127         * unwind.c (__pthread_unwind): Add hidden_def.
6128         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6130 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6132         * libc-cancellation.c (__libc_cleanup_routine): Define.
6133         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6134         (__pthread_cleanup_pop): Define.
6136 2003-07-01  Richard Henderson  <rth@redhat.com>
6138         * sysdeps/alpha/elf/pt-initfini.c: New file.
6139         * sysdeps/alpha/pthread_spin_lock.S: New file.
6140         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6141         * sysdeps/alpha/pthreaddef.h: New file.
6142         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6143         * sysdeps/alpha/tls.h: New file.
6144         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6145         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6146         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6147         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6148         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6149         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6150         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6151         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6152         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6153         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6155 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6157         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6158         cleanup support and unwind info.
6160 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6162         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6163         Use correct cleanup handler registration.  Add unwind info.
6164         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6165         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6166         * tst-once3.c: Add cleanup handler and check it is called.
6167         * tst-once4.c: Likewise.
6168         * tst-oncex3.c: New file.
6169         * tst-oncex4.c: New file.
6170         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6172 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6174         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6176 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6178         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6179         (tf_msgsnd): Likewise.
6181         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6182         premature returns a bit more.
6184 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6186         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6187         definition to the front.
6189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6190         the cleanup functions to make the names unique.  Fix dwarf opcode
6191         un unwind table.
6192         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6193         functions to make the names unique.  Fix CFA offset for two blocks.
6195 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6197         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6198         missing closing braces.
6199         Patch by Christophe Saout <christophe@saout.de>.
6201 2003-06-24  Roland McGrath  <roland@redhat.com>
6203         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6205 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6207         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6208         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6210         * pthreadP.h: Declare __find_thread_by_id.
6211         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6212         * pthread_clock_gettime.c: Allow using other thread's clock.
6213         * pthread_clock_settime.c: Likewise.
6214         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6215         * Makefile: Add rules to build and run tst-clock2.
6216         * tst-clock2.c: New file.
6218 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6220         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6221         to use exception-based cleanup handler.
6222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6224         * tst-cond8.c (ch): Announce that we are done.
6226         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6228         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6229         Also test aio_suspend with timeout value.
6231 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6233         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6234         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6235         attribute_hidden.
6237         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6238         (__pthread_mutex_lock_internal): Likewise.
6239         (__pthread_mutex_unlock_internal): Likewise.
6240         (__pthread_mutex_unlock_usercnt): Declare.
6241         * pthread_mutex_destroy.c: Always fail if used in any way.
6242         * pthread_mutex_init.c: Update comment.
6243         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6244         * pthread_mutex_timedlock.c: Adjust __nusers.
6245         * pthread_mutex_trylock.c: Adjust __nusers.
6246         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6247         and public interfaces are wrapper with pass additional parameter.
6248         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6249         parameter zero.
6250         * tst-mutex8.c: New file.
6251         * Makefile (tests): Add tst-mutex8.
6252         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6253         __pthread_mutex_unlock_usercnt.
6254         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6257         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6258         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6259         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6260         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6261         Add __nusers.
6262         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6263         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6264         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6265         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6266         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6268         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6269         * pthread_mutex_timedlock.c: Likewise.
6270         * pthread_mutex_trylock.c: Adjust __nusers.
6271         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6272         * tst-mutex9.c: New file.
6273         * Makefile (tests): Add tst-mutex9.
6274         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6275         * sysdeps/ia64/tls.h: Likewise.
6276         * sysdeps/powerpc/tls.h: Likewise.
6277         * sysdeps/s390/tls.h: Likewise.
6278         * sysdeps/sh/tls.h: Likewise.
6279         * sysdeps/x86_64/tls.h: Likewise.
6280         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6281         Change type of __owner.
6282         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6283         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6284         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6285         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6286         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6288 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6290         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6291         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6293         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6294         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6295         instead of nr to lll_futex_wake.  Only set errno and return -1
6296         if err < 0.
6298         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6299         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6300         return actual return value from the syscall, not 0.
6302 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6304         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6305         find a random value.
6306         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6307         errno==EIDRM.
6309         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6310         compat_timer_settime.
6311         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6312         compat_timer_gettime.
6313         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6314         compat_timer_getoverrun.
6315         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6316         compat_timer_delete.
6318         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6319         error-checking mutex detect busy mutexes.
6321 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6323         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6324         Add ax to clobber list.
6325         (lll_mutex_cond_lock): Likewise.
6326         (lll_mutex_unlock): Likewise.
6327         (lll_lock): Likewise.
6328         (lll_unlock): Likewise.
6330         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6331         * tst-cancel18.c: New file.
6332         * tst-cancelx18.c: New file.
6334         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6335         and tcdrain.
6337         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6338         * tst-cancel17.c: New file.
6339         * tst-cancelx17.c: New file.
6341         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6342         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6343         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6345         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6347 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6349         * sysdeps/pthread/createthread.c (create_thread): Set
6350         header.multiple_threads unconditionally.
6351         * allocatestack.c (allocate_stack): Likewise.
6352         * descr.h (struct pthread): Add header.multiple_threads
6353         unconditionally.
6354         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6355         Define for librt.  #error if neither libpthread, libc nor librt.
6356         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6357         Likewise.
6358         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6359         CDISABLE): Likewise.
6360         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6361         CDISABLE): Likewise.
6362         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6363         CDISABLE): Likewise.
6364         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6365         CDISABLE): Likewise.  Access header.multiple_threads outside of
6366         libc and libpthread.
6367         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6368         Likewise.
6369         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6370         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6372 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6374         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6375         Also test early cancellation before the thread reaches the cancellation
6376         point.
6378         * Makefile: Compile forward.c with exceptions.
6380         * sysdeps/unix/sysv/linux/sleep.c: New file.
6382 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6384         * Makefile: Add CFLAGS definition to compile function wrappers
6385         duplicated from libc with exceptions.
6386         * tst-cancel4.c: Also check cancellation handlers.
6388         * Makefile: Add rules to build and run tst-cancel16 and
6389         tst-cancelx16.  Add missing CFLAGS definitions.
6390         * tst-cancel16.c: New file.
6391         * tst-cancelx16.c: New file.
6393 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6395         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6396         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6397         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6398         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6400         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6401         (LIBC_CANCEL_RESET): Likewise.
6402         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6403         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6404         librt-cancellation.
6405         (CFLAGS-libcrt-cancellation.c): Define.
6406         * sysdeps/pthread/librt-cancellation.c: New file.
6407         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6408         macros also when compiling librt.
6409         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6410         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6411         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6412         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6413         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6414         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6415         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6417         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6418         compat_timer_create.
6420 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6422         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6424         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6425         __register_atfork.
6426         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6427         Add libc_hidden_def.
6429 2003-06-13  Roland McGrath  <roland@redhat.com>
6431         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6432         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6434 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6436         * allocatestack.c (queue_stack): Always inline.
6437         * ptreadhP.h (__do_cancel): Likewise.
6439 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6441         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6442         a typo.
6444 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6447         (__pthread_cond_signal): Remove incorrect second addition for
6448         cond_lock!=0.
6450 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6453         (__pthread_cond_signal): Use correct futex pointer in
6454         __lll_mutex_lock_wait call.
6456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6457         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6459 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6461         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6462         cancelable.
6463         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6464         Likewise.
6466         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6467         hand-written CFI generation code.  Since ENTRY/END also initiated
6468         CFI frames this caused two CFI sets to be generated.
6470 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6472         * cleanup_routine.c: New file.
6473         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6474         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6475         cleanup handling.
6476         * Makefile (libpthread-routines): Add cleanup_routine.
6477         Add more CFLAGS variables to compile with exceptions.  Add comments
6478         why which file needs unwind tables.
6479         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6480         tests.
6481         * tst-cancelx1.c: New file.
6482         * tst-cancelx2.c: New file.
6483         * tst-cancelx3.c: New file.
6484         * tst-cancelx4.c: New file.
6485         * tst-cancelx5.c: New file.
6486         * tst-cancelx6.c: New file.
6487         * tst-cancelx7.c: New file.
6488         * tst-cancelx8.c: New file.
6489         * tst-cancelx9.c: New file.
6490         * tst-cancelx10.c: New file.
6491         * tst-cancelx11.c: New file.
6492         * tst-cancelx12.c: New file.
6493         * tst-cancelx13.c: New file.
6494         * tst-cancelx14.c: New file.
6495         * tst-cancelx15.c: New file.
6496         * tst-cleanupx0.c: New file.
6497         * tst-cleanupx0.expect: New file.
6498         * tst-cleanupx1.c: New file.
6499         * tst-cleanupx2.c: New file.
6500         * tst-cleanupx3.c: New file.
6502         * tst-cleanup0.c: Make standard compliant.
6503         * tst-cleanup1.c: Likewise.
6505         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6506         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6507         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6508         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6509         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6510         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6511         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6512         CLEANUP_JMP_BUF.
6513         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6514         * tst-cancel12.c: New file.
6515         * tst-cancel13.c: New file.
6516         * tst-cancel14.c: New file.
6517         * tst-cancel15.c: New file.
6518         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6519         and tst-cancel15.
6521         * tst-cancel1.c: Add some comments.
6523         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6524         timeout correctly.
6526 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6528         * Makefile (CFLAGS-pthread_cancel.c): Define.
6530 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6532         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6533         Change type of __writer element to int.
6534         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6535         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6536         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6537         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6538         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6539         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6540         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6541         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6542         Compare with TID to determine deadlocks.
6543         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6544         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6545         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6546         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6547         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6548         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6549         Likewise.
6550         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6551         Likewise.
6552         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6553         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6554         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6555         Likewise.
6556         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6557         Likewise.
6558         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6559         * Makefile (tests): Add tst-rwlock12.
6560         * tst-rwlock12.c: New file.
6562 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6564         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6565         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6566         Remove bogus hidden_proto.
6567         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6568         Likewise.
6569         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6570         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6571         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6572         ___lll_mutex_timedlock): Likewise.
6574 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6577         (__pthread_cond_signal): Add some code to eventually handle
6578         cond_lock!=0.
6580 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6582         * Makefile (tests): Add tst-exec4.
6583         (tst-exec4-ARGS): Define.
6584         * tst-exec4.c: New file.
6586 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6588         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6589         Also fail if tv_nsec < 0.
6590         (__lll_timedwait_tid): Likewise.
6591         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6592         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6593         Likewise.
6594         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6595         Likewise.
6596         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6597         Likewise.
6598         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6599         Likewise.
6600         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6601         Likewise.
6602         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6603         Likewise.
6605         * Makefile (tests): Add tst-sem8 and tst-sem9.
6606         * tst-sem8.c: New file.
6607         * tst-sem9.c: New file.
6608         * sem_open.c: Fix creation of in_use record if the file exists but
6609         no internal record.
6611         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6612         definitions.
6614         * sysdeps/pthread/timer_create.c (timer_create): In case
6615         evp==NULL, assign timer ID to sival_ptr.
6617         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6618         struct pthread_unwind_buf *.
6619         (struct pthread): Likewise for cleanup_jmp_buf element.
6621         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6622         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6623         * unwind.c (__pthread_unwind_next): Likewise.
6625 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6627         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6628         (lll_futex_timed_wait): Use int for futex value parameter.
6629         (lll_futex_wake): Likewise.
6630         (lll_futex_requeue): Likewise.
6632         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6633         Replace one memory operation with one register operation.
6635         * tst-join4.c (do_test): Fix error message.
6637         * tst-rwlock6.c (do_test): Use correct format specifier.
6639         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6640         (__lll_mutex_lock_wait): Replace one memory operation with one
6641         register operation.
6642         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6643         (__lll_mutex_lock_wait): Likewise.
6645         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6646         (__lll_mutex_cond_lock): Add one to value parameter of
6647         __lll_lock_wait to reflect reality in the futex syscall.
6648         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6649         (lll_mutex_cond_lock): Likewise.
6651 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6653         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6654         New function.
6655         (lll_mutex_cond_lock): Define.
6657 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6659         * Makefile (tests): Add tst-signal6.
6660         * tst-signal6.c: New file.
6662         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6663         (__lll_mutex_unlock_force): New function
6664         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6666         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6667         (__lll_mutex_unlock_force): New function.
6668         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6670         * tst-rwlock7.c (do_test): Use correct format specifier.
6672         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6673         Find break parameter in correct asm argument.
6675 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6677         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6678         Remove out4.
6679         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6680         error occured.
6681         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6682         Add __mutex.
6683         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6684         lll_futex_requeue, lll_mutex_unlock_force): Define.
6686 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6688         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6689         (pthread_cond_t): Add __mutex.
6690         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6691         lll_futex_requeue, lll_mutex_unlock_force): Define.
6693 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6695         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6696         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6697         Add __mutex field.
6698         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6699         Define.
6700         (lll_futex_wait, lll_futex_wake): Define.
6701         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6702         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6703         FUTEX_REQUEUE instead of FUTEX_WAIT.
6704         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6705         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6706         mutex which was used in condvar structure.  Call
6707         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6708         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6710         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6711         include tcb-offsets.h.  Read wakeup value in locked region.
6712         Use the value of gbr register as THREAD_ID.
6713         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6714         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6715         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6717         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6718         macros.
6720 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6722         * sysdeps/pthread/pthread_cond_broadcast.c
6723         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6725 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6727         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6728         typo in register name.
6729         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6730         correctly.  Actually use requeue.  Little optimization.
6731         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6732         mutex address early.  Handle cancellation state as 32-bit value.
6733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6734         Remove unnecessary label.
6736 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6738         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6739         instead of FUTEX_WAIT.
6740         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6743         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6744         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6745         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6746         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6747         of __pthread_mutex_lock_internal.
6748         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6749         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6750         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6751         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6752         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6753         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6754         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6755         Add pthread_mutex_cond_lock.
6756         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6757         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6758         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6759         lll_mutex_cond_lock.
6760         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6761         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6762         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6763         Add __mutex field.
6764         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6765         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6767         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6768         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6770         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6771         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6772         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6773         macro don't define aliases.
6775         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6776         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6777         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6778         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6779         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6780         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6781         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6782         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6785 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6787         * sem_open.c: Fix one endless loop.  Implement correct semantics
6788         wrt opening the same semaphore more then once.
6789         * sem_close.c: Adjust for sem_open change.
6790         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6791         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6792         * Makefile (tests): Add tst-sem7.
6793         * tst-sem7.c: New file.
6795 2003-05-16  Roland McGrath  <roland@redhat.com>
6797         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6798         uninitialized variable braino.
6800 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6802         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6803         test for syscall availability.
6805         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6806         __no_posix_timers to -1 if the syscalls don't exist.
6808         * pthread_join.c (pthread_join): Set tid field of the joined
6809         thread to -1.  This isn't necessary but helps to recognize some
6810         error conditions with almost no cost.
6812         * allocatestack.c (FREE_P): Also negative values indicate an
6813         unused stack.
6815         * unwind.c: Include <unistd.h>.
6817 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6819         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6821 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6823         * Makefile (crti-objs, crtn-objs): New variables.
6824         (omit-deps, extra-objs): Add crtn.
6825         ($(objpfx)libpthread.so): Depend on both crti and crtn
6826         and links to them in multidir.
6827         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6829 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6831         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6832         (lll_mutex_unlock): Use atomic_exchange_rel.
6834 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6836         * cond-perf.c (cons): Add missing locking around setting of alldone.
6838 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6840         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6841         related macros.
6842         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6844 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6846         * tst-sem6.c: New file.
6847         * Makefile (tests): Add tst-sem6.
6849         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6850         Use atomic_exchange_rel instead of atomic_exchange.
6851         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6852         Likewise.
6854         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6855         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6856         vsyscall is possible.
6858         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6859         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6860         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6861         pthread_setaffinity_np.
6862         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6863         and pthread_setaffinity_np.
6864         * Makefile (libpthread-routines): Add pthread_getaffinity and
6865         pthread_setaffinity.
6867         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6868         use it in case mmap to allocate the stack fails.
6869         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6870         ARCH_MAP_FLAGS here.
6871         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6872         ARCH_RETRY_MMAP.
6874 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6876         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6877         handler implementation.  It is now lockless in fork().
6878         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6879         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6880         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6881         declare the __fork_*_lists.
6882         (struct fork_handler): Include pointers to all three functions.
6883         Add next, refcntr and need_signal elements.
6884         (__fork_handlers): New declaration.
6885         (__register_atfork_malloc): Remove declaration.
6886         (HAVE_register_atfork_malloc): Remove definition.
6887         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6888         __pthread_child_handler variable.
6889         (__libc_pthread_init): Use __register_atfork instead of explicitly
6890         adding to the list.
6891         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6892         and lll_futex_wake.
6893         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6895         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6896         function must never be reached.
6898         * cond-perf.c: New file.
6900 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6902         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6904 2003-05-04  Roland McGrath  <roland@redhat.com>
6906         * Makefile ($(objpfx)../libc.so): New target.
6908 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6910         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6911         (pthread_condattr_t): Size is only an int, don't use long for
6912         alignment.
6913         (pthread_mutexattr_t): Likewise.
6914         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6915         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6916         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6918 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6920         * sysdeps/i386/tls.h: Define THREAD_ID.
6921         * sysdeps/ia64/tls.h: Likewise.
6922         * sysdeps/powerpc/tls.h: Likewise.
6923         * sysdeps/s390/tls.h: Likewise.
6924         * sysdeps/sh/tls.h: Likewise.
6925         * sysdeps/x86_64/tls.h: Likewise.
6926         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6927         record ownership.
6928         * pthread_mutex_timedlock.c: Likewise.
6929         * pthread_mutex_trylock.c: Likewise.
6930         * pthread_mutex_unlock.c: Likewise.
6931         * pthread_rwlock_trywrlock.c: Likewise.
6932         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6933         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6934         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6935         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6937         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6938         flag.
6940 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6942         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6943         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6944         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6945         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6946         Make __align long long instead of long.
6947         (pthread_rwlock_t): Formatting.
6948         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6949         (pthread_rwlock_t): Formatting.
6950         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6951         (pthread_cond_t): Make __align long long instead of long.
6952         (pthread_rwlock_t): Move __flags field to the same position as in
6953         linuxthreads.
6955 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6957         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6958         * tst-rwlock7.c (do_test): Likewise.
6960 2003-04-26  Roland McGrath  <roland@redhat.com>
6962         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6964 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6966         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6967         sizeof (struct pthread).
6968         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6969         1 struct pthread.
6970         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6971         to 0.
6972         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6973         struct pthread.
6974         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6975         to 32-bit bytes.
6976         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6977         tcbp.
6978         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6979         unneccessarily.
6980         (NO_TLS_OFFSET): Define.
6981         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6982         add TLS_TCB_SIZE unnecessarily.
6984 2003-04-22  Roland McGrath  <roland@redhat.com>
6986         * Makeconfig (shared-thread-library): Reverse link order to work
6987         around linker bug.
6989 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6991         * semaphore.h: Fix typo in comment.
6993 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6995         * sysdeps/pthread/sigfillset.c: New file.
6997         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6998         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6999         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7000         * sysdeps/pthread/sigaction.c: Likewise.
7001         * sysdeps/pthread/sigprocmask.c: New file.
7002         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7003         __SIGRTMIN+1.
7004         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7005         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7006         in this case.
7008 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7010         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7011         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7013         * sysdeps/unix/sysv/linux/unregister-atfork.c
7014         (__unregister_atfork): Don't free memory not allocated dynamically.
7016         * semaphore.h: Remove __THROW marker from cancellation points.
7017         * nptl/sysdeps/pthread/pthread.h: Likewise.
7019 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7021         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7022         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7023         __THROW.
7025 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7027         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7029 2003-04-15  Roland McGrath  <roland@redhat.com>
7031         * forward.c (__pthread_unwind): Tweak to avoid warning.
7033 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7035         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7037 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7039         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7040         overflow CFA advance instructions.
7041         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7043 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7045         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7046         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7047         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7048         defined.
7050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7051         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7052         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7053         DW_CFA_advance_loc for .Laddl-.Lsubl.
7055 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7057         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7058         position-independent unwind data for static libraries.
7059         Add missing unwind info.  Add comments.
7061         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7062         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7063         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7064         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7066 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7068         * Makefile: Make sure all cancellation points are compiled with
7069         exception and asynchronous unwind tables.
7071         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7072         which mishandles loading of global object addresses in PIC.
7073         (THREAD_SETMEM_NC): Likewise.
7075 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7077         * pthread.h: Define new data structure for cleanup buffer.  Declare
7078         new cleanup handler interfaces.
7079         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7080         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7081         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7082         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7083         it.  Declare old cleanup handler installation functions.
7084         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7085         handling.
7086         * cleanup_defer.c: Likewise.
7087         * cleanup_compat.c: New file.  Old cleanup code.
7088         * cleanup_def_compat.c: New file.  Old cleanup code.
7089         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7090         if own thread descriptor.
7091         * unwind.c: New file.
7092         * forward.c: Add __pthread_unwind.
7093         * init.c (pthread_functions): Add __pthread_unwind.
7094         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7095         Add ptr___pthread_unwind.
7096         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7097         and unwind function.
7098         * Makefile (libpthread-routines): Add cleanup_compat,
7099         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7100         table generation if necessary.
7101         * version.c: Record whether unwind support is compiled in.
7102         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7103         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7104         handler interfaces.
7105         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7106         complication to generate unwind information for syscall wrappers.
7107         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7108         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7109         __cleanup_fct_attribute.
7111         * Makefile: Add rules to build and run tst-cleanup0.
7112         * tst-cleanup0.c: New file.
7113         * tst-cleanup0.expect: New file.
7115         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7116         caller.  Optimize to avoid often unecessary local variable.
7118 2003-04-11  Roland McGrath  <roland@redhat.com>
7120         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7121         sets variable `multidir'; include that.
7122         (generated): Add it.
7123         ($(objpfx)$(multidir)/crti.o): New target.
7124         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7126 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7128         * tst-attr2.c (do_test): Add cast to avoid warning.
7129         * tst-mutex4.c (do_test): Likewise.
7131 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7133         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7134         in child.
7136 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7138         * Makefile (tests): Add tst-detach1.
7139         * tst-detach1.c: New file.
7141 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7143         * sysdeps/pthread/pthread.h: Remove duplicate
7144         pthread_cleanup_{push,pop} definitions.
7146         * tst-barrier2.c: Eliminate warnings.
7147         * tst-cancel4.c: Likewise.
7148         * tst-cond4.c: Likewise.
7149         * tst-cond6.c: Likewise.
7150         * tst-detach1.c: Likewise.
7151         * tst-rwlock4.c: Likewise.
7152         * tst-rwlock6.c: Likewise.
7153         * tst-rwlock7.c: Likewise.
7154         * tst-sem3.c: Likewise.
7155         * tst-spin2.c: Likewise.
7156         * tst-umask1.c: Likewise.
7158 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7160         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7162 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7164         * descr.h (struct pthread): Move cancelhandling member to the front.
7166 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7168         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7169         malloc_parent, and malloc_child statically.
7170         (__register_atfork_malloc): New function.
7171         (free_mem): Don't free any of the malloc_* variables on the list.
7172         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7173         Define HAVE_register_atfork_malloc.
7175 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7177         * sysdeps/pthread/createthread.c (create_thread): Add some more
7178         comments explaining when to set multiple_threads and when not.
7180         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7181         THREAD_ATOMIC_BIT_SET if not already defined.
7182         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7183         THREAD_ATOMIC_BIT_SET:
7184         * sysdeps/x86_64/tls.h: Likewise.
7185         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7186         THREAD_ATOMIC_CMPXCHG_VAL.
7187         (_pthread_cleanup_pop_restore): Likewise.
7188         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7189         (__pthread_enable_asynccancel_2): Likewise.
7190         (__pthread_disable_asynccancel): Likewise.
7191         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7192         (__libc_disable_asynccancel): Likewise.
7193         * init.c (sigcancel_handler): Likewise.
7194         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7195         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7197 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7199         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7200         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7201         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7202         * Makefile (tests): Add tst-cancel11.
7203         * tst-cancel11.c: New file.
7205 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7207         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7208         round, not the first.  Use specific_used flag instead of local
7209         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7210         (__free_tcb): Don't call deallocate_tsd here.
7211         (start_thread): Call deallocate_tsd here.
7212         * pthread_setspecific.c: Set specific_used flag really only when
7213         needed.
7214         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7215         * tst-tsd3.c: New file.
7216         * tst-tsd4.c: New file.
7218 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7220         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7221         Use atomic_exchange_and_add instead of __lll_add.
7222         (__lll_mutex_timedlock): Likewise.
7223         Patch by Ian Wienand.
7225 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7227         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7228         (SINGLE_THREAD_P): Fix typo.
7229         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7231 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7233         * Makefile (tests): Add tst-align.
7234         * tst-align.c: New file.
7235         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7237         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7238         function correctly.
7240         * tst-tsd2.c: Add casts to avoid warnings.
7242 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7244         * descr.h (struct pthread): Move most often used elements to the front.
7246 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7248         * Makefile (libpthread-routines): Add pthread_atfork.
7249         (libpthread-static-only-routines): Add pthread_atfork.
7251 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7253         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7254         of TLS_DTV_AT_TP.
7255         (INSTALL_DTV): Add parens.
7256         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7257         Use passed descr instead of THREAD_SELF.
7258         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7259         (__lll_mutex_timedlock_wait): Correct expected value after
7260         spurious wakeup.
7261         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7262         Release lock before waking up the waiters.
7263         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7264         criteria.  Reorderstruct passed to cleanup handler.  Fix
7265         handling of cancellation and failung pthread_mutex_unlock call.
7266         Use __pthread_enable_asynccancel_2 instead of
7267         __pthread_enable_asynccancel.
7268         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7269         Return result of lock re-get if it fails.
7270         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7271         for __pthread_cleanup_push.
7272         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7273         completely broken rwlock implementation.
7274         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7275         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7276         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7277         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7278         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7279         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7280         versioned_symbol macro.
7281         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7282         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7284 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7286         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7287         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7288         and __helper_tid.
7289         (struct timer): Remove th and bar field.
7290         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7291         debugging code.  Create only one helper thread.
7292         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7293         helper thread.
7294         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7295         Renamed.  Define statically.  Use thread info from siginfo.
7296         (__helper_once): New variable.
7297         (__helper_tid): New variable.
7298         (__reset_helper_control): New function.
7299         (__start_helper_thread): New function.
7301         * pthread_create.c (start_thread): Don't use setjmp inside
7302         __builtin_expect to work around gcc bug.
7304         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7305         timer_delete syscall fails, but not with ENOSYS, set
7306         __no_posix_timers.
7308         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7309         (timer_settime): Fix typo.
7310         * sysdeps/unix/sysv/linux/timer_getoverr.c
7311         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7313 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7316         offset of cleanupbuf.__prev.
7318 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7320         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7321         of included file.
7323 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7325         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7326         NULL provide default definition to syscall.
7328 2003-03-25  Roland McGrath  <roland@redhat.com>
7330         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7331         (timer_id2ptr): Fix typo.
7333 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7335         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7336         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7337         * sysdeps/ia64/pthreaddef.h: Likewise.
7338         * sysdeps/powerpc/pthreaddef.h: Likewise.
7339         * sysdeps/s390/pthreaddef.h: Likewise.
7340         * sysdeps/sh/pthreaddef.h: Likewise.
7341         * sysdeps/x86_64/pthreaddef.h: Likewise.
7342         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7343         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7344         being changed.
7345         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7346         SIGTIMER is not unblocked.
7347         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7348         RT signal taken.
7349         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7350         be send.
7351         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7352         pass pointer through as ID.
7353         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7354         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7355         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7356         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7357         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7358         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7359         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7360         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7361         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7362         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7363         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7364         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7365         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7366         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7367         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7368         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7369         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7370         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7371         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7372         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7373         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7374         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7375         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7376         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7377         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7378         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7379         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7380         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7381         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7382         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7383         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7384         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7385         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7387         * pthreadP.h: Remove FRAME_LEFT definition.
7388         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7389         already left frame.  Programs which have this problem are not POSIX
7390         compliant.
7391         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7393 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7395         * sysdeps/pthread/tst-timer.c: Check return values of the
7396         functions we test.
7398 2003-03-23  Roland McGrath  <roland@redhat.com>
7400         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7401         * tst-tls3mod.c: Likewise.
7402         * tst-tls1.c: Likewise.
7403         * tst-tls2.c: Likewise.
7405         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7406         undefined behavior.
7408         * tst-join5.c (tf1, tf2): Add a cast.
7410         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7412         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7413         Don't test anything.
7414         * tst-cond4.c: Likewise.
7415         * tst-cond6.c: Likewise.
7416         * tst-flock2.c: Likewise.
7417         * tst-mutex4.c: Likewise.
7418         * tst-rwlock4.c: Likewise.
7419         * tst-signal1.c: Likewise.
7420         * tst-spin2.c: Likewise.
7421         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7423         * tst-mutex4.c: Use test-skeleton.c.
7424         * tst-spin2.c: Likewise.
7425         * tst-sysconf.c: Likewise.
7426         * tst-barrier2.c: Likewise.
7427         * tst-cond4.c: Likewise.
7428         * tst-cond6.c: Likewise.
7429         * tst-rwlock4.c: Likewise.
7430         * tst-unload.c: Likewise.
7431         * tst-flock2.c (do_test): Use return instead of exit.
7433 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7435         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7437 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7439         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7440         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7441         instead of __lll_compare_and_swap.
7442         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7443         Likewise.
7444         Removed definition if __lll_compare_and_swap.
7446         * cancellation.c: Adjust for new form of compare&exchange macros.
7447         * cleanup_defer.c: Likewise.
7448         * init.c: Likewise.
7449         * libc-cancellation.c: Likewise.
7450         * old_pthread_cond_broadcast.c: Likewise.
7451         * old_pthread_cond_signal.c: Likewise.
7452         * old_pthread_cond_timedwait.c: Likewise.
7453         * old_pthread_cond_wait.c: Likewise.
7454         * pthread_cancel.c: Likewise.
7455         * pthread_create.c: Likewise.
7456         * pthread_detach.c: Likewise.
7457         * pthread_join.c: Likewise.
7458         * pthread_key_delete.c: Likewise.
7459         * pthread_setcancelstate.c: Likewise.
7460         * pthread_setcanceltype.c: Likewise.
7461         * pthread_timedjoin.c: Likewise.
7462         * pthread_tryjoin.c: Likewise.
7463         * sysdeps/pthread/createthread.c: Likewise.
7465 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7467         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7468         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7469         definitions.  Replace uses with calls to atomic_* functions.
7470         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7471         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7472         __lll_test_and_set calls with atomic_exchange_and_add and
7473         atomic_exchange calls respectively.
7474         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7475         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7476         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7477         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7478         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7479         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7480         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7482         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7483         returns the old value.
7485 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7487         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7488         int for variable OLDVAL and correct inline assembler contraint.
7489         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7490         type int for variable OLD.
7492         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7493         only for s390-32.
7494         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7495         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7496         instead of multiple_threads field in the TCB.
7498 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7500         * sysdeps/i386/i686/bits/atomic.h: Removed.
7501         * sysdeps/i386/i586/bits/atomic.h: Removed.
7502         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7503         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7504         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7505         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7506         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7507         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7508         * atomic.h: Removed.  Moved to glibc.
7510         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7511         support for clock selection.
7513         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7514         signalling waiters.
7516 2003-03-18  Roland McGrath  <roland@redhat.com>
7518         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7519         Add __lll_rel_instr first.  Add memory clobber.
7520         (lll_mutex_unlock): Use __lll_test_and_set.
7521         From Paul Mackerras <paulus@samba.org>.
7523         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7524         unconditionally.
7525         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7526         (SINGLE_THREAD_P):  Add `header.' prefix.
7527         From Paul Mackerras <paulus@samba.org>.
7529         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7530         pthread_timedjoin_np to ...
7531         (libpthread: GLIBC_2.3.3): ... here.
7532         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7534         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7535         Avoid shadowing VAL variable.
7537         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7538         New macro.
7540 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7542         * Makefile (tests): Add tst-cond11.
7543         * tst-cond11.c: New file.
7545         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7546         struct passed to cleanup handler to eliminate one more
7547         instruction.
7548         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7550         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7551         (pthrad_cond_t): Replace __unused field with __clock.
7553         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7554         waken all waiters in cleanup handler.
7555         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7556         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7558         * pthread_condattr_getclock.c: New file.
7559         * pthread_condattr_setclock.c: New file.
7560         * sysdeps/pthread/pthread.h: Declare these new functions.
7561         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7562         * Makefile (libpthread-routines): Add the new functions.
7563         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7564         Renamed field to value.  Document use of the bits.
7565         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7566         change.
7567         * pthread_condattr_setpshared.c: Likewise.
7568         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7569         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7570         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7571         Add __clock field.
7572         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7573         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7574         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7575         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7577         Implement clock selection.
7578         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7579         * pthread-errnos.sym: Add ENOSYS.
7580         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7581         _POSIX_CLOCK_SELECTION.
7582         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7584         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7585         invalid .size directive.
7587 2003-03-17  Roland McGrath  <roland@redhat.com>
7589         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7590         Formatting tweaks.
7592 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7594         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7595         Use __lll_add instead of spelling it out.  Use protected symbol names.
7596         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7597         Use __lll_add.
7598         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7599         Renamed from lll_compare_and_swap.  Use new name where necessary.
7600         (__lll_add): Defined.
7601         (__lll_dec_if_positive): Defined.
7602         (__lll_test_and_set): Defined.
7603         * sysdeps/ia64/pthread_spin_init.c: Removed.
7604         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7605         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7606         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7607         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7608         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7609         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7610         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7611         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7612         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7613         __sync_lock_release_si.
7614         Patch by Jakub Jelinek.
7616         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7617         Fix timeout handling.
7618         (__lll_timedwait_tid): Likewise.
7619         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7620         Patch by Jakub Jelinek.
7622         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7624 2003-03-17  Roland McGrath  <roland@redhat.com>
7626         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7627         * sysdeps/pthread/pthread_spin_init.c: New file.
7628         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7629         * sysdeps/powerpc/Makefile: New file.
7630         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7631         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7632         * sysdeps/powerpc/pthreaddef.h: New file.
7633         * sysdeps/powerpc/tcb-offsets.sym: New file.
7634         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7635         * sysdeps/powerpc/tls.h: New file.
7636         * sysdeps/powerpc/bits/atomic.h: New file.
7637         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7638         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7639         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7641         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7642         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7643         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7644         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7645         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7646         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7647         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7648         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7649         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7650         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7651         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7652         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7653         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7654         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7655         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7657         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7658         not gettimeofday.
7659         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7660         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7661         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7662         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7663         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7665 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7667         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7668         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7669         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7670         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7671         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7673 2003-03-16  Roland McGrath  <roland@redhat.com>
7675         * tst-fork4.c: Include <string.h>.
7676         * tst-signal2.c: Likewise.
7677         * tst-mutex5.c (do_test): exit -> return.
7678         * tst-mutex2.c: Include <stdlib.h>.
7680 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7682         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7683         (__lll_mutex_timedlock_wait): Correct expected value after
7684         spurious wakeup.  Otherwise we would never wait again.
7686         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7687         zone versus inline asm stupidity.  Use correct instructions.
7689         * tst-rwlock6.c: Add some more status output.
7691 2003-03-15  Roland McGrath  <roland@redhat.com>
7693         * sysdeps/pthread/configure.in: New file.
7694         * sysdeps/pthread/configure: New file (generated).
7696 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7698         * allocatestack.c (allocate_stack): Store the exact stack size of
7699         user allocated stacks.
7701 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7703         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7704         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7705         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7706         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7707         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7708         Use `header.' prefix.
7709         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7711 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7713         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7714         __builtin_frame_address, use stack pointer.
7716         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7717         instead of __builtin_frame_pointer.
7719 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7721         * tst-basic1.c (do_test): Add cast to avoid warning.
7722         * tst-basic2.c (do_test): Likewise.
7724         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7725         amount of stack correction.
7727         * tst-fork4.c: Use test-skeleton.c.
7729 2003-03-14  Roland McGrath  <roland@redhat.com>
7731         * init.c: Fix typo "#eli" for "#else".
7733 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7735         * allocatestack.c (__stack_user): Use hidden_data_def.
7736         * pthread_create.c (__pthread_keys): Likewise.
7738         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7740 2003-03-14  Roland McGrath  <roland@redhat.com>
7742         * tst-fork4.c: New file.
7743         * Makefile (tests): Add it.
7745         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7746         we always define the padding space.
7747         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7748         stopped supporting its own extensions fully.
7749         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7750         struct also called `header', so `header.multiple_threads' is the field
7751         name to use on all machines.
7752         * allocatestack.c (allocate_stack): Use `header.' prefix.
7753         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7754         * pthread_create.c (__pthread_create_2_1): Likewise.
7755         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7756         (THREAD_SELF): Likewise.
7757         * sysdeps/x86_64/tls.h: Likewise.
7758         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7759         (SINGLE_THREAD_P): Likewise.
7760         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7761         (SINGLE_THREAD_P): Likewise.
7762         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7763         (SINGLE_THREAD_P): Likewise.
7765         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7766         value directly.
7768 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7770         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7771         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7773         * pthread_create.c (start_thread): setjmp is expected to return 0.
7775         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7776         (THREAD_GETMEM_NC): Likewise.
7778 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7780         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7781         and the size of the stack which must be allocated is a multiple,
7782         allocate one more page.
7783         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7784         MULTI_PAGE_ALIASING.
7786 2003-03-13  Roland McGrath  <roland@redhat.com>
7788         * pthread_create.c (start_thread): Set EXITING_BIT after the
7789         event-reporting (and destructors), not before.
7791 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7793         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7794         lll_futex_wake): Declare register variables as long int instead of
7795         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7796         Make syscall arguments clobbered by the syscall.
7797         (lll_futex_wait): Define using lll_futex_timed_wait.
7799         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7800         to void *.
7802         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7803         PPID if [! NDEBUG].
7805         * allocatestack.c (nptl_ncreated): Only declare if
7806         COLORING_INCREMENT != 0.
7808         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7809         (__libc_enable_asynccancel_2): Remove prototype.
7811         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7812         ctid to match kernel.
7814 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7816         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7817         libc_multiple_threads.
7818         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7819         __libc_multiple_threads to...
7820         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7822         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7823         versioning.
7824         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7825         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7827         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7828         (__pthread_once_internal): Define.
7830         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7831         macros instead of .symver directly.
7832         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7833         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7835         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7836         * sysdeps/x86_64/tcb-offsets.sym: New file.
7837         * sysdeps/x86_64/Makefile: New file.
7839         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7840         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7841         to access own pthread_t in TCB.
7842         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7843         Likewise.
7844         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7845         Likewise.
7846         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7848 2003-03-12  Roland McGrath  <roland@redhat.com>
7850         * pthread-errnos.sym: New file.
7851         * Makefile (gen-as-const-headers): New variable, list that file.
7852         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7853         header <pthread-errnos.h> instead of defining errno values here.
7854         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7855         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7856         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7857         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7858         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7859         Likewise.
7860         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7861         Likewise.
7862         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7864         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7865         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7866         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7867         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7868         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7869         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7871         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7872         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7873         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7874         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7875         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7876         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7877         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7878         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7879         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7880         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7881         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7882         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7883         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7884         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7885         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7886         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7887         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7888         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7890         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7891         CLONE_CHILD_SETTID worked.
7893 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7895         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7896         file.
7897         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7898         file.
7900         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7901         (pthread_cond_t): Add padding.
7903         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7904         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7905         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7907         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7908         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7909         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7910         (__pthread_rwlock_timedrdlock): Likewise.
7911         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7912         (__pthread_rwlock_wrlock): Likewise.
7913         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7914         (__pthread_rwlock_rdlock): Likewise.
7916         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7919         result of lock re-get if it fails.
7921 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7923         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7924         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7925         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7926         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7928         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7929         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7930         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7931         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7932         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7934         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7935         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7937         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7938         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7939         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7940         (create_thread): Likewise.
7941         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7942         * init.c (__pthread_initialize_minimal_internal): Initialize
7943         __libc_multiple_threads_ptr if necessary.
7944         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7945         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7946         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7947         __libc_multiple_threads.
7948         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7949         necessary.
7951         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7952         (THREAD_SETMEM_NC): Likewise.
7954         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7955         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7956         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7957         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7959         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7960         Eliminate one entire instruction.
7962         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7963         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7964         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7965         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7966         instead of __pthread_enable_asynccancel.
7967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7968         (__pthread_cond_wait): Likewise.
7969         * sysdeps/pthread/pthread_cond_timedwait.c
7970         (__pthread_cond_timedwait): Likewise.
7971         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7974         (__condvar_cleanup): Wake up all waiters in case we got signaled
7975         after being woken up but before disabling asynchronous
7976         cancellation.
7977         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7978         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7979         (__condvar_cleanup): Likewise.
7981         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7982         Make it an error if architecture has no #if case.  Add x86-64.
7984         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7985         pt-initfini.s generation.
7987         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7988         (TLS_INIT_TP): Fix typo.
7990 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7992         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7993         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7995         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7996         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7997         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7998         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7999         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8000         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8001         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8002         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8004 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8006         * sysdeps/pthread/pthread_cond_timedwait.c
8007         (__pthread_cond_timedwait): Return the result of the final
8008         locking.  If it succeeds, the regular function return value.
8010         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8011         Return result of the final locking.
8012         * version.c (__nptl_main): Work around problems with the strange
8013         INTERNAL_SYSCALL macro on ppc32.
8014         * init.c (__pthread_initialize_minimal_internal): Unblock
8015         SIGCANCEL in case the parent blocked it.
8016         Reported by Paul Mackerras <paulus@samba.org>.
8018         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8019         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8020         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8022 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8024         * sysdeps/pthread/pthread_cond_timedwait.c
8025         (__pthread_cond_timedwait): Unlock and fail if
8026         __pthread_mutex_unlock_internal failed.
8028         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8029         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8030         Use ARCH_CLONE.
8031         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8032         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8033         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8034         ALLOCATE_STACK): New macros.
8035         (TLS_TPADJ): New macro.
8036         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8037         (allocate_stack): Handle TLS_DTV_AT_TP and
8038         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8039         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8040         Don't set PD->self.
8041         * init.c [__ia64__] (__NR_set_tid_address): Define.
8043         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8044         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8045         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8046         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8047         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8048         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8049         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8050         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8051         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8052         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8053         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8054         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8055         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8056         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8057         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8058         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8059         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8060         * sysdeps/ia64/bits/atomic.h: New file.
8061         * sysdeps/ia64/Makefile: New file.
8062         * sysdeps/ia64/pthread_spin_init.c: New file.
8063         * sysdeps/ia64/pthread_spin_lock.c: New file.
8064         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8065         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8066         * sysdeps/ia64/pthreaddef.h: New file.
8067         * sysdeps/ia64/tcb-offsets.sym: New file.
8068         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8069         * sysdeps/ia64/tls.h: New file.
8071         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8072         to syscall instead of no arguments.
8074 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8076         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8077         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8078         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8079         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8081         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8082         unused code.
8084         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8086         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8087         lowlevelbarrier.sym.
8088         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8089         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8090         Include lowlevelbarrier.h and don't define offsets locally.
8091         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8093         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8094         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8095         (__lll_mutex_timedlock_wait): Likewise.
8096         (lll_mutex_lock): Adjust asm for that.
8097         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8098         (lll_lock): Adjust asm for operand order change.
8099         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8100         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8103         Reverse order of parameters.
8104         (__lll_timedwait_tid): Remove regparms attribute.
8105         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8106         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8108         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8109         (__lll_timedwait_tid): Remove one unnecessary instruction.
8111         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8112         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8113         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8114         lowlevelmutex.S.
8116         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8117         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8118         for NOT_IN_libc.
8119         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8120         lowlevellock.S.
8122         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8123         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8124         for libc.so.
8125         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8126         define LOCK here (if UP is not defined).  The actual code is in
8127         lowlevelmutex.S.
8129         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8130         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8131         __lll_timedwait_tid for libc.so.
8132         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8133         define LOCK here (if UP is not defined).  The actual code is in
8134         lowlevellock.S.
8136         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8137         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8138         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8139         instead of lowlevelsem.h.
8140         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8141         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8142         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8144         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8145         lowlevelrwlock.sym.
8146         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8147         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8148         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8150         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8151         register loading.
8152         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8153         last changed.  D'oh.
8155         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8157         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8158         of __libc_locking_needed.
8159         (lll_trylock): Initialize %eax to zero.
8161         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8162         pthread_cond_t definition.
8164 2003-03-10  Roland McGrath  <roland@redhat.com>
8166         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8167         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8168         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8169         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8170         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8172         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8173         Instead of setting PD->multiple_threads, set globals
8174         __pthread_multiple_threads and __libc_multiple_threads.
8175         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8176         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8177         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8179         * descr.h (struct pthread): Conditionalize first member on
8180         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8181         containing an anonymous tcbhead_t.  Move `list' member out.
8182         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8183         * allocatestack.c: Remove use of `header.data.' prefix.
8184         * pthread_create.c: Likewise.
8185         * init.c (__pthread_initialize_minimal_internal): Likewise.
8186         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8187         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8188         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8189         * sysdeps/x86_64/tls.h: Likewise.
8190         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8191         (SINGLE_THREAD_P): Likewise.
8192         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8193         (SINGLE_THREAD_P): Likewise.
8194         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8195         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8197 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8199         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8201         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8202         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8204         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8205         leftovers from the ia32 code.
8207         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8208         memory load.
8209         (clear_once_control): Don't load %esi.
8211         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8212         handling.
8214         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8216         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8217         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8219         * Makefile (tests): Add tst-cond10.
8220         * tst-cond10.c: New file.
8222 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8224         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8225         * tst-signal3.c (do_test): Likewise.
8226         * tst-sem5.c (do_test): Likewise.
8227         * tst-kill6.c (do_test): Likewise.
8228         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8230         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8231         of inc/dec.
8232         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8233         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8234         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8235         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8236         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8237         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8238         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8239         Likewise.
8240         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8241         Likewise.
8242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8247         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8248         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8249         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8251         * allocatestack.c (allocate_stack): If mprotect() fails free the
8252         TLS memory.
8254 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8256         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8258         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8259         lll_wake_tid.  This was used only to work around kernel limits in
8260         the early days.
8261         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8262         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8263         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8264         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8266         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8267         (__pthread_initialize_minimal_internal): Change initialization of
8268         __static_tls_align_m1 appropriately.
8269         * pthreadP.h (__static_tls_align_m1): Renamed from
8270         __static_tls_align.
8271         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8272         instead of __static_tls_align-1.
8274 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8276         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8278         * pthread_create.c: Define __pthread_keys using nocommon
8279         attribute, not by placing it explicitly in bss.
8280         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8282         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8283         Use it in mmap call to allocate stacks.
8285         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8287         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8288         result of the thread function.
8290 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8292         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8293         version is just fine.
8295         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8296         (__pthread_child_handler): Renamed from pthread_child_handler,
8297         exported, and marked hidden.  Change all users.
8298         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8299         free __pthread_child_handler from child list.
8301 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8303         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8305         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8306         Fix handling of cancellation and failing pthread_mutex_unlock call.
8307         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8308         (__pthread_cond_wait): Likewise.
8310         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8311         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8312         lll_futex_timed_wait call.
8313         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8314         (pthread_rwlock_timedwrlock): Likewise.
8316         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8317         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8318         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8320         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8321         check of lll_futex_wake return value.
8323 2003-03-03  Roland McGrath  <roland@redhat.com>
8325         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8327         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8328         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8329         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8331 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8333         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8334         error for CPU clocks.
8336         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8337         _POSIX_MONOTONIC_CLOCK.
8338         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8340         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8341         recent kernels.
8343 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8345         * descr.h (struct pthread): Move cleanup field to the front.
8347 2003-03-01  Roland McGrath  <roland@redhat.com>
8349         * sem_open.c (sem_open): Braino fix.
8351 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8353         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8355         __pthread_cleanup_pop functionality.
8356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8358         * descr.h (struct pthread): Move tid field to the front now that
8359         it is often used.
8361         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8362         (__lll_mutex_timedlock_wait): Remove.
8363         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8364         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8365         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8366         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8367         (lll_unlock_wake_cb): Don't save and restore %esi.
8368         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8369         %esi.
8370         (__lll_timedwait_tid): Add alignment.
8371         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8372         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8373         %esi.
8374         (__lll_timedwait_tid): Removed.
8375         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8376         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8377         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8378         (pthread_barrier_wait): Don't save, load, and restore %esi for
8379         last thread.
8380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8381         (__pthread_cond_signal): Don't save, load, and restore %esi.
8382         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8383         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8384         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8385         Don't save, load, and restore %esi.
8387 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8389         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8390         Release lock before waking up the waiters.
8392         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8394         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8395         (reader_thread): Likewise.
8397         * sysdeps/pthread/pthread_rwlock_unlock.c
8398         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8399         to wake up readers if there are none.
8401         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8402         Release internal lock before wake threads.
8404 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8406         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8407         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8408         predefined.
8409         * tst-rwlock9.c: Likewise.
8410         * tst-rwlock10.c: New file.
8411         * tst-rwlock11.c: New file.
8413         * Makefile (tests): Add tst-dlsym1.
8414         * tst-dlsym1.c: New file.
8416         * init.c (__pthread_initialize_minimal_internal): Set
8417         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8418         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8420 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8422         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8424         * tst-cond2.c: Fix sychronization with child.
8426         * tst-rwlock8.c (reader_thread): Remove unused variable.
8428         * Makefile: Add rules to build and run tst-tls3.
8429         * tst-tls3.c: New file.
8430         * tst-tls3mod.c: New file.
8432         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8433         * tst-rwlock8.c: New file.
8434         * tst-rwlock9.c: New file.
8435         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8436         complete broken rwlock implementation.
8437         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8438         Likewise.
8439         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8440         Likewise.
8441         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8442         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8443         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8444         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8445         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8446         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8447         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8449 2003-02-23  Roland McGrath  <roland@redhat.com>
8451         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8453 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8455         * Makefile (tests): Add tst-context1.
8456         * tst-context1.c: New file.
8458         * Makefile (tests): Add tst-tls1 and tst-tls2.
8459         * tst-tls1.c: New file.
8460         * tst-tls2.c: New file.
8462         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8463         for failed cmpxchg.
8465         * pthread_create.c (start_thread): Set EXITING_BIT early.
8467         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8468         (THREAD_GETMEM_NC): Likewise.
8470 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8472         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8473         off 3 more bytes by using offset-less instructions when possible.
8475         * Makefile: Add dependency for $(objpfx)version.d.
8477         * eintr.c (eintr_source): Add unnecessary return but the compiler
8478         insists.
8480         * tst-kill3.c: Include <unistd.h>.
8482 2003-02-21  Roland McGrath  <roland@redhat.com>
8484         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8486 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8488         * Makefile (tests): Add tst-eintr1.
8489         (distribute): Add eintr.c.
8490         * tst-eintr1.c: New file.
8491         * eintr.c: New file.
8493         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8495         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8496         Disallow sending SIGCANCEL.
8498         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8499         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8500         * tst-kill1.c: New file.
8501         * tst-kill2.c: New file.
8502         * tst-kill3.c: New file.
8503         * tst-kill5.c: New file.
8504         * tst-kill6.c: New file.
8505         * tst-basic7.c: Renamed to...
8506         * tst-kill4.c: ...this.
8508 2003-02-21  Roland McGrath  <roland@redhat.com>
8510         * Makefile (install-lib-ldscripts): New variable.
8512 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8514         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8515         * pthread_cancel.c: Use INVALID_TD_P.
8516         * pthread_detach.c: Likewise.
8517         * pthread_getschedparam.c: Likewise.
8518         * pthread_setschedparam.c: Likewise.
8519         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8520         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8521         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8522         * pthread_timedjoin.c: Likewise.
8524         * tst-basic7.c: Include <signal.h>.
8526         * pthread_join.c (pthread_join): Limited checking for invalid
8527         descriptors.
8528         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8530 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8532         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8533         beginning of the loop.  Clear the entire first block of TSD.
8534         * Makefile (tests): Add tst-key4.
8535         * tst-key4.c: New file.
8537 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8539         * Makefile (tests): Add tst-basic7.
8540         * tst-basic7.c: New file.
8542         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8543         Add some more __builtin_expect.
8545         * pthreadP.h: Define dummy version of DEBUGGING_P.
8547 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8549         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8550         _POSIX_THREAD_PRIORITY_SCHEDULING.
8551         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8552         _XOPEN_REALTIME_THREADS.
8553         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8555         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8556         kernel returns EINVAL for PID <= 0, work around it.
8558         * Makefile (tests): Add tst-signal5.
8559         * tst-signal5.c: New file.
8561         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8562         and LOGIN_NAME_MAX.
8564         * tst-cancel1.c (tf): Block all signals.
8566         * Makefile (tests): Add tst-basic6.
8567         * tst-basic6.c: New file.
8569         * tst-basic1.c: Add test for process ID.
8571         * Makefile (tests): Add tst-cancel10.
8572         * tst-cancel10.c: New file.
8574         * Makefile (tests): Add tst-signal4.
8575         * tst-signal4.c: New file.
8577         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8578         __sigismember instead of sigismember.  Add __builtin_expect.
8580 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8582         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8583         pthread_setcancelstate, and pthread_rwlock_setpshared.
8585         * tst-cancel7.c (do_test): Make sure the pid file exists before
8586         canceling the thread.
8588         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8589         pthread_rwlock_timedrdlock tests.
8590         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8591         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8592         Check for invalid tv_nsec field.
8593         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8594         Likewise.
8596         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8597         recursive mutex of overflow.
8599         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8601         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8602         going into an endless loop.
8603         * Makefile (tests): Add tst-cancel9.
8604         * tst-cancel9.c: New file.
8606         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8608 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8610         * tst-mutex5.c (do_test): Add more timedlock tests.
8612         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8613         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8615         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8616         use INLINE_SYSCALL.  Error number is returned, not -1.
8618         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8619         and __deallocate_stack with internal_function.
8620         * pthread_create.c: Adjust definitions appropriately.
8621         * allocatestack.c: Likewise.
8623         * pthread_join.c: Add one more __builtin_expect.
8624         * pthread_timedjoin.c: Likewise.
8626         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8627         not data of sequence number does not match.
8628         Add one __builtin_expect.
8630         * Makefile (tests): Add tst-clock1.
8631         * tst-clock1.c: New file.
8633         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8634         negative arguments.
8635         * Makefile (tests): Add tst-basic5.
8636         * tst-basic5.c: New file.
8638 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8640         * Makefile (tests): Add tst-basic4.
8641         * tst-basic4.c: New file.
8643         * pthreadP.h: Add declaraction for __nptl_nthreads.
8644         * pthread_create.c: Define __nptl_nthreads
8645         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8646         after thread is done.  If then zero, call exit(0).
8647         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8648         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8649         * init.c (pthread_functions): Initialize ptr_nthreads.
8650         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8651         (__reclaim_stacks): Decrement __nptl_nthreads.
8652         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8653         Define.
8654         * Makefile (tests): Add tst-basic3.
8655         * tst-basic3.c: New file.
8657         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8658         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8659         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8660         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8661         if asynchronous canceling is enabled.
8662         * pthread_join.c (pthread_join): When recognizing circular joins,
8663         take into account the other thread might be already canceled.
8664         * Makefile (tests): Add tst-join5.
8665         * tst-join5.c: New file.
8667         * Makefile (tests): Add tst-join4.
8668         * tst-join4.c: New file.
8670 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8672         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8674 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8676         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8677         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8678         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8679         warning.
8680         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8681         to avoid warning.
8682         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8683         error if lll_futex_wake failed.
8685 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8688         handling of cancellation and failung pthread_mutex_unlock call.
8689         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8690         * Makefile (tests): Add tst-cond8 and tst-cond9.
8691         * tst-cond8.c: New file.
8692         * tst-cond9.c: New file.
8694         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8696         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8697         non-standard initializers with __USE_GNU.
8699         * Makefile (tests): Add tst-cleanup3.
8700         * tst-cleanup3.c: New file.
8702 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8704         * Makefile (tests): Add tst-attr1 and tst-attr2.
8705         * tst-attr1.c: New file.
8706         * tst-attr2.c: New file.
8708         * Makefile: Add rules to build and run tst-atfork2 test.
8709         * tst-atfork2.c: New file.
8710         * tst-atfork2mod.c: New file.
8712         * sysdeps/unix/sysv/linux/unregister-atfork.c
8713         (__unregister_atfork): Free the memory allocated for the handlers
8714         after removing them from the lists.
8716         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8717         cleanup function.
8719         * tst-atfork1.c (do_test): Wait for the child we forked.
8720         Report error in child.
8722         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8724         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8726 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8728         * Makefile (tests): Add tst-cancel8.
8729         * tst-cancel8.c: New file.
8731         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8732         clearing of control variable.
8733         * Makefile (tests): Add tst-once3 and tst-once4.
8734         * tst-once3.c: New file.
8735         * tst-once4.c: New file.
8737 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8739         * sysdeps/sh/Makefile: New file.
8740         * sysdeps/sh/bits/atomic.h: New file.
8741         * sysdeps/sh/pthread_spin_init.c: New file.
8742         * sysdeps/sh/pthread_spin_lock.c: New file.
8743         * sysdeps/sh/pthread_spin_trylock.S: New file.
8744         * sysdeps/sh/pthread_spin_unlock.S: New file.
8745         * sysdeps/sh/pthreaddef.h: New file.
8746         * sysdeps/sh/tcb-offsets.sym: New file.
8747         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8748         * sysdeps/sh/tls.h: New file.
8749         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8750         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8751         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8752         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8753         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8754         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8755         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8756         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8757         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8758         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8759         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8760         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8761         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8762         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8763         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8764         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8765         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8766         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8767         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8768         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8769         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8770         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8771         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8772         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8773         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8774         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8775         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8776         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8777         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8778         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8780 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8782         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8783         according to POSIX.
8785         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8787 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8789         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8790         (TLS_GET_FS): New #define.
8791         (TLS_SET_FS): New #define.
8792         Correct value of __NR_set_thread_area.
8794         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8796 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8798         * Makefile (tests): Add tst-popen1.
8799         * tst-popen1.c: New file.
8801         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8802         but inactive generalization.
8803         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8804         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8805         Minor optimization, remove one instruction.
8806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8808 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8810         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8812 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8814         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8815         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8816         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8817         * sysdeps/pthread/pthread_cond_signal.c: New file.
8818         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8819         * sysdeps/pthread/pthread_cond_wait.c: New file.
8820         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8821         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8822         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8823         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8824         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8825         * sysdeps/s390/Makefile: New file.
8826         * sysdeps/s390/bits/atomic.h: New file.
8827         * sysdeps/s390/pthread_spin_init.c: New file.
8828         * sysdeps/s390/pthread_spin_lock.c: New file.
8829         * sysdeps/s390/pthread_spin_trylock.c: New file.
8830         * sysdeps/s390/pthread_spin_unlock.c: New file.
8831         * sysdeps/s390/pthreaddef.h: New file.
8832         * sysdeps/s390/tcb-offsets.sym: New file.
8833         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8834         * sysdeps/s390/tls.h: New file.
8835         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8836         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8837         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8838         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8839         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8840         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8841         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8842         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8843         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8844         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8845         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8846         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8847         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8848         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8849         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8850         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8851         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8852         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8853         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8854         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8855         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8856         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8857         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8859 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8861         * atomic.h: Add a couple more default implementations.
8862         (atomic_compare_and_exchange_acq): Use
8863         __arch_compare_and_exchange_32_acq in return value definition.  It
8864         always exists.
8865         (atomic_bit_set): Renamed from atomic_set_bit.
8866         Add missing atomic_ prefixes.
8868         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8869         thread library is available, use correct value to mark initialized
8870         once variable.
8872 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8874         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8875         __sysconf to determine pagesize.
8877         * pthread_create.c: Include <atomic.h>.
8878         * allocatestack.c (allocate_stack): Implement coloring of the
8879         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8880         size minus one.  Adjust users.
8881         * sysdeps/i386/i686/Makefile: New file.
8883 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8885         * allocatestack.c: Improve comment throughout the file.
8887         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8888         (__lll_lock_wait): Add branch prediction.
8889         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8890         (__lll_lock_wait): Likewise.
8891         (lll_unlock_wake_cb): Removed.
8893 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8895         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8896         _POSIX_THREAD_PRIORITY_SCHEDULING.
8898 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8900         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8901         Fix return type of ptr___pthread_getspecific.
8903 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8905         * Makefile (tests): Add tst-umask1.
8906         (tst-umask1-ARGS): Define.
8907         * tst-umask1.c: New file.
8909 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8911         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8912         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8913         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8914         pthread_rwlock_unlock.
8915         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8916         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8917         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8918         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8919         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8920         New file.
8921         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8922         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8923         New file.
8924         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8925         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8926         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8927         New file.
8928         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8929         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8930         New file.
8931         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8932         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8933         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8934         New file.
8935         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8936         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8937         New file.
8938         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8940         * Makefile (libpthread-routines): Remove lowlevelcond and
8941         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8942         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8943         and pthread_cond_broadcast.
8944         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8945         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8946         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8947         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8948         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8949         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8950         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8951         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8952         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8953         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8955         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8956         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8957         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8958         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8959         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8960         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8961         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8962         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8963         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8964         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8965         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8966         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8967         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8968         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8969         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8970         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8971         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8972         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8973         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8974         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8976         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8977         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8978         of the code is moved to ...
8979         * sysdeps/pthread/createthread.c: ...here.  New file.
8981 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8983         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8984         (__new_sem_post): Clear %eax before returning.
8985         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8987         * Makefile (tests): Add tst-cleanup2.
8988         * tst-cleanup2.c: New file.
8990         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8991         Interpret first parameter correctly.
8993 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8995         * Makefile (headers): Add bits/semaphore.h.
8997 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8999         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9000         if not SHARED.
9002 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9004         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9005         must be used and mapping failed.
9006         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9008         * Makefile (CFLAGS-pthread_self.os): Define this, not
9009         CFLAGS-pthread_self.c.
9011 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9013         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9014         lll_unlock_wake_cb.
9016         * Makefile (libpthread-routines): Add version.  Add rules to build
9017         version.os and banner.h.
9018         * version.c: New file.
9020 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9022         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9023         the alias unconditional.
9024         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9026 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9028         * Makefile (CFLAGS-pthread_self.c): New definition.
9030 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9032         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9033         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9034         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9035         * init.c (__pthread_initialize_minimal_internal): Likewise.
9037 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9039         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9041         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9042         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9043         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9044         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9045         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9046         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9048 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9050         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9051         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9052         * tst-cancel-wrappers.sh: Remove all exceptions.
9054 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9056         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9057         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9059         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9060         Use __libc_pthread_functions array if SHARED.
9062         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9063         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9065         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9066         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9067         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9068         __libc_ptf_call instead of __libc_maybe_call.
9069         (PTF): New #define.
9070         (__libc_cleanup_region_start): Wrap function name with PTF call.
9071         (__libc_cleanup_region_end): Likewise.
9072         (__libc_cleanup_end): Likewise.
9074         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9075         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9076         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9077         * pthreadP.h: Add prototypes.
9079         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9080         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9081         __pthread_rwlock_unlock aliases.
9082         * pthreadP.h: Add prototypes for new aliases.
9084         * pthreadP.h (struct pthead_functions): Moved to...
9085         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9086         * init.c (pthread_functions): Add initializers for new elements.
9088         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9089         __pthread_cleanup_pop_restore aliases.
9090         * pthreadP.h: Add prototypes.
9092         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9093         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9094         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9095         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9096         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9097         * pthreadP.h: Adjust prototypes and callers.
9099 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9101         * Makefile (tests): Add tst-cancel7.
9102         (tst-cancel7-ARGS): New variable.
9103         * tst-cancel7.c: New file.
9105         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9106         around gcc defficiencies.
9107         * old_pthread_cond_signal.c: Likewise.
9108         * old_pthread_cond_timedwait.c: Likewise.
9109         * old_pthread_cond_wait.c: Likewise.
9111         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9113 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9115         * Makefile (tests): Add tst-cond7.
9116         * tst-cond7.c: New file.
9118         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9119         (condvar_cleanup): Get condvar address from the right place.
9121         * atomic.h: Correct definitions of atomic_full_barrier,
9122         atomic_read_barrier, atomic_write_barrier.
9124         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9125         race-free.
9126         * old_pthread_cond_signal.c: Likewise.
9127         * old_pthread_cond_timedwait.c: Likewise.
9128         * old_pthread_cond_wait.c: Likewise.
9130 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9132         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9134 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9136         * pthreadP.h (pthread_cond_2_0_t): New type.
9137         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9138         Use new type for the 2.0 condvar function prototypes.
9139         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9140         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9141         parameter.
9142         * old_pthread_cond_destroy.c: Likewise.
9143         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9144         * old_pthread_cond_signal.c: Likewise.
9145         * old_pthread_cond_timedwait.c: Likewise.
9146         * old_pthread_cond_wait.c: Likewise.
9148         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9149         (__pthread_cond_wait): Don't save cancellation mode and seq value
9150         in same location.
9152         * herrno.c (__h_errno_location): Don't define as weak.
9154 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9156         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9157         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9158         and pthread_cond_wait.
9159         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9160         Renamed to...
9161         (__pthread_cond_broadcast_2_0): ... this.
9162         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9163         Renamed to...
9164         (__pthread_cond_destroy_2_0): ... this.
9165         * old_pthread_cond_init.c (__old_pthread_cond_init):
9166         Renamed to...
9167         (__pthread_cond_init_2_0): ... this.
9168         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9169         Renamed to...
9170         (__pthread_cond_signal_2_0): ... this.
9171         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9172         Renamed to...
9173         (__pthread_cond_wait_2_0): ... this.
9174         * pthread_cond_destroy.c: Include shlib-compat.h.
9175         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9176         * pthread_cond_init.c: Include shlib-compat.h.
9177         (pthread_cond_init): Change strong_alias into versioned_symbol.
9178         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9179         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9180         fields.
9181         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9182         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9183         __pthread_cond_wait_2_0): New prototypes.
9184         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9185         __old_pthread_cond_init, __old_pthread_cond_signal,
9186         __old_pthread_cond_wait): Removed.
9187         * init.c: Include shlib-compat.h.
9188         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9189         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9190         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9191         ptr___pthread_cond_*_2_0 fields.
9192         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9193         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9195         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9196         LIBC_SIGACTION was not yet defined.
9197         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9198         [!defined LIBC_SIGACTION] (__sigaction): New function and
9199         libc_hidden_weak.
9200         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9201         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9203 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9205         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9207 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9209         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9210         New, larger type definition.
9211         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9212         implementation.
9213         * Versions [libpthread]: Add definitions for new pthread_cond_*
9214         interfaces for version GLIBC_2.3.2.
9215         * pthread_cond_init.c: Update initialization for new type definition.
9216         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9217         pthread_cond_timedwait, pthread_cond_signal, and
9218         pthread_cond_broadcast.  Add old_pthread_cond_init,
9219         old_pthread_cond_destroy, old_pthread_cond_wait,
9220         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9221         old_pthread_cond_broadcast.
9222         * old_pthread_cond_broadcast.c: New file.
9223         * old_pthread_cond_destroy.c: New file.
9224         * old_pthread_cond_init.c: New file.
9225         * old_pthread_cond_signal.c: New file.
9226         * old_pthread_cond_timedwait.c: New file.
9227         * old_pthread_cond_wait.c: New file.
9228         * pthreadP.h: Add prototypes for the compatibility interfaces.
9230         * pthread_cond_destroy.c: Don't include <errno.h>.
9232 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9234         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9235         unnecessary zero offset when addressing MUTEX.
9237 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9239         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9240         __register_atfork.
9241         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9242         for __register_atfork.
9244 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9246         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9247         instead of ASSEMBLER test macro.
9249         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9250         __libc_current_sigrtmax): Add libc_hidden_def.
9252         * sysdeps/pthread/list.h: Remove assert.h include.
9254 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9256         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9257         __pthread_initialize_minimal_internal not
9258         __pthread_initialize_minimal.
9260 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9262         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9263         __pthread_initialize_minimal as hidden.
9265         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9266         constructor.
9268 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9270         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9271         $(common-objpfx)format.lds, include that into the output script.
9272         Fix comment.
9273         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9275 2002-12-28  Andreas Jaeger  <aj@suse.de>
9277         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9278         nsec resolution changes.
9279         (xstat64_conv): Likewise.
9280         (xstat32_conv): Likewise.
9281         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9282         struct kernel_stat.
9283         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9284         structs stat and stat64.
9285         * time/time.h (__timespec_defined): Define for __USE_MISC.
9286         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9288 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9290         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9291         argument.
9292         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9293         (pthread_exit): Use strong_alias to avoid warnings.
9294         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9295         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9296         ptr___pthread_attr_init_2_*.
9297         * init.c (pthread_functions): Adjust.
9299 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9301         * forward.c: Make all functions available by default again.  It
9302         caused too much trouble.
9304         * pt-siglongjmp.c: Removed.
9306 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9308         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9309         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9310         * sysdeps/i386/Makefile: New file.
9311         * sysdeps/i386/tcb-offsets.sym: New file.
9312         * sysdeps/pthread/tcb-offsets.h: New file.
9313         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9314         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9316         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9317         __register_atfork...
9318         (GLIBC_2.3.2): ...here.
9320 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9322         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9323         pthread_attr_setstackaddr with __attribute_deprecated__.
9325 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9327         * pt-system.c (system): Remove cancellation handling.
9328         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9329         cancellation routines.
9331 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9333         * descr.h: Include <dl-sysdep.h>.
9334         (struct pthread): Move header.data.list to the back of the struct.
9335         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9336         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9337         (SYSINFO_OFFSEET): Likewise.
9339 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9341         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9342         Define.
9343         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9344         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9345         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9346         (USE_DL_SYSINFO): Undef.
9348 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9350         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9351         $(common-objpfx)libc.so.
9352         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9353         it is bigger than pipe buffer size even on arches with bigger
9354         page size.
9355         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9357 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9359         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9360         correct errno access for case that USE___THREAD is not defined.
9362 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9364         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9365         Patch by Marijn Ros <marijn@mad.scientist.com>.
9367 2002-12-22  Roland McGrath  <roland@redhat.com>
9369         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9371 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9373         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9375 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9377         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9378         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9379         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9381         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9382         of int $0x80.
9383         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9384         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9385         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9386         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9387         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9388         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9389         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9390         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9392         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9393         sysenter.
9394         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9396         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9398         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9399         in new TCB.
9400         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9401         that sysinfo is properly initialized.
9402         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9403         to 1 only for ld.so.
9405         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9406         RTLD_CORRECT_DYNAMIC_WEAK.
9408 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9410         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9411         Use return 0 as 6th argument to FORWARD4.
9412         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9414 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9416         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9417         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9418         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9419         (INIT_SYSINFO): New #define.
9420         (TLS_TP_INIT): Use INIT_SYSINFO.
9421         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9422         At test to make sure SYSINFO_OFFSET value is correct.
9423         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9425 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9427         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9428         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9429         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9430         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9431         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9432         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9433         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9435 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9437         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9438         macro instead of using int $0x80 directly.
9440         * sysdeps/pthread/bits/stdio-lock.h: New file.
9441         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9442         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9443         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9444         * Makefile (routines): Add libc-lowlevelmutex.
9446         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9447         __i686.get_pc_thunk.dx.
9449 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9451         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9452         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9453         ($(objpfx)tst-cancel-wrappers.out): New rule.
9454         * tst-cancel-wrappers.sh: New test.
9455         * tst-locale1.c: Include signal.h.
9456         (uselocale): Test static linking of __libc_current_sigrt*.
9458 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9460         * Makefile (tests): Add tst-cancel6.
9461         * tst-cancel6.c: New file
9463 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9465         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9466         Define meaningfully for assembler as well.
9467         * pthreadP.h (struct pthread_functions): Remove
9468         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9469         and ptr_pthread_attr_init_2_1 fields.
9470         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9471         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9472         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9473         (FORWARD3): Define using FORWARD4.
9474         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9475         versions.
9476         * pt-system.c: Remove duplicate stdlib.h include.
9478 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9480         * sem_init.c: Define sem_init@GLIBC_2.0.
9481         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9482         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9484         * flockfile.c: Moved to...
9485         * sysdeps/pthread/flockfile.c: ...here.  New file.
9486         * funlockfile.c: Moved to...
9487         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9488         * ftrylockfile.c: Moved to...
9489         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9491 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9493         * libc-cancellation.c: Guard both function with
9494         #if !defined NOT_IN_libc.
9495         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9496         automatically provided pthread wrappers.
9497         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9498         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9499         nor in libpthread.
9500         * pt-open.c: Removed.
9501         * pt-fcntl.c: Removed.
9502         * pt-fsync.c: Removed.
9503         * pt-lseek.c: Removed.
9504         * pt-msgrcv.c: Removed.
9505         * pt-msgsnd.c: Removed.
9506         * pt-msync.c: Removed.
9507         * pt-nanosleep.c: Removed.
9508         * pt-open64.c: Removed.
9509         * pt-pause.c: Removed.
9510         * pt-pread.c: Removed.
9511         * pt-pread64.c: Removed.
9512         * pt-pwrite.c: Removed.
9513         * pt-pwrite64.c: Removed.
9514         * pt-read.c: Removed.
9515         * pt-recv.c: Removed.
9516         * pt-recvfrom.c: Removed.
9517         * pt-recvmsg.c: Removed.
9518         * pt-send.c: Removed.
9519         * pt-sendto.c: Removed.
9520         * pt-sigtimedwait.c: Removed.
9521         * pt-sigwait.c: Removed.
9522         * pt-wait.c: Removed.
9523         * pt-waitpid.c: Removed.
9524         * pt-write.c: Removed.
9525         * pt-accept.c: Removed.
9526         * pt-close.c: Removed.
9527         * pt-connect.c: Removed.
9528         * pt-lseek64.c: Removed.
9529         * pt-sendmsg.c: Removed.
9530         * pt-tcdrain.c: Removed.
9532 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9534         * init.c (__pthread_initialize_minimal_internal): Renamed from
9535         __pthread_initialize_minimal.  Make old name an alias.  This
9536         converts a normal relocation into a relative relocation.
9538         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9540         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9541         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9542         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9543         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9544         pt-sigwaitinfo, pt-waitid, and pt-writev.
9545         * pt-creat.c: Removed.
9546         * pt-poll.c: Removed.
9547         * pt-pselect.c: Removed.
9548         * pt-readv.c: Removed.
9549         * pt-select.c: Removed.
9550         * pt-sigpause.c: Removed.
9551         * pt-sigsuspend.c: Removed.
9552         * pt-sigwaitinfo.c: Removed.
9553         * pt-waitid.c: Removed.
9554         * pt-writev.c: Removed.
9556         * init.c (pthread_functions): New variable.
9557         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9558         (or NULL) to __libc_pthread_init.
9559         * forward.c: Rewrite to use __libc:pthread_functions array to get
9560         function addresses.
9561         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9562         prototype.
9563         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9564         Take new parameter.  Copy content of variable pointed to by it
9565         to __libc_pthread_init.
9567         * pthreadP.h (struct pthread_functions): New type.
9568         (__libc_pthread_init): Declare.
9570         * pthread_attr_destroy.c: Add namespace protected alias.
9571         * pthread_attr_getdetachstate.c: Likewise.
9572         * pthread_attr_getinheritsched.c: Likewise.
9573         * pthread_attr_getschedparam.c: Likewise.
9574         * pthread_attr_getschedpolicy.c: Likewise.
9575         * pthread_attr_getscope.c: Likewise.
9576         * pthread_attr_setdetachstate.c: Likewise.
9577         * pthread_attr_setinheritsched.c: Likewise.
9578         * pthread_attr_setschedparam.c: Likewise.
9579         * pthread_attr_setschedpolicy.c: Likewise.
9580         * pthread_attr_setscope.c: Likewise.
9581         * pthread_cond_broadcast.c: Likewise.
9582         * pthread_cond_destroy.c: Likewise.
9583         * pthread_cond_init.c: Likewise.
9584         * pthread_cond_signal.c: Likewise.
9585         * pthread_cond_wait.c: Likewise.
9586         * pthread_condattr_destroy.c: Likewise.
9587         * pthread_condattr_init.c: Likewise.
9588         * pthread_equal.c: Likewise.
9589         * pthread_exit.c: Likewise.
9590         * pthread_getschedparam.c: Likewise.
9591         * pthread_self.c: Likewise.
9592         * pthread_setcancelstate.c: Likewise.
9593         * pthread_setschedparam.c: Likewise.
9594         * pthread_mutex_destroy.c: Likewise.
9595         * pthread_mutex_init.c: Likewise.
9596         * pthreadP.h: Add prototypes for the aliases.
9598         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9599         multiple_threads member in correct TCB to 1.
9601         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9602         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9603         member of thread decriptor, otherwise return unconditionally 1.
9605 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9607         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9608         regular Linux version.  Remove file.
9609         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9610         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9611         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9612         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9613         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9614         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9615         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9616         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9617         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9618         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9619         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9620         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9621         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9622         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9623         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9624         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9625         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9626         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9627         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9628         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9629         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9630         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9631         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9632         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9633         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9634         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9635         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9636         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9637         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9638         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9640 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9642         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9643         * sysdeps/unix/sysv/linux/open.c: Removed.
9644         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9645         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9646         * sysdeps/unix/sysv/linux/msync.c: Removed.
9647         * sysdeps/unix/sysv/linux/read.c: Removed.
9648         * sysdeps/unix/sysv/linux/close.c: Removed.
9649         * sysdeps/unix/sysv/linux/creat.c: Removed.
9650         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9651         * sysdeps/unix/sysv/linux/pause.c: Removed.
9652         * sysdeps/unix/sysv/linux/select.c: Removed.
9653         * sysdeps/unix/sysv/linux/write.c: Removed.
9655 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9657         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9658         element in TCB to see whether locking is needed.
9660         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9661         MULTIPLE_THREADS_OFFSET value is correct.
9663         * sysdeps/unix/sysv/linux/close.c: New file.
9664         * sysdeps/unix/sysv/linux/connect.S: New file.
9665         * sysdeps/unix/sysv/linux/creat.c: New file.
9666         * sysdeps/unix/sysv/linux/fsync.c: New file.
9667         * sysdeps/unix/sysv/linux/llseek.c: New file.
9668         * sysdeps/unix/sysv/linux/lseek.c: New file.
9669         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9670         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9671         * sysdeps/unix/sysv/linux/msync.c: New file.
9672         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9673         * sysdeps/unix/sysv/linux/open.c: New file.
9674         * sysdeps/unix/sysv/linux/open64.c: New file.
9675         * sysdeps/unix/sysv/linux/pause.c: New file.
9676         * sysdeps/unix/sysv/linux/poll.c: New file.
9677         * sysdeps/unix/sysv/linux/pread.c: New file.
9678         * sysdeps/unix/sysv/linux/pread64.c: New file.
9679         * sysdeps/unix/sysv/linux/pselect.c: New file.
9680         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9681         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9682         * sysdeps/unix/sysv/linux/readv.c: New file.
9683         * sysdeps/unix/sysv/linux/recv.S: New file.
9684         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9685         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9686         * sysdeps/unix/sysv/linux/select.c: New file.
9687         * sysdeps/unix/sysv/linux/send.S: New file.
9688         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9689         * sysdeps/unix/sysv/linux/sendto.S: New file.
9690         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9691         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9692         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9693         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9694         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9695         * sysdeps/unix/sysv/linux/system.c: New file.
9696         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9697         * sysdeps/unix/sysv/linux/wait.c: New file.
9698         * sysdeps/unix/sysv/linux/waitid.c: New file.
9699         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9700         * sysdeps/unix/sysv/linux/writev.c: New file.
9701         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9703         * pt-readv.c: Fix comment.
9705 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9707         * tst-cleanup1.c: Include stdlib.h.
9709         * tst-cancel5.c: New test.
9710         * Makefile (tests): Add tst-cancel5.
9711         (tst-cancel5): Link against libc.so libpthread.so in that order.
9713 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9715         * forward.c (test_loaded): Prevent recursive calls.
9717         * Makefile (routines): Add libc-cancellation.
9718         * libc-cancellation.c: New file.
9719         * descr.h (struct pthread): Add multiple_threads field.
9720         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9721         new thread descriptor to 1.
9722         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9723         Initialize multiple_thread field after successful thread creation.
9724         * cancellation.c (__do_cancel): Move to pthreadP.h.
9725         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9726         (__pthread_disable_asynccancel): Add internal_function attribute.
9727         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9728         * pthread_setcancelstate.c: Likewise.
9729         * pthread_setcanceltype.c: Likewise.
9730         * pthread_exit.c: Likewise.
9731         * pthreadP.h (CANCELLATION_P): Likewise.
9732         (__do_cancel): Define as static inline.
9733         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9734         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9735         declarations.
9736         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9737         fields.  Define MULTIPLE_THREADS_OFFSET.
9738         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9739         declaration.
9740         * sysdeps/unix/sysv/linux/accept.S: New file.
9741         * sysdeps/unix/sysv/linux/read.c: New file.
9742         * sysdeps/unix/sysv/linux/write.c: New file.
9743         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9744         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9745         initialization of __libc_locking_needed.
9746         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9747         __libc_locking_needed, use multiple_threads field in TCB.
9748         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9750 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9752         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9753         version.
9754         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9756         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9757         access to __libc_locking_needed for PIC.
9759 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9761         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9762         declare for libc.so.
9763         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9764         expression.
9765         (__libc_lock_lock): Put into statement expression.
9766         (__libc_lock_unlock): Remove trailing semicolon.
9767         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9769 2002-12-12  Roland McGrath  <roland@redhat.com>
9771         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9772         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9774 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9776         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9777         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9778         Initialize __libc_locking_needed.
9779         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9780         instead of __register_pthread_fork_handler.
9781         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9782         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9783         fork-gen with libc_pthread_init.
9784         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9785         of __register_pthread_fork_handler.
9786         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9787         of __register_pthread_fork_handler.
9788         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9789         __libc_locking_needed to determine whether lock prefix can be avoided.
9790         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9792 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9794         * Makefile (tests): Add tst-cleanup1.
9795         * tst-cleanup1.c: New file.
9796         * cancellation.c (__cleanup_thread): Removed.
9797         (__do_cancel): Remove call to __cleanup_thread.
9798         * pthreadP.h: Remove __cleanup_thread prorotype.
9800         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9801         Remember function and argument even if cancellation handler
9802         function is not available.
9803         (__libc_cleanup_region_end): Execute registered function directly if
9804         pthread functions are not available.
9805         (__libc_cleanup_end): Likewise.
9807         * init.c (__pthread_initialize_minimal): Fix initialization in
9808         static lib by preventing gcc from being too clever.
9810 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9812         * init.c (__pthread_initialize_minimal): Remove unneccesary
9813         sigaddset call.
9815         * Makefile (tests): We can run tst-locale2 now.
9817 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9819         * Versions: Remove duplicated sigwait entry.
9821 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9823         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9824         inside libpthread.
9826         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9828         * pthreadP.h: Declare __pthread_enable_asynccancel and
9829         __pthread_disable_asynccancel.
9830         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9831         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9832         * cancellation.c (__pthread_enable_asynccancel): New function.
9833         (__pthread_disable_asynccancel): New function.
9834         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9835         * pt-close.c: Likewise.
9836         * pt-connect.c: Likewise.
9837         * pt-creat.c: Likewise.
9838         * pt-fcntl.c: Likewise.
9839         * pt-fsync.c: Likewise.
9840         * pt-lseek.c: Likewise.
9841         * pt-lseek64.c: Likewise.
9842         * pt-msgrcv.c: Likewise.
9843         * pt-msgsnd.c: Likewise.
9844         * pt-msync.c: Likewise.
9845         * pt-nanosleep.c: Likewise.
9846         * pt-open.c: Likewise.
9847         * pt-open64.c: Likewise.
9848         * pt-pause.c: Likewise.
9849         * pt-poll.c: Likewise.
9850         * pt-pread.c: Likewise.
9851         * pt-pread64.c: Likewise.
9852         * pt-pselect.c: Likewise.
9853         * pt-pwrite.c: Likewise.
9854         * pt-pwrite64.c: Likewise.
9855         * pt-read.c: Likewise.
9856         * pt-readv.c: Likewise.
9857         * pt-recv.c: Likewise.
9858         * pt-recvfrom.c: Likewise.
9859         * pt-recvmsg.c: Likewise.
9860         * pt-select.c: Likewise.
9861         * pt-send.c: Likewise.
9862         * pt-sendmsg.c: Likewise.
9863         * pt-sendto.c: Likewise.
9864         * pt-sigpause.c: Likewise.
9865         * pt-sigsuspend.c: Likewise.
9866         * pt-sigtimedwait.c: Likewise.
9867         * pt-sigwait.c: Likewise.
9868         * pt-sigwaitinfo.c: Likewise.
9869         * pt-system.c: Likewise.
9870         * pt-tcdrain.c: Likewise.
9871         * pt-wait.c: Likewise.
9872         * pt-waitid.c: Likewise.
9873         * pt-waitpid.c: Likewise.
9874         * pt-write.c: Likewise.
9875         * pt-writev.c: Likewise.
9876         * pthread_join.c: Likewise.
9877         * pthread_timedjoin.c: Likewise.
9879         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9880         (__xpg_sigpause): New function.
9881         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9883 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9885         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9887         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9888         _GI_pthread_cleanup_pop to pthreadP.h.
9890         * ftrylockfile.c: Use _IO_lock_trylock instead of
9891         pthread_mutex_trylock.
9893         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9894         (CANCEL_RESET): Likewise.
9895         (__pthread_setcanceltype_): Declare.
9896         (__pthread_mutex_lock_internal): Declare.
9897         (__pthread_mutex_unlock_internal): Declare.
9898         (__pthread_once_internal): Declare.
9899         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9900         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9902         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9903         and pthread_mutex_unlock.
9904         * pthread_cond_wait.c: Likewise.
9905         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9906         * pthread_mutex_unlock.c: Likewise.
9908         * pthread_setcanceltype.c: Add additional alias
9909         __pthread_setcanceltype.
9911         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9912         * sem_open.c (sem_open): Likewise.
9913         Use __libc_open, __libc_write, and __libc_close instead of
9914         open, write, and close respectively.
9916         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9917         Rewrite as statement expression since it must return a value.
9919         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9920         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9921         __pthread_kill.
9923         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9924         alias __pthread_once_internal.
9926         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9928 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9930         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9931         * tst-stdio1.c: New file.
9932         * tst-stdio2.c: New file.
9934         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9936         * Makefile (tests): Comment out tst-locale2 for now.
9937         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9939         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9940         -D_IO_MTSAFE_IO.
9941         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9942         Use _IO_lock_init instead of explicit assignment.
9944         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9945         Define __libc_lock_* and __libc_lock_recursive macros with
9946         lowlevellock macros, not pthread mutexes.
9948         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9949         of pthread_mutex_lock.
9950         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9951         instead of pthread_mutex_unlock.
9953 2002-12-06  Roland McGrath  <roland@redhat.com>
9955         * allocatestack.c (__stack_user): Use uninitialized defn.
9956         * init.c (__pthread_initialize_minimal): Initialize it here.
9958 2002-12-05  Roland McGrath  <roland@redhat.com>
9960         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9961         string.
9962         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9964         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9965         missing & here too.
9967 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9969         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9970         lowlevellock.
9971         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9972         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9973         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9974         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9975         for __libc_lock_* macros.
9976         * Makefile (routines): Add libc-lowlevellock.
9978 2002-10-09  Roland McGrath  <roland@redhat.com>
9980         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9981         Under [__PIC__], call the function via the pointer fetched for
9982         comparison rather than a call by name that uses the PLT.
9983         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9984         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9985         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9986         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9987         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9989 2002-12-04  Roland McGrath  <roland@redhat.com>
9991         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9993         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9994         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9996         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9998 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10000         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10001         a completely opaque, non-integer type.
10002         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10004 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10006         * sysdeps/i386/tls.h: Include stdlib.h.
10007         * sysdeps/x86_64/tls.h: Likewise.
10009 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10011         * Makefile (tests): Add tst-locale2.
10012         (tests-static): Likewise.
10013         * tst-locale2.c: New file.
10015         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10016         volatile and add memory clobbers to lock operations.
10018 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10020         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10021         * sysdeps/i386/i486/bits/atomic.h: New file.
10022         * sysdeps/i386/i586/bits/atomic.h: New file.
10023         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10024         include i486 version.
10025         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10026         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10027         Patch by Marijn Ros <marijn@mad.scientist.com>.
10029         * allocatestack.c (get_cached_stack): Don't crash if we first
10030         found a stack with a larger size then needed.
10031         Reported by Hui Huang <hui.huang@sun.com>.
10033         * Makefile (tests): Add tst-sysconf.
10034         * tst-sysconf.c: New file.
10036         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10037         PTHREAD_THREADS_MAX.
10039 2002-12-02  Roland McGrath  <roland@redhat.com>
10041         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10042         Declare using hidden_proto instead of attribute_hidden, so there are
10043         non-.hidden static symbols for gdb to find.
10044         (__pthread_keys): Likewise.
10045         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10046         * allocatestack.c (__stack_user): Likewise.
10047         * pthread_create.c (__pthread_keys): Likewise.
10048         (__nptl_threads_events, __nptl_last_event): Make these static instead
10049         of hidden.
10050         * pthread_key_create.c (__pthread_pthread_keys_max,
10051         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10053 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10055         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10056         statically.
10057         * tst-locale1.c: New file.
10059         * pthread_cond_timedwait.c: Include <stdlib.h>.
10061         * Makefile (tests): Add tst-fork2 and tst-fork3.
10062         * tst-fork2.c: New file.
10063         * tst-fork3.c: New file.
10065 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10067         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10069         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10070         require it to 200112L.
10072         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10073         instruction only if HAVE_CMOV is defined.
10074         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10076         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10078         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10080         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10082         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10084 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10086         * sysdeps/x86_64/bits/atomic.h: New file.
10088         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10089         16-bit operations.
10091         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10092         possible since gettid cannot fail.
10094         * sysdeps/x86_64/pthreaddef.h: New file.
10096         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10098         * sysdeps/x86_64/pthread_spin_init.c: New file.
10099         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10100         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10101         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10103         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10104         Add missing lock prefix.  Minute optimization.
10106         * tst-spin2.c (main): Also check successful trylock call.
10108         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10109         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10111         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10112         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10114         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10115         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10116         value in case of an error.  Add support for INTERNAL_SYSCALL.
10118         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10119         value in case of an error.
10121         * sysdeps/x86_64/tls.h: New file.
10123 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10125         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10126         takes the array member name and the index as parameters.
10127         (THREAD_SETMEM_NC): Likewise.
10128         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10129         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10130         interfaces.
10132         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10133         to decide which code to use.
10134         (THREAD_SETMEM_NC): Likewise.
10136         * allocatestack.c (queue_stack): Don't remove stack from list here.
10137         Do it in the caller.  Correct condition to prematurely terminate
10138         loop to free stacks.
10139         (__deallocate_stack): Remove stack from list here.
10141 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10143         * Makefile (tests): Add tst-stack1.
10144         * tst-stack1.c: New file.
10146         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10147         provided stack.
10149         * pthread_attr_getstack.c: Return bottom of the thread area.
10151 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10153         * Makefile (libpthread-routines): Add pt-allocrtsig and
10154         pthread_kill_other_threads.
10155         * pt-allocrtsig.c: New file.
10156         * pthread_kill_other_threads.c: New file.
10157         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10158         all three functions.
10159         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10160         allocrtsig.
10161         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10162         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10163         and __libc_allocate_rtsig_private.
10164         * Versions (libpthread): Export pthread_kill_other_threads_np,
10165         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10167 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10169         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10170         the end of the stack.  Adjust computations.
10171         When mprotect call fails dequeue stack and free it.
10172         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10173         attribute.
10174         * pthread_getattr_np.c: Likewise.
10176         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10177         surprises.
10179 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10181         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10182         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10184 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10186         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10187         * pthread_setspecific.c: Likewise.
10189 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10191         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10192         definitions.  Get them from the official place.
10193         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10195         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10196         Use new CLONE_ flags in clone() calls.
10198         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10199         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10201         * Versions: Add pthread_* functions for libc.
10202         * forward.c: New file.
10204         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10205         errno-loc.
10206         * herrno.c: New file.
10207         * res.c: New file.
10209         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10210         sem_trywait, and sem_timedwait.  Add herrno and res.
10211         * sem_init.c: Don't initialize lock and waiters members.
10212         * sem_open.c: Likewise.
10213         * sem_post.c: Removed.
10214         * sem_wait.c: Removed.
10215         * sem_trywait.c: Removed.
10216         * sem_timedwait.c: Removed.
10217         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10218         Includes full implementations of sem_post, sem_wait, sem_trywait,
10219         and sem_timedwait.
10220         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10221         for new implementation.
10222         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10223         and waiters fields.
10225         * tst-sem3.c: Improve error message.
10226         * tst-signal3.c: Likewise.
10228         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10229         to tell the kernel about the termination futex and to initialize tid
10230         member.  Don't initialize main_thread.
10231         * descr.h (struct pthread): Remove main_thread member.
10232         * cancelllation.c (__do_cancel): Remove code handling main thread.
10233         The main thread is not special anymore.
10235         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10236         size of the stacks to stack_cache_actsize.
10238         * pt-readv.c: Add missing "defined".
10239         * pt-sigwait.c: Likewise.
10240         * pt-writev.c: Likewise.
10242 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10244         * Versions: Export __connect from libpthread.
10245         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10247         * Makefile (libpthread-routines): Add pt-raise.
10248         * sysdeps/unix/sysv/linux/raise.c: New file.
10249         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10250         * sysdeps/generic/pt-raise.c: New file.
10252         * pthread_cond_init.c: Initialize all data elements of the condvar
10253         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10255         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10256         * pthread_create.c: Likewise.
10258         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10259         * tst-key1.c: New file.
10260         * tst-key2.c: New file.
10261         * tst-key3.c: New file.
10263         * Versions: Export pthread_detach for version GLIBC_2.0.
10264         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10266 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10268         * pthread_key_create.c: Terminate search after an unused key was found.
10269         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10271         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10272         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10274 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10276         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10277         dynamic lookup for errno in PIC.
10279         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10280         release the stack lock as soon as possible.
10281         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10282         the static TLS block.
10283         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10285         * cancellation.c: Renamed from cancelation.c.
10286         * Makefile: Adjust accordingly.
10287         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10288         * cleanup_defer.c: Use CANCELLATION_P.
10289         * pthread_testcancel.c: Likewise.
10290         * descr.h: Fix spelling in comments.
10291         * init.c: Likewise.
10292         * pthread_getattr_np.c: Likewise.
10293         * pthread_getschedparam.c: Likewise.
10294         * pthread_setschedparam.c: Likewise.
10295         * Versions: Likewise.
10297         * pt-pselect.c: New file.
10298         * Makefile (libpthread-routines): Add pt-pselect.
10299         * Versions: Add pselect.
10301         * tst-cancel4.c: New file.
10302         * Makefile (tests): Add tst-cancel4.
10304 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10306         * pthread_mutex_lock.c: Always record lock ownership.
10307         * pthread_mutex_timedlock.c: Likewise.
10308         * pthread_mutex_trylock.c: Likewise.
10310         * pt-readv.c: New file.
10311         * pt-writev.c: New file.
10312         * pt-creat.c: New file.
10313         * pt-msgrcv.c: New file.
10314         * pt-msgsnd.c: New file.
10315         * pt-poll.c: New file.
10316         * pt-select.c: New file.
10317         * pt-sigpause.c: New file.
10318         * pt-sigsuspend.c: New file.
10319         * pt-sigwait.c: New file.
10320         * pt-sigwaitinfo.c: New file.
10321         * pt-waitid.c: New file.
10322         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10323         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10324         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10325         * Versions: Add all the new functions.
10327         * tst-exit1.c: New file.
10328         * Makefile (tests): Add tst-exit1.
10330         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10332 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10334         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10336         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10337         call.  pthread_join is an official cancellation point.
10338         * pthread_timedjoin.c: Likewise.
10340         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10341         and the condvar's mutex are retrieved.
10342         * pthread_cond_timedwait.c: Likewise.
10343         Reported by dice@saros.East.Sun.COM.
10345 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10347         * pthreadP.h: Cut out all type definitions and move them...
10348         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10349         * pthreadP.h: Include <internaltypes.h>.
10351         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10352         performance tweaks.
10354         * sem_trywait.c: Shuffle #includes around to get right order.
10355         * sem_timedwait.c: Likewise.
10356         * sem_post.c: Likewise.
10357         * sem_wait.c: Likewise.
10359         * nptl 0.3 released.
10361         * Makefile (tests): Add tst-signal3.
10362         * tst-signal3.c: New file.
10364 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10366         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10367         the asms modify the sem object.
10368         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10370         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10371         the actual members.
10372         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10373         * semaphoreP.h: Include pthreadP.h.
10374         * sem_getvalue.c: Adjust to sem_t change.
10375         * sem_init.c: Likewise.
10376         * sem_open.c: Likewise.
10377         * sem_post.c: Likewise.
10378         * sem_timedwait.c: Likewise.
10379         * sem_trywait.c: Likewise.
10380         * sem_wait.c: Likewise.
10382 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10384         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10385         * tst-basic2.c: New file.
10386         * tst-exec1.c: New file.
10387         * tst-exec2.c: New file.
10388         * tst-exec3.c: New file.
10390         * tst-fork1.c: Remove extra */.
10392         * nptl 0.2 released.  The API for IA-32 is complete.