Updated to fedora-glibc-20080326T1041
[glibc.git] / nptl / ChangeLog
blob4af41097ff8eaf5d7a845b83b9b4b94ef8d33750
1 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
3         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
4         of ASSEMBLER.
5         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
6         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
8 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
10         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11         HAVE_DL_DISCOVER_OSVERSION.
12         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
13         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
15 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
17         [BZ #5778]
18         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
19         _POSIX_CHOWN_RESTRICTED value to zero.
21 2008-01-31  Roland McGrath  <roland@redhat.com>
23         * Makefile (omit-deps): Variable removed.
25 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
27         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
28         unnecessary addr32 prefix.
30 2008-01-29  Roland McGrath  <roland@redhat.com>
32         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
34 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
36         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
38 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
40         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
41         a scratch register.
42         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
43         (__lll_lock_wait_private): Fix typo.
44         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
45         (pthread_barrier_wait): Likewise.  Adjust XADD use.
46         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
47         Adjust XADD use.
48         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
49         (pthread_rwlock_timedrdlock): Return correct return value.
50         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
51         (pthread_rwlock_timedwrlock): Likewise.
53 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
55         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
56         thread returns the program exits with an error code.
58 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
60         * pthread-errnos.sym: Add EOVERFLOW.
61         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
62         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
63         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
64         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
66 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
68         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
69         parameter.  Passed it as permission to mmap.
70         * allocatestack.c (allocate_stack): Pass prot as second parameter
71         to ARCH_RETRY_MMAP.
73 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
75         * tst-basic7.c: Allocate memory for the stack.
77         [BZ #5465]
78         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
79         (__pthread_cond_timedwait): Don't use VDSO.
80         Patch by Michal Januszewski.
82 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
84         [BZ #5455]
85         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
86         Allow label before pthread_cleanup_pop.
87         (pthread_cleanup_pop_restore_np): Likewise.
89 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
91         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
92         Store 2 before returning ETIMEDOUT.
94 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
96         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
97         Store 2 before returning ETIMEDOUT.
98         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
99         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
100         (__lll_lock_wait_private): Optimize.
101         (__lll_lock_wait): Likewise.
103 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
105         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
106         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
107         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
109 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
111         [BZ #5240]
112         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
113         If we time out, try one last time to lock the futex to avoid
114         losing a wakeup signal.
115         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
118         [BZ #5245]
119         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
120         if necessary.
122 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
124         [BZ #5245]
125         * allocatestack.c (allocate_stack): Change ENOMEM error in case
126         mmap failed to EAGAIN.
127         * Makefile (tests): Add tst-basic7.
128         * tst-basic7.c: New file.
130 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
132         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
133         Use __linkin_atfork.
135 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
137         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
138         missing line continuations.
139         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
140         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
142 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
144         [BZ #5220]
145         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
146         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
147         (struct timer): Add next element.
148         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
149         enqueue timer structure into __active_timer_sigev_thread list.
150         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
151         remove timer struct from __active_timer_sigev_thread.
152         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
153         Before using timer structure make sure it is still on the
154         __active_timer_sigev_thread list.  Keep lock until done.
155         Define __active_timer_sigev_thread and
156         __active_timer_sigev_thread_lock.
158 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
160         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
161         Redefine thread_atfork for use of ATFORK_MEM.
162         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
163         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
164         function.
165         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
166         Use atomic operation when removing first element of list.
168 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
170         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
171         routine instead of an alias to __new_sem_post.
173 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
175         * init.c (__pthread_initialize_minimal): Initialize word to appease
176         valgrind.
178 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
180         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
181         libc.so just clear NAME.
182         (__libc_rwlock_fini): Nop inside of libc.so.
183         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
184         all zeros.
186 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
188         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
189         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
190         unlocking failed.
191         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
193 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
195         [BZ #4938]
196         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
197         reclaimed stack if necessary.
198         * Makefile (tests): Add tst-tsd6.
199         * tst-tsd6.c: New file.
201 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
203         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
204         Add private argument.
206 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
209         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
211 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
213         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
214         (__lll_robust_timedlock): Pass private as last argument to
215         __lll_robust_timedlock_wait.
216         (__lll_unlock): Fix a pasto.
218 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
220         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
221         sparc_old_sem): New structs.
222         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
223         (__sem_wait_cleanup): New function.
224         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
225         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
226         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
227         lll_futex_wait.
228         (__old_sem_wait): New function.
229         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
230         nptl/sysdeps/unix/sysv/linux/sparc version.
231         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
232         Likewise.
233         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
234         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
235         (__new_sem_trywait): Use sparc_old_sem structure.
236         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
237         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
238         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
239         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
240         lll_futex_timed_wait.
241         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
242         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
243         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
244         lll_futex_wake.
245         (__old_sem_post): New function.
246         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
247         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
248         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
249         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
250         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
251         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
253 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
255         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
256         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
257         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
258         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
259         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
260         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
261         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
262         Use FUTEX_WAKE_OP.
263         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
264         kernel-features.h and tcb-offsets.h.
265         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
266         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
267         process private.
268         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
269         tcb-offsets.h.
270         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
271         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
272         process private.
273         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
274         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
275         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
276         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
277         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
278         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
279         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
281 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
283         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
284         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
285         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
286         lll_futex_timed_wait.
288         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
289         __lll_robust_unlock): Rewrite as macros instead of inline functions.
290         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
291         __lll_robust_unlock, __lll_wait_tid): Likewise.
293 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
295         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
296         Fix a pasto.
297         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
298         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
299         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
300         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
301         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
302         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
303         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
304         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
305         kernel-features.h.
306         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
307         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
308         process private.  Switch DW_CFA_advance_loc1 and some
309         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
310         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
311         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
312         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
313         process private.  Switch DW_CFA_advance_loc{1,2} and some
314         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
315         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
316         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
317         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
318         Likewise.
319         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
320         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
321         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
322         Likewise.
323         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
324         (__pthread_cond_broadcast): Compare %r8 instead of
325         dep_mutex-cond_*(%rdi) with $-1.
326         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
327         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
328         of oring.
330 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
332         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
334 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
336         * allocatestack.c: Include kernel-features.h.
337         * pthread_create.c: Likewise.
338         * pthread_mutex_init.c: Likewise.
339         * init.c: Likewise.
340         * pthread_cond_timedwait.c: Likewise.
341         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
342         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
344         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
348         Likewise.
349         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
350         Likewise.
351         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
352         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
353         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
354         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
356 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
358         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
359         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
360         byte elements.  One of them is the new __shared element.
361         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
362         adjust names of other padding elements.
363         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
364         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
365         byte elements.  One of them is the new __shared element.
366         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
367         adjust names of other padding elements.
368         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
369         Renamed __pad1 element to __shared, adjust names of other padding
370         elements.
371         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
372         (pthread_rwlock_t): Likewise.
373         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
374         typo.
376 2007-08-09  Anton Blanchard  <anton@samba.org>
378         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
380 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
382         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
383         <kernel-features.h>.
384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
386 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
388         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
389         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
390         dealing with robust mutexes.
391         * pthread_mutex_timedlock.c: Likewise.
392         * pthread_mutex_trylock.c: Likewise.
393         * pthread_mutex_unlock.c: Likewise.
394         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
396 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
398         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
399         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
400         (PTHREAD_MUTEX_PSHARED): Define.
401         * pthread_mutex_init.c (__pthread_mutex_init): Set
402         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
403         mutexes.
404         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
405         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
406         as second argument to lll_lock.
407         (LLL_MUTEX_TRYLOCK): Take mutex as argument
408         instead of its __data.__lock field.
409         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
410         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
411         to lll_robust_lock.
412         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
413         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
414         instead of mutex->__data.__kind directly, pass
415         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
416         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
417         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
418         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
419         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
420         to lll_timedlock, lll_robust_timedlock, lll_unlock and
421         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
422         of mutex->__data.__kind directly.
423         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
424         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
425         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
426         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
427         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
428         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
429         and lll_futex_wake.
430         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
431         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
432         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
433         directly.
434         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
435         Take mutex as argument instead of its __data.__lock field, pass
436         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
437         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
438         __data.__lock field.
439         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
440         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
441         to lll_robust_cond_lock.
442         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
443         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
444         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
445         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
446         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
447         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
448         lll_futex_wait.
449         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
450         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
451         lll_futex_wake.
452         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
453         pshared variable, pass it to lll_lock, lll_unlock,
454         lll_futex_timedwait and lll_futex_wake.
455         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
456         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
457         and lll_futex_wake.
458         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
459         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
460         macro.
461         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
462         lll_futex_wake_unlock): Likewise.
463         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
464         Likewise.
465         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
466         lll_futex_wake_unlock): Likewise.
467         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
468         Likewise.
469         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
470         lll_futex_wake_unlock): Likewise.
471         (lll_futex_wake): Fix a typo.
472         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
474         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
475         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
476         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
477         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
478         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
479         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
480         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
481         (__pthread_cond_timedwait): Likewise.
482         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
483         (__condvar_cleanup, __pthread_cond_wait): Likewise.
485 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
487         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
488         Don't use CGOTSETUP and CGOTRESTORE macros.
489         (CGOTSETUP, CGOTRESTORE): Remove.
490         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
491         @local symbol.
493 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
495         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
496         definitions for private futexes.
497         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
498         kernel-features.h and lowlevellock.h.  Use private futexes if
499         they are available.
500         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
501         (__lll_mutex_lock_wait): Rename to
502         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
503         (__lll_mutex_timedlock_wait): Rename to ...
504         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
505         Don't compile in for libc.so.
506         (__lll_mutex_unlock_wake): Rename to ...
507         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
508         (__lll_timedwait_tid): Use __NR_gettimeofday.
509         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
510         the header from assembler.  Renamed all lll_mutex_* resp.
511         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
512         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
513         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
514         Define.
515         (__lll_lock_wait_private): Add prototype.
516         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
517         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
518         __lll_unlock_wake): Likewise.
519         (lll_lock): Add private argument.  Call __lll_lock_wait_private
520         if private is constant LLL_PRIVATE.
521         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
522         lll_timedlock, lll_robust_timedlock): Add private argument.
523         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
524         if private is constant LLL_PRIVATE.
525         (lll_robust_unlock, lll_robust_dead): Add private argument.
526         (lll_lock_t): Remove.
527         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
528         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
529         lll_cond_wake, lll_cond_broadcast): Remove.
530         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
531         kernel-features.h and lowlevellock.h.
532         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
533         (LOAD_FUTEX_WAIT): Define.
534         (__lll_robust_mutex_lock_wait): Rename to ...
535         (__lll_robust_lock_wait): ... this.  Add private argument.
536         Use LOAD_FUTEX_WAIT macro.
537         (__lll_robust_mutex_timedlock_wait): Rename to ...
538         (__lll_robust_timedlock_wait): ... this.    Add private argument.
539         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
540         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
541         lowlevellock.h.
542         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
543         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
544         __lll_mutex_{lock,unlock}_*.
545         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
546         lowlevellock.h and pthread-errnos.h.
547         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
548         FUTEX_CMP_REQUEUE, EINVAL): Remove.
549         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
550         __lll_mutex_{lock,unlock}_*.
551         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
552         lowlevellock.h and pthread-errnos.h.
553         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
554         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
555         __lll_mutex_{lock,unlock}_*.
556         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
557         lowlevellock.h.
558         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
559         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
560         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
561         (__condvar_tw_cleanup): Likewise.
562         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
563         lowlevellock.h.
564         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
565         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
566         __lll_mutex_{lock,unlock}_*.
567         ( __condvar_w_cleanup): Likewise.
568         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
569         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
570         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
571         lowlevellock.h.
572         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
573         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
574         __lll_mutex_{lock,unlock}_*.
575         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
576         lowlevellock.h.
577         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
578         FUTEX_PRIVATE_FLAG): Remove.
579         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
580         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
581         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
582         lowlevellock.h.
583         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
584         FUTEX_PRIVATE_FLAG): Remove.
585         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
586         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
587         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
588         lowlevellock.h.
589         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
590         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
591         __lll_mutex_{lock,unlock}_*.
592         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
593         lowlevellock.h.
594         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
595         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
596         __lll_mutex_{lock,unlock}_*.
597         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
598         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
599         (__new_sem_post): Use standard initial exec code sequences.
600         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
601         lowlevellock.h.
602         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
603         FUTEX_PRIVATE_FLAG): Remove.
604         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
605         exec code sequences.
606         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
607         (__new_sem_trywait): Use standard initial exec code sequences.
608         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
609         (__new_sem_wait): Use standard initial exec code sequences.
611 2007-07-31  Anton Blanchard  <anton@samba.org>
613         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
614         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
615         atomic_full_barrier.
617 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
619         * allocatestack.c (stack_cache_lock): Change type to int.
620         (get_cached_stack, allocate_stack, __deallocate_stack,
621         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
622         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
623         as second argument to lll_lock and lll_unlock macros on
624         stack_cache_lock.
625         * pthread_create.c (__find_in_stack_list): Likewise.
626         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
627         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
628         as second argument.
629         * descr.h (struct pthread): Change lock and setxid_futex field
630         type to int.
631         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
632         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
633         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
634         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
635         Likewise.
636         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
637         * pthread_cond_init.c (__pthread_cond_init): Likewise.
638         * pthreadP.h (__attr_list_lock): Change type to int.
639         * pthread_attr_init.c (__attr_list_lock): Likewise.
640         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
641         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
642         lll_{,un}lock.
643         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
644         also for lll_futex_{wake,wait}.
645         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
646         a pointer to const.
647         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
648         LLL_SHARED as second argument to lll_{,un}lock.
649         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
650         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
651         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
652         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
653         Likewise.
654         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
655         as second argument to lll_{,un}lock macros on pd->lock.
656         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
657         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
658         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
659         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
660         Likewise.
661         * sysdeps/pthread/createthread.c (do_clone, create_thread):
662         Likewise.
663         * pthread_once.c (once_lock): Change type to int.
664         (__pthread_once): Pass LLL_PRIVATE as second argument to
665         lll_{,un}lock macros on once_lock.
666         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
667         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
668         rwlock->__data.__shared as second argument to them and similarly
669         for lll_futex_w*.
670         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
671         Likewise.
672         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
673         Likewise.
674         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
675         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
676         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
677         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
678         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
679         to lll_{,un}lock macros on __sem_mappings_lock.
680         * sem_open.c (check_add_mapping): Likewise.
681         (__sem_mappings_lock): Change type to int.
682         * semaphoreP.h (__sem_mappings_lock): Likewise.
683         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
684         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
685         instead of lll_*mutex_*, pass LLL_SHARED as last
686         argument.
687         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
688         pass LLL_SHARED as last argument.
689         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
690         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
691         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
692         pass LLL_SHARED as last argument.
693         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
694         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
695         LLL_SHARED as last argument.
696         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
697         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
698         Similarly.
699         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
700         __libc_lock_lock_recursive, __libc_lock_unlock,
701         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
702         argument to lll_{,un}lock.
703         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
704         _IO_lock_unlock): Likewise.
705         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
706         compound literal.
707         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
708         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
709         __fork_lock.
710         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
711         free_mem): Likewise.
712         (__fork_lock): Change type to int.
713         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
714         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
715         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
716         lll_futex_wake.
717         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
718         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
719         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
720         New function.
721         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
722         pass it through to lll_futex_*wait, only compile in when
723         IS_IN_libpthread.
724         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
725         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
726         argument and pass it through to lll_futex_*wait.
727         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
728         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
729         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
730         inline functions to __lll_* resp. __lll_robust_*.
731         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
732         (lll_mutex_dead): Add private argument.
733         (__lll_lock_wait_private): New prototype.
734         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
735         __lll_robust_lock_timedwait): Add private argument to prototypes.
736         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
737         call __lll_lock_wait_private, otherwise pass private to
738         __lll_lock_wait.
739         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
740         __lll_robust_timedlock): Add private argument, pass it to
741         __lll_*wait functions.
742         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
743         call __lll_unlock_wake_private, otherwise pass private to
744         __lll_unlock_wake.
745         (__lll_robust_unlock): Add private argument, pass it to
746         __lll_robust_unlock_wake.
747         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
748         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
749         argument, pass it through to __lll_* inline function.
750         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
751         (lll_lock_t): Remove.
752         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
753         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
754         lll_cond_wake, lll_cond_broadcast): Remove.
755         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
756         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
757         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
758         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
759         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
760         the header from assembler.  Renamed all lll_mutex_* resp.
761         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
762         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
763         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
764         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
765         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
766         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
767         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
768         Remove prototype.
769         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
770         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
771         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
772         (lll_trylock): Likewise, use __lll_trylock_asm, pass
773         MULTIPLE_THREADS_OFFSET as another asm operand.
774         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
775         MULTIPLE_THREADS_OFFSET as last asm operand, call
776         __lll_lock_wait_private if private is constant LLL_PRIVATE,
777         otherwise pass private as another argument to __lll_lock_wait.
778         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
779         lll_timedlock, lll_robust_timedlock): Add private argument, pass
780         private as another argument to __lll_*lock_wait call.
781         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
782         MULTIPLE_THREADS_OFFSET as another asm operand, call
783         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
784         otherwise pass private as another argument to __lll_unlock_wake.
785         (lll_robust_unlock): Add private argument, pass private as another
786         argument to __lll_unlock_wake.
787         (lll_robust_dead): Add private argument, use __lll_private_flag
788         macro.
789         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
790         LLL_MUTEX_LOCK_INITIALIZER.
791         (lll_lock_t): Remove.
792         (LLL_LOCK_INITIALIZER_WAITERS): Define.
793         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
794         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
795         lll_cond_wake, lll_cond_broadcast): Remove.
796         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
797         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
798         2007-05-2{3,9} changes.
799         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
800         kernel-features.h and lowlevellock.h.
801         (LOAD_PRIVATE_FUTEX_WAIT): Define.
802         (LOAD_FUTEX_WAIT): Rewritten.
803         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
804         define.
805         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
806         (__lll_mutex_lock_wait): Rename to ...
807         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
808         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
809         (__lll_mutex_timedlock_wait): Rename to ...
810         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
811         contains private argument.  Don't compile in for libc.so.
812         (__lll_mutex_unlock_wake): Rename to ...
813         (__lll_unlock_wake): ... this.  %ecx contains private argument.
814         Don't compile in for libc.so.
815         (__lll_timedwait_tid): Use __NR_gettimeofday.
816         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
817         kernel-features.h and lowlevellock.h.
818         (LOAD_FUTEX_WAIT): Define.
819         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
820         define.
821         (__lll_robust_mutex_lock_wait): Rename to ...
822         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
823         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
824         macro.
825         (__lll_robust_mutex_timedlock_wait): Rename to ...
826         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
827         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
828         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
829         lowlevellock.h.
830         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
831         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
832         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
833         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
834         to __lll_lock_wait in %edx.
835         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
836         Include lowlevellock.h and pthread-errnos.h.
837         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
838         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
839         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
840         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
841         pass LLL_SHARED in %ecx to both __lll_lock_wait and
842         __lll_unlock_wake.
843         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
844         Include lowlevellock.h and pthread-errnos.h.
845         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
846         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
847         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
848         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
849         pass LLL_SHARED in %ecx to both __lll_lock_wait and
850         __lll_unlock_wake.
851         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
852         Include lowlevellock.h.
853         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
854         Don't define.
855         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
856         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
857         pass LLL_SHARED in %ecx to both __lll_lock_wait and
858         __lll_unlock_wake.  Use __NR_gettimeofday.
859         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
860         Include lowlevellock.h.
861         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
862         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
863         to __lll_*, pass cond_lock address in %edx rather than %ecx to
864         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
865         and __lll_unlock_wake.
866         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
867         Include lowlevellock.h.
868         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
869         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
870         MUTEX(%ebx) address in %edx rather than %ecx to
871         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
872         and __lll_unlock_wake.  Move return value from %ecx to %edx
873         register.
874         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
875         Include lowlevellock.h.
876         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
877         Don't define.
878         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
879         MUTEX(%ebp) address in %edx rather than %ecx to
880         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
881         and __lll_unlock_wake.  Move return value from %ecx to %edx
882         register.  Use __NR_gettimeofday.
883         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
884         Include lowlevellock.h.
885         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
886         Don't define.
887         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
888         MUTEX(%ebp) address in %edx rather than %ecx to
889         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
890         and __lll_unlock_wake.  Move return value from %ecx to %edx
891         register.  Use __NR_gettimeofday.
892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
893         Include lowlevellock.h.
894         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
895         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
896         MUTEX(%edi) address in %edx rather than %ecx to
897         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
898         and __lll_unlock_wake.
899         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
900         Include lowlevellock.h.
901         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
902         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
903         MUTEX(%ebx) address in %edx rather than %ecx to
904         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
905         and __lll_unlock_wake.  Move return value from %ecx to %edx
906         register.
907         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
908         lowlevellock.h.
909         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
910         define.
911         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
912         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
913         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
914         lowlevellock.h.
915         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
916         (sem_timedwait): Use __NR_gettimeofday.
917         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
918         lowlevellock.h.
919         (LOCK): Don't define.
920         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
921         lowlevellock.h.
922         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
923         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
924         are waiters.
925         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
926         2007-05-2{3,9} changes.
927         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
928         kernel-features.h and lowlevellock.h.
929         (LOAD_PRIVATE_FUTEX_WAIT): Define.
930         (LOAD_FUTEX_WAIT): Rewritten.
931         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
932         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
933         (__lll_mutex_lock_wait): Rename to ...
934         (__lll_lock_wait): ... this.  %esi is now private argument.
935         Don't compile in for libc.so.
936         (__lll_mutex_timedlock_wait): Rename to ...
937         (__lll_timedlock_wait): ... this.  %esi contains private argument.
938         Don't compile in for libc.so.
939         (__lll_mutex_unlock_wake): Rename to ...
940         (__lll_unlock_wake): ... this.  %esi contains private argument.
941         Don't compile in for libc.so.
942         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
943         kernel-features.h and lowlevellock.h.
944         (LOAD_FUTEX_WAIT): Define.
945         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
946         (__lll_robust_mutex_lock_wait): Rename to ...
947         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
948         Use LOAD_FUTEX_WAIT macro.
949         (__lll_robust_mutex_timedlock_wait): Rename to ...
950         (__lll_robust_timedlock_wait): ... this. %esi argument contains
951         private, use LOAD_FUTEX_WAIT macro.
952         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
953         lowlevellock.h.
954         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
955         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
956         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
957         __lll_lock_wait and __lll_unlock_wake.
958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
959         Include lowlevellock.h and pthread-errnos.h.
960         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
961         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
962         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
963         pass LLL_SHARED in %esi to both __lll_lock_wait and
964         __lll_unlock_wake.
965         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
966         Include lowlevellock.h and pthread-errnos.h.
967         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
968         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
969         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
970         pass LLL_SHARED in %esi to both __lll_lock_wait and
971         __lll_unlock_wake.
972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
973         Include lowlevellock.h.
974         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
975         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
976         pass LLL_SHARED in %esi to both __lll_lock_wait and
977         __lll_unlock_wake.
978         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
979         Include lowlevellock.h.
980         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
981         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
982         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
983         and __lll_unlock_wake.
984         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
985         Include lowlevellock.h.
986         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
987         Don't define.
988         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
989         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
990         and __lll_unlock_wake.
991         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
992         Include lowlevellock.h.
993         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
994         Don't define.
995         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
996         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
997         and __lll_unlock_wake.
998         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
999         Include lowlevellock.h.
1000         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1001         Don't define.
1002         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1003         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1004         and __lll_unlock_wake.
1005         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1006         Include lowlevellock.h.
1007         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1008         Don't define.
1009         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1010         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1011         and __lll_unlock_wake.
1012         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1013         Include lowlevellock.h.
1014         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1015         Don't define.
1016         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1017         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1018         and __lll_unlock_wake.
1019         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1020         lowlevellock.h.
1021         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1022         define.
1023         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1024         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1025         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1026         lowlevellock.h.
1027         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1028         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1029         lowlevellock.h.
1030         (LOCK): Don't define.
1031         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1032         lowlevellock.h.
1033         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1034         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1035         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1036         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1037         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1038         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1039         (__lll_lock_wait_private): New function.
1040         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1041         it to lll_futex_*wait.  Don't compile in for libc.so.
1042         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1043         Remove.
1044         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1045         (struct sparc_pthread_barrier): Remove.
1046         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1047         struct sparc_pthread_barrier.  Pass
1048         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1049         and lll_futex_wait macros.
1050         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1051         Remove.
1052         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1053         Include sparc pthread_barrier_wait.c instead of generic one.
1055 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1057         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1059         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1060         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1061         %ecx.
1062         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1063         (pthread_rwlock_timedwrlock): Likewise.
1064         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1065         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1067 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1069         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1071 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1073         * tst-locale2.c (useless): Add return statement.
1075 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1077         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1078         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1079         * pthread_create.c (start_thread): Likewise.
1080         * init.c (sighandler_setxid): Likewise.
1081         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1082         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1083         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1084         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1085         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1086         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1087         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1088         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1089         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1090         Likewise.
1091         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1092         Likewise.
1093         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1094         Likewise.
1095         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1096         __rtld_notify): Likewise.
1097         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1098         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1099         __pthread_once): Likewise.
1100         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1101         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1102         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1103         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1104         (lll_futex_wait): Add private argument, define as wrapper around
1105         lll_futex_timed_wait.
1106         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1107         use __lll_private_flag macro.
1108         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1109         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1110         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1111         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1112         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1113         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1114         (lll_futex_wait): Add private argument, define as wrapper around
1115         lll_futex_timed_wait.
1116         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1117         use __lll_private_flag macro.
1118         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1119         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1120         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1121         Define.
1122         (lll_futex_timed_wait, lll_futex_wake): Use it.
1123         (lll_private_futex_wait, lll_private_futex_timed_wait,
1124         lll_private_futex_wake): Removed.
1125         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1126         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1127         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1128         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1129         (lll_futex_wait): Add private argument, define as wrapper around
1130         lll_futex_timed_wait.
1131         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1132         use __lll_private_flag macro.
1133         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1134         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1135         to lll_futex_*.
1136         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1137         (lll_private_futex_wait, lll_private_futex_timed_wait,
1138         lll_private_futex_wake): Removed.
1139         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1140         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1141         (lll_private_futex_wait, lll_private_futex_timed_wait,
1142         lll_private_futex_wake): Removed.
1143         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1144         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1145         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1146         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1147         (lll_futex_wait): Add private argument, define as wrapper around
1148         lll_futex_timed_wait.
1149         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1150         use __lll_private_flag macro.
1151         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1152         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1153         to lll_futex_*.
1154         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1155         Define.
1156         (lll_futex_timed_wait, lll_futex_wake): Use it.
1157         (lll_private_futex_wait, lll_private_futex_timed_wait,
1158         lll_private_futex_wake): Removed.
1160 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1162         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1163         of the structure for sparc32.
1165 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1167         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1169 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1171         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1172         code used when private futexes are assumed.
1173         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1174         Likewise.
1176 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1178         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1179         (__lll_private_flag): Define.
1180         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1181         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1182         __lll_private_flag.
1183         (lll_private_futex_wait, lll_private_futex_timedwait,
1184         lll_private_futex_wake): Define as wrapper around non-_private
1185         macros.
1186         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1187         (__lll_private_flag): Define.
1188         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1189         (lll_private_futex_wait, lll_private_futex_timedwait,
1190         lll_private_futex_wake): Define as wrapper around non-_private
1191         macros.
1193 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1195         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1196         parameter to lll_futex_wait call.
1197         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1199         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1200         Replace lll_futex_wait with lll_private_futex_wait.
1201         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1202         Add LLL_SHARED parameter to lll_futex_wake().
1204         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1205         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1206         lll_private_futex_wake.
1207         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1208         bit from private parm before syscall.
1209         (lll_futex_timed_wait): Likewise.
1210         (lll_futex_wake): Likewise.
1211         (lll_futex_wake_unlock): Likewise.
1212         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1213         (lll_robust_mutex_unlock): Likewise.
1214         (lll_mutex_unlock_force): Likewise.
1215         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1217 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1219         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1220         compilation when unconditionally using private futexes.
1221         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1222         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1223         Likewise.
1224         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1225         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1227 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1229         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1230         Define.
1232 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1234         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1235         kernel-features.h.
1237 2007-05-16  Roland McGrath  <roland@redhat.com>
1239         * init.c (__nptl_initial_report_events): New variable.
1240         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1241         to that.
1243 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1245         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1246         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1248 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1250         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1251         implementation.
1253 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1255         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1256         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1257         * pthread_mutex_timedlock.c: Likewise.
1258         * pthread_mutex_trylock.c: Likewise.
1259         * pthread_mutex_unlock.c: Likewise.
1261 2007-06-17  Andreas Schwab  <schwab@suse.de>
1263         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1264         sections.
1266 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1268         * allocatestack.c (allocate_stack): Make code compile if
1269         __ASSUME_PRIVATE_FUTEX is set.
1271 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1273         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1274         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1275         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1276         (__pthread_rwlock_wrlock): Likewise.
1277         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1278         (pthread_rwlock_timedrdlock): Likewise.
1279         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1280         (pthread_rwlock_timedwrlock): Likewise.
1281         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1282         (__pthread_rwlock_unlock): Likewise.
1284 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1286         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1287         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1288         Split __flags into __flags, __shared, __pad1 and __pad2.
1289         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1290         futexes if they are available.
1291         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1292         in libc-lowlevellock.S allow using private futexes.
1293         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1294         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1295         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1296         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1297         lll_private_futex_timed_wait and lll_private_futex_wake.
1298         (lll_robust_mutex_unlock): Fix typo.
1299         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1300         field in futex command setup.
1301         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1302         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1303         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1304         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1305         if they are available.  Remove clear_once_control.
1306         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1307         futexes if they are available.
1308         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1309         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1310         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1311         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1312         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1313         Wake only when there are waiters.
1314         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1315         support.  Indicate that there are waiters.  Remove unnecessary
1316         extra cancellation test.
1317         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1318         left-over duplication of __sem_wait_cleanup.
1320 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1322         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1323         parameter to lll_futex_wait, lll_futex_timed_wait, and
1324         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1325         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1326         lll_private_futex_wake.
1327         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1328         * allocatestack.c: Adjust use of lll_futex_* macros.
1329         * init.c: Likewise.
1330         * lowlevellock.h: Likewise.
1331         * pthread_barrier_wait.c: Likewise.
1332         * pthread_cond_broadcast.c: Likewise.
1333         * pthread_cond_destroy.c: Likewise.
1334         * pthread_cond_signal.c: Likewise.
1335         * pthread_cond_timedwait.c: Likewise.
1336         * pthread_cond_wait.c: Likewise.
1337         * pthread_create.c: Likewise.
1338         * pthread_mutex_lock.c: Likewise.
1339         * pthread_mutex_setprioceiling.c: Likewise.
1340         * pthread_mutex_timedlock.c: Likewise.
1341         * pthread_mutex_unlock.c: Likewise.
1342         * pthread_rwlock_timedrdlock.c: Likewise.
1343         * pthread_rwlock_timedwrlock.c: Likewise.
1344         * pthread_rwlock_unlock.c: Likewise.
1345         * sysdeps/alpha/tls.h: Likewise.
1346         * sysdeps/i386/tls.h: Likewise.
1347         * sysdeps/ia64/tls.h: Likewise.
1348         * sysdeps/powerpc/tls.h: Likewise.
1349         * sysdeps/pthread/aio_misc.h: Likewise.
1350         * sysdeps/pthread/gai_misc.h: Likewise.
1351         * sysdeps/s390/tls.h: Likewise.
1352         * sysdeps/sh/tls.h: Likewise.
1353         * sysdeps/sparc/tls.h: Likewise.
1354         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1355         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1356         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1357         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1358         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1359         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1360         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1361         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1362         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1363         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1364         Likewise.
1365         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1366         * sysdeps/x86_64/tls.h: Likewise.
1368 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1370         * pthread_getattr_np.c: No need to install a cancellation handler,
1371         this is no cancellation point.
1372         * pthread_getschedparam.c: Likewise.
1373         * pthread_setschedparam.c: Likewise.
1374         * pthread_setschedprio.c: Likewise.
1375         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1376         lll_unlock_wake_cb.
1377         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1378         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1379         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1380         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1381         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1382         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1383         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1384         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1385         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1386         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1387         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1388         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1390         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1391         whether there are more than one thread makes no sense here since
1392         we only call the slow path if the locks are taken.
1393         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1395         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1396         COND_NWAITERS_SHIFT.
1397         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1398         COND_CLOCK_BITS.
1399         * pthread_cond_init.c: Likewise.
1400         * pthread_cond_timedwait.c: Likewise.
1401         * pthread_cond_wait.c: Likewise.
1402         * pthread_condattr_getclock.c: Likewise.
1403         * pthread_condattr_setclock.c: Likewise.
1404         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1406         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1407         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1410 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1412         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1413         unistd.h.
1415         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1416         insn suffix.
1417         (THREAD_GSCOPE_GET_FLAG): Remove.
1418         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1419         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1420         changes.
1421         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1422         (THREAD_GSCOPE_GET_FLAG): Remove.
1423         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1424         instead of THREAD_GSCOPE_GET_FLAG.
1425         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1426         it.
1427         * sysdeps/s390/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.
1431         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1432         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1433         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1434         THREAD_GSCOPE_WAIT): Define.
1435         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1436         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1437         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1438         THREAD_GSCOPE_WAIT): Define.
1439         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1440         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1441         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1442         THREAD_GSCOPE_WAIT): Define.
1444 2007-05-24  Richard Henderson  <rth@redhat.com>
1446         * descr.h (struct pthread): Add header.gscope_flag.
1447         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1448         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1449         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1450         THREAD_GSCOPE_WAIT): Define.
1452 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1454         * init.c: Make it compile with older kernel headers.
1456         * tst-initializers1.c: Show through exit code which test failed.
1458         * pthread_rwlock_init.c: Also initialize __shared field.
1459         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1460         element in rwlock structure into four byte elements.  One of them is
1461         the new __shared element.
1462         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1463         Likewise.
1464         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1465         __shared, adjust names of other padding elements.
1466         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1467         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1468         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1469         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1470         FUTEX_PRIVATE_FLAG.
1471         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1472         futex to use private operations if possible.
1473         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1474         Likewise.
1475         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1476         Likewise.
1477         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1478         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1479         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1480         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1481         Likewise.
1482         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1483         Likewise.
1484         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1487 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1489         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1490         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1491         * pthread_rwlock_timedrdlock.c: Likewise.
1492         * pthread_rwlock_tryrdlock.c: Likewise.
1494         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1495         optimization.
1497         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1498         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1499         duplication of __sem_wait_cleanup.
1501         * allocatestack.c: Revert last change.
1502         * init.c: Likewise.
1503         * sysdeps/i386/tls.h: Likewise.
1504         * sysdeps/x86_64/tls.h: Likewise.
1505         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1506         header structure.
1507         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1509         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1510         Add private field.
1511         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1512         * pthread_barrier_init.c: Set private flag if pshared and private
1513         futexes are supported.
1514         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1515         private field in futex command setup.
1516         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1518 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1520         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1521         support.
1522         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1523         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1524         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1525         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1526         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1528         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1529         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1530         fields in the structure.
1531         (__old_sem_init): New function.
1532         * sem_open.c: Initialize all fields of the structure.
1533         * sem_getvalue.c: Adjust for renamed element.
1534         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1535         (gen-as-const-headers): Add structsem.sym.
1536         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1537         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1538         struct new_sem.  Add struct old_sem.
1539         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1540         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1541         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1542         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1543         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1544         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1545         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1546         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1547         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1548         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1549         * tst-sem10.c: New file.
1550         * tst-sem11.c: New file.
1551         * tst-sem12.c: New file.
1552         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1553         of struct sem.
1555 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1556             Jakub Jelinek  <jakub@redhat.com>
1558         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1559         Move __pthread_enable_asynccancel right before futex syscall.
1560         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1561         Likewise.
1563 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1565         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1566         THREAD_COPY_PRIVATE_FUTEX): Define.
1567         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1568         THREAD_COPY_PRIVATE_FUTEX): Define.
1569         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1570         * init.c (__pthread_initialize_minimal_internal): Use
1571         THREAD_SET_PRIVATE_FUTEX.
1573         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1574         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1575         THREAD_GSCOPE_FLAG_WAIT): Define.
1576         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1577         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1578         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1579         PTR_DEMANGLE.
1580         (THREAD_GSCOPE_GET_FLAG): Define.
1581         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1582         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1583         instead of ->header.gscope_flag directly.
1585 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1587         * init.c (__pthread_initialize_minimal_internal): Check whether
1588         private futexes are available.
1589         * allocatestack.c (allocate_stack): Copy private_futex field from
1590         current thread into the new stack.
1591         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1592         futexes if they are available.
1593         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1594         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1595         in libc-lowlevellock.S allow using private futexes.
1596         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1597         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1598         FUTEX_PRIVATE_FLAG.
1599         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1600         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1601         if they are available.
1602         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1603         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1604         * sysdeps/i386/tcb-offsets.sym: Likewise.
1605         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1606         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1608 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1610         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1611         Remove ptr_wait_lookup_done again.
1612         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1613         (__pthread_initialize_minimal_internal): Initialize
1614         _dl_wait_lookup_done pointer in _rtld_global directly.
1615         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1616         Remove code to code _dl_wait_lookup_done.
1617         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1618         encrypted for now.
1620 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1622         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1623         pthread_mutex_init failed with ENOTSUP.
1625 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1627         * allocatestack.c (__wait_lookup_done): New function.
1628         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1629         Add ptr_wait_lookup_done.
1630         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1631         * pthreadP.h: Declare __wait_lookup_done.
1632         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1633         Define macros to implement reference handling of global scope.
1634         * sysdeps/x86_64/tls.h: Likewise.
1635         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1636         Initialize GL(dl_wait_lookup_done).
1638 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1640         [BZ #4512]
1641         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1642         is detected.
1643         * pthread_mutex_timedlock.c: Likewise.
1644         * pthread_mutex_trylock.c: Likewise.
1645         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1647         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1648         * tst-robust9.c: New file.
1649         * tst-robustpi9.c: New file.
1651         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1652         unnecessary extra cancellation test.
1654 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1656         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1657         extra cancellation test.
1658         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1660 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1662         * descr.h (struct pthread): Rearrange members to fill hole in
1663         64-bit layout.
1665         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1666         (__pthread_setaffinity_new): If syscall was successful and
1667         RESET_VGETCPU_CACHE is defined, use it before returning.
1668         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1670 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1672         [BZ #4455]
1673         * tst-align2.c: Include stackinfo.h.
1674         * tst-getpid1.c: Likewise.
1676 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1678         [BZ #4455]
1679         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1680         * tst-getpid1.c (do_test): Likewise.
1682         [BZ #4456]
1683         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1684         (allocate_stack): Likewise.
1686 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1688         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1689         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1690         (__lll_robust_timedlock_wait): Likewise.
1691         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1693 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1695         [BZ #4465]
1696         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1697         * tst-cancel4.c (tf_fdatasync): New test.
1699 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1701         [BZ #4392]
1702         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1703         check mutexes like normal mutexes.
1705         [BZ #4306]
1706         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1707         Initialize the whole sigevent structure to appease valgrind.
1709 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1711         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1712         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1714 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1716         * tst-locale1.c: Avoid warnings.
1717         * tst-locale2.c: Likewise.
1719 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1721         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1722         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1724 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1726         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1727         __extern_always_inline where appropriate.
1728         * sysdeps/pthread/pthread.h: Likewise.
1730 2007-03-13  Richard Henderson  <rth@redhat.com>
1732         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1733         separate cfi regions for the two subsections.
1735 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1737         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1738         new thread, don't just decrement it.
1739         Patch by Suzuki K P <suzuki@in.ibm.com>.
1741 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1743         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1744         PTHFCT_CALL definition.
1746 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1748         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1749         available, don't use it.
1751 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1753         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1754         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1755         call into the kernel to delay.
1757 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1759         * tst-initializers1.c: We want to test the initializers as seen
1760         outside of libc, so undefined _LIBC.
1762         * pthread_join.c (cleanup): Avoid warning.
1764 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1766         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1767         (__lll_timedwait_tid): Add unwind info.
1769         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1770         function table, mangle the pointers.
1771         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1772         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1773         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1774         demangle pointers before use.
1775         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1776         demangle pointer.
1777         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1778         * sysdeps/pthread/setxid.h: Likewise.
1780 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1782         * tst-rwlock7.c: Show some more information in case of correct
1783         behavior.
1785 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1787         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1788         (lll_futex_timed_wait): Undo part of last change, don't negate
1789         return value.
1791 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1793         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1794         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1796 2006-12-28  David S. Miller  <davem@davemloft.net>
1798         * shlib-versions: Fix sparc64 linux target specification.
1800 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1802         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1803         Adjust include path for pthread_barrier_wait.c move.
1805 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1807         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1808         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1810 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1812         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1813         6 argument cancellable syscalls.
1814         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1815         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1816         6 argument cancellable syscalls.
1817         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1819 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1821         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1822         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1824 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1826         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1827         __sync_lock_release instead of __sync_lock_release_si.
1829 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1831         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1832         Define.
1833         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1834         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1835         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1836         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1837         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1838         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1839         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1840         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1841         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1842         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1843         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1845 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1847         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1848         * pthread_barrier_wait.c: ...here.
1849         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1850         * pthread_cond_broadcast.c: ...here.
1851         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1852         * pthread_cond_signal.c: ...here.
1853         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1854         * pthread_cond_timedwait.c: ...here.
1855         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1856         * pthread_cond_wait.c: ...here.
1857         * sysdeps/pthread/pthread_once.c: Move to...
1858         * pthread_once.c: ...here.
1859         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1860         * pthread_rwlock_rdlock.c: ...here.
1861         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1862         * pthread_rwlock_timedrdlock.c: ...here.
1863         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1864         * pthread_rwlock_timedwrlock.c: ...here.
1865         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1866         * pthread_rwlock_unlock.c: ...here.
1867         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1868         * pthread_rwlock_wrlock.c: ...here.
1869         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1870         * pthread_spin_destroy.c: ...here.
1871         * sysdeps/pthread/pthread_spin_init.c: Move to...
1872         * pthread_spin_init.c: ...here.
1873         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1874         * pthread_spin_unlock.c: ...here.
1875         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1876         * pthread_getcpuclockid.c: ...here.
1878         * init.c: USE_TLS support is now always enabled.
1879         * tst-tls5.h: Likewise.
1880         * sysdeps/alpha/tls.h: Likewise.
1881         * sysdeps/i386/tls.h: Likewise.
1882         * sysdeps/ia64/tls.h: Likewise.
1883         * sysdeps/powerpc/tls.h: Likewise.
1884         * sysdeps/s390/tls.h: Likewise.
1885         * sysdeps/sh/tls.h: Likewise.
1886         * sysdeps/sparc/tls.h: Likewise.
1887         * sysdeps/x86_64/tls.h: Likewise.
1889 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1891         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1892         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1893         failed.
1895         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1896         Define to THREAD_SELF->header.multiple_threads.
1897         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1898         Likewise.
1899         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1900         Likewise.
1901         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1902         (SINGLE_THREAD_P): Likewise.
1903         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1904         (SINGLE_THREAD_P): Likewise.
1905         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1906         (SINGLE_THREAD_P): Likewise.
1907         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1908         (SINGLE_THREAD_P): Likewise.
1909         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1910         Likewise.
1911         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1912         (SINGLE_THREAD_P): Likewise.
1913         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1914         (SINGLE_THREAD_P): Likewise.
1915         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1916         Likewise.
1918 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1920         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1921         by default rather than 2_3_3.
1923 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1925         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1926         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1927         atomic_* instead of catomic_* macros.
1929 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1931         [BZ #3285]
1932         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1933         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1934         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1935         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1936         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1937         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1938         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1939         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1940         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1941         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1942         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1943         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1944         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1946 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1948         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1949         cancelable syscalls with six parameters.
1951         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1952         operations instead of atomic_*.
1954 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1956         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1958 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1960         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1961         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1962         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1963         New file.
1964         * pthread_attr_setstack.c: Allow overwriting the version number of the
1965         new symbol.
1966         * pthread_attr_setstacksize.c: Likewise.
1967         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1968         it.
1969         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1970         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1972 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1974         [BZ #3251]
1975         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1976         Patch by Petr Baudis.
1978 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1980         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1982         * tst-cancel2.c (tf): Loop as long as something was written.
1984 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1986         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1987         mutexes wake all mutexes.
1988         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1989         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1990         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1992 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1994         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1995         to guarantee the thread is always canceled.
1997 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1999         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2000         Include stdlib.h.
2001         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2002         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2003         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2005         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2007 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2009         [BZ #3123]
2010         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2011         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2012         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2013         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2014         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2015         * Makefile (tests): Add tst-cond22.
2016         * tst-cond22.c: New file.
2018 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2020         [BZ #3124]
2021         * descr.h (struct pthread): Add parent_cancelhandling.
2022         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2023         cancelhandling value to child.
2024         * pthread_create.c (start_thread): If parent thread was canceled
2025         reset the SIGCANCEL mask.
2026         * Makefile (tests): Add tst-cancel25.
2027         * tst-cancel25.c: New file.
2029 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2030             Ulrich Drepper  <drepper@redhat.com>
2032         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2033         counterp if it is already zero.
2034         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2036 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2037             Roland McGrath  <roland@redhat.com>
2039         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2040         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2041         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2042         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2043         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2044         lll_robust_mutex_timedlock, lll_mutex_unlock,
2045         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2046         Add _L_*_ symbols around the subsection.
2047         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2048         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2050 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2051             Roland McGrath  <roland@redhat.com>
2053         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2054         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2055         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2056         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2057         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2058         lll_robust_mutex_timedlock, lll_mutex_unlock,
2059         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2060         Add _L_*_ symbols around the subsection.
2061         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2062         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2064 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2066         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2067         change because it can disturb too much existing code.  If real hard
2068         reader preference is needed we'll introduce another type.
2069         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2070         (pthread_rwlock_timedwrlock): Likewise.
2071         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2072         Likewise.
2074 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2076         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2077         reader preference.
2078         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2079         (pthread_rwlock_timedwrlock): Likewise.
2080         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2081         Likewise.
2083 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2085         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2086         Only define ifdef SHARED.
2088 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2090         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2091         (free_stacks): ...here.
2092         (__free_stack_cache): New function.
2093         * pthreadP.h: Declare __free_stack_cache.
2094         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2095         ptr_freeres.
2096         * init.c (pthread_functions): Initialize ptr_freeres.
2097         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2098         New freeres function.
2100 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2102         [BZ #3018]
2103         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2105 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2107         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2108         _XOPEN_REALTIME_THREADS.
2110 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2112         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2113         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2114         HAVE_CLOCK_GETTIME_VSYSCALL.
2115         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2117 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2119         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2120         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2121         * descr.h (struct priority_protection_data): New type.
2122         (struct pthread): Add tpp field.
2123         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2124         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2125         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2126         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2127         TPP mutexes.
2128         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2129         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2130         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2131         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2132         * tpp.c: New file.
2133         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2134         boosted by TPP.
2135         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2136         * pthread_mutexattr_getprioceiling.c
2137         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2138         in the SCHED_FIFO priority range.
2139         * pthread_mutexattr_setprioceiling.c
2140         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2141         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2142         if mutex is not TPP.  Ceiling is now in __data.__lock.
2143         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2144         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2145         is now in __data.__lock.  Add locking.
2146         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2147         * Makefile (libpthread-routines): Add tpp.
2148         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2149         * tst-tpp.h: New file.
2150         * tst-mutexpp1.c: New file.
2151         * tst-mutexpp6.c: New file.
2152         * tst-mutexpp10.c: New file.
2153         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2154         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2156 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2158         [BZ #2843]
2159         * pthread_join.c (pthread_join): Account for self being canceled
2160         when checking for deadlocks.
2161         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2162         (tf1): Don't print anything after pthread_join returns, this would be
2163         another cancellation point.
2164         (tf2): Likewise.
2165         * tst-join6.c: New file.
2166         * Makefile (tests): Add tst-join6.
2168 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2170         [BZ #2892]
2171         * pthread_setspecific.c (__pthread_setspecific): Check
2172         out-of-range index before checking for unused key.
2174         * sysdeps/pthread/gai_misc.h: New file.
2176 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2178         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2179         file.  Don't use sysctl.
2180         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2181         overwrite the file if this is likely not true.
2183 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2185         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2186         * Makefile (tests): Add tst-getpid3.
2187         * tst-getpid3.c: New file.
2189 2006-07-30  Roland McGrath  <roland@redhat.com>
2191         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2193         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2194         (pause_not_cancel): New macro.
2195         (nanosleep_not_cancel): New macro.
2196         (sigsuspend_not_cancel): New macro.
2197         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2198         nanosleep_not_cancel macro from <not-cancel.h>.
2199         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2200         macro from <not-cancel.h>.
2202 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2203             Jakub Jelinek  <jakub@redhat.com>
2205         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2206         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2207         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2208         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2209         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2210         * pthread_mutex_lock.c: Likewise.
2211         * pthread_mutex_timedlock.c: Likewise.
2212         * pthread_mutex_trylock.c: Likewise.
2213         * pthread_mutex_unlock.c: Likewise.
2214         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2215         all mutexes.
2216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2218         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2219         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2220         pthread-pi-defines.sym.
2221         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2222         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2223         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2224         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2225         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2226         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2227         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2228         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2229         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2230         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2231         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2232         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2233         * tst-mutex2.c: Likewise.
2234         * tst-mutex3.c: Likewise.
2235         * tst-mutex4.c: Likewise.
2236         * tst-mutex5.c: Likewise.
2237         * tst-mutex6.c: Likewise.
2238         * tst-mutex7.c: Likewise.
2239         * tst-mutex7a.c: Likewise.
2240         * tst-mutex8.c: Likewise.
2241         * tst-mutex9.c: Likewise.
2242         * tst-robust1.c: Likewise.
2243         * tst-robust7.c: Likewise.
2244         * tst-robust8.c: Likewise.
2245         * tst-mutexpi1.c: New file.
2246         * tst-mutexpi2.c: New file.
2247         * tst-mutexpi3.c: New file.
2248         * tst-mutexpi4.c: New file.
2249         * tst-mutexpi5.c: New file.
2250         * tst-mutexpi6.c: New file.
2251         * tst-mutexpi7.c: New file.
2252         * tst-mutexpi7a.c: New file.
2253         * tst-mutexpi8.c: New file.
2254         * tst-mutexpi9.c: New file.
2255         * tst-robust1.c: New file.
2256         * tst-robust2.c: New file.
2257         * tst-robust3.c: New file.
2258         * tst-robust4.c: New file.
2259         * tst-robust5.c: New file.
2260         * tst-robust6.c: New file.
2261         * tst-robust7.c: New file.
2262         * tst-robust8.c: New file.
2263         * Makefile (tests): Add the new tests.
2265         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2266         * pthread_mutex_destroy.c: Remove unneeded label.
2268 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2270         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2271         computations to compile time.
2273 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2275         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2277 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2279         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2281 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2283         * pthread_key_create.c (__pthread_key_create): Do away with
2284         __pthread_keys_lock.
2286         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2287         (__kernel_cpumask_size): Mark as hidden.
2288         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2290         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2291         * semaphoreP.h (__sem_mappings_lock): Likewise.
2293 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2295         * pthread_atfork.c: Mark __dso_handle as hidden.
2297 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2299         [BZ #2644]
2300         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2301         the reload problem.  Change the one path in pthread_cancel_init
2302         which causes the problem.  Force gcc to reload.  Simplify callers.
2303         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2304         (_Unwind_GetBSP): Undo last patch.
2306 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2308         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2309         function pointer is reloaded after pthread_cancel_init calls.
2311         [BZ #2644]
2312         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2313         pointers are reloaded after pthread_cancel_init calls.
2315 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2317         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2318         __always_inline.
2320 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2322         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2323         Allocate new object which is passed to timer_sigev_thread so that
2324         the timer can be deleted before the new thread is scheduled.
2326 2006-04-26  Roland McGrath  <roland@redhat.com>
2328         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2330 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2332         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2333         suffix for conditional jumps.
2334         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2335         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2336         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2337         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2338         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2339         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2341         * init.c (sigcancel_handler): Compare with correct PID even if the
2342         thread is in the middle of a fork call.
2343         (sighandler_setxid): Likewise.
2344         Reported by Suzuki K P <suzuki@in.ibm.com> .
2346 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2348         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2350 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2352         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2353         fails [Coverity CID 105].
2355 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2357         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2359 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2361         [BZ #2505]
2362         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2363         Define __lll_rel_instr using lwsync.
2365 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2367         * allocatestack.c (allocate_stack): Always initialize robust_head.
2368         * descr.h: Define struct robust_list_head.
2369         (struct pthread): Use robust_list_head in robust mutex list definition.
2370         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2371         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2372         (__pthread_initialize_minimal_internal): Register robust_list with
2373         the kernel.
2374         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2375         Declare __set_robust_list_avail.
2376         * pthread_create.c (start_thread): Register robust_list of new thread.
2377         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2378         waiters.
2379         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2380         number of users, it's unreliable.
2381         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2382         set_robust_list syscall is available.
2383         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2384         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2385         Set robust_head.list_op_pending before trying to lock a robust mutex.
2386         * pthread_mutex_timedlock.c: Likewise.
2387         * pthread_mutex_trylock.c: Likewise.
2388         * pthread_mutex_unlock.c: Likewise for unlocking.
2389         * Makefile (tests): Add tst-robust8.
2390         * tst-robust8.c: New file.
2392 2006-03-08  Andreas Schwab  <schwab@suse.de>
2394         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2395         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2397 2006-03-05  Roland McGrath  <roland@redhat.com>
2399         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2400         and $config_os doesn't match *linux*.
2402 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2404         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2405         Use __syscall_error.
2406         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2407         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2408         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2409         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2410         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2411         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2413 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2415         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2417 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2419         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2420         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2421         mutex.
2422         (__lll_robust_timedlock_wait): Likewise.
2423         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2424         (__lll_robust_lock_wait): Likewise.
2425         (__lll_robust_timedlock_wait): Likewise.
2426         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2427         (__lll_robust_lock_wait): Likewise.
2428         (__lll_robust_timedlock_wait): Likewise.
2430 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2432         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2433         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2434         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2435         lll_robust_mutex_unlock): Define.
2436         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2438 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2440         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2441         instead of <clone.S>.
2443 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2445         * Makefile (libpthread-routines): Add
2446         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2447         and pthread_mutex_[sg]etprioceiling.
2448         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2449         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2450         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2451         pthread_mutex_setprioceiling.
2452         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2453         PTHREAD_PRIO_PROTECT): New enum values.
2454         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2455         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2456         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2457         prototypes.
2458         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2459         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2460         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2461         Define.
2462         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2463         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2464         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2465         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2466         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2467         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2468         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2469         protocol mutexes.
2470         * pthread_mutex_getprioceiling.c: New file.
2471         * pthread_mutex_setprioceiling.c: New file.
2472         * pthread_mutexattr_getprioceiling.c: New file.
2473         * pthread_mutexattr_setprioceiling.c: New file.
2474         * pthread_mutexattr_getprotocol.c: New file.
2475         * pthread_mutexattr_setprotocol.c: New file.
2477 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2479         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2481 2006-02-27  Roland McGrath  <roland@redhat.com>
2483         * sysdeps/pthread/Subdirs: List nptl here too.
2484         * configure (libc_add_on_canonical): New variable.
2486         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2488         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2489         self to get main source tree's file.
2490         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2491         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2492         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2493         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2494         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2495         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2496         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2497         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2498         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2499         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2500         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2501         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2502         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2504         * Makefile: Use $(sysdirs) in vpath directive.
2506         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2507         (CPPFLAGS-timer_routines.c): Likewise.
2509         * Makeconfig (includes): Variable removed.
2511 2006-02-26  Roland McGrath  <roland@redhat.com>
2513         * sysdeps/generic/pt-raise.c: Moved to ...
2514         * pt-raise.c: ... here.
2515         * sysdeps/generic/lowlevellock.h: Moved to ...
2516         * lowlevellock.h: ... here.
2518 2006-02-23  Roland McGrath  <roland@redhat.com>
2520         * descr.h (struct pthread): Add final member `end_padding'.
2521         (PTHREAD_STRUCT_END_PADDING): Use it.
2523 2006-02-20  Roland McGrath  <roland@redhat.com>
2525         * sysdeps/mips: Directory removed, saved in ports repository.
2526         * sysdeps/unix/sysv/linux/mips: Likewise.
2528 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2530         * tst-robust1.c: Add second mutex to check that the mutex list is
2531         handled correctly.
2533 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2535         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2536         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2537         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2538         lll_robust_mutex_unlock): New macros.
2539         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2540         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2541         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2542         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2543         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2545 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2547         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2548         definitions.
2549         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2551 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2553         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2554         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2555         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2556         (lll_robust_mutex_unlock): Likewise.
2558 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2560         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2561         Set robust_list.__next rather than robust_list.
2562         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2563         (__pthread_list_t): New typedef.
2564         (pthread_mutex_t): Replace __next and __prev fields with __list.
2565         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2566         (__pthread_list_t): New typedef.
2567         (pthread_mutex_t): Replace __next and __prev fields with __list.
2568         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2569         (__pthread_list_t, __pthread_slist_t): New typedefs.
2570         (pthread_mutex_t): Replace __next and __prev fields with __list.
2571         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2572         (__pthread_list_t, __pthread_slist_t): New typedefs.
2573         (pthread_mutex_t): Replace __next and __prev fields with __list.
2574         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2575         (__pthread_list_t, __pthread_slist_t): New typedefs.
2576         (pthread_mutex_t): Replace __next and __prev fields with __list.
2577         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2578         (__pthread_slist_t): New typedef.
2579         (pthread_mutex_t): Replace __next field with __list.
2581 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2583         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2584         PTHREAD_MUTEX_OWNERDEAD.
2585         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2586         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2587         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2588         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2589         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2590         to PTHREAD_MUTEX_INCONSISTENT.
2591         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2592         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2593         * pthread_mutex_trylock.c: Likewise.
2594         * pthread_mutex_timedlock.c: Likewise.
2595         * pthread_mutex_unlock.c: Likewise.
2596         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2597         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2598         lowlevelrobustlock.sym.
2599         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2600         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2601         definitions.
2602         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2603         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2604         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2605         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2606         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2608 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2610         * allocatestack.c (allocate_stack): Initialize robust_list.
2611         * init.c (__pthread_initialize_minimal_internal): Likewise.
2612         * descr.h (struct xid_command): Pretty printing.
2613         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2614         robust_list.  Adjust macros.
2615         * pthread_create.c (start_thread): Adjust robust_list handling.
2616         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2617         but the owner for all robust mutex types.
2618         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2619         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2620         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2621         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2623         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2624         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2626 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2628         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2629         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2631 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2633         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2634         Return status.
2635         (lll_futex_timed_wait): Define.
2637 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2639         * tst-cancel4.c: Test ppoll.
2641 2006-01-18  Andreas Jaeger  <aj@suse.de>
2643         [BZ #2167]
2644         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2645         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2646         by Jim Gifford <patches@jg555.com>.
2648 2006-01-13  Richard Henderson  <rth@redhat.com>
2650         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2652 2006-01-10  Roland McGrath  <roland@redhat.com>
2654         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2655         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2656         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2657         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2658         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2659         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2660         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2661         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2662         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2663         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2665 2006-01-09  Roland McGrath  <roland@redhat.com>
2667         * tst-initializers1-c89.c: New file.
2668         * tst-initializers1-c99.c: New file.
2669         * tst-initializers1-gnu89.c: New file.
2670         * tst-initializers1-gnu99.c: New file.
2671         * Makefile (tests): Add them.
2672         (CFLAGS-tst-initializers1-c89.c): New variable.
2673         (CFLAGS-tst-initializers1-c99.c): New variable.
2674         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2675         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2677         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2678         Use __extension__ on anonymous union definition.
2679         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2680         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2681         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2682         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2683         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2685 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2687         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2688         Don't give the union a name because it changes the mangled name.
2689         Instead name the struct for __data.
2690         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2691         Likewise.
2692         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2693         Likewise.
2695 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2697         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2698         stack bias to mc_ftp field.
2700 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2702         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2703         being too clever and reloading the futex value where it shouldn't.
2705 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2707         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2708         correct type.
2710 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2712         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2713         Add cfi directives.
2715 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2717         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2718         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2719         rename in tcbhead_t.
2721         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2722         Don't give the union a name because it changes the mangled name.
2723         Instead name the struct for __data.
2724         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2725         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2726         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2727         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2728         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2729         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2731 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2733         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2734         Return status.
2735         (lll_futex_timed_wait): Define.
2736         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2737         * sysdeps/pthread/aio_misc.h: New file.
2739 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2741         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2743 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2745         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2746         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2747         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2749 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2751         * tst-cancel24.cc: Use C headers instead of C++ headers.
2753 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2755         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2756         sparc-linux configured glibc.
2757         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2758         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2759         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2760         atomic_compare_and_exchange_val_24_acq instead of
2761         atomic_compare_and_exchange_val_acq.
2762         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2763         instead of atomic_exchange_rel.
2764         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2765         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2766         file.
2767         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2768         file.
2769         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2770         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2771         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2772         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2773         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2774         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2775         New file.
2776         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2777         New file.
2778         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2779         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2780         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2781         file.
2782         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2783         file.
2784         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2786 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2788         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2789         mutex initializers.
2791 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2793         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2794         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2795         THREAD_COPY_POINTER_GUARD): Define.
2796         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2797         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2799 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2801         * version.c: Update copyright year.
2803 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2805         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2806         .eh_frame section, use cfi_* directives.
2807         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2809 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2811         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2812         now.
2814 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2816         * sysdeps/pthread/sigaction.c: Removed.
2817         * sigaction.c: New file.
2818         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2820 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2822         * Makefile (tests): Add tst-signal7.
2823         * tst-signal7.c: New file.
2825 2005-12-27  Roland McGrath  <roland@redhat.com>
2827         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2828         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2829         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2830         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2831         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2832         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2833         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2834         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2835         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2836         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2837         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2839 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2841         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2842         and __prev field to pthread_mutex_t.
2843         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2844         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2845         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2846         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2847         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2848         to pthread_mutex_t.
2850 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2852         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2853         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2854         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2855         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2856         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2857         and PTHREAD_MUTEXATTR_FLAG_BITS.
2858         * descr.h (struct pthread): Add robust_list field and define
2859         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2860         * pthread_mutexattr_getrobust.c: New file.
2861         * pthread_mutexattr_setrobust.c: New file.
2862         * pthread_mutex_consistent.c: New file.
2863         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2864         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2865         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2866         Adjust pthread_mutex_t initializers.
2867         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2868         field to pthread_mutex_t.
2869         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2870         and __prev field to pthread_mutex_t.
2871         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2872         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2873         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2874         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2875         * pthread_mutexattr_gettype.c: Likewise.
2876         * pthread_mutexattr_setpshared.c: Likewise.
2877         * pthread_mutexattr_settype.c: Likewise.
2878         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2879         Initialize mutex kind according to robust flag.
2880         * pthread_mutex_lock.c: Implement local robust mutex.
2881         * pthread_mutex_timedlock.c: Likewise.
2882         * pthread_mutex_trylock.c: Likewise.
2883         * pthread_mutex_unlock.c: Likewise.
2884         * pthread_create.c (start_thread): Mark robust mutexes which remained
2885         locked as dead.
2886         * tst-robust1.c: New file.
2887         * tst-robust2.c: New file.
2888         * tst-robust3.c: New file.
2889         * tst-robust4.c: New file.
2890         * tst-robust5.c: New file.
2891         * tst-robust6.c: New file.
2892         * tst-robust7.c: New file.
2893         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2894         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2895         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2896         tst-robust5, tst-robust6, and tst-robust7.
2898         * tst-typesizes.c: New file.
2899         * Makefile (tests): Add tst-typesizes.
2901         * tst-once3.c: More debug output.
2903 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2905         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2906         missing after last change.
2908         * version.c: Update copyright year.
2910 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2912         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2913         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2914         * pthread_mutex_trylock.c: Likewise.
2915         * pthread_mutex_timedlock.c: Likewise.
2916         * pthread_mutex_unlock.c: Likewise.
2918 2005-12-22  Roland McGrath  <roland@redhat.com>
2920         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2921         so that #include_next's search location is not reset to the -I..
2922         directory where <nptl/...> can be found.
2924 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2926         [BZ #1913]
2927         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2928         Fix unwind info.  Remove useless branch prediction prefix.
2929         * tst-cancel24.cc: New file.
2930         * Makefile: Add rules to build and run tst-cancel24.
2932 2005-12-21  Roland McGrath  <roland@redhat.com>
2934         * libc-cancellation.c: Use <> rather than "" #includes.
2935         * pt-cleanup.c: Likewise.
2936         * pthread_create.c: Likewise.
2937         * pthread_join.c: Likewise.
2938         * pthread_timedjoin.c: Likewise.
2939         * pthread_tryjoin.c: Likewise.
2940         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2941         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2942         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2943         * unwind.c: Likewise.
2945 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2947         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2948         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2949         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2950         THREAD_COPY_POINTER_GUARD): Define.
2952 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2954         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2955         rather than one.
2956         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2957         THREAD_COPY_POINTER_GUARD): Define.
2958         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2959         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2960         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2961         THREAD_COPY_POINTER_GUARD): Define.
2962         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2963         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2964         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2965         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2966         Use PTR_DEMANGLE for B0 if defined.
2968 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2970         * pthread_create.c (__pthread_create_2_1): Use
2971         THREAD_COPY_POINTER_GUARD if available.
2972         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2973         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2974         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2975         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2976         * sysdeps/x86_64/tls.h: Likewise.
2978 2005-12-15  Roland McGrath  <roland@redhat.com>
2980         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2982 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2984         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2985         sysdeps/generic.
2986         * errno-loc.c: New file.
2988 2005-12-12  Roland McGrath  <roland@redhat.com>
2990         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2991         adjustments before choosing stack size.  Update minimum stack size
2992         calculation to match allocate_stack change.
2994 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2996         * allocatestack.c (allocate_stack): Don't demand that there is an
2997         additional full page available on the stack beside guard, TLS, the
2998         minimum stack.
3000 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3002         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3003         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3005         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3006         compiling 32-bit code we must define __cleanup_fct_attribute.
3008 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3010         [BZ #1920]
3011         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3012         __attribute__ instead of __attribute.
3013         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3014         (__cleanup_fct_attribute): Likewise.
3016 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3018         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3019         a write barrier before writing libgcc_s_getcfa.
3021 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3023         * sysdeps/unix/sysv/linux/configure: Removed.
3025 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3027         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3028         optional init_array/fini_array support.
3030 2005-10-24  Roland McGrath  <roland@redhat.com>
3032         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3033         versioned_symbol use.
3035 2005-10-16  Roland McGrath  <roland@redhat.com>
3037         * init.c (__pthread_initialize_minimal_internal): Even when using a
3038         compile-time default stack size, apply the minimum that allocate_stack
3039         will require, and round up to page size.
3041 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3043         * Makefile ($(test-modules)): Remove static pattern rule.
3045 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3046             Ulrich Drepper  <drepper@redhat.com>
3048         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3049         alignment in callback function.
3050         * Makefile: Add rules to build and run tst-align3.
3051         * tst-align3.c: New file.
3053 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3055         * allocatestack.c (setxid_signal_thread): Add
3056         INTERNAL_SYSCALL_DECL (err).
3058 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3060         * allocatestack.c (setxid_signal_thread): Need to use
3061         atomic_compare_and_exchange_bool_acq.
3063 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3064             Jakub Jelinek  <jakub@redhat.com>
3066         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3067         CANCEL_RESTMASK.
3068         (struct pthread): Move specific_used field to avoid padding.
3069         Add setxid_futex field.
3070         * init.c (sighandler_setxid): Reset setxid flag and release the
3071         setxid futex.
3072         * allocatestack.c (setxid_signal_thread): New function.  Broken
3073         out of the bodies of the two loops in __nptl_setxid.  For undetached
3074         threads check whether they are exiting and if yes, don't send a signal.
3075         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3076         * pthread_create.c (start_thread): For undetached threads, check
3077         whether setxid bit is set.  If yes, wait until signal has been
3078         processed.
3080         * allocatestack.c (STACK_VARIABLES): Initialize them.
3081         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3083 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3085         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3086         waiters, awake all waiters on the associated mutex.
3088 2005-09-22  Roland McGrath  <roland@redhat.com>
3090         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3091         ../sysdeps/x86_64/hp-timing.h).
3093 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3095         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3096         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3097         (lll_futex_wake_unlock): Define.
3098         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3099         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3100         (lll_futex_wake_unlock): Define.
3101         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3102         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3103         (lll_futex_wake_unlock): Define.
3104         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3105         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3106         (lll_futex_wake_unlock): Define.
3107         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3108         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3109         (lll_futex_wake_unlock): Define.
3110         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3111         lll_futex_wake_unlock.
3112         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3113         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3114         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3116         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3117         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3119 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3121         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3122         Fix typo in register name.
3124 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3126         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3127         Use __sigfillset.  Document that sigfillset does the right thing wrt
3128         to SIGSETXID.
3130 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
3132         * tst-stackguard1.c (do_test): Likewise.
3134 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
3136         * tst-stackguard1.c (do_test): Don't fail if the poor man's
3137         randomization doesn't work well enough.
3139 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3141         [BZ #1102]
3142         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3143         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3144         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3145         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3146         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3147         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3148         in the structure.
3149         * Makefile (tests): Add tst-initializers1.
3150         (CFLAGS-tst-initializers1.c): Set.
3151         * tst-initializers1.c: New test.
3153 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3155         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3156         Make sure __flags are located at offset 48 from the start of the
3157         structure.
3159 2005-07-02  Roland McGrath  <roland@redhat.com>
3161         * Makeconfig: Comment fix.
3163 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3165         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3166         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3167         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3168         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3169         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3170         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3171         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3172         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3173         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3174         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3176 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3178         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3179         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3180         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3181         fields.
3182         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3183         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3184         field.  Put in sysinfo field unconditionally.
3185         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3186         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3187         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3188         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3189         fields.
3190         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3191         * pthread_create.c (__pthread_create_2_1): Use
3192         THREAD_COPY_STACK_GUARD macro.
3193         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3194         tests.
3195         * tst-stackguard1.c: New file.
3196         * tst-stackguard1-static.c: New file.
3198 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3200         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3201         Invoke CGOTSETUP and CGOTRESTORE.
3202         (CGOTSETUP, CGOTRESTORE): Define.
3204 2005-05-29  Richard Henderson  <rth@redhat.com>
3206         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3207         (tf_write, tf_writev): Use it.
3208         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3209         the system minimum.
3211 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3213         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3214         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3215         __librt_*_asynccancel@local.
3217 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3219         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3220         all occurrences of JUMPTARGET.  Instead append @local to labels.
3222 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3224         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3225         size/alignment of struct pthread rather than tcbhead_t.
3226         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3227         Likewise.
3228         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3229         Likewise.
3230         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3231         Likewise.
3233 2005-05-19  Richard Henderson  <rth@redhat.com>
3235         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3236         __sync_val_compare_and_swap, not explicit _si variant.
3237         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3239 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3241         [BZ #915]
3242         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3244 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3246         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3247         .eh_frame section, use cfi_* directives.
3249 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3251         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3252         of "" includes.
3254 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3256         [BZ #1075]
3257         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3258         aio_write blocks.
3260 2005-04-27  Roland McGrath  <roland@redhat.com>
3262         * Makefile (tests): Remove tst-clock2.
3264         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3265         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3266         translating to the kernel clockid_t for our own process/thread clock.
3268         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3270 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3272         * old_pthread_cond_init.c: Include <errno.h>.
3273         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3274         process shared or uses clock other than CLOCK_REALTIME.
3275         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3277 2005-04-13  David S. Miller  <davem@davemloft.net>
3279         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3280         * sysdeps/sparc/sparc64/clone.S: New file.
3282 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3284         [BZ #1102]
3285         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3286         __inline instead of inline.
3287         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3289 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3291         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3292         functionally equivalent, but shorter instructions.
3293         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3294         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3295         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3296         Likewise.
3297         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3298         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3299         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3300         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3302         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3303         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3304         Likewise.
3305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3306         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3308         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3309         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3311 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3313         * sysdeps/mips/Makefile: New file.
3314         * sysdeps/mips/nptl-sysdep.S: New file.
3315         * sysdeps/mips/tcb-offsets.sym: New file.
3316         * sysdeps/mips/pthread_spin_lock.S: New file.
3317         * sysdeps/mips/pthread_spin_trylock.S: New file.
3318         * sysdeps/mips/pthreaddef.h: New file.
3319         * sysdeps/mips/tls.h: New file.
3320         * sysdeps/mips/jmpbuf-unwind.h: New file.
3321         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3322         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3323         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3324         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3325         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3326         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3327         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3328         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3329         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3330         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3332 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3334         [BZ #1112]
3335         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3336         variable to scerr.
3338 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3340         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3342 2005-02-25  Roland McGrath  <roland@redhat.com>
3344         * alloca_cutoff.c: Correct license text.
3345         * tst-unload.c: Likewise.
3346         * sysdeps/pthread/allocalim.h: Likewise.
3347         * sysdeps/pthread/pt-initfini.c: Likewise.
3348         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3349         * sysdeps/pthread/bits/sigthread.h: Likewise.
3350         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3351         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3353 2005-02-16  Roland McGrath  <roland@redhat.com>
3355         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3356         Use unsigned int * for ptr_nthreads.
3358 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3360         [BZ #721]
3361         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3362         gcc4.
3364 2005-02-07  Richard Henderson  <rth@redhat.com>
3366         [BZ #787]
3367         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3368         argument.
3370 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3372         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3373         order of arguments in invocation of atomic_add_zero.
3375 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3377         [BZ #737]
3378         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3379         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3380         at least gotntpoff relocation and addition.
3381         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3382         Likewise.
3383         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3384         Likewise.
3385         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3386         Likewise.
3388 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3390         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3391         entry for static tls deallocation fix.
3392         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3393         also contains information whether the memory pointed to is static
3394         TLS or not.
3395         * sysdeps/i386/tls.h: Likewise.
3396         * sysdeps/ia64/tls.h: Likewise.
3397         * sysdeps/powerpc/tls.h: Likewise.
3398         * sysdeps/s390/tls.h: Likewise.
3399         * sysdeps/sh/tls.h: Likewise.
3400         * sysdeps/sparc/tls.h: Likewise.
3401         * sysdeps/x86_64/tls.h: Likewise.
3403 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3405         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3407 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3409         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3410         %esp.
3411         * Makefile (tests): Add tst-align2.
3412         * tst-align2.c: New test.
3413         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3414         -mpreferred-stack-boundary=4.
3416 2004-12-18  Roland McGrath  <roland@redhat.com>
3418         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3419         New file removed withdrawn for the moment.
3421 2004-12-17  Richard Henderson  <rth@redhat.com>
3423         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3424         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3426 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3428         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3429         Increased PTHREAD_STACK_MIN.
3431         * tst-context1.c (stacks): Use bigger stack size.
3433 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3435         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3436         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3438 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3440         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3441         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3442         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3444 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3446         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3448 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3450         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3451         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3453         * tst-getpid1.c: If child crashes, report this first.  Print which
3454         signal.
3456 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3458         * init.c (__pthread_initialize_minimal_internal): Also unblock
3459         SIGSETXID.
3461 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3463         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3464         _POSIX_THREAD_CPUTIME): Define to 0.
3465         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3466         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3467         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3468         __timer_signal_thread_tclk): Remove.
3469         (init_module): Remove their initialization.
3470         (thread_cleanup): Remove their cleanup assertions.
3471         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3472         __timer_signal_thread_tclk): Remove.
3473         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3474         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3475         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3477 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3479         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3480         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3482         * Makefile (tests): Add tst-getpid2.
3483         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3484         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3485         * tst-getpid2.c: New test.
3487 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3489         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3491 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3493         * Makefile (tests): Add tst-getpid1.
3494         * tst-getpid1.c: New file.
3495         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3496         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3498 2004-12-02  Roland McGrath  <roland@redhat.com>
3500         * Makefile (libpthread-nonshared): Variable removed.
3501         ($(objpfx)libpthread_nonshared.a): Target removed.
3502         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3503         These are now handled by generic magic from
3504         libpthread-static-only-routines being set.
3506 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3508         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3509         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3510         _POSIX_THREAD_PRIO_PROTECT): Define.
3511         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3512         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3513         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3515 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3517         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3518         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3519         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3520         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3521         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3522         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3523         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3525 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3527         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3529         * Makefile (libpthread-routines): Add pthread_setschedprio.
3530         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3531         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3532         * pthread_setschedprio.c: New file.
3534 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3536         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3537         * pthread_cancel.c (pthread_create): Likewise.
3539         * Makefile (libpthread-routines): Add vars.
3540         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3541         * init.c (__default_stacksize, __is_smp): Remove.
3542         * vars.c: New file.
3543         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3544         and define a wrapper macro.
3545         (PTHREAD_STATIC_FN_REQUIRE): Define.
3546         * allocatestack.c (__find_thread_by_id): Undefine.
3547         * pthread_create (__pthread_keys): Remove.
3548         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3549         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3550         PTHREAD_STATIC_FN_REQUIRE.
3552 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3554         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3555         parameter to REGISTER macro.
3557 2004-11-17  Roland McGrath  <roland@redhat.com>
3559         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3560         Make sure SIGCANCEL is blocked as well.
3562 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3564         * sysdeps/pthread/setxid.h: New file.
3565         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3566         (struct xid_command): Add forward decl.
3567         (struct pthread_functions): Change return type of __nptl_setxid hook
3568         to int.
3569         * pthreadP.h (__nptl_setxid): Change return type to int.
3570         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3571         calling thread, return its return value and set errno on failure.
3572         * descr.h (struct xid_command): Change id type to long array.
3574         * Makefile: Add rules to build and test tst-setuid1 and
3575         tst-setuid1-static.
3576         * tst-setuid1.c: New test.
3577         * tst-setuid1-static.c: New test.
3579 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3581         * Makefile (tests): Add tst-exit3.
3582         * tst-exit3.c: New test.
3584 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3586         * Makefile (tests): Add tst-exit2.
3587         * tst-exit2.c: New file.
3589 2004-11-09  Roland McGrath  <roland@redhat.com>
3591         [BZ #530]
3592         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3593         here, before calling clone.
3594         * pthread_create.c (start_thread): Don't do it here.
3596 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3598         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3600 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3602         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3603         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3604         assembler warning.
3606 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3608         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3609         if sched_priority is not between minprio and maxprio.
3611 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3613         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3614         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3616         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3617         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3619 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3621         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3622         not-cancelable I/O functions.
3624 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3626         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3627         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3628         make sure 2 is stored in the futex and we looked at the old value.
3629         Fix a few other problems to return the correct value.
3631 2004-10-14  Richard Henderson  <rth@redhat.com>
3633         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3634         make gcc4 happy.
3636 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3638         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3639         of pthread-functions.h and pthreaddef.h.
3640         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3642         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3643         Change __data.__nwaiters from int to unsigned int.
3645         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3646         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3648         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3649         before return type.
3651         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3652         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3654 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3656         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3657         test fails, remove message queue.
3658         (tf_msgsnd): Likewise.
3660 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3662         * tst-clock1.c: Change #ifdef to #if defined.
3663         * tst-clock2.c: Likewise.
3664         * tst-cond11.c: Likewise.
3666         * sysdeps/pthread/timer_create.c (timer_create): Use
3667         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3668         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3669         THREAD_CPUTIME.
3671 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3673         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3674         _POSIX_THREAD_CPUTIME): Define to 0.
3676 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3678         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3679         and _POSIX_THREAD_CPUTIME to zero.
3680         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3681         * tst-barrier2.c: Fix testing for POSIX feature.
3682         * tst-clock1.c: Likewise.
3683         * tst-clock2.c: Likewise.
3684         * tst-cond11.c: Likewise.
3685         * tst-cond4.c: Likewise.
3686         * tst-cond6.c: Likewise.
3687         * tst-flock2.c: Likewise.
3688         * tst-mutex4.c: Likewise.
3689         * tst-mutex9.c: Likewise.
3690         * tst-rwlock12.c: Likewise.
3691         * tst-rwlock4.c: Likewise.
3692         * tst-signal1.c: Likewise.
3693         * tst-spin2.c: Likewise.
3694         * sysdeps/pthread/posix-timer.h: Likewise.
3695         * sysdeps/pthread/timer_create.c: Likewise.
3696         * sysdeps/pthread/timer_routines.c: Likewise.
3698 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3701         (__lll_mutex_timedlock_wait): Address futex correctly.
3703         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3704         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3705         make sure 2 is stored in the futex and we looked at the old value.
3706         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3707         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3708         which might very well made the code not working at all before.
3709         [BZ #417]
3711 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3713         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3714         allow SIGSETXID to be sent.
3715         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3716         for SIGSETXID to be defined.
3717         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3718         SIGSETXID cannot be blocked.
3720         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3721         Add __extension__ to long long types.
3722         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3723         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3724         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3725         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3726         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3727         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3728         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3730 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3732         * descr.h (struct pthread): Add stopped_start field.
3733         * sysdeps/pthread/createthread.c (create_thread): Set
3734         start_stopped flag in descriptor for new thread appropriately.
3735         * pthread_create.c (start_thread): Only take lock to be stopped on
3736         startup if stopped_start flag says so.
3738 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3740         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3741         is created detached and if yes, do not try to free the stack in case
3742         the thread creation failed.
3743         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3744         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3745         case there has been no error.  [BZ #405]
3747         * pthread_create.c (start_thread): Don't wait for scheduler data
3748         etc to be set at the beginning of the function.  The cancellation
3749         infrastructure must have been set up.  And enable async
3750         cancellation before potentially going to sleep.  [BZ #401]
3752 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3754         * Versions: Remove exports for pthread_set*id_np functions.
3755         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3756         for now.
3757         * Makefile: Don't build pthread_set*id code for now.
3759 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3761         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3762         internal use.
3763         * allocatestack.c (__nptl_setxid): New function.
3764         * descr.h (struct xid_command): Define type.
3765         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3766         (sighandler_setxid): New function.
3767         (__pthread_initialize_minimal): Register sighandler_setxid for
3768         SIGCANCEL.
3769         * pt-allocrtsig.c: Update comment.
3770         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3771         Declare __nptl_setxid.
3772         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3773         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3774         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3775         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3776         and pthread_setresuid_np.
3777         * pthread_setgid_np.c: New file.
3778         * pthread_setuid_np.c: New file.
3779         * pthread_setegid_np.c: New file.
3780         * pthread_seteuid_np.c: New file.
3781         * pthread_setregid_np.c: New file.
3782         * pthread_setreuid_np.c: New file.
3783         * pthread_setresgid_np.c: New file.
3784         * pthread_setresuid_np.c: New file.
3785         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3786         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3787         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3788         and pthread_setresuid_np.
3789         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3790         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3791         pthread_setregid, and pthread_setresgid.
3793 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3795         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3796         ENOMEM when out of memory.
3798 2004-09-10  Roland McGrath  <roland@redhat.com>
3800         [BZ #379]
3801         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3802         code, since we don't try to use the broken CLONE_STOPPED any more.
3803         * pthread_create.c (start_thread): Likewise.
3805 2004-09-15  Richard Henderson  <rth@redhat.com>
3807         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3809 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3811         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3812         (__libc_unwind_longjmp): Delete macro and declare as function.
3813         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3814         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3815         nptl directory.
3816         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3817         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3818         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3820 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3822         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3823         for __USE_XOPEN2K.
3824         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3825         types also for __USE_XOPEN2K.
3826         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3827         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3828         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3829         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3830         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3831         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3832         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3833         [BZ #320]
3835 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3837         * sysdeps/pthread/pthread.h
3838         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3839         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3840         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3841         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3842         [BZ #375]
3844 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3846         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3847         PSEUDO to be used with . prefix.
3849         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3850         Use atomic_increment instead of atomic_exchange_and_add.
3851         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3852         Likewise.
3853         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3854         Likewise.
3855         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3856         Likewise.
3858         * allocatestack.c (allocate_stack): Use atomic_increment_val
3859         instead of atomic_exchange_and_add.
3860         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3861         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3862         Likewise.
3863         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3864         Likewise.
3866         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3867         the initialization function might throw.
3869 2005-09-05  Richard Henderson  <rth@redhat.com>
3871         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3872         Move definition inside libpthread, libc, librt check.  Provide
3873         definition for rtld.
3875 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3877         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3878         waiters, awake all waiters on the associated mutex.
3880 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3882         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3883         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3884         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3885         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3886         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3887         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3888         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3889         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3890         * unwind.c: Use it.
3892         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3893         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3894         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3895         Likewise.
3896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3897         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3898         this is the last waiter, signal pthread_cond_destroy caller and
3899         avoid using the pthread_cond_t structure after unlock.
3900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3902         Read clock type from the least significant bits of __nwaiters instead
3903         of __clock.
3904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3905         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3907 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3909         [BZ #342]
3910         * Makefile (tests): Add tst-cond20 and tst-cond21.
3911         * tst-cond20.c: New test.
3912         * tst-cond21.c: New test.
3913         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3914         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3915         it unsigned int.
3916         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3917         Likewise.
3918         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3919         (pthread_cond_t): Likewise.
3920         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3921         Likewise.
3922         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3923         Likewise.
3924         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3925         Likewise.
3926         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3927         (cond_nwaiters): New.
3928         (clock_bits): New.
3929         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3930         if there are waiters not signalled yet.
3931         Wait until all already signalled waiters wake up.
3932         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3933         __nwaiters.  If pthread_cond_destroy has been called and this is the
3934         last waiter, signal pthread_cond_destroy caller and avoid using
3935         the pthread_cond_t structure after unlock.
3936         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3937         decrement it when leaving.  If pthread_cond_destroy has been called
3938         and this is the last waiter, signal pthread_cond_destroy caller.
3939         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3940         Likewise.  Read clock type from the least significant bits of
3941         __nwaiters instead of __clock.
3942         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3943         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3944         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3945         clock type just from the last COND_CLOCK_BITS bits of value.
3946         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3947         instead of __clock, just from second bit of condattr's value.
3949 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3951         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3952         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3953         != 64.
3954         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3956 2004-08-15  Roland McGrath  <roland@frob.com>
3958         * pthread_atfork.c: Update copyright terms including special exception
3959         for these trivial files, which are statically linked into executables
3960         that use dynamic linking for the significant library code.
3962 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3964         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3965         pthread_rwlock_rdlock.
3966         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3967         Decrease __nr_readers_queued after reacquiring lock.
3968         * sysdeps/pthread/pthread_rwlock_timedrdlock
3969         (pthread_rwlock_timedrdlock): Likewise.
3970         Reported by Bob Cook <bobcook47@hotmail.com>.
3972 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3974         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3975         before pthread_barrier_wait.
3977 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3979         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3980         Remove unnecessary exception handling data.
3982 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3984         [BZ #284]
3985         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3986         instead of clockid_t.
3988 2004-07-21  Roland McGrath  <roland@redhat.com>
3990         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3992 2004-07-19  Roland McGrath  <roland@redhat.com>
3994         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3996 2004-07-02  Roland McGrath  <roland@redhat.com>
3998         * configure: Don't exit.
4000 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4002         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4003         (__pthread_cond_timedwait): Check for invalid nanosecond in
4004         timeout value.
4006 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4008         * Makefile: Add rules to build and run tst-fini1.
4009         * tst-fini1.c: New file.
4010         * tst-fini1mod.c: New file.
4012 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4014         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4015         if no cancellation support is needed.
4016         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4017         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4018         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4019         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4020         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4021         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4022         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4023         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4024         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4026         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4027         only if not already defined.
4029 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4031         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4032         constraint "m" instead of "0" for futex.
4034         * shlib-versions: Add powerpc64-.*-linux.*.
4036 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4038         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4039         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4040         for valid tv_nsec.
4041         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4042         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4043         bits.
4045 2004-06-29  Roland McGrath  <roland@redhat.com>
4047         * Banner: NPTL no longer has its own version number.
4048         * Makefile (nptl-version): Variable removed.
4049         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4050         using $(version), the glibc version number.
4052 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4054         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4055         Fix branch offset for a PLT entry.
4056         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4057         Likewise.
4058         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4059         Likewise.
4060         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4061         Likewise.
4062         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4063         Likewise.
4065 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4067         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4068         unconditionally.
4070 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4072         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4073         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4074         instead of tv_sec.
4075         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4076         (pthread_rwlock_timedrdlock): Likewise.
4078 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4080         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4081         Set __r7 to val, not mutex.
4083 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4085         * Makefile: Add rules to build tst-rwlock14.
4086         * tst-rwlock14.c: New file.
4088 2004-06-24  Boris Hu  <boris.hu@intel.com>
4090         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4091         check.
4092         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4094 2004-06-19  Andreas Jaeger  <aj@suse.de>
4096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4097         assembler in last patch.
4099 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4101         * sysdeps/pthread/pthread_cond_timedwait.c
4102         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4104         (__pthread_cond_timedwait): Check for invalid nanosecond in
4105         timeout value.
4106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4107         * tst-cond19.c: New file.
4108         * Makefile: Add rules to build and run tst-cond19.
4110 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4112         * tst-context1.c (GUARD_PATTERN): Defined.
4113         (tst_context_t): Define struct containing ucontext_t & guard words.
4114         (ctx): Declare as an array of tst_context_t.
4115         (fct): Verify uc_link & guard words are still valid.
4116         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4118 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4120         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4121         Add __data.__futex field, reshuffle __data.__clock.
4122         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4123         (__pthread_cond_signal): Increment __futex at the same time as
4124         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4125         address of low 32-bits of __wakeup_seq to futex syscall.
4126         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4127         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4128         releasing internal lock to FUTEX_WAIT.
4129         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4130         (__pthread_cond_timedwait): Likewise.
4131         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4132         (FUTEX_CMP_REQUEUE): Define.
4133         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4134         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4135         Pass __futex value from before the unlock and __futex address instead
4136         of address of low 32-bits of __wakeup_seq to futex syscall.
4137         Fallback to FUTEX_WAKE all on any errors.
4139 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4141         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4142         comment typo.
4143         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4144         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4145         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4146         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4147         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4149 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4151         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4152         Add memory clobber to inline assembly.
4153         (__lll_mutex_trylock): Likewise.
4154         (__lll_mutex_cond_trylock): Likewise.
4156 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4158         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4159         Pass val argument as 6th system call argument in %r7.
4161 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4163         * Makefile (tests): Add tst-cond16.
4164         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4165         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4166         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4167         Add __data.__futex field, reshuffle __data.__clock.
4168         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4169         (__pthread_cond_signal): Increment __futex at the same time as
4170         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4171         address of low 32-bits of __wakeup_seq to futex syscall.
4172         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4173         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4174         releasing internal lock to FUTEX_WAIT.
4175         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4176         (__pthread_cond_timedwait): Likewise.
4177         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4178         (FUTEX_CMP_REQUEUE): Define.
4179         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4180         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4181         Pass __futex value from before the unlock and __futex address instead
4182         of address of low 32-bits of __wakeup_seq to futex syscall.
4183         Fallback to FUTEX_WAKE all on any errors.
4184         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4185         Define.
4186         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4187         internally.  Return non-zero if error, zero if success.
4188         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4189         Add __data.__futex field, reshuffle __data.__clock.
4190         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4191         Define.
4192         (lll_futex_requeue): Add val argument, return 1 unconditionally
4193         for the time being.
4194         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4195         Add __data.__futex field, reshuffle __data.__clock.
4196         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4197         Define.
4198         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4199         internally.  Return non-zero if error, zero if success.
4200         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4201         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4202         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4203         Define.
4204         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4205         internally.  Return non-zero if error, zero if success.
4206         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4207         Add __data.__futex field, reshuffle __data.__clock.
4208         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4209         Define.
4210         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4211         internally.  Return non-zero if error, zero if success.
4212         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4213         Add __data.__futex field, reshuffle __data.__clock.
4214         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4215         Add __data.__futex field, reshuffle __data.__clock.
4216         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4217         Increment __futex at the same time as __wakeup_seq or __total_seq.
4218         Pass address of __futex instead of address of low 32-bits of
4219         __wakeup_seq to futex syscall.
4220         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4221         Pass __futex value from before releasing internal lock
4222         to FUTEX_WAIT.
4223         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4224         Likewise.  Avoid unnecessary shadowing of variables.
4225         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4226         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4227         unlock and __futex address instead of address of low 32-bits of
4228         __wakeup_seq to futex_requeue macro, adjust for new return value
4229         meaning.
4230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4231         (__pthread_cond_signal): Increment __futex at the same time as
4232         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4233         address of low 32-bits of __wakeup_seq to futex syscall.
4234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4235         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4236         releasing internal lock to FUTEX_WAIT.
4237         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4238         (__pthread_cond_timedwait): Likewise.
4239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4240         (FUTEX_CMP_REQUEUE): Define.
4241         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4242         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4243         Pass __futex value from before the unlock and __futex address instead
4244         of address of low 32-bits of __wakeup_seq to futex syscall.
4245         Fallback to FUTEX_WAKE all on any errors.
4247 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4249         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4250         Add nop to align the end of critical section.
4251         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4253 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4255         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4256         Add __broadcast_seq field.
4257         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4258         all waiters as woken with woken_seq and bump broadcast counter.
4259         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4260         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4261         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4262         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4264 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4267         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4268         Reported by Kaz Kojima.
4270 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4272         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4274 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4276         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4277         __broadcast_seq with bc_seq after acquiring internal lock instead of
4278         before it.
4280 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4282         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4283         compilation.
4284         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4285         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4286         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4287         (pthread_cond_t): Add __data.__broadcast_seq field.
4288         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4289         (FRAME_SIZE): Define.
4290         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4291         Comment typo fixes.
4292         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4293         Define.
4294         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4295         typo fixes.
4296         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4297         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4298         fixes.
4300 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4302         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4303         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4304         Add __broadcast_seq field.
4305         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4306         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4307         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4308         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4309         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4310         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4311         all waiters as woken with woken_seq and bump broadcast counter.
4312         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4314         __broadcast_seq field.
4315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4316         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4317         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4318         * pthread_cond_init.c: Initialize __broadcast_seq field.
4319         * Makefile (tests): Add tst-cond17 and tst-cond18.
4320         Add .NOTPARALLEL goal.
4321         * tst-cond16.c: New file.  From Jakub.
4322         * tst-cond17.c: New file.  From Jakub.
4323         * tst-cond18.c: New file.  From Jakub.
4325 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4327         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4328         unwind info.
4330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4331         Parametrize frame size.  Correct some unwind info.
4332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4334 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4336         * tst-stack3.c: Note testing functionality beyond POSIX.
4338 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4340         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4341         Change conditional from ifdef to if.
4343 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4345         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4346         SYSDEP_CANCEL_ERROR): Define.
4347         (PSEUDO): Use it.
4349 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4351         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4353 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4355         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4357 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4359         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4360         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4361         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4362         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4364 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4366         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4367         thread has all signals blocked.
4369 2004-04-18  Andreas Jaeger  <aj@suse.de>
4371         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4372         (SEM_VALUE_MAX): Add missing brace.
4374 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4376         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4377         in rt subdir.
4378         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4379         * sysdeps/pthread/tst-mqueue8x.c: New test.
4380         * tst-cancel4.c: Update comment about message queues.
4382         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4383         return it_value { 0, 0 }.
4384         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4385         like SIGEV_SIGNAL.
4386         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4387         assertion for SIGEV_NONE.
4388         (thread_attr_compare): Compare all attributes, not just a partial
4389         subset.
4391 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4393         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4395 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4397         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4398         Just use a plain number.
4399         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4400         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4401         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4402         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4403         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4404         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4405         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4407 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4409         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4410         frame info.
4411         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4413 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4415         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4416         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4417         of calling sigwaitinfo.
4419 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4421         * allocatestack.c (allocate_stack): Set reported_guardsize
4422         unconditionally.
4423         * pthread_getattr_np.c (pthread_getattr_np): Use
4424         reported_guardsize instead of guardsize.
4425         * descr.h (struct pthread): Add reported_guardsize field.
4427 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4429         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4431 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4433         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4435 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4437         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4438         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4439         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4440         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4441         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4442         Define.
4443         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4444         (_POSIX_MESSAGE_PASSING): Define.
4445         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4446         (_POSIX_MESSAGE_PASSING): Define.
4447         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4448         (_POSIX_MESSAGE_PASSING): Define.
4450 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4452         * tst-context1.c (fct): Check whether correct stack is used.
4454 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4456         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4457         matching constraints for asm mem parameters.
4459         * tst-clock2.c (tf): Don't define unless needed.
4461 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4463         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4464         $(gnulib).
4466 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4468         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4469         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4470         * pthreadP.h: Declare __nptl_deallocate_tsd.
4471         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4472         Adjust caller.
4474         * Makefile (tests): Add tst-tsd5.
4475         * tst-tsd5.c: New file.
4477 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4479         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4480         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4481         is SHLIB_COMPAT check.
4482         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4483         (__pthread_attr_getaffinity_old): Likewise.
4484         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4485         (__pthread_getaffinity_old): Likewise.
4486         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4487         (__pthread_setaffinity_old): Likewise.
4489 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4491         * allocatestack.c (_make_stacks_executable): Call
4492         _dl_make_stack_executable first.
4494 2004-03-24  Roland McGrath  <roland@redhat.com>
4496         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4497         constraint instead of "0".
4499 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4501         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4502         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4504         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4505         code to avoid warning.
4507 2004-03-24  Andreas Jaeger  <aj@suse.de>
4509         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4510         (__pthread_attr_setaffinity_old): Remove const.
4512 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4514         * sysdeps/unix/sysv/linux/smp.h: New file.
4515         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4516         * init.c: Define __is_smp.
4517         (__pthread_initialize_minimal_internal): Call is_smp_system to
4518         initialize __is_smp.
4519         * pthreadP.h: Declare __is_smp.
4520         Define MAX_ADAPTIVE_COUNT is necessary.
4521         * pthread_mutex_init.c: Add comment regarding __spins field.
4522         * pthread_mutex_lock.c: Implement adaptive mutex type.
4523         * pthread_mutex_timedlock.c: Likewise.
4524         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4525         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4526         Add __spins field.
4527         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4528         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4529         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4530         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4531         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4532         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4533         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4534         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4535         lll_mutex_cond_trylock.
4536         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4537         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4538         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4539         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4540         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4541         Define BUSY_WAIT_NOP.
4542         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4543         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4545         * tst-mutex5.c: Add support for testing adaptive mutexes.
4546         * tst-mutex7.c: Likewise.
4547         * tst-mutex5a.c: New file.
4548         * tst-mutex7a.c: New file.
4549         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4551         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4552         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4553         vgettimeofday call might destroy the content.
4555         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4556         @pause in the loop.
4558         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4559         No need to restrict type of ret.  Make it int.  Add comment.
4561         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4562         Remove unnecessary setne instruction.
4564 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4566         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4567         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4568         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4569         If realloc fails, break out of the loop.
4571 2004-03-20  Andreas Jaeger  <aj@suse.de>
4573         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4574         (__pthread_setaffinity_old): Fix interface.
4575         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4576         (__pthread_getaffinity_old): Likewise.
4578         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4579         (__pthread_setaffinity_new): Remove duplicate declaration.
4581 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4583         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4584         the return value to a safe register.
4585         (CDISABLE): Set the function argument correctly.
4587 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4589         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4590         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4591         Rewrite so that only one locked memory operation per round is needed.
4592         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4593         (pthread_barrier_wait): After wakeup, release lock only when the
4594         last thread stopped using the barrier object.
4595         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4596         (__pthread_cond_wait): Don't store mutex address if the current
4597         value is ~0l.  Add correct cleanup support and unwind info.
4598         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4599         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4600         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4601         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4602         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4603         Add correct cleanup support and unwind info.
4604         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4605         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4606         information for syscall wrappers.
4608 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4610         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4611         cpusetsize field, remove next.
4612         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4613         parameter for size of the CPU set.
4614         (pthread_setaffinity_np): Likewise.
4615         (pthread_attr_getaffinity_np): Likewise.
4616         (pthread_attr_setaffinity_np): Likewise.
4617         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4618         interface change, keep compatibility code.
4619         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4620         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4621         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4622         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4623         __pthread_getaffinity_np.
4624         * Versions: Add version for changed interfaces.
4625         * tst-attr3.c: Adjust test for interface change.
4626         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4627         increasing buffer sizes.
4628         * pthread_attr_destroy.c: Remove unused list handling.
4629         * pthread_attr_init.c: Likewise.
4631 2004-03-17  Roland McGrath  <roland@redhat.com>
4633         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4634         first argument to clock_getres so we ever enable kernel timers.
4636 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4638         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4640 2004-03-12  Richard Henderson  <rth@redhat.com>
4642         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4643         oldvalue from CENABLE to CDISABLE.
4645 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4648         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4649         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4650         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4652 2004-03-11  Richard Henderson  <rth@redhat.com>
4654         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4655         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4656         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4658 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4660         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4661         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4662         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4664 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4666         * forward.c (__pthread_cond_broadcast_2_0,
4667         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4668         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4669         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4671 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4673         * sysdeps/sh/tcb-offsets.sym: Add PID.
4674         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4675         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4677 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4679         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4680         include <sysdep-cancel.h>, vfork is no cancellation point.
4681         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4682         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4683         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4685 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4687         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4688         libc_hidden_def.
4689         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4690         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4691         Likewise.
4692         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4693         Likewise.
4694         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4695         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4696         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4697         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4698         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4700         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4701         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4702         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4703         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4704         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4705         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4707         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4708         a local register for saving old PID.  Negate PID in parent upon exit.
4710         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4711         tcb-offsets.h.
4712         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4713         before syscall, set to the old value in the parent afterwards.
4714         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4715         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4716         tcb-offsets.h.
4717         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4718         before syscall, set to the old value in the parent afterwards.
4719         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4720         * sysdeps/s390/tcb-offsets.sym: Add PID.
4722         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4723         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4724         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4725         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4726         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4727         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4729 2004-03-10  Andreas Schwab  <schwab@suse.de>
4731         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4732         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4733         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4735 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4737         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4738         * tst-cancel21.c (do_one_test): Likewise.
4739         Reported by Gordon Jin <gordon.jin@intel.com>.
4741 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4743         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4744         if non-zero and set to INT_MIN if zero.
4745         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4746         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4747         (SAVE_PID, RESTORE_PID): Define.
4748         (__vfork): Use it.
4749         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4750         Use relative path to avoid including NPTL i386/vfork.S.
4751         (SAVE_PID, RESTORE_PID): Define.
4752         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4753         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4754         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4755         tst-vfork2x.
4756         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4757         * tst-vfork1.c: New test.
4758         * tst-vfork2.c: New test.
4759         * tst-vfork1x.c: New test.
4760         * tst-vfork2x.c: New test.
4762 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4764         * sysdeps/i386/tcb-offsets.sym: Add PID.
4765         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4766         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4767         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4769 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4771         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4773 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4775         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4776         _rtld_global_ro.
4778 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4780         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4781         _rtld_global_ro.
4783         * tst-once4.c: Remove unnecessary macro definition.
4785         * tst-mutex7.c (do_test): Limit thread stack size.
4786         * tst-once2.c (do_test): Likewise.
4787         * tst-tls3.c (do_test): Likewise.
4788         * tst-tls1.c (do_test): Likewise.
4789         * tst-signal3.c (do_test): Likewise.
4790         * tst-kill6.c (do_test): Likewise.
4791         * tst-key4.c (do_test): Likewise.
4792         * tst-join4.c (do_test): Likewise.
4793         * tst-fork1.c (do_test): Likewise.
4794         * tst-context1.c (do_test): Likewise.
4795         * tst-cond2.c (do_test): Likewise.
4796         * tst-cond10.c (do_test): Likewise.
4797         * tst-clock2.c (do_test): Likewise.
4798         * tst-cancel10.c (do_test): Likewise.
4799         * tst-basic2.c (do_test): Likewise.
4800         * tst-barrier4.c (do_test): Likewise.
4802 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4804         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4806 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4808         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4809         (__pthread_cond_timedwait): Optimize wakeup test.
4810         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4811         (__pthread_cond_wait): Likewise.
4812         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4813         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4814         Likewise.
4816 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4818         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4819         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4820         the atomic instruction needed.
4821         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4822         (__lll_mutex_lock_wait): Likewise.
4824 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4826         * Makefile (tests): Add tst-cond14 and tst-cond15.
4827         * tst-cond14.c: New file.
4828         * tst-cond15.c: New file.
4830 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4832         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4833         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4834         needs to be implemented differently to be useful.
4836 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4838         * pthread_attr_setschedparam.c: Don't test priority against limits
4839         here.  Set ATTR_FLAG_SCHED_SET flag.
4840         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4841         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4842         from parent thread to child.  If attribute is used and scheduling
4843         parameters are not inherited, copy parameters from attribute or
4844         compute them.  Check priority value.
4845         * pthread_getschedparam.c: If the parameters aren't known yet get
4846         them from the kernel.
4847         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4848         ATTR_FLAG_POLICY_SET flag for thread.
4849         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4850         and ATTR_FLAG_POLICY_SET.
4852         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4854         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4855         fail if stack address hasn't been set.  Just return 0.
4857 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4859         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4860         libpthread for the files in this list.
4861         (CFLAGS-tst-unload): Removed.
4862         * tst-unload.c (do_test): Don't use complete path for
4863         LIBPHREAD_SO.
4865         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4866         tst-_res1mod2.
4868 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4870         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4871         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4872         operation per round is needed.
4873         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4874         (__lll_mutex_lock_wait): Likewise.
4876 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4878         * tst-cancel9.c (cleanup): Don't print to stderr.
4880 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4882         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4884 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4886         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4887         (__syscall_error_handler2): Call CDISABLE.
4888         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4889         (__syscall_error_handler2): Call CDISABLE.
4891         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4892         Release lock before the loop, don't reacquire it.
4894         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4896 2004-02-19  Andreas Schwab  <schwab@suse.de>
4898         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4899         Fix last change.
4901 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4903         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4904         (pthread_barrier_wait): After wakeup, release lock only when the
4905         last thread stopped using the barrier object.
4906         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4907         (pthread_barrier_wait): Likewise.
4908         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4909         Likewise.
4910         * Makefile (tests): Add tst-barrier4.
4911         * tst-barrier4.c: New file.
4913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4914         (__pthread_cond_timedwait): Perform timeout test while holding
4915         internal lock to prevent wakeup race.
4916         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4917         * sysdeps/pthread/pthread_cond_timedwait.c
4918         (__pthread_cond_timedwait): Likewise.
4919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4920         (__pthread_cond_timedwait): Likewise.
4922 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4924         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4925         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4926         * Makefile (tests): Add tst-rwlock13.
4927         * tst-rwlock13.c: New test.
4929 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4932         (__condvar_tw_cleanup): Little optimization.
4933         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4935 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4937         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4938         libpthread as "lib" parameter to SHLIB_COMPAT.
4939         (__novmx_siglongjmp): Fix typo in function name.
4940         (__novmx_longjmp): Fix typo in function name.
4942 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4945         __builtin_expect.
4947         * sysdeps/generic/pt-longjmp.c: Moved to...
4948         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4950 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4952         * Makefile (libpthread-routines): Add pt-cleanup.
4953         * pt-longjmp.c: Removed.
4954         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4955         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4956         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4957         Version longjmp, siglongjmp for GLIBC_2.3.4.
4958         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4960 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4962         * sysdeps/pthread/pthread_cond_timedwait.c
4963         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4964         Reuse code.  Add __builtin_expects.
4966         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4967         (__pthread_cond_timedwait): Get internal lock in case timeout has
4968         passed before the futex syscall.
4969         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4971 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4973         * allocatestack.c: Pretty printing.
4975         * sysdeps/pthread/createthread.c (create_thread): Don't add
4976         CLONE_DETACHED bit if it is not necessary.
4978 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4980         * pthread_getattr_np.c: Include ldsodefs.h.
4982 2004-01-16  Richard Henderson  <rth@redhat.com>
4984         * allocatestack.c: Don't declare __libc_stack_end.
4985         * init.c (__pthread_initialize_minimal_internal): Likewise.
4986         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4988 2004-01-15  Richard Henderson  <rth@redhat.com>
4990         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4991         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4992         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4993         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4994         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4995         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4996         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4997         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4999 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5001         * init.c (pthread_functions): Make array const.
5003 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5005         * allocatestack.c (__make_stacks_executable): Change interface.
5006         Check parameters.  Pass parameter on to libc counterpart.
5007         * pthreadP.h: Change declaration.
5009 2004-01-13  Richard Henderson  <rth@redhat.com>
5011         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5012         prototype form.
5013         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5014         Likewise.
5016         * sysdeps/alpha/Makefile: New file.
5017         * sysdeps/alpha/tcb-offsets.sym: New file.
5018         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5019         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5021         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5022         on powerpc version.
5024 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5026         * Makefile (tests): Add tst-backtrace1.
5027         * tst-backtrace1.c: New test.
5029 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5031         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5032         register as second parameter to the REGISTER macro.
5033         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5034         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5035         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5036         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5037         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5038         of thread register as second parameter to REGISTER macro in 64 case.
5040 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5042         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5043         (CFLAGS-getpid.o): Defined.
5044         (CFLAGS-getpid.os): Defined.
5046 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5048         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5049         returned for main thread does not overlap with any other VMA.
5050         Patch by Jakub Jelinek.
5052 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5054         * tst-raise1.c: Include stdio.h.
5056 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5058         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5059         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5060         If pid is 0, set it to selftid.
5061         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5062         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5063         != 0, return self->tid without doing a syscall.
5064         * descr.h (struct pthread): Move pid field after tid.
5066         * Makefile (tests): Add tst-raise1.
5067         * tst-raise1.c: New file.
5069 2003-12-23  Roland McGrath  <roland@redhat.com>
5071         * tst-oddstacklimit.c: New file.
5072         * Makefile (tests): Add it.
5073         (tst-oddstacklimit-ENV): New variable.
5075         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5076         value up to page size for __default_stacksize.
5078 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5080         * Makefile (tests): Add tst-eintr5.
5081         * tst-eintr5.c: New file.
5083         * eintr.c (eintr_source): Prevent sending signal to self.
5085         * tst-eintr2.c (tf1): Improve error message.
5087 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5089         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5090         * sysdeps/unix/sysv/linux/getpid.c: New file.
5091         * pthread_cancel.c: Add comment explaining use of PID field.
5092         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5093         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5094         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5095         temporarily to signal the field must not be relied on and updated
5096         by getpid().
5097         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5098         temporarily negative.
5099         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5101 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5103         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5104         (eintr_source): If ARG != NULL, use pthread_kill.
5105         * tst-eintr1.c: Adjust for this change.
5106         * tst-eintr2.c: Likewise.
5107         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5108         * tst-eintr3.c: New file.
5109         * tst-eintr4.c: New file.
5111 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5113         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5114         if CANCELSTATE_BITMASK is set.
5115         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5116         Likewise.
5118         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5119         (tests-reverse): Add tst-cancel23.
5120         * tst-cancel22.c: New test.
5121         * tst-cancel23.c: New test.
5123 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5125         * tst-eintr1.c: Better error messages.
5127         * Makefile (tests): Add tst-eintr2.
5128         * tst-eintr2.c: New file.
5130 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5132         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5133         (CFLAGS-tst-cancelx21.c): Set.
5134         * tst-cancel21.c: New test.
5135         * tst-cancelx21.c: New test.
5137         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5138         comparison operand.
5139         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5140         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5141         * pt-longjmp.c: Include jmpbuf-unwind.h.
5142         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5143         _JMPBUF_UNWINDS.  Adjust compared pointers.
5144         * init.c (__pthread_initialize_minimal_internal): Initialize
5145         pd->stackblock_size.
5146         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5147         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5148         * sysdeps/i386/jmpbuf-unwind.h: New file.
5149         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5150         * sysdeps/s390/jmpbuf-unwind.h: New file.
5151         * sysdeps/sh/jmpbuf-unwind.h: New file.
5152         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5153         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5154         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5155         (_JMPBUF_CFA_UNWINDS): Remove.
5156         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5158 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5160         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5161         (CFLAGS-tst-cancelx20.c): Set.
5162         * tst-cancel20.c: New test.
5163         * tst-cancelx20.c: New test.
5165 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5167         * init.c (__pthread_initialize_minimal_internal): Don't treat
5168         architectures with separate register stack special here when
5169         computing default stack size.
5171 2003-12-17  Roland McGrath  <roland@redhat.com>
5173         * Makefile (tst-cancelx7-ARGS): New variable.
5174         Reportd by Greg Schafer <gschafer@zip.com.au>.
5176 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5178         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5179         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5180         (tst-stack3-ENV): Set.
5181         ($(objpfx)tst-stack3-mem): New.
5182         * tst-stack3.c: New test.
5184 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5186         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5187         Add unwind directives.  Drop unused .regstk directive.
5188         (_fini_EPILOG_BEGINS): Add unwind directives.
5190 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5192         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5193         Assume parameter is a pointer.
5194         (lll_futex_wake): Likewise.
5195         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5196         Likewise.
5197         (lll_futex_wake): Likewise.
5198         Reported by Boris Hu.
5199         * sysdeps/unix/sysv/linux/unregister-atfork.c
5200         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5202         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5204 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5206         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5207         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5208         __rtld_lock_initialize for ld.so lock.
5209         Patch in part by Adam Li <adam.li@intel.com>.
5211 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5213         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5214         in $(gnulib).  Also, remove stale comment.
5216 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5218         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5219         advantage of new syscall stub and optimize accordingly.
5221         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5222         from SYS_futex, to match expectations of
5223         sysdep.h:DO_INLINE_SYSCALL.
5224         (lll_futex_clobbers): Remove.
5225         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5226         (lll_futex_wake): Likewise.
5227         (lll_futex_requeue): Likewise.
5228         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5229         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5230         Jelinek).
5231         (__lll_mutex_lock): Likewise.
5232         (__lll_mutex_cond_lock): Likewise.
5233         (__lll_mutex_timed_lock): Likewise.
5234         (__lll_mutex_unlock): Likewise.
5235         (__lll_mutex_unlock_force): Likewise.
5237         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5238         comes before the include of <sysdep.h>.
5239         (THREAD_SELF_SYSINFO): New macro.
5240         (THREAD_SYSINFO): Likewise.
5241         (INIT_SYSINFO): New macro.
5242         (TLS_INIT_TP): Call INIT_SYSINFO.
5244         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5246         * sysdeps/pthread/createthread.c (create_thread): Use
5247         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5248         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5249         THREAD_SELF_SYSINFO instead of open code.
5250         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5251         (THREAD_SYSINFO): Likewise.
5253         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5255         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5257 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5259         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5260         instead of .init.  Patch by David Mosberger.
5262 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5264         * sysdeps/pthread/configure.in: Remove broken declaration in C
5265         cleanup handling check.
5267 2003-11-30  Andreas Jaeger  <aj@suse.de>
5269         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5270         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5271         Likewise.
5273 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5275         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5276         * pthread_attr_destroy.c: Include shlib-compat.h.
5277         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5278         is set in iattr->flags.
5279         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5281 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5283         * Makefile (distribute): Add tst-cleanup4aux.c.
5285         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5286         include.
5288 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5290         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5291         pthread_cond_signal.
5293         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5294         store mutex address if the current value is ~0l.
5295         * sysdeps/pthread/pthread_cond_timedwait.c
5296         (__pthread_cond_timedwait): Likewise.
5297         * sysdeps/pthread/pthread_cond_broadcast.c
5298         (__pthread_cond_broadcast): Don't use requeue for pshared
5299         condvars.
5301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5302         (__pthread_cond_wait): Don't store mutex address if the current
5303         value is ~0l.
5304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5305         (__pthread_cond_timedwait): Likewise.
5306         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5307         (__pthread_cond_broadcast): Don't use requeue for pshared
5308         condvars.
5310         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5311         element with ~0l for pshared condvars, with NULL otherwise.
5313         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5314         (__pthread_cond_wait): Don't store mutex address if the current
5315         value is ~0l.
5316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5317         (__pthread_cond_timedwait): Likewise.
5318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5319         (__pthread_cond_broadcast): Don't use requeue for pshared
5320         condvars.
5322         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5323         * tst-cond12.c: New file.
5324         * tst-cond13.c: New file.
5326 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5328         * sysdeps/pthread/configure.in: Make missing forced unwind support
5329         fatal.
5331 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5333         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5335 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5337         * Makefile: Add magic to clean up correctly.
5339 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5341         * unwind.c (FRAME_LEFT): Define.
5342         (unwind_stop): Handle old style cleanups here.
5343         (__pthread_unwind): Handle old style cleanups only if
5344         !HAVE_FORCED_UNWIND.
5345         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5346         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5347         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5348         ($(objpfx)tst-cleanupx4): Likewise.
5349         * tst-cleanup4.c: New test.
5350         * tst-cleanup4aux.c: New.
5351         * tst-cleanupx4.c: New test.
5353 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5355         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5356         lll_mutex_*lock macros to skip atomic operations on some archs.
5358 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5360         * sysdeps/pthread/tst-timer.c (main): Initialize
5361         sigev2.sigev_value as well.
5363 2003-10-15  Roland McGrath  <roland@redhat.com>
5365         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5366         is missing.
5367         * sysdeps/pthread/configure: Regenerated.
5369 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5371         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5372         locking macros.  No distinction between normal and mutex locking
5373         anymore.
5374         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5375         Merge bits from lowlevelmutex.S we still need.
5376         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5377         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5378         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5379         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5380         new mutex implementation.
5381         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5382         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5383         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5384         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5385         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5386         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5387         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5388         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5389         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5390         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5391         symbol for entry point to avoid cancellation.
5393 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5395         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5396         changes.
5397         (SAVE_OLDTYPE_0): Fix a typo.
5399 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5401         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5402         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5404 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5406         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5407         correct offset.
5409 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5411         * Makefile (tests): Add tst-cancel19.
5412         * tst-cancel19.c: New test.
5414 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5416         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5417         restoring of the old cancellation type.
5419 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5421         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5423 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5425         * sysdeps/pthread/malloc-machine.h: New file
5427 2003-09-24  Roland McGrath  <roland@redhat.com>
5429         * allocatestack.c (__make_stacks_executable): Don't ignore return
5430         value from _dl_make_stack_executable.
5432 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5434         * allocatestack.c (__make_stacks_executable): Also change
5435         permission of the currently unused stacks.
5437         * allocatestack.c (change_stack_perm): Split out from
5438         __make_stacks_executable.
5439         (allocate_stack): If the required permission changed between the time
5440         we started preparing the stack and queueing it, change the permission.
5441         (__make_stacks_executable): Call change_stack_perm.
5443         * Makefile: Build tst-execstack-mod locally.
5444         * tst-execstack-mod.c: New file.
5446 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5448         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5450 2003-09-23  Roland McGrath  <roland@redhat.com>
5452         * tst-execstack.c: New file.
5453         * Makefile (tests): Add it.
5454         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5455         (LDFLAGS-tst-execstack): New variable.
5457         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5458         whether to use PROT_EXEC for stack mmap.
5459         (__make_stacks_executable): New function.
5460         * pthreadP.h: Declare it.
5461         * init.c (__pthread_initialize_minimal_internal): Set
5462         GL(dl_make_stack_executable_hook) to that.
5464 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5466         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5467         recommendation from AMD re avoidance of lock prefix.
5469 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5471         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5472         lll_futex_timed_wait instead of lll_futex_wait.
5473         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5474         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5475         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5476         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5477         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5478         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5479         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5480         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5481         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5482         Completely revamp the locking macros.  No distinction between
5483         normal and mutex locking anymore.
5484         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5485         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5486         __lll_lock_timedwait): Fix prototypes.
5487         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5488         __lll_lock_timedwait): Likewise.
5489         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5490         macros, add __builtin_expect.
5491         (lll_mutex_timedlock): Likewise.  Fix return value.
5492         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5493         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5494         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5495         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5496         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5497         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5498         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5499         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5501 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5503         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5504         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5505         operation if possible.
5507         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5508         like jumping over the lock prefix.
5510 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5512         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5513         locking macros.  No distinction between normal and mutex locking
5514         anymore.
5515         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5516         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5517         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5518         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5519         locking.  Merge bits from lowlevelmutex.S we still need.
5520         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5521         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5522         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5523         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5524         * Makefile (routines): Remove libc-lowlevelmutex.
5525         (libpthread-rountines): Remove lowlevelmutex.
5526         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5527         for new mutex implementation.
5528         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5531         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5532         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5533         Likewise.
5534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5535         Likewise.
5536         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5538         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5539         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5540         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5541         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5542         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5543         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5544         Likewise.
5545         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5546         Likewise.
5547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5548         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5549         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5550         Don't use requeue.
5551         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5552         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5554 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5556         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5557         in parameters of asm with output parameters.
5559         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5560         type of DECR parameter to int.
5561         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5563 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5565         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5566         guardsize for each thread.
5568 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5570         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5571         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5572         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5574         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5575         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5576         NULL.
5577         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5578         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5579         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5580         (pthread_getaffinity_np): Add hidden_def.
5582         * Makefile (tests): Add tst-attr3.
5583         * tst-attr3.c: New test.
5585         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5587 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5589         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5590         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5592 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5594         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5595         * tst-align.c: Include tst-stack-align.h.
5596         (tf, do_test): Use TEST_STACK_ALIGN macro.
5598 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5600         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5601         variable.
5603 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5605         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5606         stack-related values for the initial thread.
5608 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5610         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5612 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5614         * pthread_mutex_lock.c: Minor code rearrangements.
5616 2003-09-05  Roland McGrath  <roland@redhat.com>
5618         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5619         Instead, include ../nptl_db/db_info.c to do its magic.
5620         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5621         (__pthread_pthread_key_2ndlevel_size): Likewise.
5622         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5623         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5624         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5625         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5626         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5627         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5628         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5629         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5630         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5631         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5632         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5633         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5634         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5635         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5636         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5637         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5638         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5640 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5642         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5643         of pthread_t to be compatible with LT.
5644         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5645         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5646         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5647         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5648         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5649         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5650         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5652 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5654         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5656 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5658         * unwind-forcedunwind.c: Move to...
5659         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5660         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5661         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5662         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5663         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5664         * unwind.c: Include jmpbuf-unwind.h.
5665         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5667 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5669         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5670         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5671         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5672         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5673         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5674         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5675         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5676         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5677         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5678         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5679         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5680         function.
5681         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5682         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5683         * Makefile (tests): Add tst-stack2.
5684         * tst-stack2.c: New test.
5685         * tst-stack1.c: Include limits.h and sys/param.h.
5686         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5688         * pthread_condattr_setpshared.c: Include errno.h.
5689         (pthread_condattr_setpshared): Return EINVAL if pshared
5690         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5692         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5693         defined symbol for entry point to avoid cancellation.
5694         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5695         Likewise.
5696         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5697         Likewise.
5698         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5699         Likewise.
5700         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5701         Likewise.
5702         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5703         Likewise.
5704         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5705         __close_nocancel, __read_nocancel, __write_nocancel,
5706         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5707         libpthread.so or librt.so, define to corresponding function
5708         without _nocancel suffix.
5709         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5710         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5711         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5713         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5715 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5717         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5718         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5720         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5721         in subsections has a symbol associated with it.
5723         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5724         defined symbol for entry point to avoid cancellation.
5725         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5727 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5729         * Makefile (tests): Add tst-tls5.
5730         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5731         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5732         ($(objpfx)tst-tls5): New.
5733         ($(objpfx)tst-tls6.out): Likewise.
5734         (tests): Depend on $(objpfx)tst-tls6.out.
5735         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5736         (do_test): Check pthread_self () return value alignment.
5737         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5738         (tf): Check pthread_self () return value alignment.
5739         * tst-tls5.c: New test.
5740         * tst-tls5.h: New.
5741         * tst-tls5mod.c: New.
5742         * tst-tls5moda.c: New.
5743         * tst-tls5modb.c: New.
5744         * tst-tls5modc.c: New.
5745         * tst-tls5modd.c: New.
5746         * tst-tls5mode.c: New.
5747         * tst-tls5modf.c: New.
5748         * tst-tls6.sh: New test.
5750         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5751         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5752         * init.c (pthread_functions): Initialize them.
5753         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5754         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5755         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5756         pthread_cond_timedwait@@GLIBC_2.3.2.
5758 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5760         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5761         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5762         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5763         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5764         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5765         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5767         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5769         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5770         _POSIX_THREAD_PRIORITY_SCHEDULING.
5771         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5773 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5775         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5776         nested function, use static inline function from libio.h.
5777         Code by Richard Henderson.
5779         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5780         weak.
5782 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5784         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5785         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5786         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5787         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5788         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5789         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5790         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5791         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5792         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5793         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5794         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5795         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5796         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5797         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5798         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5799         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5800         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5801         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5802         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5803         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5804         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5805         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5806         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5807         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5808         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5809         * sysdeps/sparc/tls.h: New file.
5810         * sysdeps/sparc/tcb-offsets.sym: New file.
5811         * sysdeps/sparc/Makefile: New file.
5812         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5813         * init.c [__sparc__] (__NR_set_tid_address): Define.
5815 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5817         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5818         _IO_release_lock): Define.
5820 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5822         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5823         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5825 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5827         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5828         (__pthread_cleanup_class): Add missing return types of member
5829         functions.
5831 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5833         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5834         (lll_mutex_unlock_force): Add memory barrier between store and futex
5835         syscall.
5837 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5839         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5840         tempmsg in first loop.
5842 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5844         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5845         _POSIX_THREAD_PRIORITY_SCHEDULING.
5846         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5848 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5850         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5851         (__rtld_lock_default_lock_recursive,
5852         __rtld_lock_default_unlock_recursive): Define.
5853         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5854         __rtld_lock_unlock_recursive): Define using
5855         GL(_dl_rtld_*lock_recursive).
5856         * init.c (__pthread_initialize_minimal_internal): Initialize
5857         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5858         Lock GL(_dl_load_lock) the same number of times as
5859         GL(_dl_load_lock) using non-mt implementation was nested.
5861         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5862         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5864 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5866         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5867         PIPE_BUF.
5869 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5871         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5873 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5875         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5876         to first syscall error check.  Move syscall error check for tkill
5877         into __ASSUME_CLONE_STOPPED #ifdef.
5879 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5881         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5882         is not defined, do explicit synchronization.
5883         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5884         is not defined also unlock pd->lock for non-debugging case in case
5885         it is necessary.
5886         * pthread_create.c (start_thread): Always get and release pd->lock
5887         if __ASSUME_CLONE_STOPPED is not defined.
5888         (start_thread_debug): Removed.  Adjust users.
5889         * allocatestack.c (allocate_stack): Always initialize lock if
5890         __ASSUME_CLONE_STOPPED is not defined.
5891         * Makefile (tests): Add tst-sched1.
5892         * tst-sched1.c: New file.
5894         * sysdeps/pthread/createthread.c (do_clone): Only use
5895         sched_setschduler and pass correct parameters.
5897 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5899         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5900         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5901         PTHREAD_STACK_MIN in comments.
5903 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5905         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5906         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5907         argument.
5908         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5909         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5910         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5911         (__pthread_cleanup_upto): Fix prototype.
5912         (_longjmp_unwind): Adjust caller.
5913         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5914         Change second argument to const struct pointer.
5915         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5916         * tst-sem9.c (main): Likewise.
5917         * unwind.c: Include string.h for strlen prototype.
5919 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5922         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5923         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5924         Define HAVE_CMOV.
5925         Patch by Nicholas Miell <nmiell@attbi.com>.
5927 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5929         * init.c (__pthread_initialize_minimal_internal): Initialize
5930         GL(dl_init_static_tls).
5931         * pthreadP.h (__pthread_init_static_tls): New prototype.
5932         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5933         New functions.
5934         * Makefile (tests): Add tst-tls4.
5935         (modules-names): Add tst-tls4moda and tst-tls4modb.
5936         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5937         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5938         tst-tls4modb.so.
5939         * tst-tls4.c: New file.
5940         * tst-tls4moda.c: New file.
5941         * tst-tls4modb.c: New file.
5943 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5945         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5946         before __timer_dealloc.
5947         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5948         Don't call list_unlink.
5950 2003-07-29  Roland McGrath  <roland@redhat.com>
5952         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5954 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5956         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
5957         if __need_struct_pthread_size, instead define lll_lock_t.
5959 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5961         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5962         Don't reuse struct aiocb A if it failed.
5963         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5964         not just one byte, as that does not block.
5966 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5968         * sysdeps/pthread/unwind-resume.c: New file.
5969         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5970         unwind-resume in csu subdir.
5971         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5972         exceptions.
5973         (librt-sysdep_routines, librt-shared-only-routines): Add
5974         rt-unwind-resume.
5975         * sysdeps/pthread/rt-unwind-resume.c: New file.
5976         * unwind-forcedunwind.c: New file.
5977         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5978         (libpthread-shared-only-routines): Likewise.
5979         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5980         * pthreadP.h (pthread_cancel_init): New prototype.
5981         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5983         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5984         attr argument const struct pthread_attr *.
5986         * res.c (__res_state): Return __resp.
5987         * descr.h: Include resolv.h.
5988         (struct pthread): Add res field.
5989         * pthread_create.c: Include resolv.h.
5990         (start_thread): Initialize __resp.
5991         * Makefile (tests): Add tst-_res1.
5992         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5993         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5994         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5995         libpthread.
5996         * tst-_res1.c: New file.
5997         * tst-_res1mod1.c: New file.
5998         * tst-_res1mod2.c: New file.
6000 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6002         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6004         * Makefile: Define various *-no-z-defs variables for test DSOs
6005         which has undefined symbols.
6007 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6009         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6010         Retry if the stwcx fails to store once_control.
6012 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6014         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6015         pthread_attr_setaffinity.
6016         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6017         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6018         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6019         * pthread_attr_destroy.c: Free cpuset element if allocated.
6020         * pthread_create.c: Pass iattr as additional parameter to
6021         create_thread.
6022         * sysdeps/pthread/createthread.c: If attribute is provided and
6023         a new thread is created with affinity set or scheduling parameters,
6024         start thread with CLONE_STOPPED.
6025         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6026         pthread_attr_setaffinity.
6027         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6028         cpuset element.
6030 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6032         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6034 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6036         * sysdeps/pthread/configure.in: Require CFI directives also for
6037         ppc and s390.
6039 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6041         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6042         Add cfi directives.
6044 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6046         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6047         CLEANUP_JMP_BUF.
6048         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6049         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6050         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6051         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6052         not self pointer in __writer.  Compare with TID to determine
6053         deadlocks.
6054         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6055         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6056         Likewise.
6057         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6058         Likewise.
6059         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6060         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6061         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6062         macros also when compiling librt.
6064 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6066         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6067         -fasynchronous-unwind-tables.
6068         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6069         (PSEUDO): Add cfi directives.
6070         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6071         Likewise.
6072         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6073         Likewise.
6075 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6077         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6078         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6079         * unwind.c (__pthread_unwind_next): Add hidden_def.
6080         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6081         Likewise.
6082         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6083         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6084         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6085         Likewise.
6086         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6087         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6088         Likewise.
6089         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6090         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6091         __pthread_unregister_cancel and __pthread_unwind_next.
6093 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6095         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6096         different symbol for the cancellation syscall wrapper and
6097         non-cancellation syscall wrapper.
6098         (PSEUDO_END): Define.
6100 2003-07-05  Richard Henderson  <rth@redhat.com>
6102         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6103         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6104         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6105         return actual return value from the syscall, not 0.
6107 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6109         * descr.h (struct pthread): Add pid field.
6110         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6111         (__reclaim_stacks): Likewise.
6112         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6113         also check for PID of the signal source.
6114         (__pthread_initialize_minimal_internal): Also initialize pid field
6115         of initial thread's descriptor.
6116         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6117         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6118         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6119         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6120         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6122 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6124         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6125         Fix use of parameter.
6126         (__libc_cleanup_pop): Likewise.
6128 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6130         * init.c (sigcancel_handler): Change parameters to match handler
6131         for SA_SIGACTION.  Check signal number and code to recognize
6132         invalid invocations.
6134 2003-07-03  Roland McGrath  <roland@redhat.com>
6136         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6137         Apply sizeof (struct pthread) bias to r13 value.
6139 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6141         * sysdeps/pthread/configure.in: Require CFI directives.
6143         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6144         definition.
6145         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6146         libpthread compilation.
6147         * unwind.c (__pthread_unwind): Add hidden_def.
6148         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6150 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6152         * libc-cancellation.c (__libc_cleanup_routine): Define.
6153         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6154         (__pthread_cleanup_pop): Define.
6156 2003-07-01  Richard Henderson  <rth@redhat.com>
6158         * sysdeps/alpha/elf/pt-initfini.c: New file.
6159         * sysdeps/alpha/pthread_spin_lock.S: New file.
6160         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6161         * sysdeps/alpha/pthreaddef.h: New file.
6162         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6163         * sysdeps/alpha/tls.h: New file.
6164         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6165         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6166         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6167         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6168         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6169         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6170         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6171         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6172         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6173         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6175 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6177         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6178         cleanup support and unwind info.
6180 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6182         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6183         Use correct cleanup handler registration.  Add unwind info.
6184         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6185         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6186         * tst-once3.c: Add cleanup handler and check it is called.
6187         * tst-once4.c: Likewise.
6188         * tst-oncex3.c: New file.
6189         * tst-oncex4.c: New file.
6190         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6192 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6194         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6196 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6198         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6199         (tf_msgsnd): Likewise.
6201         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6202         premature returns a bit more.
6204 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6206         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6207         definition to the front.
6209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6210         the cleanup functions to make the names unique.  Fix dwarf opcode
6211         un unwind table.
6212         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6213         functions to make the names unique.  Fix CFA offset for two blocks.
6215 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6217         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6218         missing closing braces.
6219         Patch by Christophe Saout <christophe@saout.de>.
6221 2003-06-24  Roland McGrath  <roland@redhat.com>
6223         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6225 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6227         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6228         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6230         * pthreadP.h: Declare __find_thread_by_id.
6231         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6232         * pthread_clock_gettime.c: Allow using other thread's clock.
6233         * pthread_clock_settime.c: Likewise.
6234         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6235         * Makefile: Add rules to build and run tst-clock2.
6236         * tst-clock2.c: New file.
6238 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6241         to use exception-based cleanup handler.
6242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6244         * tst-cond8.c (ch): Announce that we are done.
6246         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6248         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6249         Also test aio_suspend with timeout value.
6251 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6253         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6254         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6255         attribute_hidden.
6257         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6258         (__pthread_mutex_lock_internal): Likewise.
6259         (__pthread_mutex_unlock_internal): Likewise.
6260         (__pthread_mutex_unlock_usercnt): Declare.
6261         * pthread_mutex_destroy.c: Always fail if used in any way.
6262         * pthread_mutex_init.c: Update comment.
6263         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6264         * pthread_mutex_timedlock.c: Adjust __nusers.
6265         * pthread_mutex_trylock.c: Adjust __nusers.
6266         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6267         and public interfaces are wrapper with pass additional parameter.
6268         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6269         parameter zero.
6270         * tst-mutex8.c: New file.
6271         * Makefile (tests): Add tst-mutex8.
6272         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6273         __pthread_mutex_unlock_usercnt.
6274         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6275         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6276         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6277         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6278         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6279         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6280         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6281         Add __nusers.
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         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6289         * pthread_mutex_timedlock.c: Likewise.
6290         * pthread_mutex_trylock.c: Adjust __nusers.
6291         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6292         * tst-mutex9.c: New file.
6293         * Makefile (tests): Add tst-mutex9.
6294         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6295         * sysdeps/ia64/tls.h: Likewise.
6296         * sysdeps/powerpc/tls.h: Likewise.
6297         * sysdeps/s390/tls.h: Likewise.
6298         * sysdeps/sh/tls.h: Likewise.
6299         * sysdeps/x86_64/tls.h: Likewise.
6300         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6301         Change type of __owner.
6302         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6303         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6304         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6305         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6306         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6308 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6310         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6311         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6313         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6314         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6315         instead of nr to lll_futex_wake.  Only set errno and return -1
6316         if err < 0.
6318         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6319         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6320         return actual return value from the syscall, not 0.
6322 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6324         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6325         find a random value.
6326         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6327         errno==EIDRM.
6329         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6330         compat_timer_settime.
6331         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6332         compat_timer_gettime.
6333         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6334         compat_timer_getoverrun.
6335         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6336         compat_timer_delete.
6338         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6339         error-checking mutex detect busy mutexes.
6341 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6343         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6344         Add ax to clobber list.
6345         (lll_mutex_cond_lock): Likewise.
6346         (lll_mutex_unlock): Likewise.
6347         (lll_lock): Likewise.
6348         (lll_unlock): Likewise.
6350         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6351         * tst-cancel18.c: New file.
6352         * tst-cancelx18.c: New file.
6354         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6355         and tcdrain.
6357         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6358         * tst-cancel17.c: New file.
6359         * tst-cancelx17.c: New file.
6361         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6362         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6363         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6365         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6367 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6369         * sysdeps/pthread/createthread.c (create_thread): Set
6370         header.multiple_threads unconditionally.
6371         * allocatestack.c (allocate_stack): Likewise.
6372         * descr.h (struct pthread): Add header.multiple_threads
6373         unconditionally.
6374         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6375         Define for librt.  #error if neither libpthread, libc nor librt.
6376         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6377         Likewise.
6378         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6379         CDISABLE): Likewise.
6380         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6381         CDISABLE): Likewise.
6382         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6383         CDISABLE): Likewise.
6384         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6385         CDISABLE): Likewise.  Access header.multiple_threads outside of
6386         libc and libpthread.
6387         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6388         Likewise.
6389         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6390         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6392 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6394         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6395         Also test early cancellation before the thread reaches the cancellation
6396         point.
6398         * Makefile: Compile forward.c with exceptions.
6400         * sysdeps/unix/sysv/linux/sleep.c: New file.
6402 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6404         * Makefile: Add CFLAGS definition to compile function wrappers
6405         duplicated from libc with exceptions.
6406         * tst-cancel4.c: Also check cancellation handlers.
6408         * Makefile: Add rules to build and run tst-cancel16 and
6409         tst-cancelx16.  Add missing CFLAGS definitions.
6410         * tst-cancel16.c: New file.
6411         * tst-cancelx16.c: New file.
6413 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6415         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6416         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6417         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6418         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6420         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6421         (LIBC_CANCEL_RESET): Likewise.
6422         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6423         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6424         librt-cancellation.
6425         (CFLAGS-libcrt-cancellation.c): Define.
6426         * sysdeps/pthread/librt-cancellation.c: New file.
6427         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6428         macros also when compiling librt.
6429         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6430         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6431         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6432         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6433         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6434         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6435         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6437         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6438         compat_timer_create.
6440 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6442         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6444         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6445         __register_atfork.
6446         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6447         Add libc_hidden_def.
6449 2003-06-13  Roland McGrath  <roland@redhat.com>
6451         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6452         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6454 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6456         * allocatestack.c (queue_stack): Always inline.
6457         * ptreadhP.h (__do_cancel): Likewise.
6459 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6461         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6462         a typo.
6464 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6466         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6467         (__pthread_cond_signal): Remove incorrect second addition for
6468         cond_lock!=0.
6470 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6472         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6473         (__pthread_cond_signal): Use correct futex pointer in
6474         __lll_mutex_lock_wait call.
6476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6477         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6479 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6481         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6482         cancelable.
6483         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6484         Likewise.
6486         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6487         hand-written CFI generation code.  Since ENTRY/END also initiated
6488         CFI frames this caused two CFI sets to be generated.
6490 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6492         * cleanup_routine.c: New file.
6493         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6494         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6495         cleanup handling.
6496         * Makefile (libpthread-routines): Add cleanup_routine.
6497         Add more CFLAGS variables to compile with exceptions.  Add comments
6498         why which file needs unwind tables.
6499         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6500         tests.
6501         * tst-cancelx1.c: New file.
6502         * tst-cancelx2.c: New file.
6503         * tst-cancelx3.c: New file.
6504         * tst-cancelx4.c: New file.
6505         * tst-cancelx5.c: New file.
6506         * tst-cancelx6.c: New file.
6507         * tst-cancelx7.c: New file.
6508         * tst-cancelx8.c: New file.
6509         * tst-cancelx9.c: New file.
6510         * tst-cancelx10.c: New file.
6511         * tst-cancelx11.c: New file.
6512         * tst-cancelx12.c: New file.
6513         * tst-cancelx13.c: New file.
6514         * tst-cancelx14.c: New file.
6515         * tst-cancelx15.c: New file.
6516         * tst-cleanupx0.c: New file.
6517         * tst-cleanupx0.expect: New file.
6518         * tst-cleanupx1.c: New file.
6519         * tst-cleanupx2.c: New file.
6520         * tst-cleanupx3.c: New file.
6522         * tst-cleanup0.c: Make standard compliant.
6523         * tst-cleanup1.c: Likewise.
6525         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6526         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6527         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6528         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6529         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6530         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6531         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6532         CLEANUP_JMP_BUF.
6533         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6534         * tst-cancel12.c: New file.
6535         * tst-cancel13.c: New file.
6536         * tst-cancel14.c: New file.
6537         * tst-cancel15.c: New file.
6538         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6539         and tst-cancel15.
6541         * tst-cancel1.c: Add some comments.
6543         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6544         timeout correctly.
6546 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6548         * Makefile (CFLAGS-pthread_cancel.c): Define.
6550 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6552         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6553         Change type of __writer element to int.
6554         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6555         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6556         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6557         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6558         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6559         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6560         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6561         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6562         Compare with TID to determine deadlocks.
6563         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6564         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6565         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6566         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6567         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6568         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6569         Likewise.
6570         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6571         Likewise.
6572         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6573         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6574         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6575         Likewise.
6576         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6577         Likewise.
6578         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6579         * Makefile (tests): Add tst-rwlock12.
6580         * tst-rwlock12.c: New file.
6582 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6584         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6585         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6586         Remove bogus hidden_proto.
6587         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6588         Likewise.
6589         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6590         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6591         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6592         ___lll_mutex_timedlock): Likewise.
6594 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6596         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6597         (__pthread_cond_signal): Add some code to eventually handle
6598         cond_lock!=0.
6600 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6602         * Makefile (tests): Add tst-exec4.
6603         (tst-exec4-ARGS): Define.
6604         * tst-exec4.c: New file.
6606 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6608         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6609         Also fail if tv_nsec < 0.
6610         (__lll_timedwait_tid): Likewise.
6611         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6612         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6613         Likewise.
6614         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6615         Likewise.
6616         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6617         Likewise.
6618         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6619         Likewise.
6620         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6621         Likewise.
6622         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6623         Likewise.
6625         * Makefile (tests): Add tst-sem8 and tst-sem9.
6626         * tst-sem8.c: New file.
6627         * tst-sem9.c: New file.
6628         * sem_open.c: Fix creation of in_use record if the file exists but
6629         no internal record.
6631         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6632         definitions.
6634         * sysdeps/pthread/timer_create.c (timer_create): In case
6635         evp==NULL, assign timer ID to sival_ptr.
6637         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6638         struct pthread_unwind_buf *.
6639         (struct pthread): Likewise for cleanup_jmp_buf element.
6641         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6642         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6643         * unwind.c (__pthread_unwind_next): Likewise.
6645 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6647         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6648         (lll_futex_timed_wait): Use int for futex value parameter.
6649         (lll_futex_wake): Likewise.
6650         (lll_futex_requeue): Likewise.
6652         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6653         Replace one memory operation with one register operation.
6655         * tst-join4.c (do_test): Fix error message.
6657         * tst-rwlock6.c (do_test): Use correct format specifier.
6659         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6660         (__lll_mutex_lock_wait): Replace one memory operation with one
6661         register operation.
6662         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6663         (__lll_mutex_lock_wait): Likewise.
6665         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6666         (__lll_mutex_cond_lock): Add one to value parameter of
6667         __lll_lock_wait to reflect reality in the futex syscall.
6668         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6669         (lll_mutex_cond_lock): Likewise.
6671 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6673         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6674         New function.
6675         (lll_mutex_cond_lock): Define.
6677 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6679         * Makefile (tests): Add tst-signal6.
6680         * tst-signal6.c: New file.
6682         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6683         (__lll_mutex_unlock_force): New function
6684         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6686         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6687         (__lll_mutex_unlock_force): New function.
6688         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6690         * tst-rwlock7.c (do_test): Use correct format specifier.
6692         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6693         Find break parameter in correct asm argument.
6695 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6697         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6698         Remove out4.
6699         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6700         error occured.
6701         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6702         Add __mutex.
6703         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6704         lll_futex_requeue, lll_mutex_unlock_force): Define.
6706 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6708         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6709         (pthread_cond_t): Add __mutex.
6710         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6711         lll_futex_requeue, lll_mutex_unlock_force): Define.
6713 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6715         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6716         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6717         Add __mutex field.
6718         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6719         Define.
6720         (lll_futex_wait, lll_futex_wake): Define.
6721         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6722         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6723         FUTEX_REQUEUE instead of FUTEX_WAIT.
6724         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6725         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6726         mutex which was used in condvar structure.  Call
6727         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6728         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6730         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6731         include tcb-offsets.h.  Read wakeup value in locked region.
6732         Use the value of gbr register as THREAD_ID.
6733         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6734         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6735         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6737         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6738         macros.
6740 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6742         * sysdeps/pthread/pthread_cond_broadcast.c
6743         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6745 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6748         typo in register name.
6749         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6750         correctly.  Actually use requeue.  Little optimization.
6751         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6752         mutex address early.  Handle cancellation state as 32-bit value.
6753         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6754         Remove unnecessary label.
6756 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6758         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6759         instead of FUTEX_WAIT.
6760         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6761         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6762         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6763         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6765         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6766         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6767         of __pthread_mutex_lock_internal.
6768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6769         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6770         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6771         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6773         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6774         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6775         Add pthread_mutex_cond_lock.
6776         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6777         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6778         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6779         lll_mutex_cond_lock.
6780         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6781         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6782         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6783         Add __mutex field.
6784         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6785         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6787         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6788         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6790         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6791         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6792         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6793         macro don't define aliases.
6795         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6796         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6797         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6798         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6799         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6801         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6803         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6805 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6807         * sem_open.c: Fix one endless loop.  Implement correct semantics
6808         wrt opening the same semaphore more then once.
6809         * sem_close.c: Adjust for sem_open change.
6810         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6811         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6812         * Makefile (tests): Add tst-sem7.
6813         * tst-sem7.c: New file.
6815 2003-05-16  Roland McGrath  <roland@redhat.com>
6817         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6818         uninitialized variable braino.
6820 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6822         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6823         test for syscall availability.
6825         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6826         __no_posix_timers to -1 if the syscalls don't exist.
6828         * pthread_join.c (pthread_join): Set tid field of the joined
6829         thread to -1.  This isn't necessary but helps to recognize some
6830         error conditions with almost no cost.
6832         * allocatestack.c (FREE_P): Also negative values indicate an
6833         unused stack.
6835         * unwind.c: Include <unistd.h>.
6837 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6839         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6841 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6843         * Makefile (crti-objs, crtn-objs): New variables.
6844         (omit-deps, extra-objs): Add crtn.
6845         ($(objpfx)libpthread.so): Depend on both crti and crtn
6846         and links to them in multidir.
6847         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6849 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6851         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6852         (lll_mutex_unlock): Use atomic_exchange_rel.
6854 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6856         * cond-perf.c (cons): Add missing locking around setting of alldone.
6858 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6860         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6861         related macros.
6862         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6864 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6866         * tst-sem6.c: New file.
6867         * Makefile (tests): Add tst-sem6.
6869         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6870         Use atomic_exchange_rel instead of atomic_exchange.
6871         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6872         Likewise.
6874         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6875         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6876         vsyscall is possible.
6878         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6879         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6880         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6881         pthread_setaffinity_np.
6882         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6883         and pthread_setaffinity_np.
6884         * Makefile (libpthread-routines): Add pthread_getaffinity and
6885         pthread_setaffinity.
6887         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6888         use it in case mmap to allocate the stack fails.
6889         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6890         ARCH_MAP_FLAGS here.
6891         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6892         ARCH_RETRY_MMAP.
6894 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6896         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6897         handler implementation.  It is now lockless in fork().
6898         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6899         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6900         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6901         declare the __fork_*_lists.
6902         (struct fork_handler): Include pointers to all three functions.
6903         Add next, refcntr and need_signal elements.
6904         (__fork_handlers): New declaration.
6905         (__register_atfork_malloc): Remove declaration.
6906         (HAVE_register_atfork_malloc): Remove definition.
6907         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6908         __pthread_child_handler variable.
6909         (__libc_pthread_init): Use __register_atfork instead of explicitly
6910         adding to the list.
6911         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6912         and lll_futex_wake.
6913         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6915         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6916         function must never be reached.
6918         * cond-perf.c: New file.
6920 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6922         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6924 2003-05-04  Roland McGrath  <roland@redhat.com>
6926         * Makefile ($(objpfx)../libc.so): New target.
6928 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6930         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6931         (pthread_condattr_t): Size is only an int, don't use long for
6932         alignment.
6933         (pthread_mutexattr_t): Likewise.
6934         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6935         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6936         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6938 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6940         * sysdeps/i386/tls.h: Define THREAD_ID.
6941         * sysdeps/ia64/tls.h: Likewise.
6942         * sysdeps/powerpc/tls.h: Likewise.
6943         * sysdeps/s390/tls.h: Likewise.
6944         * sysdeps/sh/tls.h: Likewise.
6945         * sysdeps/x86_64/tls.h: Likewise.
6946         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6947         record ownership.
6948         * pthread_mutex_timedlock.c: Likewise.
6949         * pthread_mutex_trylock.c: Likewise.
6950         * pthread_mutex_unlock.c: Likewise.
6951         * pthread_rwlock_trywrlock.c: Likewise.
6952         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6953         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6954         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6955         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6957         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6958         flag.
6960 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6962         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6963         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6964         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6965         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6966         Make __align long long instead of long.
6967         (pthread_rwlock_t): Formatting.
6968         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6969         (pthread_rwlock_t): Formatting.
6970         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6971         (pthread_cond_t): Make __align long long instead of long.
6972         (pthread_rwlock_t): Move __flags field to the same position as in
6973         linuxthreads.
6975 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6977         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6978         * tst-rwlock7.c (do_test): Likewise.
6980 2003-04-26  Roland McGrath  <roland@redhat.com>
6982         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6984 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6986         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6987         sizeof (struct pthread).
6988         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6989         1 struct pthread.
6990         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6991         to 0.
6992         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6993         struct pthread.
6994         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6995         to 32-bit bytes.
6996         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6997         tcbp.
6998         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6999         unneccessarily.
7000         (NO_TLS_OFFSET): Define.
7001         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7002         add TLS_TCB_SIZE unnecessarily.
7004 2003-04-22  Roland McGrath  <roland@redhat.com>
7006         * Makeconfig (shared-thread-library): Reverse link order to work
7007         around linker bug.
7009 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7011         * semaphore.h: Fix typo in comment.
7013 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7015         * sysdeps/pthread/sigfillset.c: New file.
7017         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7018         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7019         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7020         * sysdeps/pthread/sigaction.c: Likewise.
7021         * sysdeps/pthread/sigprocmask.c: New file.
7022         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7023         __SIGRTMIN+1.
7024         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7025         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7026         in this case.
7028 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7030         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7031         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7033         * sysdeps/unix/sysv/linux/unregister-atfork.c
7034         (__unregister_atfork): Don't free memory not allocated dynamically.
7036         * semaphore.h: Remove __THROW marker from cancellation points.
7037         * nptl/sysdeps/pthread/pthread.h: Likewise.
7039 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7042         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7043         __THROW.
7045 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7047         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7049 2003-04-15  Roland McGrath  <roland@redhat.com>
7051         * forward.c (__pthread_unwind): Tweak to avoid warning.
7053 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7055         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7057 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7060         overflow CFA advance instructions.
7061         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7063 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7065         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7066         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7067         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7068         defined.
7070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7071         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7073         DW_CFA_advance_loc for .Laddl-.Lsubl.
7075 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7077         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7078         position-independent unwind data for static libraries.
7079         Add missing unwind info.  Add comments.
7081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7082         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7086 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7088         * Makefile: Make sure all cancellation points are compiled with
7089         exception and asynchronous unwind tables.
7091         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7092         which mishandles loading of global object addresses in PIC.
7093         (THREAD_SETMEM_NC): Likewise.
7095 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7097         * pthread.h: Define new data structure for cleanup buffer.  Declare
7098         new cleanup handler interfaces.
7099         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7100         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7101         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7102         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7103         it.  Declare old cleanup handler installation functions.
7104         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7105         handling.
7106         * cleanup_defer.c: Likewise.
7107         * cleanup_compat.c: New file.  Old cleanup code.
7108         * cleanup_def_compat.c: New file.  Old cleanup code.
7109         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7110         if own thread descriptor.
7111         * unwind.c: New file.
7112         * forward.c: Add __pthread_unwind.
7113         * init.c (pthread_functions): Add __pthread_unwind.
7114         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7115         Add ptr___pthread_unwind.
7116         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7117         and unwind function.
7118         * Makefile (libpthread-routines): Add cleanup_compat,
7119         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7120         table generation if necessary.
7121         * version.c: Record whether unwind support is compiled in.
7122         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7123         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7124         handler interfaces.
7125         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7126         complication to generate unwind information for syscall wrappers.
7127         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7128         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7129         __cleanup_fct_attribute.
7131         * Makefile: Add rules to build and run tst-cleanup0.
7132         * tst-cleanup0.c: New file.
7133         * tst-cleanup0.expect: New file.
7135         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7136         caller.  Optimize to avoid often unecessary local variable.
7138 2003-04-11  Roland McGrath  <roland@redhat.com>
7140         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7141         sets variable `multidir'; include that.
7142         (generated): Add it.
7143         ($(objpfx)$(multidir)/crti.o): New target.
7144         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7146 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7148         * tst-attr2.c (do_test): Add cast to avoid warning.
7149         * tst-mutex4.c (do_test): Likewise.
7151 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7153         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7154         in child.
7156 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7158         * Makefile (tests): Add tst-detach1.
7159         * tst-detach1.c: New file.
7161 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7163         * sysdeps/pthread/pthread.h: Remove duplicate
7164         pthread_cleanup_{push,pop} definitions.
7166         * tst-barrier2.c: Eliminate warnings.
7167         * tst-cancel4.c: Likewise.
7168         * tst-cond4.c: Likewise.
7169         * tst-cond6.c: Likewise.
7170         * tst-detach1.c: Likewise.
7171         * tst-rwlock4.c: Likewise.
7172         * tst-rwlock6.c: Likewise.
7173         * tst-rwlock7.c: Likewise.
7174         * tst-sem3.c: Likewise.
7175         * tst-spin2.c: Likewise.
7176         * tst-umask1.c: Likewise.
7178 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7180         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7182 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7184         * descr.h (struct pthread): Move cancelhandling member to the front.
7186 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7188         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7189         malloc_parent, and malloc_child statically.
7190         (__register_atfork_malloc): New function.
7191         (free_mem): Don't free any of the malloc_* variables on the list.
7192         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7193         Define HAVE_register_atfork_malloc.
7195 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7197         * sysdeps/pthread/createthread.c (create_thread): Add some more
7198         comments explaining when to set multiple_threads and when not.
7200         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7201         THREAD_ATOMIC_BIT_SET if not already defined.
7202         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7203         THREAD_ATOMIC_BIT_SET:
7204         * sysdeps/x86_64/tls.h: Likewise.
7205         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7206         THREAD_ATOMIC_CMPXCHG_VAL.
7207         (_pthread_cleanup_pop_restore): Likewise.
7208         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7209         (__pthread_enable_asynccancel_2): Likewise.
7210         (__pthread_disable_asynccancel): Likewise.
7211         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7212         (__libc_disable_asynccancel): Likewise.
7213         * init.c (sigcancel_handler): Likewise.
7214         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7215         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7217 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7219         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7220         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7221         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7222         * Makefile (tests): Add tst-cancel11.
7223         * tst-cancel11.c: New file.
7225 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7227         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7228         round, not the first.  Use specific_used flag instead of local
7229         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7230         (__free_tcb): Don't call deallocate_tsd here.
7231         (start_thread): Call deallocate_tsd here.
7232         * pthread_setspecific.c: Set specific_used flag really only when
7233         needed.
7234         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7235         * tst-tsd3.c: New file.
7236         * tst-tsd4.c: New file.
7238 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7240         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7241         Use atomic_exchange_and_add instead of __lll_add.
7242         (__lll_mutex_timedlock): Likewise.
7243         Patch by Ian Wienand.
7245 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7247         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7248         (SINGLE_THREAD_P): Fix typo.
7249         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7251 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7253         * Makefile (tests): Add tst-align.
7254         * tst-align.c: New file.
7255         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7257         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7258         function correctly.
7260         * tst-tsd2.c: Add casts to avoid warnings.
7262 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7264         * descr.h (struct pthread): Move most often used elements to the front.
7266 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7268         * Makefile (libpthread-routines): Add pthread_atfork.
7269         (libpthread-static-only-routines): Add pthread_atfork.
7271 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7273         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7274         of TLS_DTV_AT_TP.
7275         (INSTALL_DTV): Add parens.
7276         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7277         Use passed descr instead of THREAD_SELF.
7278         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7279         (__lll_mutex_timedlock_wait): Correct expected value after
7280         spurious wakeup.
7281         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7282         Release lock before waking up the waiters.
7283         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7284         criteria.  Reorderstruct passed to cleanup handler.  Fix
7285         handling of cancellation and failung pthread_mutex_unlock call.
7286         Use __pthread_enable_asynccancel_2 instead of
7287         __pthread_enable_asynccancel.
7288         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7289         Return result of lock re-get if it fails.
7290         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7291         for __pthread_cleanup_push.
7292         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7293         completely broken rwlock implementation.
7294         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7295         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7296         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7297         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7298         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7299         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7300         versioned_symbol macro.
7301         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7302         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7304 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7306         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7307         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7308         and __helper_tid.
7309         (struct timer): Remove th and bar field.
7310         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7311         debugging code.  Create only one helper thread.
7312         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7313         helper thread.
7314         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7315         Renamed.  Define statically.  Use thread info from siginfo.
7316         (__helper_once): New variable.
7317         (__helper_tid): New variable.
7318         (__reset_helper_control): New function.
7319         (__start_helper_thread): New function.
7321         * pthread_create.c (start_thread): Don't use setjmp inside
7322         __builtin_expect to work around gcc bug.
7324         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7325         timer_delete syscall fails, but not with ENOSYS, set
7326         __no_posix_timers.
7328         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7329         (timer_settime): Fix typo.
7330         * sysdeps/unix/sysv/linux/timer_getoverr.c
7331         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7333 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7335         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7336         offset of cleanupbuf.__prev.
7338 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7340         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7341         of included file.
7343 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7345         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7346         NULL provide default definition to syscall.
7348 2003-03-25  Roland McGrath  <roland@redhat.com>
7350         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7351         (timer_id2ptr): Fix typo.
7353 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7355         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7356         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7357         * sysdeps/ia64/pthreaddef.h: Likewise.
7358         * sysdeps/powerpc/pthreaddef.h: Likewise.
7359         * sysdeps/s390/pthreaddef.h: Likewise.
7360         * sysdeps/sh/pthreaddef.h: Likewise.
7361         * sysdeps/x86_64/pthreaddef.h: Likewise.
7362         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7363         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7364         being changed.
7365         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7366         SIGTIMER is not unblocked.
7367         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7368         RT signal taken.
7369         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7370         be send.
7371         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7372         pass pointer through as ID.
7373         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7374         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7375         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7376         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7377         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7378         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7379         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7380         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7381         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7382         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7383         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7384         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7385         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7386         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7387         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7388         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7389         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7390         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7391         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7392         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7393         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7394         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7395         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7396         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7397         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7398         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7399         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7400         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7401         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7402         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7403         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7404         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7405         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7407         * pthreadP.h: Remove FRAME_LEFT definition.
7408         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7409         already left frame.  Programs which have this problem are not POSIX
7410         compliant.
7411         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7413 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7415         * sysdeps/pthread/tst-timer.c: Check return values of the
7416         functions we test.
7418 2003-03-23  Roland McGrath  <roland@redhat.com>
7420         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7421         * tst-tls3mod.c: Likewise.
7422         * tst-tls1.c: Likewise.
7423         * tst-tls2.c: Likewise.
7425         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7426         undefined behavior.
7428         * tst-join5.c (tf1, tf2): Add a cast.
7430         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7432         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7433         Don't test anything.
7434         * tst-cond4.c: Likewise.
7435         * tst-cond6.c: Likewise.
7436         * tst-flock2.c: Likewise.
7437         * tst-mutex4.c: Likewise.
7438         * tst-rwlock4.c: Likewise.
7439         * tst-signal1.c: Likewise.
7440         * tst-spin2.c: Likewise.
7441         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7443         * tst-mutex4.c: Use test-skeleton.c.
7444         * tst-spin2.c: Likewise.
7445         * tst-sysconf.c: Likewise.
7446         * tst-barrier2.c: Likewise.
7447         * tst-cond4.c: Likewise.
7448         * tst-cond6.c: Likewise.
7449         * tst-rwlock4.c: Likewise.
7450         * tst-unload.c: Likewise.
7451         * tst-flock2.c (do_test): Use return instead of exit.
7453 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7455         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7457 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7459         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7460         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7461         instead of __lll_compare_and_swap.
7462         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7463         Likewise.
7464         Removed definition if __lll_compare_and_swap.
7466         * cancellation.c: Adjust for new form of compare&exchange macros.
7467         * cleanup_defer.c: Likewise.
7468         * init.c: Likewise.
7469         * libc-cancellation.c: Likewise.
7470         * old_pthread_cond_broadcast.c: Likewise.
7471         * old_pthread_cond_signal.c: Likewise.
7472         * old_pthread_cond_timedwait.c: Likewise.
7473         * old_pthread_cond_wait.c: Likewise.
7474         * pthread_cancel.c: Likewise.
7475         * pthread_create.c: Likewise.
7476         * pthread_detach.c: Likewise.
7477         * pthread_join.c: Likewise.
7478         * pthread_key_delete.c: Likewise.
7479         * pthread_setcancelstate.c: Likewise.
7480         * pthread_setcanceltype.c: Likewise.
7481         * pthread_timedjoin.c: Likewise.
7482         * pthread_tryjoin.c: Likewise.
7483         * sysdeps/pthread/createthread.c: Likewise.
7485 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7487         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7488         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7489         definitions.  Replace uses with calls to atomic_* functions.
7490         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7491         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7492         __lll_test_and_set calls with atomic_exchange_and_add and
7493         atomic_exchange calls respectively.
7494         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7495         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7496         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7497         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7498         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7499         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7500         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7502         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7503         returns the old value.
7505 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7507         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7508         int for variable OLDVAL and correct inline assembler contraint.
7509         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7510         type int for variable OLD.
7512         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7513         only for s390-32.
7514         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7515         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7516         instead of multiple_threads field in the TCB.
7518 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7520         * sysdeps/i386/i686/bits/atomic.h: Removed.
7521         * sysdeps/i386/i586/bits/atomic.h: Removed.
7522         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7523         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7524         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7525         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7526         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7527         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7528         * atomic.h: Removed.  Moved to glibc.
7530         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7531         support for clock selection.
7533         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7534         signalling waiters.
7536 2003-03-18  Roland McGrath  <roland@redhat.com>
7538         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7539         Add __lll_rel_instr first.  Add memory clobber.
7540         (lll_mutex_unlock): Use __lll_test_and_set.
7541         From Paul Mackerras <paulus@samba.org>.
7543         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7544         unconditionally.
7545         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7546         (SINGLE_THREAD_P):  Add `header.' prefix.
7547         From Paul Mackerras <paulus@samba.org>.
7549         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7550         pthread_timedjoin_np to ...
7551         (libpthread: GLIBC_2.3.3): ... here.
7552         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7554         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7555         Avoid shadowing VAL variable.
7557         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7558         New macro.
7560 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7562         * Makefile (tests): Add tst-cond11.
7563         * tst-cond11.c: New file.
7565         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7566         struct passed to cleanup handler to eliminate one more
7567         instruction.
7568         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7570         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7571         (pthrad_cond_t): Replace __unused field with __clock.
7573         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7574         waken all waiters in cleanup handler.
7575         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7578         * pthread_condattr_getclock.c: New file.
7579         * pthread_condattr_setclock.c: New file.
7580         * sysdeps/pthread/pthread.h: Declare these new functions.
7581         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7582         * Makefile (libpthread-routines): Add the new functions.
7583         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7584         Renamed field to value.  Document use of the bits.
7585         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7586         change.
7587         * pthread_condattr_setpshared.c: Likewise.
7588         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7589         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7590         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7591         Add __clock field.
7592         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7593         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7594         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7595         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7596         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7597         Implement clock selection.
7598         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7599         * pthread-errnos.sym: Add ENOSYS.
7600         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7601         _POSIX_CLOCK_SELECTION.
7602         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7604         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7605         invalid .size directive.
7607 2003-03-17  Roland McGrath  <roland@redhat.com>
7609         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7610         Formatting tweaks.
7612 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7614         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7615         Use __lll_add instead of spelling it out.  Use protected symbol names.
7616         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7617         Use __lll_add.
7618         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7619         Renamed from lll_compare_and_swap.  Use new name where necessary.
7620         (__lll_add): Defined.
7621         (__lll_dec_if_positive): Defined.
7622         (__lll_test_and_set): Defined.
7623         * sysdeps/ia64/pthread_spin_init.c: Removed.
7624         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7625         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7626         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7627         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7628         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7629         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7630         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7631         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7632         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7633         __sync_lock_release_si.
7634         Patch by Jakub Jelinek.
7636         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7637         Fix timeout handling.
7638         (__lll_timedwait_tid): Likewise.
7639         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7640         Patch by Jakub Jelinek.
7642         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7644 2003-03-17  Roland McGrath  <roland@redhat.com>
7646         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7647         * sysdeps/pthread/pthread_spin_init.c: New file.
7648         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7649         * sysdeps/powerpc/Makefile: New file.
7650         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7651         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7652         * sysdeps/powerpc/pthreaddef.h: New file.
7653         * sysdeps/powerpc/tcb-offsets.sym: New file.
7654         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7655         * sysdeps/powerpc/tls.h: New file.
7656         * sysdeps/powerpc/bits/atomic.h: New file.
7657         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7658         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7659         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7661         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7662         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7663         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7664         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7665         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7666         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7667         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7668         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7669         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7670         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7671         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7672         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7673         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7674         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7675         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7677         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7678         not gettimeofday.
7679         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7680         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7681         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7682         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7683         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7685 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7687         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7688         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7689         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7690         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7691         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7693 2003-03-16  Roland McGrath  <roland@redhat.com>
7695         * tst-fork4.c: Include <string.h>.
7696         * tst-signal2.c: Likewise.
7697         * tst-mutex5.c (do_test): exit -> return.
7698         * tst-mutex2.c: Include <stdlib.h>.
7700 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7702         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7703         (__lll_mutex_timedlock_wait): Correct expected value after
7704         spurious wakeup.  Otherwise we would never wait again.
7706         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7707         zone versus inline asm stupidity.  Use correct instructions.
7709         * tst-rwlock6.c: Add some more status output.
7711 2003-03-15  Roland McGrath  <roland@redhat.com>
7713         * sysdeps/pthread/configure.in: New file.
7714         * sysdeps/pthread/configure: New file (generated).
7716 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7718         * allocatestack.c (allocate_stack): Store the exact stack size of
7719         user allocated stacks.
7721 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7723         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7724         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7725         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7726         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7727         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7728         Use `header.' prefix.
7729         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7731 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7733         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7734         __builtin_frame_address, use stack pointer.
7736         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7737         instead of __builtin_frame_pointer.
7739 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7741         * tst-basic1.c (do_test): Add cast to avoid warning.
7742         * tst-basic2.c (do_test): Likewise.
7744         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7745         amount of stack correction.
7747         * tst-fork4.c: Use test-skeleton.c.
7749 2003-03-14  Roland McGrath  <roland@redhat.com>
7751         * init.c: Fix typo "#eli" for "#else".
7753 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7755         * allocatestack.c (__stack_user): Use hidden_data_def.
7756         * pthread_create.c (__pthread_keys): Likewise.
7758         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7760 2003-03-14  Roland McGrath  <roland@redhat.com>
7762         * tst-fork4.c: New file.
7763         * Makefile (tests): Add it.
7765         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7766         we always define the padding space.
7767         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7768         stopped supporting its own extensions fully.
7769         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7770         struct also called `header', so `header.multiple_threads' is the field
7771         name to use on all machines.
7772         * allocatestack.c (allocate_stack): Use `header.' prefix.
7773         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7774         * pthread_create.c (__pthread_create_2_1): Likewise.
7775         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7776         (THREAD_SELF): Likewise.
7777         * sysdeps/x86_64/tls.h: Likewise.
7778         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7779         (SINGLE_THREAD_P): Likewise.
7780         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7781         (SINGLE_THREAD_P): Likewise.
7782         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7783         (SINGLE_THREAD_P): Likewise.
7785         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7786         value directly.
7788 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7790         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7791         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7793         * pthread_create.c (start_thread): setjmp is expected to return 0.
7795         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7796         (THREAD_GETMEM_NC): Likewise.
7798 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7800         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7801         and the size of the stack which must be allocated is a multiple,
7802         allocate one more page.
7803         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7804         MULTI_PAGE_ALIASING.
7806 2003-03-13  Roland McGrath  <roland@redhat.com>
7808         * pthread_create.c (start_thread): Set EXITING_BIT after the
7809         event-reporting (and destructors), not before.
7811 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7813         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7814         lll_futex_wake): Declare register variables as long int instead of
7815         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7816         Make syscall arguments clobbered by the syscall.
7817         (lll_futex_wait): Define using lll_futex_timed_wait.
7819         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7820         to void *.
7822         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7823         PPID if [! NDEBUG].
7825         * allocatestack.c (nptl_ncreated): Only declare if
7826         COLORING_INCREMENT != 0.
7828         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7829         (__libc_enable_asynccancel_2): Remove prototype.
7831         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7832         ctid to match kernel.
7834 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7836         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7837         libc_multiple_threads.
7838         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7839         __libc_multiple_threads to...
7840         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7842         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7843         versioning.
7844         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7845         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7847         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7848         (__pthread_once_internal): Define.
7850         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7851         macros instead of .symver directly.
7852         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7853         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7855         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7856         * sysdeps/x86_64/tcb-offsets.sym: New file.
7857         * sysdeps/x86_64/Makefile: New file.
7859         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7860         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7861         to access own pthread_t in TCB.
7862         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7863         Likewise.
7864         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7865         Likewise.
7866         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7868 2003-03-12  Roland McGrath  <roland@redhat.com>
7870         * pthread-errnos.sym: New file.
7871         * Makefile (gen-as-const-headers): New variable, list that file.
7872         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7873         header <pthread-errnos.h> instead of defining errno values here.
7874         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7875         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7876         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7877         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7878         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7879         Likewise.
7880         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7881         Likewise.
7882         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7884         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7885         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7886         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7887         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7888         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7889         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7891         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7892         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7893         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7894         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7895         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7896         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7897         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7898         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7899         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7900         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7901         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7902         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7903         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7904         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7905         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7906         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7907         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7908         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7910         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7911         CLONE_CHILD_SETTID worked.
7913 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7915         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7916         file.
7917         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7918         file.
7920         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7921         (pthread_cond_t): Add padding.
7923         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7924         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7925         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7927         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7928         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7929         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7930         (__pthread_rwlock_timedrdlock): Likewise.
7931         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7932         (__pthread_rwlock_wrlock): Likewise.
7933         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7934         (__pthread_rwlock_rdlock): Likewise.
7936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7938         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7939         result of lock re-get if it fails.
7941 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7943         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7945         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7946         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7947         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7948         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7949         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7950         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7951         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7952         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7954         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7955         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7957         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7958         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7959         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7960         (create_thread): Likewise.
7961         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7962         * init.c (__pthread_initialize_minimal_internal): Initialize
7963         __libc_multiple_threads_ptr if necessary.
7964         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7965         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7966         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7967         __libc_multiple_threads.
7968         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7969         necessary.
7971         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7972         (THREAD_SETMEM_NC): Likewise.
7974         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7975         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7976         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7977         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7979         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7980         Eliminate one entire instruction.
7982         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7983         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7985         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7986         instead of __pthread_enable_asynccancel.
7987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7988         (__pthread_cond_wait): Likewise.
7989         * sysdeps/pthread/pthread_cond_timedwait.c
7990         (__pthread_cond_timedwait): Likewise.
7991         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7994         (__condvar_cleanup): Wake up all waiters in case we got signaled
7995         after being woken up but before disabling asynchronous
7996         cancellation.
7997         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7998         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7999         (__condvar_cleanup): Likewise.
8001         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8002         Make it an error if architecture has no #if case.  Add x86-64.
8004         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8005         pt-initfini.s generation.
8007         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8008         (TLS_INIT_TP): Fix typo.
8010 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8012         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8013         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8015         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8016         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8017         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8018         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8019         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8020         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8021         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8022         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8024 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8026         * sysdeps/pthread/pthread_cond_timedwait.c
8027         (__pthread_cond_timedwait): Return the result of the final
8028         locking.  If it succeeds, the regular function return value.
8030         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8031         Return result of the final locking.
8032         * version.c (__nptl_main): Work around problems with the strange
8033         INTERNAL_SYSCALL macro on ppc32.
8034         * init.c (__pthread_initialize_minimal_internal): Unblock
8035         SIGCANCEL in case the parent blocked it.
8036         Reported by Paul Mackerras <paulus@samba.org>.
8038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8039         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8040         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8042 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8044         * sysdeps/pthread/pthread_cond_timedwait.c
8045         (__pthread_cond_timedwait): Unlock and fail if
8046         __pthread_mutex_unlock_internal failed.
8048         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8049         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8050         Use ARCH_CLONE.
8051         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8052         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8053         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8054         ALLOCATE_STACK): New macros.
8055         (TLS_TPADJ): New macro.
8056         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8057         (allocate_stack): Handle TLS_DTV_AT_TP and
8058         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8059         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8060         Don't set PD->self.
8061         * init.c [__ia64__] (__NR_set_tid_address): Define.
8063         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8064         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8065         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8066         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8067         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8068         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8069         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8070         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8071         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8072         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8073         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8074         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8075         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8076         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8077         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8078         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8079         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8080         * sysdeps/ia64/bits/atomic.h: New file.
8081         * sysdeps/ia64/Makefile: New file.
8082         * sysdeps/ia64/pthread_spin_init.c: New file.
8083         * sysdeps/ia64/pthread_spin_lock.c: New file.
8084         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8085         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8086         * sysdeps/ia64/pthreaddef.h: New file.
8087         * sysdeps/ia64/tcb-offsets.sym: New file.
8088         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8089         * sysdeps/ia64/tls.h: New file.
8091         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8092         to syscall instead of no arguments.
8094 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8096         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8097         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8098         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8099         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8101         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8102         unused code.
8104         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8106         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8107         lowlevelbarrier.sym.
8108         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8109         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8110         Include lowlevelbarrier.h and don't define offsets locally.
8111         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8113         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8114         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8115         (__lll_mutex_timedlock_wait): Likewise.
8116         (lll_mutex_lock): Adjust asm for that.
8117         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8118         (lll_lock): Adjust asm for operand order change.
8119         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8120         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8122         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8123         Reverse order of parameters.
8124         (__lll_timedwait_tid): Remove regparms attribute.
8125         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8126         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8128         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8129         (__lll_timedwait_tid): Remove one unnecessary instruction.
8131         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8132         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8133         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8134         lowlevelmutex.S.
8136         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8137         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8138         for NOT_IN_libc.
8139         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8140         lowlevellock.S.
8142         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8143         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8144         for libc.so.
8145         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8146         define LOCK here (if UP is not defined).  The actual code is in
8147         lowlevelmutex.S.
8149         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8150         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8151         __lll_timedwait_tid for libc.so.
8152         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8153         define LOCK here (if UP is not defined).  The actual code is in
8154         lowlevellock.S.
8156         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8157         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8158         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8159         instead of lowlevelsem.h.
8160         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8161         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8162         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8164         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8165         lowlevelrwlock.sym.
8166         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8167         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8168         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8170         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8171         register loading.
8172         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8173         last changed.  D'oh.
8175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8177         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8178         of __libc_locking_needed.
8179         (lll_trylock): Initialize %eax to zero.
8181         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8182         pthread_cond_t definition.
8184 2003-03-10  Roland McGrath  <roland@redhat.com>
8186         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8187         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8188         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8189         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8190         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8192         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8193         Instead of setting PD->multiple_threads, set globals
8194         __pthread_multiple_threads and __libc_multiple_threads.
8195         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8196         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8197         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8199         * descr.h (struct pthread): Conditionalize first member on
8200         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8201         containing an anonymous tcbhead_t.  Move `list' member out.
8202         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8203         * allocatestack.c: Remove use of `header.data.' prefix.
8204         * pthread_create.c: Likewise.
8205         * init.c (__pthread_initialize_minimal_internal): Likewise.
8206         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8207         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8208         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8209         * sysdeps/x86_64/tls.h: Likewise.
8210         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8211         (SINGLE_THREAD_P): Likewise.
8212         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8213         (SINGLE_THREAD_P): Likewise.
8214         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8215         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8217 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8219         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8221         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8222         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8224         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8225         leftovers from the ia32 code.
8227         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8228         memory load.
8229         (clear_once_control): Don't load %esi.
8231         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8232         handling.
8234         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8236         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8237         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8239         * Makefile (tests): Add tst-cond10.
8240         * tst-cond10.c: New file.
8242 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8244         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8245         * tst-signal3.c (do_test): Likewise.
8246         * tst-sem5.c (do_test): Likewise.
8247         * tst-kill6.c (do_test): Likewise.
8248         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8250         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8251         of inc/dec.
8252         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8253         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8254         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8255         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8257         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8259         Likewise.
8260         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8261         Likewise.
8262         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8266         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8267         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8268         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8269         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8271         * allocatestack.c (allocate_stack): If mprotect() fails free the
8272         TLS memory.
8274 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8276         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8278         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8279         lll_wake_tid.  This was used only to work around kernel limits in
8280         the early days.
8281         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8282         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8283         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8284         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8286         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8287         (__pthread_initialize_minimal_internal): Change initialization of
8288         __static_tls_align_m1 appropriately.
8289         * pthreadP.h (__static_tls_align_m1): Renamed from
8290         __static_tls_align.
8291         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8292         instead of __static_tls_align-1.
8294 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8296         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8298         * pthread_create.c: Define __pthread_keys using nocommon
8299         attribute, not by placing it explicitly in bss.
8300         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8302         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8303         Use it in mmap call to allocate stacks.
8305         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8307         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8308         result of the thread function.
8310 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8312         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8313         version is just fine.
8315         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8316         (__pthread_child_handler): Renamed from pthread_child_handler,
8317         exported, and marked hidden.  Change all users.
8318         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8319         free __pthread_child_handler from child list.
8321 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8323         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8325         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8326         Fix handling of cancellation and failing pthread_mutex_unlock call.
8327         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8328         (__pthread_cond_wait): Likewise.
8330         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8331         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8332         lll_futex_timed_wait call.
8333         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8334         (pthread_rwlock_timedwrlock): Likewise.
8336         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8337         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8338         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8340         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8341         check of lll_futex_wake return value.
8343 2003-03-03  Roland McGrath  <roland@redhat.com>
8345         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8347         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8348         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8349         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8351 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8353         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8354         error for CPU clocks.
8356         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8357         _POSIX_MONOTONIC_CLOCK.
8358         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8360         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8361         recent kernels.
8363 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8365         * descr.h (struct pthread): Move cleanup field to the front.
8367 2003-03-01  Roland McGrath  <roland@redhat.com>
8369         * sem_open.c (sem_open): Braino fix.
8371 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8373         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8374         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8375         __pthread_cleanup_pop functionality.
8376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8378         * descr.h (struct pthread): Move tid field to the front now that
8379         it is often used.
8381         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8382         (__lll_mutex_timedlock_wait): Remove.
8383         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8384         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8385         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8386         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8387         (lll_unlock_wake_cb): Don't save and restore %esi.
8388         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8389         %esi.
8390         (__lll_timedwait_tid): Add alignment.
8391         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8392         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8393         %esi.
8394         (__lll_timedwait_tid): Removed.
8395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8396         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8397         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8398         (pthread_barrier_wait): Don't save, load, and restore %esi for
8399         last thread.
8400         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8401         (__pthread_cond_signal): Don't save, load, and restore %esi.
8402         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8403         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8404         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8405         Don't save, load, and restore %esi.
8407 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8409         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8410         Release lock before waking up the waiters.
8412         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8414         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8415         (reader_thread): Likewise.
8417         * sysdeps/pthread/pthread_rwlock_unlock.c
8418         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8419         to wake up readers if there are none.
8421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8422         Release internal lock before wake threads.
8424 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8426         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8427         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8428         predefined.
8429         * tst-rwlock9.c: Likewise.
8430         * tst-rwlock10.c: New file.
8431         * tst-rwlock11.c: New file.
8433         * Makefile (tests): Add tst-dlsym1.
8434         * tst-dlsym1.c: New file.
8436         * init.c (__pthread_initialize_minimal_internal): Set
8437         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8438         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8440 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8442         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8444         * tst-cond2.c: Fix sychronization with child.
8446         * tst-rwlock8.c (reader_thread): Remove unused variable.
8448         * Makefile: Add rules to build and run tst-tls3.
8449         * tst-tls3.c: New file.
8450         * tst-tls3mod.c: New file.
8452         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8453         * tst-rwlock8.c: New file.
8454         * tst-rwlock9.c: New file.
8455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8456         complete broken rwlock implementation.
8457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8458         Likewise.
8459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8460         Likewise.
8461         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8462         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8463         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8464         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8465         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8466         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8467         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8469 2003-02-23  Roland McGrath  <roland@redhat.com>
8471         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8473 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8475         * Makefile (tests): Add tst-context1.
8476         * tst-context1.c: New file.
8478         * Makefile (tests): Add tst-tls1 and tst-tls2.
8479         * tst-tls1.c: New file.
8480         * tst-tls2.c: New file.
8482         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8483         for failed cmpxchg.
8485         * pthread_create.c (start_thread): Set EXITING_BIT early.
8487         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8488         (THREAD_GETMEM_NC): Likewise.
8490 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8493         off 3 more bytes by using offset-less instructions when possible.
8495         * Makefile: Add dependency for $(objpfx)version.d.
8497         * eintr.c (eintr_source): Add unnecessary return but the compiler
8498         insists.
8500         * tst-kill3.c: Include <unistd.h>.
8502 2003-02-21  Roland McGrath  <roland@redhat.com>
8504         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8506 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8508         * Makefile (tests): Add tst-eintr1.
8509         (distribute): Add eintr.c.
8510         * tst-eintr1.c: New file.
8511         * eintr.c: New file.
8513         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8515         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8516         Disallow sending SIGCANCEL.
8518         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8519         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8520         * tst-kill1.c: New file.
8521         * tst-kill2.c: New file.
8522         * tst-kill3.c: New file.
8523         * tst-kill5.c: New file.
8524         * tst-kill6.c: New file.
8525         * tst-basic7.c: Renamed to...
8526         * tst-kill4.c: ...this.
8528 2003-02-21  Roland McGrath  <roland@redhat.com>
8530         * Makefile (install-lib-ldscripts): New variable.
8532 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8534         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8535         * pthread_cancel.c: Use INVALID_TD_P.
8536         * pthread_detach.c: Likewise.
8537         * pthread_getschedparam.c: Likewise.
8538         * pthread_setschedparam.c: Likewise.
8539         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8540         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8541         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8542         * pthread_timedjoin.c: Likewise.
8544         * tst-basic7.c: Include <signal.h>.
8546         * pthread_join.c (pthread_join): Limited checking for invalid
8547         descriptors.
8548         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8550 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8552         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8553         beginning of the loop.  Clear the entire first block of TSD.
8554         * Makefile (tests): Add tst-key4.
8555         * tst-key4.c: New file.
8557 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8559         * Makefile (tests): Add tst-basic7.
8560         * tst-basic7.c: New file.
8562         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8563         Add some more __builtin_expect.
8565         * pthreadP.h: Define dummy version of DEBUGGING_P.
8567 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8569         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8570         _POSIX_THREAD_PRIORITY_SCHEDULING.
8571         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8572         _XOPEN_REALTIME_THREADS.
8573         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8575         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8576         kernel returns EINVAL for PID <= 0, work around it.
8578         * Makefile (tests): Add tst-signal5.
8579         * tst-signal5.c: New file.
8581         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8582         and LOGIN_NAME_MAX.
8584         * tst-cancel1.c (tf): Block all signals.
8586         * Makefile (tests): Add tst-basic6.
8587         * tst-basic6.c: New file.
8589         * tst-basic1.c: Add test for process ID.
8591         * Makefile (tests): Add tst-cancel10.
8592         * tst-cancel10.c: New file.
8594         * Makefile (tests): Add tst-signal4.
8595         * tst-signal4.c: New file.
8597         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8598         __sigismember instead of sigismember.  Add __builtin_expect.
8600 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8602         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8603         pthread_setcancelstate, and pthread_rwlock_setpshared.
8605         * tst-cancel7.c (do_test): Make sure the pid file exists before
8606         canceling the thread.
8608         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8609         pthread_rwlock_timedrdlock tests.
8610         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8611         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8612         Check for invalid tv_nsec field.
8613         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8614         Likewise.
8616         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8617         recursive mutex of overflow.
8619         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8621         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8622         going into an endless loop.
8623         * Makefile (tests): Add tst-cancel9.
8624         * tst-cancel9.c: New file.
8626         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8628 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8630         * tst-mutex5.c (do_test): Add more timedlock tests.
8632         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8633         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8635         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8636         use INLINE_SYSCALL.  Error number is returned, not -1.
8638         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8639         and __deallocate_stack with internal_function.
8640         * pthread_create.c: Adjust definitions appropriately.
8641         * allocatestack.c: Likewise.
8643         * pthread_join.c: Add one more __builtin_expect.
8644         * pthread_timedjoin.c: Likewise.
8646         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8647         not data of sequence number does not match.
8648         Add one __builtin_expect.
8650         * Makefile (tests): Add tst-clock1.
8651         * tst-clock1.c: New file.
8653         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8654         negative arguments.
8655         * Makefile (tests): Add tst-basic5.
8656         * tst-basic5.c: New file.
8658 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8660         * Makefile (tests): Add tst-basic4.
8661         * tst-basic4.c: New file.
8663         * pthreadP.h: Add declaraction for __nptl_nthreads.
8664         * pthread_create.c: Define __nptl_nthreads
8665         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8666         after thread is done.  If then zero, call exit(0).
8667         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8668         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8669         * init.c (pthread_functions): Initialize ptr_nthreads.
8670         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8671         (__reclaim_stacks): Decrement __nptl_nthreads.
8672         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8673         Define.
8674         * Makefile (tests): Add tst-basic3.
8675         * tst-basic3.c: New file.
8677         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8678         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8679         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8680         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8681         if asynchronous canceling is enabled.
8682         * pthread_join.c (pthread_join): When recognizing circular joins,
8683         take into account the other thread might be already canceled.
8684         * Makefile (tests): Add tst-join5.
8685         * tst-join5.c: New file.
8687         * Makefile (tests): Add tst-join4.
8688         * tst-join4.c: New file.
8690 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8692         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8694 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8696         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8697         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8698         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8699         warning.
8700         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8701         to avoid warning.
8702         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8703         error if lll_futex_wake failed.
8705 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8708         handling of cancellation and failung pthread_mutex_unlock call.
8709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8710         * Makefile (tests): Add tst-cond8 and tst-cond9.
8711         * tst-cond8.c: New file.
8712         * tst-cond9.c: New file.
8714         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8716         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8717         non-standard initializers with __USE_GNU.
8719         * Makefile (tests): Add tst-cleanup3.
8720         * tst-cleanup3.c: New file.
8722 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8724         * Makefile (tests): Add tst-attr1 and tst-attr2.
8725         * tst-attr1.c: New file.
8726         * tst-attr2.c: New file.
8728         * Makefile: Add rules to build and run tst-atfork2 test.
8729         * tst-atfork2.c: New file.
8730         * tst-atfork2mod.c: New file.
8732         * sysdeps/unix/sysv/linux/unregister-atfork.c
8733         (__unregister_atfork): Free the memory allocated for the handlers
8734         after removing them from the lists.
8736         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8737         cleanup function.
8739         * tst-atfork1.c (do_test): Wait for the child we forked.
8740         Report error in child.
8742         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8744         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8746 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8748         * Makefile (tests): Add tst-cancel8.
8749         * tst-cancel8.c: New file.
8751         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8752         clearing of control variable.
8753         * Makefile (tests): Add tst-once3 and tst-once4.
8754         * tst-once3.c: New file.
8755         * tst-once4.c: New file.
8757 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8759         * sysdeps/sh/Makefile: New file.
8760         * sysdeps/sh/bits/atomic.h: New file.
8761         * sysdeps/sh/pthread_spin_init.c: New file.
8762         * sysdeps/sh/pthread_spin_lock.c: New file.
8763         * sysdeps/sh/pthread_spin_trylock.S: New file.
8764         * sysdeps/sh/pthread_spin_unlock.S: New file.
8765         * sysdeps/sh/pthreaddef.h: New file.
8766         * sysdeps/sh/tcb-offsets.sym: New file.
8767         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8768         * sysdeps/sh/tls.h: New file.
8769         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8770         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8771         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8772         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8773         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8774         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8775         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8776         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8777         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8778         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8779         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8780         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8781         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8782         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8783         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8784         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8785         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8786         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8787         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8788         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8789         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8790         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8791         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8792         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8793         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8794         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8795         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8796         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8797         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8798         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8800 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8802         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8803         according to POSIX.
8805         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8807 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8809         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8810         (TLS_GET_FS): New #define.
8811         (TLS_SET_FS): New #define.
8812         Correct value of __NR_set_thread_area.
8814         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8816 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8818         * Makefile (tests): Add tst-popen1.
8819         * tst-popen1.c: New file.
8821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8822         but inactive generalization.
8823         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8824         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8825         Minor optimization, remove one instruction.
8826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8828 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8830         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8832 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8834         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8835         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8836         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8837         * sysdeps/pthread/pthread_cond_signal.c: New file.
8838         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8839         * sysdeps/pthread/pthread_cond_wait.c: New file.
8840         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8841         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8842         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8843         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8844         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8845         * sysdeps/s390/Makefile: New file.
8846         * sysdeps/s390/bits/atomic.h: New file.
8847         * sysdeps/s390/pthread_spin_init.c: New file.
8848         * sysdeps/s390/pthread_spin_lock.c: New file.
8849         * sysdeps/s390/pthread_spin_trylock.c: New file.
8850         * sysdeps/s390/pthread_spin_unlock.c: New file.
8851         * sysdeps/s390/pthreaddef.h: New file.
8852         * sysdeps/s390/tcb-offsets.sym: New file.
8853         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8854         * sysdeps/s390/tls.h: New file.
8855         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8856         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8857         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8858         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8859         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8860         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8861         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8862         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8863         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8864         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8865         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8866         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8867         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8868         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8869         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8870         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8871         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8872         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8873         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8874         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8875         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8876         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8877         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8879 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8881         * atomic.h: Add a couple more default implementations.
8882         (atomic_compare_and_exchange_acq): Use
8883         __arch_compare_and_exchange_32_acq in return value definition.  It
8884         always exists.
8885         (atomic_bit_set): Renamed from atomic_set_bit.
8886         Add missing atomic_ prefixes.
8888         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8889         thread library is available, use correct value to mark initialized
8890         once variable.
8892 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8894         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8895         __sysconf to determine pagesize.
8897         * pthread_create.c: Include <atomic.h>.
8898         * allocatestack.c (allocate_stack): Implement coloring of the
8899         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8900         size minus one.  Adjust users.
8901         * sysdeps/i386/i686/Makefile: New file.
8903 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8905         * allocatestack.c: Improve comment throughout the file.
8907         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8908         (__lll_lock_wait): Add branch prediction.
8909         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8910         (__lll_lock_wait): Likewise.
8911         (lll_unlock_wake_cb): Removed.
8913 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8915         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8916         _POSIX_THREAD_PRIORITY_SCHEDULING.
8918 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8920         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8921         Fix return type of ptr___pthread_getspecific.
8923 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8925         * Makefile (tests): Add tst-umask1.
8926         (tst-umask1-ARGS): Define.
8927         * tst-umask1.c: New file.
8929 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8931         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8932         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8933         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8934         pthread_rwlock_unlock.
8935         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8936         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8937         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8938         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8939         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8940         New file.
8941         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8942         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8943         New file.
8944         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8945         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8946         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8947         New file.
8948         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8949         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8950         New file.
8951         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8952         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8953         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8954         New file.
8955         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8956         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8957         New file.
8958         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8960         * Makefile (libpthread-routines): Remove lowlevelcond and
8961         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8962         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8963         and pthread_cond_broadcast.
8964         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8965         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8966         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8967         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8968         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8969         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8970         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8971         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8972         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8973         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8976         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8978         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8979         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8980         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8981         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8982         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8983         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8984         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8985         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8986         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8987         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8988         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8989         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8990         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8991         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8992         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8993         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8994         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8996         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8997         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8998         of the code is moved to ...
8999         * sysdeps/pthread/createthread.c: ...here.  New file.
9001 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9003         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9004         (__new_sem_post): Clear %eax before returning.
9005         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9007         * Makefile (tests): Add tst-cleanup2.
9008         * tst-cleanup2.c: New file.
9010         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9011         Interpret first parameter correctly.
9013 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9015         * Makefile (headers): Add bits/semaphore.h.
9017 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9019         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9020         if not SHARED.
9022 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9024         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9025         must be used and mapping failed.
9026         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9028         * Makefile (CFLAGS-pthread_self.os): Define this, not
9029         CFLAGS-pthread_self.c.
9031 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9033         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9034         lll_unlock_wake_cb.
9036         * Makefile (libpthread-routines): Add version.  Add rules to build
9037         version.os and banner.h.
9038         * version.c: New file.
9040 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9042         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9043         the alias unconditional.
9044         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9046 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9048         * Makefile (CFLAGS-pthread_self.c): New definition.
9050 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9052         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9053         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9054         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9055         * init.c (__pthread_initialize_minimal_internal): Likewise.
9057 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9059         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9061         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9062         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9063         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9064         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9065         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9066         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9068 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9070         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9071         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9072         * tst-cancel-wrappers.sh: Remove all exceptions.
9074 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9076         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9077         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9079         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9080         Use __libc_pthread_functions array if SHARED.
9082         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9083         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9085         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9086         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9087         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9088         __libc_ptf_call instead of __libc_maybe_call.
9089         (PTF): New #define.
9090         (__libc_cleanup_region_start): Wrap function name with PTF call.
9091         (__libc_cleanup_region_end): Likewise.
9092         (__libc_cleanup_end): Likewise.
9094         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9095         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9096         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9097         * pthreadP.h: Add prototypes.
9099         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9100         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9101         __pthread_rwlock_unlock aliases.
9102         * pthreadP.h: Add prototypes for new aliases.
9104         * pthreadP.h (struct pthead_functions): Moved to...
9105         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9106         * init.c (pthread_functions): Add initializers for new elements.
9108         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9109         __pthread_cleanup_pop_restore aliases.
9110         * pthreadP.h: Add prototypes.
9112         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9113         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9114         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9115         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9116         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9117         * pthreadP.h: Adjust prototypes and callers.
9119 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9121         * Makefile (tests): Add tst-cancel7.
9122         (tst-cancel7-ARGS): New variable.
9123         * tst-cancel7.c: New file.
9125         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9126         around gcc defficiencies.
9127         * old_pthread_cond_signal.c: Likewise.
9128         * old_pthread_cond_timedwait.c: Likewise.
9129         * old_pthread_cond_wait.c: Likewise.
9131         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9133 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9135         * Makefile (tests): Add tst-cond7.
9136         * tst-cond7.c: New file.
9138         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9139         (condvar_cleanup): Get condvar address from the right place.
9141         * atomic.h: Correct definitions of atomic_full_barrier,
9142         atomic_read_barrier, atomic_write_barrier.
9144         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9145         race-free.
9146         * old_pthread_cond_signal.c: Likewise.
9147         * old_pthread_cond_timedwait.c: Likewise.
9148         * old_pthread_cond_wait.c: Likewise.
9150 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9152         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9154 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9156         * pthreadP.h (pthread_cond_2_0_t): New type.
9157         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9158         Use new type for the 2.0 condvar function prototypes.
9159         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9160         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9161         parameter.
9162         * old_pthread_cond_destroy.c: Likewise.
9163         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9164         * old_pthread_cond_signal.c: Likewise.
9165         * old_pthread_cond_timedwait.c: Likewise.
9166         * old_pthread_cond_wait.c: Likewise.
9168         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9169         (__pthread_cond_wait): Don't save cancellation mode and seq value
9170         in same location.
9172         * herrno.c (__h_errno_location): Don't define as weak.
9174 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9176         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9177         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9178         and pthread_cond_wait.
9179         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9180         Renamed to...
9181         (__pthread_cond_broadcast_2_0): ... this.
9182         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9183         Renamed to...
9184         (__pthread_cond_destroy_2_0): ... this.
9185         * old_pthread_cond_init.c (__old_pthread_cond_init):
9186         Renamed to...
9187         (__pthread_cond_init_2_0): ... this.
9188         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9189         Renamed to...
9190         (__pthread_cond_signal_2_0): ... this.
9191         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9192         Renamed to...
9193         (__pthread_cond_wait_2_0): ... this.
9194         * pthread_cond_destroy.c: Include shlib-compat.h.
9195         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9196         * pthread_cond_init.c: Include shlib-compat.h.
9197         (pthread_cond_init): Change strong_alias into versioned_symbol.
9198         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9199         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9200         fields.
9201         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9202         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9203         __pthread_cond_wait_2_0): New prototypes.
9204         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9205         __old_pthread_cond_init, __old_pthread_cond_signal,
9206         __old_pthread_cond_wait): Removed.
9207         * init.c: Include shlib-compat.h.
9208         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9209         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9210         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9211         ptr___pthread_cond_*_2_0 fields.
9212         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9213         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9215         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9216         LIBC_SIGACTION was not yet defined.
9217         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9218         [!defined LIBC_SIGACTION] (__sigaction): New function and
9219         libc_hidden_weak.
9220         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9221         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9223 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9225         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9227 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9229         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9230         New, larger type definition.
9231         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9232         implementation.
9233         * Versions [libpthread]: Add definitions for new pthread_cond_*
9234         interfaces for version GLIBC_2.3.2.
9235         * pthread_cond_init.c: Update initialization for new type definition.
9236         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9237         pthread_cond_timedwait, pthread_cond_signal, and
9238         pthread_cond_broadcast.  Add old_pthread_cond_init,
9239         old_pthread_cond_destroy, old_pthread_cond_wait,
9240         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9241         old_pthread_cond_broadcast.
9242         * old_pthread_cond_broadcast.c: New file.
9243         * old_pthread_cond_destroy.c: New file.
9244         * old_pthread_cond_init.c: New file.
9245         * old_pthread_cond_signal.c: New file.
9246         * old_pthread_cond_timedwait.c: New file.
9247         * old_pthread_cond_wait.c: New file.
9248         * pthreadP.h: Add prototypes for the compatibility interfaces.
9250         * pthread_cond_destroy.c: Don't include <errno.h>.
9252 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9254         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9255         unnecessary zero offset when addressing MUTEX.
9257 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9259         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9260         __register_atfork.
9261         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9262         for __register_atfork.
9264 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9266         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9267         instead of ASSEMBLER test macro.
9269         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9270         __libc_current_sigrtmax): Add libc_hidden_def.
9272         * sysdeps/pthread/list.h: Remove assert.h include.
9274 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9276         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9277         __pthread_initialize_minimal_internal not
9278         __pthread_initialize_minimal.
9280 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9282         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9283         __pthread_initialize_minimal as hidden.
9285         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9286         constructor.
9288 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9290         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9291         $(common-objpfx)format.lds, include that into the output script.
9292         Fix comment.
9293         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9295 2002-12-28  Andreas Jaeger  <aj@suse.de>
9297         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9298         nsec resolution changes.
9299         (xstat64_conv): Likewise.
9300         (xstat32_conv): Likewise.
9301         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9302         struct kernel_stat.
9303         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9304         structs stat and stat64.
9305         * time/time.h (__timespec_defined): Define for __USE_MISC.
9306         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9308 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9310         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9311         argument.
9312         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9313         (pthread_exit): Use strong_alias to avoid warnings.
9314         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9315         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9316         ptr___pthread_attr_init_2_*.
9317         * init.c (pthread_functions): Adjust.
9319 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9321         * forward.c: Make all functions available by default again.  It
9322         caused too much trouble.
9324         * pt-siglongjmp.c: Removed.
9326 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9328         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9329         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9330         * sysdeps/i386/Makefile: New file.
9331         * sysdeps/i386/tcb-offsets.sym: New file.
9332         * sysdeps/pthread/tcb-offsets.h: New file.
9333         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9334         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9336         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9337         __register_atfork...
9338         (GLIBC_2.3.2): ...here.
9340 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9342         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9343         pthread_attr_setstackaddr with __attribute_deprecated__.
9345 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9347         * pt-system.c (system): Remove cancellation handling.
9348         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9349         cancellation routines.
9351 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9353         * descr.h: Include <dl-sysdep.h>.
9354         (struct pthread): Move header.data.list to the back of the struct.
9355         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9356         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9357         (SYSINFO_OFFSEET): Likewise.
9359 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9361         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9362         Define.
9363         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9364         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9365         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9366         (USE_DL_SYSINFO): Undef.
9368 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9370         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9371         $(common-objpfx)libc.so.
9372         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9373         it is bigger than pipe buffer size even on arches with bigger
9374         page size.
9375         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9377 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9379         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9380         correct errno access for case that USE___THREAD is not defined.
9382 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9384         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9385         Patch by Marijn Ros <marijn@mad.scientist.com>.
9387 2002-12-22  Roland McGrath  <roland@redhat.com>
9389         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9391 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9393         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9395 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9397         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9398         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9399         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9401         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9402         of int $0x80.
9403         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9404         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9405         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9406         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9407         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9408         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9409         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9410         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9412         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9413         sysenter.
9414         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9416         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9418         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9419         in new TCB.
9420         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9421         that sysinfo is properly initialized.
9422         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9423         to 1 only for ld.so.
9425         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9426         RTLD_CORRECT_DYNAMIC_WEAK.
9428 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9430         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9431         Use return 0 as 6th argument to FORWARD4.
9432         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9434 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9436         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9437         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9438         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9439         (INIT_SYSINFO): New #define.
9440         (TLS_TP_INIT): Use INIT_SYSINFO.
9441         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9442         At test to make sure SYSINFO_OFFSET value is correct.
9443         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9445 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9447         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9448         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9449         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9450         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9451         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9452         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9453         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9455 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9457         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9458         macro instead of using int $0x80 directly.
9460         * sysdeps/pthread/bits/stdio-lock.h: New file.
9461         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9462         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9463         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9464         * Makefile (routines): Add libc-lowlevelmutex.
9466         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9467         __i686.get_pc_thunk.dx.
9469 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9471         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9472         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9473         ($(objpfx)tst-cancel-wrappers.out): New rule.
9474         * tst-cancel-wrappers.sh: New test.
9475         * tst-locale1.c: Include signal.h.
9476         (uselocale): Test static linking of __libc_current_sigrt*.
9478 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9480         * Makefile (tests): Add tst-cancel6.
9481         * tst-cancel6.c: New file
9483 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9485         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9486         Define meaningfully for assembler as well.
9487         * pthreadP.h (struct pthread_functions): Remove
9488         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9489         and ptr_pthread_attr_init_2_1 fields.
9490         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9491         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9492         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9493         (FORWARD3): Define using FORWARD4.
9494         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9495         versions.
9496         * pt-system.c: Remove duplicate stdlib.h include.
9498 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9500         * sem_init.c: Define sem_init@GLIBC_2.0.
9501         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9502         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9504         * flockfile.c: Moved to...
9505         * sysdeps/pthread/flockfile.c: ...here.  New file.
9506         * funlockfile.c: Moved to...
9507         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9508         * ftrylockfile.c: Moved to...
9509         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9511 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9513         * libc-cancellation.c: Guard both function with
9514         #if !defined NOT_IN_libc.
9515         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9516         automatically provided pthread wrappers.
9517         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9518         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9519         nor in libpthread.
9520         * pt-open.c: Removed.
9521         * pt-fcntl.c: Removed.
9522         * pt-fsync.c: Removed.
9523         * pt-lseek.c: Removed.
9524         * pt-msgrcv.c: Removed.
9525         * pt-msgsnd.c: Removed.
9526         * pt-msync.c: Removed.
9527         * pt-nanosleep.c: Removed.
9528         * pt-open64.c: Removed.
9529         * pt-pause.c: Removed.
9530         * pt-pread.c: Removed.
9531         * pt-pread64.c: Removed.
9532         * pt-pwrite.c: Removed.
9533         * pt-pwrite64.c: Removed.
9534         * pt-read.c: Removed.
9535         * pt-recv.c: Removed.
9536         * pt-recvfrom.c: Removed.
9537         * pt-recvmsg.c: Removed.
9538         * pt-send.c: Removed.
9539         * pt-sendto.c: Removed.
9540         * pt-sigtimedwait.c: Removed.
9541         * pt-sigwait.c: Removed.
9542         * pt-wait.c: Removed.
9543         * pt-waitpid.c: Removed.
9544         * pt-write.c: Removed.
9545         * pt-accept.c: Removed.
9546         * pt-close.c: Removed.
9547         * pt-connect.c: Removed.
9548         * pt-lseek64.c: Removed.
9549         * pt-sendmsg.c: Removed.
9550         * pt-tcdrain.c: Removed.
9552 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9554         * init.c (__pthread_initialize_minimal_internal): Renamed from
9555         __pthread_initialize_minimal.  Make old name an alias.  This
9556         converts a normal relocation into a relative relocation.
9558         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9560         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9561         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9562         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9563         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9564         pt-sigwaitinfo, pt-waitid, and pt-writev.
9565         * pt-creat.c: Removed.
9566         * pt-poll.c: Removed.
9567         * pt-pselect.c: Removed.
9568         * pt-readv.c: Removed.
9569         * pt-select.c: Removed.
9570         * pt-sigpause.c: Removed.
9571         * pt-sigsuspend.c: Removed.
9572         * pt-sigwaitinfo.c: Removed.
9573         * pt-waitid.c: Removed.
9574         * pt-writev.c: Removed.
9576         * init.c (pthread_functions): New variable.
9577         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9578         (or NULL) to __libc_pthread_init.
9579         * forward.c: Rewrite to use __libc:pthread_functions array to get
9580         function addresses.
9581         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9582         prototype.
9583         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9584         Take new parameter.  Copy content of variable pointed to by it
9585         to __libc_pthread_init.
9587         * pthreadP.h (struct pthread_functions): New type.
9588         (__libc_pthread_init): Declare.
9590         * pthread_attr_destroy.c: Add namespace protected alias.
9591         * pthread_attr_getdetachstate.c: Likewise.
9592         * pthread_attr_getinheritsched.c: Likewise.
9593         * pthread_attr_getschedparam.c: Likewise.
9594         * pthread_attr_getschedpolicy.c: Likewise.
9595         * pthread_attr_getscope.c: Likewise.
9596         * pthread_attr_setdetachstate.c: Likewise.
9597         * pthread_attr_setinheritsched.c: Likewise.
9598         * pthread_attr_setschedparam.c: Likewise.
9599         * pthread_attr_setschedpolicy.c: Likewise.
9600         * pthread_attr_setscope.c: Likewise.
9601         * pthread_cond_broadcast.c: Likewise.
9602         * pthread_cond_destroy.c: Likewise.
9603         * pthread_cond_init.c: Likewise.
9604         * pthread_cond_signal.c: Likewise.
9605         * pthread_cond_wait.c: Likewise.
9606         * pthread_condattr_destroy.c: Likewise.
9607         * pthread_condattr_init.c: Likewise.
9608         * pthread_equal.c: Likewise.
9609         * pthread_exit.c: Likewise.
9610         * pthread_getschedparam.c: Likewise.
9611         * pthread_self.c: Likewise.
9612         * pthread_setcancelstate.c: Likewise.
9613         * pthread_setschedparam.c: Likewise.
9614         * pthread_mutex_destroy.c: Likewise.
9615         * pthread_mutex_init.c: Likewise.
9616         * pthreadP.h: Add prototypes for the aliases.
9618         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9619         multiple_threads member in correct TCB to 1.
9621         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9622         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9623         member of thread decriptor, otherwise return unconditionally 1.
9625 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9627         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9628         regular Linux version.  Remove file.
9629         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9630         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9631         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9632         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9633         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9634         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9635         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9636         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9637         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9638         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9639         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9640         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9641         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9642         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9643         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9644         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9645         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9646         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9647         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9648         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9649         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9650         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9651         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9652         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9653         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9654         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9655         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9656         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9657         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9658         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9660 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9662         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9663         * sysdeps/unix/sysv/linux/open.c: Removed.
9664         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9665         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9666         * sysdeps/unix/sysv/linux/msync.c: Removed.
9667         * sysdeps/unix/sysv/linux/read.c: Removed.
9668         * sysdeps/unix/sysv/linux/close.c: Removed.
9669         * sysdeps/unix/sysv/linux/creat.c: Removed.
9670         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9671         * sysdeps/unix/sysv/linux/pause.c: Removed.
9672         * sysdeps/unix/sysv/linux/select.c: Removed.
9673         * sysdeps/unix/sysv/linux/write.c: Removed.
9675 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9677         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9678         element in TCB to see whether locking is needed.
9680         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9681         MULTIPLE_THREADS_OFFSET value is correct.
9683         * sysdeps/unix/sysv/linux/close.c: New file.
9684         * sysdeps/unix/sysv/linux/connect.S: New file.
9685         * sysdeps/unix/sysv/linux/creat.c: New file.
9686         * sysdeps/unix/sysv/linux/fsync.c: New file.
9687         * sysdeps/unix/sysv/linux/llseek.c: New file.
9688         * sysdeps/unix/sysv/linux/lseek.c: New file.
9689         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9690         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9691         * sysdeps/unix/sysv/linux/msync.c: New file.
9692         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9693         * sysdeps/unix/sysv/linux/open.c: New file.
9694         * sysdeps/unix/sysv/linux/open64.c: New file.
9695         * sysdeps/unix/sysv/linux/pause.c: New file.
9696         * sysdeps/unix/sysv/linux/poll.c: New file.
9697         * sysdeps/unix/sysv/linux/pread.c: New file.
9698         * sysdeps/unix/sysv/linux/pread64.c: New file.
9699         * sysdeps/unix/sysv/linux/pselect.c: New file.
9700         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9701         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9702         * sysdeps/unix/sysv/linux/readv.c: New file.
9703         * sysdeps/unix/sysv/linux/recv.S: New file.
9704         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9705         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9706         * sysdeps/unix/sysv/linux/select.c: New file.
9707         * sysdeps/unix/sysv/linux/send.S: New file.
9708         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9709         * sysdeps/unix/sysv/linux/sendto.S: New file.
9710         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9711         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9712         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9713         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9714         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9715         * sysdeps/unix/sysv/linux/system.c: New file.
9716         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9717         * sysdeps/unix/sysv/linux/wait.c: New file.
9718         * sysdeps/unix/sysv/linux/waitid.c: New file.
9719         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9720         * sysdeps/unix/sysv/linux/writev.c: New file.
9721         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9723         * pt-readv.c: Fix comment.
9725 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9727         * tst-cleanup1.c: Include stdlib.h.
9729         * tst-cancel5.c: New test.
9730         * Makefile (tests): Add tst-cancel5.
9731         (tst-cancel5): Link against libc.so libpthread.so in that order.
9733 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9735         * forward.c (test_loaded): Prevent recursive calls.
9737         * Makefile (routines): Add libc-cancellation.
9738         * libc-cancellation.c: New file.
9739         * descr.h (struct pthread): Add multiple_threads field.
9740         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9741         new thread descriptor to 1.
9742         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9743         Initialize multiple_thread field after successful thread creation.
9744         * cancellation.c (__do_cancel): Move to pthreadP.h.
9745         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9746         (__pthread_disable_asynccancel): Add internal_function attribute.
9747         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9748         * pthread_setcancelstate.c: Likewise.
9749         * pthread_setcanceltype.c: Likewise.
9750         * pthread_exit.c: Likewise.
9751         * pthreadP.h (CANCELLATION_P): Likewise.
9752         (__do_cancel): Define as static inline.
9753         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9754         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9755         declarations.
9756         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9757         fields.  Define MULTIPLE_THREADS_OFFSET.
9758         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9759         declaration.
9760         * sysdeps/unix/sysv/linux/accept.S: New file.
9761         * sysdeps/unix/sysv/linux/read.c: New file.
9762         * sysdeps/unix/sysv/linux/write.c: New file.
9763         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9764         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9765         initialization of __libc_locking_needed.
9766         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9767         __libc_locking_needed, use multiple_threads field in TCB.
9768         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9770 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9772         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9773         version.
9774         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9776         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9777         access to __libc_locking_needed for PIC.
9779 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9781         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9782         declare for libc.so.
9783         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9784         expression.
9785         (__libc_lock_lock): Put into statement expression.
9786         (__libc_lock_unlock): Remove trailing semicolon.
9787         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9789 2002-12-12  Roland McGrath  <roland@redhat.com>
9791         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9792         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9794 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9796         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9797         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9798         Initialize __libc_locking_needed.
9799         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9800         instead of __register_pthread_fork_handler.
9801         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9802         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9803         fork-gen with libc_pthread_init.
9804         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9805         of __register_pthread_fork_handler.
9806         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9807         of __register_pthread_fork_handler.
9808         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9809         __libc_locking_needed to determine whether lock prefix can be avoided.
9810         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9812 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9814         * Makefile (tests): Add tst-cleanup1.
9815         * tst-cleanup1.c: New file.
9816         * cancellation.c (__cleanup_thread): Removed.
9817         (__do_cancel): Remove call to __cleanup_thread.
9818         * pthreadP.h: Remove __cleanup_thread prorotype.
9820         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9821         Remember function and argument even if cancellation handler
9822         function is not available.
9823         (__libc_cleanup_region_end): Execute registered function directly if
9824         pthread functions are not available.
9825         (__libc_cleanup_end): Likewise.
9827         * init.c (__pthread_initialize_minimal): Fix initialization in
9828         static lib by preventing gcc from being too clever.
9830 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9832         * init.c (__pthread_initialize_minimal): Remove unneccesary
9833         sigaddset call.
9835         * Makefile (tests): We can run tst-locale2 now.
9837 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9839         * Versions: Remove duplicated sigwait entry.
9841 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9843         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9844         inside libpthread.
9846         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9848         * pthreadP.h: Declare __pthread_enable_asynccancel and
9849         __pthread_disable_asynccancel.
9850         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9851         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9852         * cancellation.c (__pthread_enable_asynccancel): New function.
9853         (__pthread_disable_asynccancel): New function.
9854         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9855         * pt-close.c: Likewise.
9856         * pt-connect.c: Likewise.
9857         * pt-creat.c: Likewise.
9858         * pt-fcntl.c: Likewise.
9859         * pt-fsync.c: Likewise.
9860         * pt-lseek.c: Likewise.
9861         * pt-lseek64.c: Likewise.
9862         * pt-msgrcv.c: Likewise.
9863         * pt-msgsnd.c: Likewise.
9864         * pt-msync.c: Likewise.
9865         * pt-nanosleep.c: Likewise.
9866         * pt-open.c: Likewise.
9867         * pt-open64.c: Likewise.
9868         * pt-pause.c: Likewise.
9869         * pt-poll.c: Likewise.
9870         * pt-pread.c: Likewise.
9871         * pt-pread64.c: Likewise.
9872         * pt-pselect.c: Likewise.
9873         * pt-pwrite.c: Likewise.
9874         * pt-pwrite64.c: Likewise.
9875         * pt-read.c: Likewise.
9876         * pt-readv.c: Likewise.
9877         * pt-recv.c: Likewise.
9878         * pt-recvfrom.c: Likewise.
9879         * pt-recvmsg.c: Likewise.
9880         * pt-select.c: Likewise.
9881         * pt-send.c: Likewise.
9882         * pt-sendmsg.c: Likewise.
9883         * pt-sendto.c: Likewise.
9884         * pt-sigpause.c: Likewise.
9885         * pt-sigsuspend.c: Likewise.
9886         * pt-sigtimedwait.c: Likewise.
9887         * pt-sigwait.c: Likewise.
9888         * pt-sigwaitinfo.c: Likewise.
9889         * pt-system.c: Likewise.
9890         * pt-tcdrain.c: Likewise.
9891         * pt-wait.c: Likewise.
9892         * pt-waitid.c: Likewise.
9893         * pt-waitpid.c: Likewise.
9894         * pt-write.c: Likewise.
9895         * pt-writev.c: Likewise.
9896         * pthread_join.c: Likewise.
9897         * pthread_timedjoin.c: Likewise.
9899         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9900         (__xpg_sigpause): New function.
9901         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9903 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9905         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9907         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9908         _GI_pthread_cleanup_pop to pthreadP.h.
9910         * ftrylockfile.c: Use _IO_lock_trylock instead of
9911         pthread_mutex_trylock.
9913         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9914         (CANCEL_RESET): Likewise.
9915         (__pthread_setcanceltype_): Declare.
9916         (__pthread_mutex_lock_internal): Declare.
9917         (__pthread_mutex_unlock_internal): Declare.
9918         (__pthread_once_internal): Declare.
9919         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9920         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9922         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9923         and pthread_mutex_unlock.
9924         * pthread_cond_wait.c: Likewise.
9925         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9926         * pthread_mutex_unlock.c: Likewise.
9928         * pthread_setcanceltype.c: Add additional alias
9929         __pthread_setcanceltype.
9931         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9932         * sem_open.c (sem_open): Likewise.
9933         Use __libc_open, __libc_write, and __libc_close instead of
9934         open, write, and close respectively.
9936         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9937         Rewrite as statement expression since it must return a value.
9939         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9940         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9941         __pthread_kill.
9943         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9944         alias __pthread_once_internal.
9946         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9948 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9950         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9951         * tst-stdio1.c: New file.
9952         * tst-stdio2.c: New file.
9954         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9956         * Makefile (tests): Comment out tst-locale2 for now.
9957         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9959         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9960         -D_IO_MTSAFE_IO.
9961         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9962         Use _IO_lock_init instead of explicit assignment.
9964         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9965         Define __libc_lock_* and __libc_lock_recursive macros with
9966         lowlevellock macros, not pthread mutexes.
9968         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9969         of pthread_mutex_lock.
9970         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9971         instead of pthread_mutex_unlock.
9973 2002-12-06  Roland McGrath  <roland@redhat.com>
9975         * allocatestack.c (__stack_user): Use uninitialized defn.
9976         * init.c (__pthread_initialize_minimal): Initialize it here.
9978 2002-12-05  Roland McGrath  <roland@redhat.com>
9980         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9981         string.
9982         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9984         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9985         missing & here too.
9987 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9989         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9990         lowlevellock.
9991         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9992         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9993         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9994         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9995         for __libc_lock_* macros.
9996         * Makefile (routines): Add libc-lowlevellock.
9998 2002-10-09  Roland McGrath  <roland@redhat.com>
10000         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10001         Under [__PIC__], call the function via the pointer fetched for
10002         comparison rather than a call by name that uses the PLT.
10003         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10004         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10005         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10006         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10007         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10009 2002-12-04  Roland McGrath  <roland@redhat.com>
10011         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10013         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10014         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10016         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10018 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10020         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10021         a completely opaque, non-integer type.
10022         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10024 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10026         * sysdeps/i386/tls.h: Include stdlib.h.
10027         * sysdeps/x86_64/tls.h: Likewise.
10029 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10031         * Makefile (tests): Add tst-locale2.
10032         (tests-static): Likewise.
10033         * tst-locale2.c: New file.
10035         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10036         volatile and add memory clobbers to lock operations.
10038 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10040         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10041         * sysdeps/i386/i486/bits/atomic.h: New file.
10042         * sysdeps/i386/i586/bits/atomic.h: New file.
10043         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10044         include i486 version.
10045         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10046         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10047         Patch by Marijn Ros <marijn@mad.scientist.com>.
10049         * allocatestack.c (get_cached_stack): Don't crash if we first
10050         found a stack with a larger size then needed.
10051         Reported by Hui Huang <hui.huang@sun.com>.
10053         * Makefile (tests): Add tst-sysconf.
10054         * tst-sysconf.c: New file.
10056         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10057         PTHREAD_THREADS_MAX.
10059 2002-12-02  Roland McGrath  <roland@redhat.com>
10061         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10062         Declare using hidden_proto instead of attribute_hidden, so there are
10063         non-.hidden static symbols for gdb to find.
10064         (__pthread_keys): Likewise.
10065         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10066         * allocatestack.c (__stack_user): Likewise.
10067         * pthread_create.c (__pthread_keys): Likewise.
10068         (__nptl_threads_events, __nptl_last_event): Make these static instead
10069         of hidden.
10070         * pthread_key_create.c (__pthread_pthread_keys_max,
10071         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10073 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10075         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10076         statically.
10077         * tst-locale1.c: New file.
10079         * pthread_cond_timedwait.c: Include <stdlib.h>.
10081         * Makefile (tests): Add tst-fork2 and tst-fork3.
10082         * tst-fork2.c: New file.
10083         * tst-fork3.c: New file.
10085 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10087         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10089         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10090         require it to 200112L.
10092         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10093         instruction only if HAVE_CMOV is defined.
10094         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10096         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10098         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10100         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10102         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10104 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10106         * sysdeps/x86_64/bits/atomic.h: New file.
10108         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10109         16-bit operations.
10111         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10112         possible since gettid cannot fail.
10114         * sysdeps/x86_64/pthreaddef.h: New file.
10116         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10118         * sysdeps/x86_64/pthread_spin_init.c: New file.
10119         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10120         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10121         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10123         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10124         Add missing lock prefix.  Minute optimization.
10126         * tst-spin2.c (main): Also check successful trylock call.
10128         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10129         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10131         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10132         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10134         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10135         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10136         value in case of an error.  Add support for INTERNAL_SYSCALL.
10138         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10139         value in case of an error.
10141         * sysdeps/x86_64/tls.h: New file.
10143 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10145         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10146         takes the array member name and the index as parameters.
10147         (THREAD_SETMEM_NC): Likewise.
10148         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10149         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10150         interfaces.
10152         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10153         to decide which code to use.
10154         (THREAD_SETMEM_NC): Likewise.
10156         * allocatestack.c (queue_stack): Don't remove stack from list here.
10157         Do it in the caller.  Correct condition to prematurely terminate
10158         loop to free stacks.
10159         (__deallocate_stack): Remove stack from list here.
10161 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10163         * Makefile (tests): Add tst-stack1.
10164         * tst-stack1.c: New file.
10166         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10167         provided stack.
10169         * pthread_attr_getstack.c: Return bottom of the thread area.
10171 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10173         * Makefile (libpthread-routines): Add pt-allocrtsig and
10174         pthread_kill_other_threads.
10175         * pt-allocrtsig.c: New file.
10176         * pthread_kill_other_threads.c: New file.
10177         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10178         all three functions.
10179         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10180         allocrtsig.
10181         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10182         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10183         and __libc_allocate_rtsig_private.
10184         * Versions (libpthread): Export pthread_kill_other_threads_np,
10185         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10187 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10189         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10190         the end of the stack.  Adjust computations.
10191         When mprotect call fails dequeue stack and free it.
10192         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10193         attribute.
10194         * pthread_getattr_np.c: Likewise.
10196         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10197         surprises.
10199 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10201         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10202         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10204 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10206         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10207         * pthread_setspecific.c: Likewise.
10209 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10211         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10212         definitions.  Get them from the official place.
10213         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10215         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10216         Use new CLONE_ flags in clone() calls.
10218         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10219         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10221         * Versions: Add pthread_* functions for libc.
10222         * forward.c: New file.
10224         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10225         errno-loc.
10226         * herrno.c: New file.
10227         * res.c: New file.
10229         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10230         sem_trywait, and sem_timedwait.  Add herrno and res.
10231         * sem_init.c: Don't initialize lock and waiters members.
10232         * sem_open.c: Likewise.
10233         * sem_post.c: Removed.
10234         * sem_wait.c: Removed.
10235         * sem_trywait.c: Removed.
10236         * sem_timedwait.c: Removed.
10237         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10238         Includes full implementations of sem_post, sem_wait, sem_trywait,
10239         and sem_timedwait.
10240         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10241         for new implementation.
10242         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10243         and waiters fields.
10245         * tst-sem3.c: Improve error message.
10246         * tst-signal3.c: Likewise.
10248         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10249         to tell the kernel about the termination futex and to initialize tid
10250         member.  Don't initialize main_thread.
10251         * descr.h (struct pthread): Remove main_thread member.
10252         * cancelllation.c (__do_cancel): Remove code handling main thread.
10253         The main thread is not special anymore.
10255         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10256         size of the stacks to stack_cache_actsize.
10258         * pt-readv.c: Add missing "defined".
10259         * pt-sigwait.c: Likewise.
10260         * pt-writev.c: Likewise.
10262 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10264         * Versions: Export __connect from libpthread.
10265         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10267         * Makefile (libpthread-routines): Add pt-raise.
10268         * sysdeps/unix/sysv/linux/raise.c: New file.
10269         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10270         * sysdeps/generic/pt-raise.c: New file.
10272         * pthread_cond_init.c: Initialize all data elements of the condvar
10273         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10275         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10276         * pthread_create.c: Likewise.
10278         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10279         * tst-key1.c: New file.
10280         * tst-key2.c: New file.
10281         * tst-key3.c: New file.
10283         * Versions: Export pthread_detach for version GLIBC_2.0.
10284         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10286 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10288         * pthread_key_create.c: Terminate search after an unused key was found.
10289         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10291         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10292         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10294 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10296         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10297         dynamic lookup for errno in PIC.
10299         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10300         release the stack lock as soon as possible.
10301         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10302         the static TLS block.
10303         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10305         * cancellation.c: Renamed from cancelation.c.
10306         * Makefile: Adjust accordingly.
10307         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10308         * cleanup_defer.c: Use CANCELLATION_P.
10309         * pthread_testcancel.c: Likewise.
10310         * descr.h: Fix spelling in comments.
10311         * init.c: Likewise.
10312         * pthread_getattr_np.c: Likewise.
10313         * pthread_getschedparam.c: Likewise.
10314         * pthread_setschedparam.c: Likewise.
10315         * Versions: Likewise.
10317         * pt-pselect.c: New file.
10318         * Makefile (libpthread-routines): Add pt-pselect.
10319         * Versions: Add pselect.
10321         * tst-cancel4.c: New file.
10322         * Makefile (tests): Add tst-cancel4.
10324 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10326         * pthread_mutex_lock.c: Always record lock ownership.
10327         * pthread_mutex_timedlock.c: Likewise.
10328         * pthread_mutex_trylock.c: Likewise.
10330         * pt-readv.c: New file.
10331         * pt-writev.c: New file.
10332         * pt-creat.c: New file.
10333         * pt-msgrcv.c: New file.
10334         * pt-msgsnd.c: New file.
10335         * pt-poll.c: New file.
10336         * pt-select.c: New file.
10337         * pt-sigpause.c: New file.
10338         * pt-sigsuspend.c: New file.
10339         * pt-sigwait.c: New file.
10340         * pt-sigwaitinfo.c: New file.
10341         * pt-waitid.c: New file.
10342         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10343         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10344         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10345         * Versions: Add all the new functions.
10347         * tst-exit1.c: New file.
10348         * Makefile (tests): Add tst-exit1.
10350         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10352 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10354         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10356         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10357         call.  pthread_join is an official cancellation point.
10358         * pthread_timedjoin.c: Likewise.
10360         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10361         and the condvar's mutex are retrieved.
10362         * pthread_cond_timedwait.c: Likewise.
10363         Reported by dice@saros.East.Sun.COM.
10365 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10367         * pthreadP.h: Cut out all type definitions and move them...
10368         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10369         * pthreadP.h: Include <internaltypes.h>.
10371         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10372         performance tweaks.
10374         * sem_trywait.c: Shuffle #includes around to get right order.
10375         * sem_timedwait.c: Likewise.
10376         * sem_post.c: Likewise.
10377         * sem_wait.c: Likewise.
10379         * nptl 0.3 released.
10381         * Makefile (tests): Add tst-signal3.
10382         * tst-signal3.c: New file.
10384 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10386         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10387         the asms modify the sem object.
10388         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10390         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10391         the actual members.
10392         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10393         * semaphoreP.h: Include pthreadP.h.
10394         * sem_getvalue.c: Adjust to sem_t change.
10395         * sem_init.c: Likewise.
10396         * sem_open.c: Likewise.
10397         * sem_post.c: Likewise.
10398         * sem_timedwait.c: Likewise.
10399         * sem_trywait.c: Likewise.
10400         * sem_wait.c: Likewise.
10402 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10404         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10405         * tst-basic2.c: New file.
10406         * tst-exec1.c: New file.
10407         * tst-exec2.c: New file.
10408         * tst-exec3.c: New file.
10410         * tst-fork1.c: Remove extra */.
10412         * nptl 0.2 released.  The API for IA-32 is complete.