* sysdeps/mach/hurd/bits/ioctls.h (NL0, NL1, TAB0, TAB1, TAB2, CR0,
[glibc.git] / nptl / ChangeLog
bloba1cb40c46ee81019390c3044091c12cec2e2d244
1 2008-04-14  David S. Miller  <davem@davemloft.net>
3         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
4         (__old_sem_wait): Fix argument to lll_futex_wait().
6 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
8         * pthread_create.c: Require pthread_mutex_trylock and
9         pthread_key_delete for libgcc.
11 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
13         [BZ #6020]
14         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
15         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
16         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
18 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
20         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
21         <linux/limits.h> has defined it.
22         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
23         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
24         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
25         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
27 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
29         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
30         of ASSEMBLER.
31         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
32         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
34 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
36         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
37         HAVE_DL_DISCOVER_OSVERSION.
38         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
39         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
41 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
43         [BZ #5778]
44         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
45         _POSIX_CHOWN_RESTRICTED value to zero.
47 2008-01-31  Roland McGrath  <roland@redhat.com>
49         * Makefile (omit-deps): Variable removed.
51 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
53         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
54         unnecessary addr32 prefix.
56 2008-01-29  Roland McGrath  <roland@redhat.com>
58         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
60 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
62         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
64 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
66         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
67         a scratch register.
68         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
69         (__lll_lock_wait_private): Fix typo.
70         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
71         (pthread_barrier_wait): Likewise.  Adjust XADD use.
72         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
73         Adjust XADD use.
74         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
75         (pthread_rwlock_timedrdlock): Return correct return value.
76         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
77         (pthread_rwlock_timedwrlock): Likewise.
79 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
81         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
82         thread returns the program exits with an error code.
84 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
86         * pthread-errnos.sym: Add EOVERFLOW.
87         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
88         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
89         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
90         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
92 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
94         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
95         parameter.  Passed it as permission to mmap.
96         * allocatestack.c (allocate_stack): Pass prot as second parameter
97         to ARCH_RETRY_MMAP.
99 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
101         * tst-basic7.c: Allocate memory for the stack.
103         [BZ #5465]
104         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
105         (__pthread_cond_timedwait): Don't use VDSO.
106         Patch by Michal Januszewski.
108 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
110         [BZ #5455]
111         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
112         Allow label before pthread_cleanup_pop.
113         (pthread_cleanup_pop_restore_np): Likewise.
115 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
117         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
118         Store 2 before returning ETIMEDOUT.
120 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
122         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
123         Store 2 before returning ETIMEDOUT.
124         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
125         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
126         (__lll_lock_wait_private): Optimize.
127         (__lll_lock_wait): Likewise.
129 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
131         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
132         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
133         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
135 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
137         [BZ #5240]
138         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
139         If we time out, try one last time to lock the futex to avoid
140         losing a wakeup signal.
141         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
142         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
144         [BZ #5245]
145         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
146         if necessary.
148 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
150         [BZ #5245]
151         * allocatestack.c (allocate_stack): Change ENOMEM error in case
152         mmap failed to EAGAIN.
153         * Makefile (tests): Add tst-basic7.
154         * tst-basic7.c: New file.
156 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
158         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
159         Use __linkin_atfork.
161 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
163         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
164         missing line continuations.
165         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
166         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
168 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
170         [BZ #5220]
171         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
172         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
173         (struct timer): Add next element.
174         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
175         enqueue timer structure into __active_timer_sigev_thread list.
176         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
177         remove timer struct from __active_timer_sigev_thread.
178         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
179         Before using timer structure make sure it is still on the
180         __active_timer_sigev_thread list.  Keep lock until done.
181         Define __active_timer_sigev_thread and
182         __active_timer_sigev_thread_lock.
184 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
186         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
187         Redefine thread_atfork for use of ATFORK_MEM.
188         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
189         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
190         function.
191         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
192         Use atomic operation when removing first element of list.
194 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
196         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
197         routine instead of an alias to __new_sem_post.
199 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
201         * init.c (__pthread_initialize_minimal): Initialize word to appease
202         valgrind.
204 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
206         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
207         libc.so just clear NAME.
208         (__libc_rwlock_fini): Nop inside of libc.so.
209         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
210         all zeros.
212 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
215         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
216         unlocking failed.
217         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
219 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
221         [BZ #4938]
222         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
223         reclaimed stack if necessary.
224         * Makefile (tests): Add tst-tsd6.
225         * tst-tsd6.c: New file.
227 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
229         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
230         Add private argument.
232 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
235         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
237 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
239         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
240         (__lll_robust_timedlock): Pass private as last argument to
241         __lll_robust_timedlock_wait.
242         (__lll_unlock): Fix a pasto.
244 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
246         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
247         sparc_old_sem): New structs.
248         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
249         (__sem_wait_cleanup): New function.
250         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
251         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
252         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
253         lll_futex_wait.
254         (__old_sem_wait): New function.
255         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
256         nptl/sysdeps/unix/sysv/linux/sparc version.
257         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
258         Likewise.
259         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
260         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
261         (__new_sem_trywait): Use sparc_old_sem structure.
262         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
263         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
264         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
265         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
266         lll_futex_timed_wait.
267         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
268         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
269         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
270         lll_futex_wake.
271         (__old_sem_post): New function.
272         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
273         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
274         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
275         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
276         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
277         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
279 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
281         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
282         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
283         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
284         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
285         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
286         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
287         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
288         Use FUTEX_WAKE_OP.
289         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
290         kernel-features.h and tcb-offsets.h.
291         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
292         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
293         process private.
294         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
295         tcb-offsets.h.
296         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
297         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
298         process private.
299         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
300         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
301         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
303         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
304         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
305         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
307 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
309         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
310         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
311         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
312         lll_futex_timed_wait.
314         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
315         __lll_robust_unlock): Rewrite as macros instead of inline functions.
316         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
317         __lll_robust_unlock, __lll_wait_tid): Likewise.
319 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
321         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
322         Fix a pasto.
323         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
324         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
325         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
326         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
327         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
328         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
329         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
331         kernel-features.h.
332         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
333         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
334         process private.  Switch DW_CFA_advance_loc1 and some
335         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
336         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
337         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
338         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
339         process private.  Switch DW_CFA_advance_loc{1,2} and some
340         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
342         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
344         Likewise.
345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
346         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
348         Likewise.
349         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
350         (__pthread_cond_broadcast): Compare %r8 instead of
351         dep_mutex-cond_*(%rdi) with $-1.
352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
353         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
354         of oring.
356 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
358         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
360 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
362         * allocatestack.c: Include kernel-features.h.
363         * pthread_create.c: Likewise.
364         * pthread_mutex_init.c: Likewise.
365         * init.c: Likewise.
366         * pthread_cond_timedwait.c: Likewise.
367         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
368         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
369         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
370         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
371         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
373         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
374         Likewise.
375         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
376         Likewise.
377         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
378         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
379         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
380         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
382 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
384         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
385         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
386         byte elements.  One of them is the new __shared element.
387         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
388         adjust names of other padding elements.
389         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
390         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
391         byte elements.  One of them is the new __shared element.
392         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
393         adjust names of other padding elements.
394         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
395         Renamed __pad1 element to __shared, adjust names of other padding
396         elements.
397         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
398         (pthread_rwlock_t): Likewise.
399         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
400         typo.
402 2007-08-09  Anton Blanchard  <anton@samba.org>
404         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
406 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
409         <kernel-features.h>.
410         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
412 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
414         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
415         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
416         dealing with robust mutexes.
417         * pthread_mutex_timedlock.c: Likewise.
418         * pthread_mutex_trylock.c: Likewise.
419         * pthread_mutex_unlock.c: Likewise.
420         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
422 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
424         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
425         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
426         (PTHREAD_MUTEX_PSHARED): Define.
427         * pthread_mutex_init.c (__pthread_mutex_init): Set
428         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
429         mutexes.
430         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
431         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
432         as second argument to lll_lock.
433         (LLL_MUTEX_TRYLOCK): Take mutex as argument
434         instead of its __data.__lock field.
435         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
436         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
437         to lll_robust_lock.
438         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
439         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
440         instead of mutex->__data.__kind directly, pass
441         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
442         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
443         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
444         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
445         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
446         to lll_timedlock, lll_robust_timedlock, lll_unlock and
447         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
448         of mutex->__data.__kind directly.
449         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
450         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
451         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
452         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
453         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
454         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
455         and lll_futex_wake.
456         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
457         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
458         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
459         directly.
460         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
461         Take mutex as argument instead of its __data.__lock field, pass
462         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
463         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
464         __data.__lock field.
465         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
466         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
467         to lll_robust_cond_lock.
468         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
469         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
470         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
471         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
472         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
473         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
474         lll_futex_wait.
475         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
476         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
477         lll_futex_wake.
478         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
479         pshared variable, pass it to lll_lock, lll_unlock,
480         lll_futex_timedwait and lll_futex_wake.
481         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
482         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
483         and lll_futex_wake.
484         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
485         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
486         macro.
487         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
488         lll_futex_wake_unlock): Likewise.
489         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
490         Likewise.
491         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
492         lll_futex_wake_unlock): Likewise.
493         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
494         Likewise.
495         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
496         lll_futex_wake_unlock): Likewise.
497         (lll_futex_wake): Fix a typo.
498         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
499         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
500         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
501         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
502         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
503         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
504         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
505         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
506         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
507         (__pthread_cond_timedwait): Likewise.
508         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
509         (__condvar_cleanup, __pthread_cond_wait): Likewise.
511 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
513         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
514         Don't use CGOTSETUP and CGOTRESTORE macros.
515         (CGOTSETUP, CGOTRESTORE): Remove.
516         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
517         @local symbol.
519 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
521         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
522         definitions for private futexes.
523         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
524         kernel-features.h and lowlevellock.h.  Use private futexes if
525         they are available.
526         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
527         (__lll_mutex_lock_wait): Rename to
528         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
529         (__lll_mutex_timedlock_wait): Rename to ...
530         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
531         Don't compile in for libc.so.
532         (__lll_mutex_unlock_wake): Rename to ...
533         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
534         (__lll_timedwait_tid): Use __NR_gettimeofday.
535         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
536         the header from assembler.  Renamed all lll_mutex_* resp.
537         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
538         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
539         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
540         Define.
541         (__lll_lock_wait_private): Add prototype.
542         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
543         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
544         __lll_unlock_wake): Likewise.
545         (lll_lock): Add private argument.  Call __lll_lock_wait_private
546         if private is constant LLL_PRIVATE.
547         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
548         lll_timedlock, lll_robust_timedlock): Add private argument.
549         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
550         if private is constant LLL_PRIVATE.
551         (lll_robust_unlock, lll_robust_dead): Add private argument.
552         (lll_lock_t): Remove.
553         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
554         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
555         lll_cond_wake, lll_cond_broadcast): Remove.
556         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
557         kernel-features.h and lowlevellock.h.
558         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
559         (LOAD_FUTEX_WAIT): Define.
560         (__lll_robust_mutex_lock_wait): Rename to ...
561         (__lll_robust_lock_wait): ... this.  Add private argument.
562         Use LOAD_FUTEX_WAIT macro.
563         (__lll_robust_mutex_timedlock_wait): Rename to ...
564         (__lll_robust_timedlock_wait): ... this.    Add private argument.
565         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
566         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
567         lowlevellock.h.
568         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
569         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
570         __lll_mutex_{lock,unlock}_*.
571         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
572         lowlevellock.h and pthread-errnos.h.
573         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
574         FUTEX_CMP_REQUEUE, EINVAL): Remove.
575         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
576         __lll_mutex_{lock,unlock}_*.
577         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
578         lowlevellock.h and pthread-errnos.h.
579         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
580         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
581         __lll_mutex_{lock,unlock}_*.
582         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
583         lowlevellock.h.
584         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
585         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
586         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
587         (__condvar_tw_cleanup): Likewise.
588         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
589         lowlevellock.h.
590         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
591         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
592         __lll_mutex_{lock,unlock}_*.
593         ( __condvar_w_cleanup): Likewise.
594         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
595         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
596         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
597         lowlevellock.h.
598         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
599         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
600         __lll_mutex_{lock,unlock}_*.
601         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
602         lowlevellock.h.
603         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
604         FUTEX_PRIVATE_FLAG): Remove.
605         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
606         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
607         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
608         lowlevellock.h.
609         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
610         FUTEX_PRIVATE_FLAG): Remove.
611         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
612         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
613         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
614         lowlevellock.h.
615         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
616         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
617         __lll_mutex_{lock,unlock}_*.
618         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
619         lowlevellock.h.
620         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
621         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
622         __lll_mutex_{lock,unlock}_*.
623         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
624         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
625         (__new_sem_post): Use standard initial exec code sequences.
626         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
627         lowlevellock.h.
628         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
629         FUTEX_PRIVATE_FLAG): Remove.
630         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
631         exec code sequences.
632         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
633         (__new_sem_trywait): Use standard initial exec code sequences.
634         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
635         (__new_sem_wait): Use standard initial exec code sequences.
637 2007-07-31  Anton Blanchard  <anton@samba.org>
639         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
640         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
641         atomic_full_barrier.
643 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
645         * allocatestack.c (stack_cache_lock): Change type to int.
646         (get_cached_stack, allocate_stack, __deallocate_stack,
647         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
648         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
649         as second argument to lll_lock and lll_unlock macros on
650         stack_cache_lock.
651         * pthread_create.c (__find_in_stack_list): Likewise.
652         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
653         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
654         as second argument.
655         * descr.h (struct pthread): Change lock and setxid_futex field
656         type to int.
657         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
658         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
659         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
660         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
661         Likewise.
662         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
663         * pthread_cond_init.c (__pthread_cond_init): Likewise.
664         * pthreadP.h (__attr_list_lock): Change type to int.
665         * pthread_attr_init.c (__attr_list_lock): Likewise.
666         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
667         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
668         lll_{,un}lock.
669         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
670         also for lll_futex_{wake,wait}.
671         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
672         a pointer to const.
673         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
674         LLL_SHARED as second argument to lll_{,un}lock.
675         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
676         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
677         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
678         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
679         Likewise.
680         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
681         as second argument to lll_{,un}lock macros on pd->lock.
682         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
683         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
684         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
685         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
686         Likewise.
687         * sysdeps/pthread/createthread.c (do_clone, create_thread):
688         Likewise.
689         * pthread_once.c (once_lock): Change type to int.
690         (__pthread_once): Pass LLL_PRIVATE as second argument to
691         lll_{,un}lock macros on once_lock.
692         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
693         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
694         rwlock->__data.__shared as second argument to them and similarly
695         for lll_futex_w*.
696         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
697         Likewise.
698         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
699         Likewise.
700         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
701         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
702         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
703         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
704         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
705         to lll_{,un}lock macros on __sem_mappings_lock.
706         * sem_open.c (check_add_mapping): Likewise.
707         (__sem_mappings_lock): Change type to int.
708         * semaphoreP.h (__sem_mappings_lock): Likewise.
709         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
710         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
711         instead of lll_*mutex_*, pass LLL_SHARED as last
712         argument.
713         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
714         pass LLL_SHARED as last argument.
715         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
716         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
717         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
718         pass LLL_SHARED as last argument.
719         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
720         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
721         LLL_SHARED as last argument.
722         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
723         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
724         Similarly.
725         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
726         __libc_lock_lock_recursive, __libc_lock_unlock,
727         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
728         argument to lll_{,un}lock.
729         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
730         _IO_lock_unlock): Likewise.
731         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
732         compound literal.
733         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
734         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
735         __fork_lock.
736         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
737         free_mem): Likewise.
738         (__fork_lock): Change type to int.
739         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
740         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
741         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
742         lll_futex_wake.
743         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
744         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
745         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
746         New function.
747         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
748         pass it through to lll_futex_*wait, only compile in when
749         IS_IN_libpthread.
750         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
751         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
752         argument and pass it through to lll_futex_*wait.
753         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
754         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
755         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
756         inline functions to __lll_* resp. __lll_robust_*.
757         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
758         (lll_mutex_dead): Add private argument.
759         (__lll_lock_wait_private): New prototype.
760         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
761         __lll_robust_lock_timedwait): Add private argument to prototypes.
762         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
763         call __lll_lock_wait_private, otherwise pass private to
764         __lll_lock_wait.
765         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
766         __lll_robust_timedlock): Add private argument, pass it to
767         __lll_*wait functions.
768         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
769         call __lll_unlock_wake_private, otherwise pass private to
770         __lll_unlock_wake.
771         (__lll_robust_unlock): Add private argument, pass it to
772         __lll_robust_unlock_wake.
773         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
774         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
775         argument, pass it through to __lll_* inline function.
776         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
777         (lll_lock_t): Remove.
778         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
779         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
780         lll_cond_wake, lll_cond_broadcast): Remove.
781         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
782         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
783         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
784         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
785         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
786         the header from assembler.  Renamed all lll_mutex_* resp.
787         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
788         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
789         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
790         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
791         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
792         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
793         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
794         Remove prototype.
795         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
796         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
797         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
798         (lll_trylock): Likewise, use __lll_trylock_asm, pass
799         MULTIPLE_THREADS_OFFSET as another asm operand.
800         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
801         MULTIPLE_THREADS_OFFSET as last asm operand, call
802         __lll_lock_wait_private if private is constant LLL_PRIVATE,
803         otherwise pass private as another argument to __lll_lock_wait.
804         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
805         lll_timedlock, lll_robust_timedlock): Add private argument, pass
806         private as another argument to __lll_*lock_wait call.
807         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
808         MULTIPLE_THREADS_OFFSET as another asm operand, call
809         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
810         otherwise pass private as another argument to __lll_unlock_wake.
811         (lll_robust_unlock): Add private argument, pass private as another
812         argument to __lll_unlock_wake.
813         (lll_robust_dead): Add private argument, use __lll_private_flag
814         macro.
815         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
816         LLL_MUTEX_LOCK_INITIALIZER.
817         (lll_lock_t): Remove.
818         (LLL_LOCK_INITIALIZER_WAITERS): Define.
819         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
820         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
821         lll_cond_wake, lll_cond_broadcast): Remove.
822         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
823         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
824         2007-05-2{3,9} changes.
825         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
826         kernel-features.h and lowlevellock.h.
827         (LOAD_PRIVATE_FUTEX_WAIT): Define.
828         (LOAD_FUTEX_WAIT): Rewritten.
829         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
830         define.
831         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
832         (__lll_mutex_lock_wait): Rename to ...
833         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
834         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
835         (__lll_mutex_timedlock_wait): Rename to ...
836         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
837         contains private argument.  Don't compile in for libc.so.
838         (__lll_mutex_unlock_wake): Rename to ...
839         (__lll_unlock_wake): ... this.  %ecx contains private argument.
840         Don't compile in for libc.so.
841         (__lll_timedwait_tid): Use __NR_gettimeofday.
842         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
843         kernel-features.h and lowlevellock.h.
844         (LOAD_FUTEX_WAIT): Define.
845         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
846         define.
847         (__lll_robust_mutex_lock_wait): Rename to ...
848         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
849         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
850         macro.
851         (__lll_robust_mutex_timedlock_wait): Rename to ...
852         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
853         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
854         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
855         lowlevellock.h.
856         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
857         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
858         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
859         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
860         to __lll_lock_wait in %edx.
861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
862         Include lowlevellock.h and pthread-errnos.h.
863         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
864         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
865         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
866         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
867         pass LLL_SHARED in %ecx to both __lll_lock_wait and
868         __lll_unlock_wake.
869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
870         Include lowlevellock.h and pthread-errnos.h.
871         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
872         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
873         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
874         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
875         pass LLL_SHARED in %ecx to both __lll_lock_wait and
876         __lll_unlock_wake.
877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
878         Include lowlevellock.h.
879         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
880         Don't define.
881         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
882         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
883         pass LLL_SHARED in %ecx to both __lll_lock_wait and
884         __lll_unlock_wake.  Use __NR_gettimeofday.
885         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
886         Include lowlevellock.h.
887         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
888         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
889         to __lll_*, pass cond_lock address in %edx rather than %ecx to
890         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
891         and __lll_unlock_wake.
892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
893         Include lowlevellock.h.
894         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
895         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
896         MUTEX(%ebx) address in %edx rather than %ecx to
897         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
898         and __lll_unlock_wake.  Move return value from %ecx to %edx
899         register.
900         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
901         Include lowlevellock.h.
902         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
903         Don't define.
904         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
905         MUTEX(%ebp) address in %edx rather than %ecx to
906         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
907         and __lll_unlock_wake.  Move return value from %ecx to %edx
908         register.  Use __NR_gettimeofday.
909         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
910         Include lowlevellock.h.
911         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
912         Don't define.
913         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
914         MUTEX(%ebp) address in %edx rather than %ecx to
915         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
916         and __lll_unlock_wake.  Move return value from %ecx to %edx
917         register.  Use __NR_gettimeofday.
918         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
919         Include lowlevellock.h.
920         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
921         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
922         MUTEX(%edi) address in %edx rather than %ecx to
923         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
924         and __lll_unlock_wake.
925         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
926         Include lowlevellock.h.
927         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
928         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
929         MUTEX(%ebx) address in %edx rather than %ecx to
930         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
931         and __lll_unlock_wake.  Move return value from %ecx to %edx
932         register.
933         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
934         lowlevellock.h.
935         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
936         define.
937         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
938         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
939         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
940         lowlevellock.h.
941         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
942         (sem_timedwait): Use __NR_gettimeofday.
943         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
944         lowlevellock.h.
945         (LOCK): Don't define.
946         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
947         lowlevellock.h.
948         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
949         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
950         are waiters.
951         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
952         2007-05-2{3,9} changes.
953         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
954         kernel-features.h and lowlevellock.h.
955         (LOAD_PRIVATE_FUTEX_WAIT): Define.
956         (LOAD_FUTEX_WAIT): Rewritten.
957         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
958         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
959         (__lll_mutex_lock_wait): Rename to ...
960         (__lll_lock_wait): ... this.  %esi is now private argument.
961         Don't compile in for libc.so.
962         (__lll_mutex_timedlock_wait): Rename to ...
963         (__lll_timedlock_wait): ... this.  %esi contains private argument.
964         Don't compile in for libc.so.
965         (__lll_mutex_unlock_wake): Rename to ...
966         (__lll_unlock_wake): ... this.  %esi contains private argument.
967         Don't compile in for libc.so.
968         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
969         kernel-features.h and lowlevellock.h.
970         (LOAD_FUTEX_WAIT): Define.
971         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
972         (__lll_robust_mutex_lock_wait): Rename to ...
973         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
974         Use LOAD_FUTEX_WAIT macro.
975         (__lll_robust_mutex_timedlock_wait): Rename to ...
976         (__lll_robust_timedlock_wait): ... this. %esi argument contains
977         private, use LOAD_FUTEX_WAIT macro.
978         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
979         lowlevellock.h.
980         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
981         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
982         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
983         __lll_lock_wait and __lll_unlock_wake.
984         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
985         Include lowlevellock.h and pthread-errnos.h.
986         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
987         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
988         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
989         pass LLL_SHARED in %esi to both __lll_lock_wait and
990         __lll_unlock_wake.
991         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
992         Include lowlevellock.h and pthread-errnos.h.
993         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
994         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
995         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
996         pass LLL_SHARED in %esi to both __lll_lock_wait and
997         __lll_unlock_wake.
998         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
999         Include lowlevellock.h.
1000         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1001         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1002         pass LLL_SHARED in %esi to both __lll_lock_wait and
1003         __lll_unlock_wake.
1004         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1005         Include lowlevellock.h.
1006         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1007         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1008         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1009         and __lll_unlock_wake.
1010         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1011         Include lowlevellock.h.
1012         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1013         Don't define.
1014         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1015         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1016         and __lll_unlock_wake.
1017         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1018         Include lowlevellock.h.
1019         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1020         Don't define.
1021         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1022         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1023         and __lll_unlock_wake.
1024         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1025         Include lowlevellock.h.
1026         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1027         Don't define.
1028         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1029         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1030         and __lll_unlock_wake.
1031         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1032         Include lowlevellock.h.
1033         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1034         Don't define.
1035         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1036         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1037         and __lll_unlock_wake.
1038         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1039         Include lowlevellock.h.
1040         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1041         Don't define.
1042         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1043         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1044         and __lll_unlock_wake.
1045         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1046         lowlevellock.h.
1047         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1048         define.
1049         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1050         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1051         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1052         lowlevellock.h.
1053         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1054         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1055         lowlevellock.h.
1056         (LOCK): Don't define.
1057         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1058         lowlevellock.h.
1059         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1060         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1061         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1062         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1063         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1064         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1065         (__lll_lock_wait_private): New function.
1066         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1067         it to lll_futex_*wait.  Don't compile in for libc.so.
1068         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1069         Remove.
1070         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1071         (struct sparc_pthread_barrier): Remove.
1072         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1073         struct sparc_pthread_barrier.  Pass
1074         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1075         and lll_futex_wait macros.
1076         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1077         Remove.
1078         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1079         Include sparc pthread_barrier_wait.c instead of generic one.
1081 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1083         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1085         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1086         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1087         %ecx.
1088         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1089         (pthread_rwlock_timedwrlock): Likewise.
1090         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1091         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1093 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1095         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1097 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1099         * tst-locale2.c (useless): Add return statement.
1101 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1103         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1104         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1105         * pthread_create.c (start_thread): Likewise.
1106         * init.c (sighandler_setxid): Likewise.
1107         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1108         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1109         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1110         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1111         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1112         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1113         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1114         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1115         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1116         Likewise.
1117         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1118         Likewise.
1119         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1120         Likewise.
1121         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1122         __rtld_notify): Likewise.
1123         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1124         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1125         __pthread_once): Likewise.
1126         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1127         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1128         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1129         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1130         (lll_futex_wait): Add private argument, define as wrapper around
1131         lll_futex_timed_wait.
1132         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1133         use __lll_private_flag macro.
1134         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1135         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1136         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1137         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1138         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1139         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1140         (lll_futex_wait): Add private argument, define as wrapper around
1141         lll_futex_timed_wait.
1142         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1143         use __lll_private_flag macro.
1144         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1145         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1146         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1147         Define.
1148         (lll_futex_timed_wait, lll_futex_wake): Use it.
1149         (lll_private_futex_wait, lll_private_futex_timed_wait,
1150         lll_private_futex_wake): Removed.
1151         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1152         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1153         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1154         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1155         (lll_futex_wait): Add private argument, define as wrapper around
1156         lll_futex_timed_wait.
1157         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1158         use __lll_private_flag macro.
1159         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1160         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1161         to lll_futex_*.
1162         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1163         (lll_private_futex_wait, lll_private_futex_timed_wait,
1164         lll_private_futex_wake): Removed.
1165         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1166         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1167         (lll_private_futex_wait, lll_private_futex_timed_wait,
1168         lll_private_futex_wake): Removed.
1169         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1170         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1171         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1172         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1173         (lll_futex_wait): Add private argument, define as wrapper around
1174         lll_futex_timed_wait.
1175         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1176         use __lll_private_flag macro.
1177         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1178         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1179         to lll_futex_*.
1180         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1181         Define.
1182         (lll_futex_timed_wait, lll_futex_wake): Use it.
1183         (lll_private_futex_wait, lll_private_futex_timed_wait,
1184         lll_private_futex_wake): Removed.
1186 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1188         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1189         of the structure for sparc32.
1191 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1193         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1195 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1197         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1198         code used when private futexes are assumed.
1199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1200         Likewise.
1202 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1204         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1205         (__lll_private_flag): Define.
1206         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1207         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1208         __lll_private_flag.
1209         (lll_private_futex_wait, lll_private_futex_timedwait,
1210         lll_private_futex_wake): Define as wrapper around non-_private
1211         macros.
1212         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1213         (__lll_private_flag): Define.
1214         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1215         (lll_private_futex_wait, lll_private_futex_timedwait,
1216         lll_private_futex_wake): Define as wrapper around non-_private
1217         macros.
1219 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1221         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1222         parameter to lll_futex_wait call.
1223         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1225         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1226         Replace lll_futex_wait with lll_private_futex_wait.
1227         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1228         Add LLL_SHARED parameter to lll_futex_wake().
1230         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1231         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1232         lll_private_futex_wake.
1233         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1234         bit from private parm before syscall.
1235         (lll_futex_timed_wait): Likewise.
1236         (lll_futex_wake): Likewise.
1237         (lll_futex_wake_unlock): Likewise.
1238         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1239         (lll_robust_mutex_unlock): Likewise.
1240         (lll_mutex_unlock_force): Likewise.
1241         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1243 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1245         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1246         compilation when unconditionally using private futexes.
1247         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1248         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1249         Likewise.
1250         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1251         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1253 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1255         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1256         Define.
1258 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1260         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1261         kernel-features.h.
1263 2007-05-16  Roland McGrath  <roland@redhat.com>
1265         * init.c (__nptl_initial_report_events): New variable.
1266         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1267         to that.
1269 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1271         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1272         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1274 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1276         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1277         implementation.
1279 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1281         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1282         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1283         * pthread_mutex_timedlock.c: Likewise.
1284         * pthread_mutex_trylock.c: Likewise.
1285         * pthread_mutex_unlock.c: Likewise.
1287 2007-06-17  Andreas Schwab  <schwab@suse.de>
1289         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1290         sections.
1292 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1294         * allocatestack.c (allocate_stack): Make code compile if
1295         __ASSUME_PRIVATE_FUTEX is set.
1297 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1299         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1300         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1301         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1302         (__pthread_rwlock_wrlock): Likewise.
1303         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1304         (pthread_rwlock_timedrdlock): Likewise.
1305         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1306         (pthread_rwlock_timedwrlock): Likewise.
1307         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1308         (__pthread_rwlock_unlock): Likewise.
1310 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1312         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1313         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1314         Split __flags into __flags, __shared, __pad1 and __pad2.
1315         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1316         futexes if they are available.
1317         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1318         in libc-lowlevellock.S allow using private futexes.
1319         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1320         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1321         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1322         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1323         lll_private_futex_timed_wait and lll_private_futex_wake.
1324         (lll_robust_mutex_unlock): Fix typo.
1325         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1326         field in futex command setup.
1327         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1328         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1329         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1330         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1331         if they are available.  Remove clear_once_control.
1332         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1333         futexes if they are available.
1334         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1335         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1336         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1337         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1338         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1339         Wake only when there are waiters.
1340         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1341         support.  Indicate that there are waiters.  Remove unnecessary
1342         extra cancellation test.
1343         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1344         left-over duplication of __sem_wait_cleanup.
1346 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1348         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1349         parameter to lll_futex_wait, lll_futex_timed_wait, and
1350         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1351         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1352         lll_private_futex_wake.
1353         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1354         * allocatestack.c: Adjust use of lll_futex_* macros.
1355         * init.c: Likewise.
1356         * lowlevellock.h: Likewise.
1357         * pthread_barrier_wait.c: Likewise.
1358         * pthread_cond_broadcast.c: Likewise.
1359         * pthread_cond_destroy.c: Likewise.
1360         * pthread_cond_signal.c: Likewise.
1361         * pthread_cond_timedwait.c: Likewise.
1362         * pthread_cond_wait.c: Likewise.
1363         * pthread_create.c: Likewise.
1364         * pthread_mutex_lock.c: Likewise.
1365         * pthread_mutex_setprioceiling.c: Likewise.
1366         * pthread_mutex_timedlock.c: Likewise.
1367         * pthread_mutex_unlock.c: Likewise.
1368         * pthread_rwlock_timedrdlock.c: Likewise.
1369         * pthread_rwlock_timedwrlock.c: Likewise.
1370         * pthread_rwlock_unlock.c: Likewise.
1371         * sysdeps/alpha/tls.h: Likewise.
1372         * sysdeps/i386/tls.h: Likewise.
1373         * sysdeps/ia64/tls.h: Likewise.
1374         * sysdeps/powerpc/tls.h: Likewise.
1375         * sysdeps/pthread/aio_misc.h: Likewise.
1376         * sysdeps/pthread/gai_misc.h: Likewise.
1377         * sysdeps/s390/tls.h: Likewise.
1378         * sysdeps/sh/tls.h: Likewise.
1379         * sysdeps/sparc/tls.h: Likewise.
1380         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1381         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1382         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1383         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1384         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1385         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1386         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1387         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1388         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1389         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1390         Likewise.
1391         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1392         * sysdeps/x86_64/tls.h: Likewise.
1394 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1396         * pthread_getattr_np.c: No need to install a cancellation handler,
1397         this is no cancellation point.
1398         * pthread_getschedparam.c: Likewise.
1399         * pthread_setschedparam.c: Likewise.
1400         * pthread_setschedprio.c: Likewise.
1401         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1402         lll_unlock_wake_cb.
1403         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1404         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1405         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1406         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1407         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1408         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1409         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1410         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1411         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1412         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1413         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1414         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1416         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1417         whether there are more than one thread makes no sense here since
1418         we only call the slow path if the locks are taken.
1419         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1421         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1422         COND_NWAITERS_SHIFT.
1423         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1424         COND_CLOCK_BITS.
1425         * pthread_cond_init.c: Likewise.
1426         * pthread_cond_timedwait.c: Likewise.
1427         * pthread_cond_wait.c: Likewise.
1428         * pthread_condattr_getclock.c: Likewise.
1429         * pthread_condattr_setclock.c: Likewise.
1430         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1431         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1434         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1436 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1438         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1439         unistd.h.
1441         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1442         insn suffix.
1443         (THREAD_GSCOPE_GET_FLAG): Remove.
1444         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1445         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1446         changes.
1447         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1448         (THREAD_GSCOPE_GET_FLAG): Remove.
1449         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1450         instead of THREAD_GSCOPE_GET_FLAG.
1451         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1452         it.
1453         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1454         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1455         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1456         THREAD_GSCOPE_WAIT): Define.
1457         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1458         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1459         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1460         THREAD_GSCOPE_WAIT): Define.
1461         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1462         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1463         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1464         THREAD_GSCOPE_WAIT): Define.
1465         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1466         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1467         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1468         THREAD_GSCOPE_WAIT): Define.
1470 2007-05-24  Richard Henderson  <rth@redhat.com>
1472         * descr.h (struct pthread): Add header.gscope_flag.
1473         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1474         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1475         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1476         THREAD_GSCOPE_WAIT): Define.
1478 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1480         * init.c: Make it compile with older kernel headers.
1482         * tst-initializers1.c: Show through exit code which test failed.
1484         * pthread_rwlock_init.c: Also initialize __shared field.
1485         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1486         element in rwlock structure into four byte elements.  One of them is
1487         the new __shared element.
1488         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1489         Likewise.
1490         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1491         __shared, adjust names of other padding elements.
1492         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1493         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1494         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1495         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1496         FUTEX_PRIVATE_FLAG.
1497         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1498         futex to use private operations if possible.
1499         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1500         Likewise.
1501         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1502         Likewise.
1503         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1504         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1505         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1506         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1507         Likewise.
1508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1509         Likewise.
1510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1513 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1515         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1516         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1517         * pthread_rwlock_timedrdlock.c: Likewise.
1518         * pthread_rwlock_tryrdlock.c: Likewise.
1520         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1521         optimization.
1523         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1524         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1525         duplication of __sem_wait_cleanup.
1527         * allocatestack.c: Revert last change.
1528         * init.c: Likewise.
1529         * sysdeps/i386/tls.h: Likewise.
1530         * sysdeps/x86_64/tls.h: Likewise.
1531         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1532         header structure.
1533         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1535         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1536         Add private field.
1537         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1538         * pthread_barrier_init.c: Set private flag if pshared and private
1539         futexes are supported.
1540         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1541         private field in futex command setup.
1542         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1544 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1546         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1547         support.
1548         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1549         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1550         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1551         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1552         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1554         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1555         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1556         fields in the structure.
1557         (__old_sem_init): New function.
1558         * sem_open.c: Initialize all fields of the structure.
1559         * sem_getvalue.c: Adjust for renamed element.
1560         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1561         (gen-as-const-headers): Add structsem.sym.
1562         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1563         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1564         struct new_sem.  Add struct old_sem.
1565         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1566         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1567         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1568         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1569         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1570         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1571         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1572         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1573         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1574         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1575         * tst-sem10.c: New file.
1576         * tst-sem11.c: New file.
1577         * tst-sem12.c: New file.
1578         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1579         of struct sem.
1581 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1582             Jakub Jelinek  <jakub@redhat.com>
1584         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1585         Move __pthread_enable_asynccancel right before futex syscall.
1586         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1587         Likewise.
1589 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1591         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1592         THREAD_COPY_PRIVATE_FUTEX): Define.
1593         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1594         THREAD_COPY_PRIVATE_FUTEX): Define.
1595         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1596         * init.c (__pthread_initialize_minimal_internal): Use
1597         THREAD_SET_PRIVATE_FUTEX.
1599         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1600         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1601         THREAD_GSCOPE_FLAG_WAIT): Define.
1602         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1603         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1604         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1605         PTR_DEMANGLE.
1606         (THREAD_GSCOPE_GET_FLAG): Define.
1607         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1608         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1609         instead of ->header.gscope_flag directly.
1611 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1613         * init.c (__pthread_initialize_minimal_internal): Check whether
1614         private futexes are available.
1615         * allocatestack.c (allocate_stack): Copy private_futex field from
1616         current thread into the new stack.
1617         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1618         futexes if they are available.
1619         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1620         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1621         in libc-lowlevellock.S allow using private futexes.
1622         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1623         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1624         FUTEX_PRIVATE_FLAG.
1625         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1626         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1627         if they are available.
1628         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1629         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1630         * sysdeps/i386/tcb-offsets.sym: Likewise.
1631         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1632         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1634 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1636         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1637         Remove ptr_wait_lookup_done again.
1638         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1639         (__pthread_initialize_minimal_internal): Initialize
1640         _dl_wait_lookup_done pointer in _rtld_global directly.
1641         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1642         Remove code to code _dl_wait_lookup_done.
1643         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1644         encrypted for now.
1646 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1648         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1649         pthread_mutex_init failed with ENOTSUP.
1651 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1653         * allocatestack.c (__wait_lookup_done): New function.
1654         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1655         Add ptr_wait_lookup_done.
1656         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1657         * pthreadP.h: Declare __wait_lookup_done.
1658         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1659         Define macros to implement reference handling of global scope.
1660         * sysdeps/x86_64/tls.h: Likewise.
1661         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1662         Initialize GL(dl_wait_lookup_done).
1664 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1666         [BZ #4512]
1667         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1668         is detected.
1669         * pthread_mutex_timedlock.c: Likewise.
1670         * pthread_mutex_trylock.c: Likewise.
1671         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1673         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1674         * tst-robust9.c: New file.
1675         * tst-robustpi9.c: New file.
1677         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1678         unnecessary extra cancellation test.
1680 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1682         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1683         extra cancellation test.
1684         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1686 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1688         * descr.h (struct pthread): Rearrange members to fill hole in
1689         64-bit layout.
1691         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1692         (__pthread_setaffinity_new): If syscall was successful and
1693         RESET_VGETCPU_CACHE is defined, use it before returning.
1694         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1696 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1698         [BZ #4455]
1699         * tst-align2.c: Include stackinfo.h.
1700         * tst-getpid1.c: Likewise.
1702 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1704         [BZ #4455]
1705         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1706         * tst-getpid1.c (do_test): Likewise.
1708         [BZ #4456]
1709         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1710         (allocate_stack): Likewise.
1712 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1714         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1715         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1716         (__lll_robust_timedlock_wait): Likewise.
1717         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1719 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1721         [BZ #4465]
1722         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1723         * tst-cancel4.c (tf_fdatasync): New test.
1725 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1727         [BZ #4392]
1728         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1729         check mutexes like normal mutexes.
1731         [BZ #4306]
1732         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1733         Initialize the whole sigevent structure to appease valgrind.
1735 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1737         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1738         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1740 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1742         * tst-locale1.c: Avoid warnings.
1743         * tst-locale2.c: Likewise.
1745 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1747         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1748         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1750 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1752         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1753         __extern_always_inline where appropriate.
1754         * sysdeps/pthread/pthread.h: Likewise.
1756 2007-03-13  Richard Henderson  <rth@redhat.com>
1758         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1759         separate cfi regions for the two subsections.
1761 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1763         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1764         new thread, don't just decrement it.
1765         Patch by Suzuki K P <suzuki@in.ibm.com>.
1767 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1769         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1770         PTHFCT_CALL definition.
1772 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1774         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1775         available, don't use it.
1777 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1779         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1780         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1781         call into the kernel to delay.
1783 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1785         * tst-initializers1.c: We want to test the initializers as seen
1786         outside of libc, so undefined _LIBC.
1788         * pthread_join.c (cleanup): Avoid warning.
1790 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1792         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1793         (__lll_timedwait_tid): Add unwind info.
1795         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1796         function table, mangle the pointers.
1797         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1798         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1799         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1800         demangle pointers before use.
1801         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1802         demangle pointer.
1803         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1804         * sysdeps/pthread/setxid.h: Likewise.
1806 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1808         * tst-rwlock7.c: Show some more information in case of correct
1809         behavior.
1811 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1813         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1814         (lll_futex_timed_wait): Undo part of last change, don't negate
1815         return value.
1817 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1819         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1820         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1822 2006-12-28  David S. Miller  <davem@davemloft.net>
1824         * shlib-versions: Fix sparc64 linux target specification.
1826 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1828         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1829         Adjust include path for pthread_barrier_wait.c move.
1831 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1833         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1834         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1836 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1838         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1839         6 argument cancellable syscalls.
1840         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1841         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1842         6 argument cancellable syscalls.
1843         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1845 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1847         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1848         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1850 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1852         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1853         __sync_lock_release instead of __sync_lock_release_si.
1855 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1857         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1858         Define.
1859         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1860         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1861         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1862         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1863         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1864         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1865         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1866         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1867         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1868         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1869         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1871 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1873         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1874         * pthread_barrier_wait.c: ...here.
1875         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1876         * pthread_cond_broadcast.c: ...here.
1877         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1878         * pthread_cond_signal.c: ...here.
1879         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1880         * pthread_cond_timedwait.c: ...here.
1881         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1882         * pthread_cond_wait.c: ...here.
1883         * sysdeps/pthread/pthread_once.c: Move to...
1884         * pthread_once.c: ...here.
1885         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1886         * pthread_rwlock_rdlock.c: ...here.
1887         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1888         * pthread_rwlock_timedrdlock.c: ...here.
1889         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1890         * pthread_rwlock_timedwrlock.c: ...here.
1891         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1892         * pthread_rwlock_unlock.c: ...here.
1893         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1894         * pthread_rwlock_wrlock.c: ...here.
1895         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1896         * pthread_spin_destroy.c: ...here.
1897         * sysdeps/pthread/pthread_spin_init.c: Move to...
1898         * pthread_spin_init.c: ...here.
1899         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1900         * pthread_spin_unlock.c: ...here.
1901         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1902         * pthread_getcpuclockid.c: ...here.
1904         * init.c: USE_TLS support is now always enabled.
1905         * tst-tls5.h: Likewise.
1906         * sysdeps/alpha/tls.h: Likewise.
1907         * sysdeps/i386/tls.h: Likewise.
1908         * sysdeps/ia64/tls.h: Likewise.
1909         * sysdeps/powerpc/tls.h: Likewise.
1910         * sysdeps/s390/tls.h: Likewise.
1911         * sysdeps/sh/tls.h: Likewise.
1912         * sysdeps/sparc/tls.h: Likewise.
1913         * sysdeps/x86_64/tls.h: Likewise.
1915 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1917         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1918         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1919         failed.
1921         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1922         Define to THREAD_SELF->header.multiple_threads.
1923         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1924         Likewise.
1925         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1926         Likewise.
1927         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1928         (SINGLE_THREAD_P): Likewise.
1929         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1930         (SINGLE_THREAD_P): Likewise.
1931         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1932         (SINGLE_THREAD_P): Likewise.
1933         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1934         (SINGLE_THREAD_P): Likewise.
1935         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1936         Likewise.
1937         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1938         (SINGLE_THREAD_P): Likewise.
1939         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1940         (SINGLE_THREAD_P): Likewise.
1941         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1942         Likewise.
1944 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1946         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1947         by default rather than 2_3_3.
1949 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1951         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1952         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1953         atomic_* instead of catomic_* macros.
1955 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1957         [BZ #3285]
1958         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1959         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1960         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1961         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1962         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1963         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1964         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1965         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1966         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1967         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1968         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1969         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1970         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1972 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1974         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1975         cancelable syscalls with six parameters.
1977         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1978         operations instead of atomic_*.
1980 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1982         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1984 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1986         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1987         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1988         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1989         New file.
1990         * pthread_attr_setstack.c: Allow overwriting the version number of the
1991         new symbol.
1992         * pthread_attr_setstacksize.c: Likewise.
1993         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1994         it.
1995         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1996         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1998 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2000         [BZ #3251]
2001         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2002         Patch by Petr Baudis.
2004 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2006         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2008         * tst-cancel2.c (tf): Loop as long as something was written.
2010 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2012         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2013         mutexes wake all mutexes.
2014         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2015         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2016         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2018 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2020         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2021         to guarantee the thread is always canceled.
2023 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2025         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2026         Include stdlib.h.
2027         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2028         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2033 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2035         [BZ #3123]
2036         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2037         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2038         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2039         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2040         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2041         * Makefile (tests): Add tst-cond22.
2042         * tst-cond22.c: New file.
2044 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2046         [BZ #3124]
2047         * descr.h (struct pthread): Add parent_cancelhandling.
2048         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2049         cancelhandling value to child.
2050         * pthread_create.c (start_thread): If parent thread was canceled
2051         reset the SIGCANCEL mask.
2052         * Makefile (tests): Add tst-cancel25.
2053         * tst-cancel25.c: New file.
2055 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2056             Ulrich Drepper  <drepper@redhat.com>
2058         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2059         counterp if it is already zero.
2060         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2062 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2063             Roland McGrath  <roland@redhat.com>
2065         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2066         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2067         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2068         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2069         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2070         lll_robust_mutex_timedlock, lll_mutex_unlock,
2071         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2072         Add _L_*_ symbols around the subsection.
2073         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2074         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2076 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2077             Roland McGrath  <roland@redhat.com>
2079         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2080         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2081         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2082         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2083         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2084         lll_robust_mutex_timedlock, lll_mutex_unlock,
2085         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2086         Add _L_*_ symbols around the subsection.
2087         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2088         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2090 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2092         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2093         change because it can disturb too much existing code.  If real hard
2094         reader preference is needed we'll introduce another type.
2095         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2096         (pthread_rwlock_timedwrlock): Likewise.
2097         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2098         Likewise.
2100 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2102         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2103         reader preference.
2104         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2105         (pthread_rwlock_timedwrlock): Likewise.
2106         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2107         Likewise.
2109 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2111         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2112         Only define ifdef SHARED.
2114 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2116         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2117         (free_stacks): ...here.
2118         (__free_stack_cache): New function.
2119         * pthreadP.h: Declare __free_stack_cache.
2120         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2121         ptr_freeres.
2122         * init.c (pthread_functions): Initialize ptr_freeres.
2123         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2124         New freeres function.
2126 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2128         [BZ #3018]
2129         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2131 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2133         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2134         _XOPEN_REALTIME_THREADS.
2136 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2138         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2139         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2140         HAVE_CLOCK_GETTIME_VSYSCALL.
2141         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2143 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2145         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2146         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2147         * descr.h (struct priority_protection_data): New type.
2148         (struct pthread): Add tpp field.
2149         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2150         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2151         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2152         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2153         TPP mutexes.
2154         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2155         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2156         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2157         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2158         * tpp.c: New file.
2159         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2160         boosted by TPP.
2161         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2162         * pthread_mutexattr_getprioceiling.c
2163         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2164         in the SCHED_FIFO priority range.
2165         * pthread_mutexattr_setprioceiling.c
2166         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2167         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2168         if mutex is not TPP.  Ceiling is now in __data.__lock.
2169         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2170         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2171         is now in __data.__lock.  Add locking.
2172         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2173         * Makefile (libpthread-routines): Add tpp.
2174         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2175         * tst-tpp.h: New file.
2176         * tst-mutexpp1.c: New file.
2177         * tst-mutexpp6.c: New file.
2178         * tst-mutexpp10.c: New file.
2179         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2180         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2182 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2184         [BZ #2843]
2185         * pthread_join.c (pthread_join): Account for self being canceled
2186         when checking for deadlocks.
2187         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2188         (tf1): Don't print anything after pthread_join returns, this would be
2189         another cancellation point.
2190         (tf2): Likewise.
2191         * tst-join6.c: New file.
2192         * Makefile (tests): Add tst-join6.
2194 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2196         [BZ #2892]
2197         * pthread_setspecific.c (__pthread_setspecific): Check
2198         out-of-range index before checking for unused key.
2200         * sysdeps/pthread/gai_misc.h: New file.
2202 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2204         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2205         file.  Don't use sysctl.
2206         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2207         overwrite the file if this is likely not true.
2209 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2211         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2212         * Makefile (tests): Add tst-getpid3.
2213         * tst-getpid3.c: New file.
2215 2006-07-30  Roland McGrath  <roland@redhat.com>
2217         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2219         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2220         (pause_not_cancel): New macro.
2221         (nanosleep_not_cancel): New macro.
2222         (sigsuspend_not_cancel): New macro.
2223         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2224         nanosleep_not_cancel macro from <not-cancel.h>.
2225         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2226         macro from <not-cancel.h>.
2228 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2229             Jakub Jelinek  <jakub@redhat.com>
2231         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2232         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2233         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2234         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2235         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2236         * pthread_mutex_lock.c: Likewise.
2237         * pthread_mutex_timedlock.c: Likewise.
2238         * pthread_mutex_trylock.c: Likewise.
2239         * pthread_mutex_unlock.c: Likewise.
2240         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2241         all mutexes.
2242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2243         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2244         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2245         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2246         pthread-pi-defines.sym.
2247         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2248         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2249         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2250         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2251         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2252         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2253         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2254         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2255         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2256         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2257         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2258         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2259         * tst-mutex2.c: Likewise.
2260         * tst-mutex3.c: Likewise.
2261         * tst-mutex4.c: Likewise.
2262         * tst-mutex5.c: Likewise.
2263         * tst-mutex6.c: Likewise.
2264         * tst-mutex7.c: Likewise.
2265         * tst-mutex7a.c: Likewise.
2266         * tst-mutex8.c: Likewise.
2267         * tst-mutex9.c: Likewise.
2268         * tst-robust1.c: Likewise.
2269         * tst-robust7.c: Likewise.
2270         * tst-robust8.c: Likewise.
2271         * tst-mutexpi1.c: New file.
2272         * tst-mutexpi2.c: New file.
2273         * tst-mutexpi3.c: New file.
2274         * tst-mutexpi4.c: New file.
2275         * tst-mutexpi5.c: New file.
2276         * tst-mutexpi6.c: New file.
2277         * tst-mutexpi7.c: New file.
2278         * tst-mutexpi7a.c: New file.
2279         * tst-mutexpi8.c: New file.
2280         * tst-mutexpi9.c: New file.
2281         * tst-robust1.c: New file.
2282         * tst-robust2.c: New file.
2283         * tst-robust3.c: New file.
2284         * tst-robust4.c: New file.
2285         * tst-robust5.c: New file.
2286         * tst-robust6.c: New file.
2287         * tst-robust7.c: New file.
2288         * tst-robust8.c: New file.
2289         * Makefile (tests): Add the new tests.
2291         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2292         * pthread_mutex_destroy.c: Remove unneeded label.
2294 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2296         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2297         computations to compile time.
2299 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2301         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2303 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2305         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2307 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2309         * pthread_key_create.c (__pthread_key_create): Do away with
2310         __pthread_keys_lock.
2312         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2313         (__kernel_cpumask_size): Mark as hidden.
2314         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2316         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2317         * semaphoreP.h (__sem_mappings_lock): Likewise.
2319 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2321         * pthread_atfork.c: Mark __dso_handle as hidden.
2323 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2325         [BZ #2644]
2326         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2327         the reload problem.  Change the one path in pthread_cancel_init
2328         which causes the problem.  Force gcc to reload.  Simplify callers.
2329         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2330         (_Unwind_GetBSP): Undo last patch.
2332 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2334         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2335         function pointer is reloaded after pthread_cancel_init calls.
2337         [BZ #2644]
2338         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2339         pointers are reloaded after pthread_cancel_init calls.
2341 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2343         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2344         __always_inline.
2346 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2348         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2349         Allocate new object which is passed to timer_sigev_thread so that
2350         the timer can be deleted before the new thread is scheduled.
2352 2006-04-26  Roland McGrath  <roland@redhat.com>
2354         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2356 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2358         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2359         suffix for conditional jumps.
2360         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2361         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2362         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2363         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2364         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2365         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2367         * init.c (sigcancel_handler): Compare with correct PID even if the
2368         thread is in the middle of a fork call.
2369         (sighandler_setxid): Likewise.
2370         Reported by Suzuki K P <suzuki@in.ibm.com> .
2372 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2374         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2376 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2378         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2379         fails [Coverity CID 105].
2381 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2383         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2385 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2387         [BZ #2505]
2388         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2389         Define __lll_rel_instr using lwsync.
2391 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2393         * allocatestack.c (allocate_stack): Always initialize robust_head.
2394         * descr.h: Define struct robust_list_head.
2395         (struct pthread): Use robust_list_head in robust mutex list definition.
2396         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2397         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2398         (__pthread_initialize_minimal_internal): Register robust_list with
2399         the kernel.
2400         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2401         Declare __set_robust_list_avail.
2402         * pthread_create.c (start_thread): Register robust_list of new thread.
2403         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2404         waiters.
2405         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2406         number of users, it's unreliable.
2407         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2408         set_robust_list syscall is available.
2409         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2410         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2411         Set robust_head.list_op_pending before trying to lock a robust mutex.
2412         * pthread_mutex_timedlock.c: Likewise.
2413         * pthread_mutex_trylock.c: Likewise.
2414         * pthread_mutex_unlock.c: Likewise for unlocking.
2415         * Makefile (tests): Add tst-robust8.
2416         * tst-robust8.c: New file.
2418 2006-03-08  Andreas Schwab  <schwab@suse.de>
2420         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2421         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2423 2006-03-05  Roland McGrath  <roland@redhat.com>
2425         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2426         and $config_os doesn't match *linux*.
2428 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2430         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2431         Use __syscall_error.
2432         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2433         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2434         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2435         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2436         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2437         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2439 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2441         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2443 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2445         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2446         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2447         mutex.
2448         (__lll_robust_timedlock_wait): Likewise.
2449         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2450         (__lll_robust_lock_wait): Likewise.
2451         (__lll_robust_timedlock_wait): Likewise.
2452         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2453         (__lll_robust_lock_wait): Likewise.
2454         (__lll_robust_timedlock_wait): Likewise.
2456 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2458         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2459         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2460         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2461         lll_robust_mutex_unlock): Define.
2462         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2464 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2466         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2467         instead of <clone.S>.
2469 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2471         * Makefile (libpthread-routines): Add
2472         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2473         and pthread_mutex_[sg]etprioceiling.
2474         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2475         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2476         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2477         pthread_mutex_setprioceiling.
2478         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2479         PTHREAD_PRIO_PROTECT): New enum values.
2480         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2481         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2482         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2483         prototypes.
2484         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2485         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2486         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2487         Define.
2488         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2489         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2490         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2491         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2492         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2493         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2494         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2495         protocol mutexes.
2496         * pthread_mutex_getprioceiling.c: New file.
2497         * pthread_mutex_setprioceiling.c: New file.
2498         * pthread_mutexattr_getprioceiling.c: New file.
2499         * pthread_mutexattr_setprioceiling.c: New file.
2500         * pthread_mutexattr_getprotocol.c: New file.
2501         * pthread_mutexattr_setprotocol.c: New file.
2503 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2505         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2507 2006-02-27  Roland McGrath  <roland@redhat.com>
2509         * sysdeps/pthread/Subdirs: List nptl here too.
2510         * configure (libc_add_on_canonical): New variable.
2512         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2514         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2515         self to get main source tree's file.
2516         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2517         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2518         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2519         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2520         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2521         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2522         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2523         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2524         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2525         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2526         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2527         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2528         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2530         * Makefile: Use $(sysdirs) in vpath directive.
2532         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2533         (CPPFLAGS-timer_routines.c): Likewise.
2535         * Makeconfig (includes): Variable removed.
2537 2006-02-26  Roland McGrath  <roland@redhat.com>
2539         * sysdeps/generic/pt-raise.c: Moved to ...
2540         * pt-raise.c: ... here.
2541         * sysdeps/generic/lowlevellock.h: Moved to ...
2542         * lowlevellock.h: ... here.
2544 2006-02-23  Roland McGrath  <roland@redhat.com>
2546         * descr.h (struct pthread): Add final member `end_padding'.
2547         (PTHREAD_STRUCT_END_PADDING): Use it.
2549 2006-02-20  Roland McGrath  <roland@redhat.com>
2551         * sysdeps/mips: Directory removed, saved in ports repository.
2552         * sysdeps/unix/sysv/linux/mips: Likewise.
2554 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2556         * tst-robust1.c: Add second mutex to check that the mutex list is
2557         handled correctly.
2559 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2561         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2562         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2563         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2564         lll_robust_mutex_unlock): New macros.
2565         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2566         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2567         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2568         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2569         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2571 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2573         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2574         definitions.
2575         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2577 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2579         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2580         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2581         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2582         (lll_robust_mutex_unlock): Likewise.
2584 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2586         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2587         Set robust_list.__next rather than robust_list.
2588         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2589         (__pthread_list_t): New typedef.
2590         (pthread_mutex_t): Replace __next and __prev fields with __list.
2591         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2592         (__pthread_list_t): New typedef.
2593         (pthread_mutex_t): Replace __next and __prev fields with __list.
2594         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2595         (__pthread_list_t, __pthread_slist_t): New typedefs.
2596         (pthread_mutex_t): Replace __next and __prev fields with __list.
2597         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2598         (__pthread_list_t, __pthread_slist_t): New typedefs.
2599         (pthread_mutex_t): Replace __next and __prev fields with __list.
2600         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2601         (__pthread_list_t, __pthread_slist_t): New typedefs.
2602         (pthread_mutex_t): Replace __next and __prev fields with __list.
2603         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2604         (__pthread_slist_t): New typedef.
2605         (pthread_mutex_t): Replace __next field with __list.
2607 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2609         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2610         PTHREAD_MUTEX_OWNERDEAD.
2611         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2612         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2613         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2614         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2615         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2616         to PTHREAD_MUTEX_INCONSISTENT.
2617         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2618         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2619         * pthread_mutex_trylock.c: Likewise.
2620         * pthread_mutex_timedlock.c: Likewise.
2621         * pthread_mutex_unlock.c: Likewise.
2622         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2623         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2624         lowlevelrobustlock.sym.
2625         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2626         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2627         definitions.
2628         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2629         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2630         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2631         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2632         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2634 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2636         * allocatestack.c (allocate_stack): Initialize robust_list.
2637         * init.c (__pthread_initialize_minimal_internal): Likewise.
2638         * descr.h (struct xid_command): Pretty printing.
2639         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2640         robust_list.  Adjust macros.
2641         * pthread_create.c (start_thread): Adjust robust_list handling.
2642         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2643         but the owner for all robust mutex types.
2644         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2645         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2646         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2647         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2649         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2650         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2652 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2654         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2655         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2657 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2659         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2660         Return status.
2661         (lll_futex_timed_wait): Define.
2663 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2665         * tst-cancel4.c: Test ppoll.
2667 2006-01-18  Andreas Jaeger  <aj@suse.de>
2669         [BZ #2167]
2670         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2671         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2672         by Jim Gifford <patches@jg555.com>.
2674 2006-01-13  Richard Henderson  <rth@redhat.com>
2676         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2678 2006-01-10  Roland McGrath  <roland@redhat.com>
2680         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2681         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2682         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2683         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2684         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2685         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2686         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2687         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2688         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2689         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2691 2006-01-09  Roland McGrath  <roland@redhat.com>
2693         * tst-initializers1-c89.c: New file.
2694         * tst-initializers1-c99.c: New file.
2695         * tst-initializers1-gnu89.c: New file.
2696         * tst-initializers1-gnu99.c: New file.
2697         * Makefile (tests): Add them.
2698         (CFLAGS-tst-initializers1-c89.c): New variable.
2699         (CFLAGS-tst-initializers1-c99.c): New variable.
2700         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2701         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2703         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2704         Use __extension__ on anonymous union definition.
2705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2706         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2707         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2708         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2709         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2711 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2713         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2714         Don't give the union a name because it changes the mangled name.
2715         Instead name the struct for __data.
2716         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2717         Likewise.
2718         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2719         Likewise.
2721 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2723         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2724         stack bias to mc_ftp field.
2726 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2728         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2729         being too clever and reloading the futex value where it shouldn't.
2731 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2733         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2734         correct type.
2736 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2738         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2739         Add cfi directives.
2741 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2743         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2744         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2745         rename in tcbhead_t.
2747         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2748         Don't give the union a name because it changes the mangled name.
2749         Instead name the struct for __data.
2750         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2751         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2752         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2753         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2754         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2755         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2757 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2759         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2760         Return status.
2761         (lll_futex_timed_wait): Define.
2762         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2763         * sysdeps/pthread/aio_misc.h: New file.
2765 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2767         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2769 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2771         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2772         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2773         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2775 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2777         * tst-cancel24.cc: Use C headers instead of C++ headers.
2779 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2781         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2782         sparc-linux configured glibc.
2783         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2784         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2785         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2786         atomic_compare_and_exchange_val_24_acq instead of
2787         atomic_compare_and_exchange_val_acq.
2788         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2789         instead of atomic_exchange_rel.
2790         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2791         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2792         file.
2793         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2794         file.
2795         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2796         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2797         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2798         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2799         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2800         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2801         New file.
2802         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2803         New file.
2804         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2805         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2806         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2807         file.
2808         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2809         file.
2810         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2812 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2814         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2815         mutex initializers.
2817 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2819         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2820         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2821         THREAD_COPY_POINTER_GUARD): Define.
2822         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2823         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2825 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2827         * version.c: Update copyright year.
2829 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2831         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2832         .eh_frame section, use cfi_* directives.
2833         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2835 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2837         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2838         now.
2840 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2842         * sysdeps/pthread/sigaction.c: Removed.
2843         * sigaction.c: New file.
2844         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2846 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2848         * Makefile (tests): Add tst-signal7.
2849         * tst-signal7.c: New file.
2851 2005-12-27  Roland McGrath  <roland@redhat.com>
2853         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2854         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2855         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2856         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2857         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2858         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2859         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2860         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2861         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2862         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2863         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2865 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2867         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2868         and __prev field to pthread_mutex_t.
2869         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2870         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2871         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2872         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2873         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2874         to pthread_mutex_t.
2876 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2878         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2879         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2880         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2881         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2882         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2883         and PTHREAD_MUTEXATTR_FLAG_BITS.
2884         * descr.h (struct pthread): Add robust_list field and define
2885         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2886         * pthread_mutexattr_getrobust.c: New file.
2887         * pthread_mutexattr_setrobust.c: New file.
2888         * pthread_mutex_consistent.c: New file.
2889         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2890         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2891         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2892         Adjust pthread_mutex_t initializers.
2893         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2894         field to pthread_mutex_t.
2895         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2896         and __prev field to pthread_mutex_t.
2897         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2898         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2899         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2900         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2901         * pthread_mutexattr_gettype.c: Likewise.
2902         * pthread_mutexattr_setpshared.c: Likewise.
2903         * pthread_mutexattr_settype.c: Likewise.
2904         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2905         Initialize mutex kind according to robust flag.
2906         * pthread_mutex_lock.c: Implement local robust mutex.
2907         * pthread_mutex_timedlock.c: Likewise.
2908         * pthread_mutex_trylock.c: Likewise.
2909         * pthread_mutex_unlock.c: Likewise.
2910         * pthread_create.c (start_thread): Mark robust mutexes which remained
2911         locked as dead.
2912         * tst-robust1.c: New file.
2913         * tst-robust2.c: New file.
2914         * tst-robust3.c: New file.
2915         * tst-robust4.c: New file.
2916         * tst-robust5.c: New file.
2917         * tst-robust6.c: New file.
2918         * tst-robust7.c: New file.
2919         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2920         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2921         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2922         tst-robust5, tst-robust6, and tst-robust7.
2924         * tst-typesizes.c: New file.
2925         * Makefile (tests): Add tst-typesizes.
2927         * tst-once3.c: More debug output.
2929 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2931         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2932         missing after last change.
2934         * version.c: Update copyright year.
2936 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2938         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2939         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2940         * pthread_mutex_trylock.c: Likewise.
2941         * pthread_mutex_timedlock.c: Likewise.
2942         * pthread_mutex_unlock.c: Likewise.
2944 2005-12-22  Roland McGrath  <roland@redhat.com>
2946         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2947         so that #include_next's search location is not reset to the -I..
2948         directory where <nptl/...> can be found.
2950 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2952         [BZ #1913]
2953         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2954         Fix unwind info.  Remove useless branch prediction prefix.
2955         * tst-cancel24.cc: New file.
2956         * Makefile: Add rules to build and run tst-cancel24.
2958 2005-12-21  Roland McGrath  <roland@redhat.com>
2960         * libc-cancellation.c: Use <> rather than "" #includes.
2961         * pt-cleanup.c: Likewise.
2962         * pthread_create.c: Likewise.
2963         * pthread_join.c: Likewise.
2964         * pthread_timedjoin.c: Likewise.
2965         * pthread_tryjoin.c: Likewise.
2966         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2967         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2968         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2969         * unwind.c: Likewise.
2971 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2973         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2974         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2975         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2976         THREAD_COPY_POINTER_GUARD): Define.
2978 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2980         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2981         rather than one.
2982         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2983         THREAD_COPY_POINTER_GUARD): Define.
2984         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2985         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2986         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2987         THREAD_COPY_POINTER_GUARD): Define.
2988         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2989         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2990         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2991         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2992         Use PTR_DEMANGLE for B0 if defined.
2994 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2996         * pthread_create.c (__pthread_create_2_1): Use
2997         THREAD_COPY_POINTER_GUARD if available.
2998         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2999         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3000         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3001         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3002         * sysdeps/x86_64/tls.h: Likewise.
3004 2005-12-15  Roland McGrath  <roland@redhat.com>
3006         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3008 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3010         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3011         sysdeps/generic.
3012         * errno-loc.c: New file.
3014 2005-12-12  Roland McGrath  <roland@redhat.com>
3016         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3017         adjustments before choosing stack size.  Update minimum stack size
3018         calculation to match allocate_stack change.
3020 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3022         * allocatestack.c (allocate_stack): Don't demand that there is an
3023         additional full page available on the stack beside guard, TLS, the
3024         minimum stack.
3026 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3028         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3029         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3031         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3032         compiling 32-bit code we must define __cleanup_fct_attribute.
3034 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3036         [BZ #1920]
3037         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3038         __attribute__ instead of __attribute.
3039         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3040         (__cleanup_fct_attribute): Likewise.
3042 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3044         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3045         a write barrier before writing libgcc_s_getcfa.
3047 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3049         * sysdeps/unix/sysv/linux/configure: Removed.
3051 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3053         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3054         optional init_array/fini_array support.
3056 2005-10-24  Roland McGrath  <roland@redhat.com>
3058         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3059         versioned_symbol use.
3061 2005-10-16  Roland McGrath  <roland@redhat.com>
3063         * init.c (__pthread_initialize_minimal_internal): Even when using a
3064         compile-time default stack size, apply the minimum that allocate_stack
3065         will require, and round up to page size.
3067 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3069         * Makefile ($(test-modules)): Remove static pattern rule.
3071 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3072             Ulrich Drepper  <drepper@redhat.com>
3074         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3075         alignment in callback function.
3076         * Makefile: Add rules to build and run tst-align3.
3077         * tst-align3.c: New file.
3079 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3081         * allocatestack.c (setxid_signal_thread): Add
3082         INTERNAL_SYSCALL_DECL (err).
3084 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3086         * allocatestack.c (setxid_signal_thread): Need to use
3087         atomic_compare_and_exchange_bool_acq.
3089 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3090             Jakub Jelinek  <jakub@redhat.com>
3092         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3093         CANCEL_RESTMASK.
3094         (struct pthread): Move specific_used field to avoid padding.
3095         Add setxid_futex field.
3096         * init.c (sighandler_setxid): Reset setxid flag and release the
3097         setxid futex.
3098         * allocatestack.c (setxid_signal_thread): New function.  Broken
3099         out of the bodies of the two loops in __nptl_setxid.  For undetached
3100         threads check whether they are exiting and if yes, don't send a signal.
3101         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3102         * pthread_create.c (start_thread): For undetached threads, check
3103         whether setxid bit is set.  If yes, wait until signal has been
3104         processed.
3106         * allocatestack.c (STACK_VARIABLES): Initialize them.
3107         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3109 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3111         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3112         waiters, awake all waiters on the associated mutex.
3114 2005-09-22  Roland McGrath  <roland@redhat.com>
3116         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3117         ../sysdeps/x86_64/hp-timing.h).
3119 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3121         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3122         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3123         (lll_futex_wake_unlock): Define.
3124         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3125         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3126         (lll_futex_wake_unlock): Define.
3127         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3128         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3129         (lll_futex_wake_unlock): Define.
3130         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3131         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3132         (lll_futex_wake_unlock): Define.
3133         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3134         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3135         (lll_futex_wake_unlock): Define.
3136         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3137         lll_futex_wake_unlock.
3138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3139         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3140         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3141         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3142         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3143         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3145 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3147         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3148         Fix typo in register name.
3150 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3152         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3153         Use __sigfillset.  Document that sigfillset does the right thing wrt
3154         to SIGSETXID.
3156 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3158         [BZ #1102]
3159         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3160         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3161         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3162         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3163         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3164         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3165         in the structure.
3166         * Makefile (tests): Add tst-initializers1.
3167         (CFLAGS-tst-initializers1.c): Set.
3168         * tst-initializers1.c: New test.
3170 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3172         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3173         Make sure __flags are located at offset 48 from the start of the
3174         structure.
3176 2005-07-02  Roland McGrath  <roland@redhat.com>
3178         * Makeconfig: Comment fix.
3180 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3182         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3183         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3184         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3185         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3186         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3187         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3188         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3189         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3190         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3191         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3193 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3195         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3196         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3197         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3198         fields.
3199         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3200         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3201         field.  Put in sysinfo field unconditionally.
3202         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3203         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3204         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3205         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3206         fields.
3207         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3208         * pthread_create.c (__pthread_create_2_1): Use
3209         THREAD_COPY_STACK_GUARD macro.
3210         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3211         tests.
3212         * tst-stackguard1.c: New file.
3213         * tst-stackguard1-static.c: New file.
3215 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3217         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3218         Invoke CGOTSETUP and CGOTRESTORE.
3219         (CGOTSETUP, CGOTRESTORE): Define.
3221 2005-05-29  Richard Henderson  <rth@redhat.com>
3223         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3224         (tf_write, tf_writev): Use it.
3225         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3226         the system minimum.
3228 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3230         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3231         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3232         __librt_*_asynccancel@local.
3234 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3236         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3237         all occurrences of JUMPTARGET.  Instead append @local to labels.
3239 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3241         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3242         size/alignment of struct pthread rather than tcbhead_t.
3243         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3244         Likewise.
3245         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3246         Likewise.
3247         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3248         Likewise.
3250 2005-05-19  Richard Henderson  <rth@redhat.com>
3252         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3253         __sync_val_compare_and_swap, not explicit _si variant.
3254         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3256 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3258         [BZ #915]
3259         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3261 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3263         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3264         .eh_frame section, use cfi_* directives.
3266 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3268         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3269         of "" includes.
3271 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3273         [BZ #1075]
3274         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3275         aio_write blocks.
3277 2005-04-27  Roland McGrath  <roland@redhat.com>
3279         * Makefile (tests): Remove tst-clock2.
3281         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3282         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3283         translating to the kernel clockid_t for our own process/thread clock.
3285         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3287 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3289         * old_pthread_cond_init.c: Include <errno.h>.
3290         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3291         process shared or uses clock other than CLOCK_REALTIME.
3292         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3294 2005-04-13  David S. Miller  <davem@davemloft.net>
3296         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3297         * sysdeps/sparc/sparc64/clone.S: New file.
3299 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3301         [BZ #1102]
3302         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3303         __inline instead of inline.
3304         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3306 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3308         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3309         functionally equivalent, but shorter instructions.
3310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3311         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3312         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3313         Likewise.
3314         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3315         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3316         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3317         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3318         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3319         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3320         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3321         Likewise.
3322         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3323         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3324         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3325         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3326         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3328 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3330         * sysdeps/mips/Makefile: New file.
3331         * sysdeps/mips/nptl-sysdep.S: New file.
3332         * sysdeps/mips/tcb-offsets.sym: New file.
3333         * sysdeps/mips/pthread_spin_lock.S: New file.
3334         * sysdeps/mips/pthread_spin_trylock.S: New file.
3335         * sysdeps/mips/pthreaddef.h: New file.
3336         * sysdeps/mips/tls.h: New file.
3337         * sysdeps/mips/jmpbuf-unwind.h: New file.
3338         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3339         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3340         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3341         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3342         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3343         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3344         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3345         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3346         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3347         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3349 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3351         [BZ #1112]
3352         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3353         variable to scerr.
3355 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3357         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3359 2005-02-25  Roland McGrath  <roland@redhat.com>
3361         * alloca_cutoff.c: Correct license text.
3362         * tst-unload.c: Likewise.
3363         * sysdeps/pthread/allocalim.h: Likewise.
3364         * sysdeps/pthread/pt-initfini.c: Likewise.
3365         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3366         * sysdeps/pthread/bits/sigthread.h: Likewise.
3367         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3368         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3370 2005-02-16  Roland McGrath  <roland@redhat.com>
3372         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3373         Use unsigned int * for ptr_nthreads.
3375 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3377         [BZ #721]
3378         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3379         gcc4.
3381 2005-02-07  Richard Henderson  <rth@redhat.com>
3383         [BZ #787]
3384         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3385         argument.
3387 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3389         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3390         order of arguments in invocation of atomic_add_zero.
3392 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3394         [BZ #737]
3395         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3396         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3397         at least gotntpoff relocation and addition.
3398         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3399         Likewise.
3400         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3401         Likewise.
3402         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3403         Likewise.
3405 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3407         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3408         entry for static tls deallocation fix.
3409         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3410         also contains information whether the memory pointed to is static
3411         TLS or not.
3412         * sysdeps/i386/tls.h: Likewise.
3413         * sysdeps/ia64/tls.h: Likewise.
3414         * sysdeps/powerpc/tls.h: Likewise.
3415         * sysdeps/s390/tls.h: Likewise.
3416         * sysdeps/sh/tls.h: Likewise.
3417         * sysdeps/sparc/tls.h: Likewise.
3418         * sysdeps/x86_64/tls.h: Likewise.
3420 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3422         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3424 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3426         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3427         %esp.
3428         * Makefile (tests): Add tst-align2.
3429         * tst-align2.c: New test.
3430         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3431         -mpreferred-stack-boundary=4.
3433 2004-12-18  Roland McGrath  <roland@redhat.com>
3435         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3436         New file removed withdrawn for the moment.
3438 2004-12-17  Richard Henderson  <rth@redhat.com>
3440         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3441         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3443 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3445         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3446         Increased PTHREAD_STACK_MIN.
3448         * tst-context1.c (stacks): Use bigger stack size.
3450 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3452         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3453         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3455 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3457         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3458         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3459         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3461 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3463         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3465 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3467         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3468         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3470         * tst-getpid1.c: If child crashes, report this first.  Print which
3471         signal.
3473 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3475         * init.c (__pthread_initialize_minimal_internal): Also unblock
3476         SIGSETXID.
3478 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3480         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3481         _POSIX_THREAD_CPUTIME): Define to 0.
3482         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3483         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3484         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3485         __timer_signal_thread_tclk): Remove.
3486         (init_module): Remove their initialization.
3487         (thread_cleanup): Remove their cleanup assertions.
3488         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3489         __timer_signal_thread_tclk): Remove.
3490         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3491         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3492         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3494 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3496         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3497         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3499         * Makefile (tests): Add tst-getpid2.
3500         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3501         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3502         * tst-getpid2.c: New test.
3504 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3506         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3508 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3510         * Makefile (tests): Add tst-getpid1.
3511         * tst-getpid1.c: New file.
3512         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3513         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3515 2004-12-02  Roland McGrath  <roland@redhat.com>
3517         * Makefile (libpthread-nonshared): Variable removed.
3518         ($(objpfx)libpthread_nonshared.a): Target removed.
3519         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3520         These are now handled by generic magic from
3521         libpthread-static-only-routines being set.
3523 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3525         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3526         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3527         _POSIX_THREAD_PRIO_PROTECT): Define.
3528         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3529         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3530         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3532 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3534         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3535         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3536         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3537         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3538         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3539         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3540         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3542 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3544         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3546         * Makefile (libpthread-routines): Add pthread_setschedprio.
3547         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3548         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3549         * pthread_setschedprio.c: New file.
3551 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3553         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3554         * pthread_cancel.c (pthread_create): Likewise.
3556         * Makefile (libpthread-routines): Add vars.
3557         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3558         * init.c (__default_stacksize, __is_smp): Remove.
3559         * vars.c: New file.
3560         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3561         and define a wrapper macro.
3562         (PTHREAD_STATIC_FN_REQUIRE): Define.
3563         * allocatestack.c (__find_thread_by_id): Undefine.
3564         * pthread_create (__pthread_keys): Remove.
3565         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3566         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3567         PTHREAD_STATIC_FN_REQUIRE.
3569 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3571         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3572         parameter to REGISTER macro.
3574 2004-11-17  Roland McGrath  <roland@redhat.com>
3576         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3577         Make sure SIGCANCEL is blocked as well.
3579 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3581         * sysdeps/pthread/setxid.h: New file.
3582         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3583         (struct xid_command): Add forward decl.
3584         (struct pthread_functions): Change return type of __nptl_setxid hook
3585         to int.
3586         * pthreadP.h (__nptl_setxid): Change return type to int.
3587         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3588         calling thread, return its return value and set errno on failure.
3589         * descr.h (struct xid_command): Change id type to long array.
3591         * Makefile: Add rules to build and test tst-setuid1 and
3592         tst-setuid1-static.
3593         * tst-setuid1.c: New test.
3594         * tst-setuid1-static.c: New test.
3596 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3598         * Makefile (tests): Add tst-exit3.
3599         * tst-exit3.c: New test.
3601 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3603         * Makefile (tests): Add tst-exit2.
3604         * tst-exit2.c: New file.
3606 2004-11-09  Roland McGrath  <roland@redhat.com>
3608         [BZ #530]
3609         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3610         here, before calling clone.
3611         * pthread_create.c (start_thread): Don't do it here.
3613 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3615         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3617 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3619         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3620         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3621         assembler warning.
3623 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3625         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3626         if sched_priority is not between minprio and maxprio.
3628 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3630         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3631         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3633         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3634         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3636 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3638         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3639         not-cancelable I/O functions.
3641 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3643         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3644         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3645         make sure 2 is stored in the futex and we looked at the old value.
3646         Fix a few other problems to return the correct value.
3648 2004-10-14  Richard Henderson  <rth@redhat.com>
3650         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3651         make gcc4 happy.
3653 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3655         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3656         of pthread-functions.h and pthreaddef.h.
3657         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3659         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3660         Change __data.__nwaiters from int to unsigned int.
3662         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3663         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3665         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3666         before return type.
3668         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3669         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3671 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3673         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3674         test fails, remove message queue.
3675         (tf_msgsnd): Likewise.
3677 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3679         * tst-clock1.c: Change #ifdef to #if defined.
3680         * tst-clock2.c: Likewise.
3681         * tst-cond11.c: Likewise.
3683         * sysdeps/pthread/timer_create.c (timer_create): Use
3684         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3685         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3686         THREAD_CPUTIME.
3688 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3690         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3691         _POSIX_THREAD_CPUTIME): Define to 0.
3693 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3695         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3696         and _POSIX_THREAD_CPUTIME to zero.
3697         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3698         * tst-barrier2.c: Fix testing for POSIX feature.
3699         * tst-clock1.c: Likewise.
3700         * tst-clock2.c: Likewise.
3701         * tst-cond11.c: Likewise.
3702         * tst-cond4.c: Likewise.
3703         * tst-cond6.c: Likewise.
3704         * tst-flock2.c: Likewise.
3705         * tst-mutex4.c: Likewise.
3706         * tst-mutex9.c: Likewise.
3707         * tst-rwlock12.c: Likewise.
3708         * tst-rwlock4.c: Likewise.
3709         * tst-signal1.c: Likewise.
3710         * tst-spin2.c: Likewise.
3711         * sysdeps/pthread/posix-timer.h: Likewise.
3712         * sysdeps/pthread/timer_create.c: Likewise.
3713         * sysdeps/pthread/timer_routines.c: Likewise.
3715 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3717         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3718         (__lll_mutex_timedlock_wait): Address futex correctly.
3720         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3721         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3722         make sure 2 is stored in the futex and we looked at the old value.
3723         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3724         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3725         which might very well made the code not working at all before.
3726         [BZ #417]
3728 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3730         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3731         allow SIGSETXID to be sent.
3732         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3733         for SIGSETXID to be defined.
3734         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3735         SIGSETXID cannot be blocked.
3737         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3738         Add __extension__ to long long types.
3739         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3740         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3741         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3742         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3743         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3744         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3745         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3747 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3749         * descr.h (struct pthread): Add stopped_start field.
3750         * sysdeps/pthread/createthread.c (create_thread): Set
3751         start_stopped flag in descriptor for new thread appropriately.
3752         * pthread_create.c (start_thread): Only take lock to be stopped on
3753         startup if stopped_start flag says so.
3755 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3757         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3758         is created detached and if yes, do not try to free the stack in case
3759         the thread creation failed.
3760         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3761         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3762         case there has been no error.  [BZ #405]
3764         * pthread_create.c (start_thread): Don't wait for scheduler data
3765         etc to be set at the beginning of the function.  The cancellation
3766         infrastructure must have been set up.  And enable async
3767         cancellation before potentially going to sleep.  [BZ #401]
3769 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3771         * Versions: Remove exports for pthread_set*id_np functions.
3772         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3773         for now.
3774         * Makefile: Don't build pthread_set*id code for now.
3776 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3778         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3779         internal use.
3780         * allocatestack.c (__nptl_setxid): New function.
3781         * descr.h (struct xid_command): Define type.
3782         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3783         (sighandler_setxid): New function.
3784         (__pthread_initialize_minimal): Register sighandler_setxid for
3785         SIGCANCEL.
3786         * pt-allocrtsig.c: Update comment.
3787         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3788         Declare __nptl_setxid.
3789         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3790         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3791         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3792         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3793         and pthread_setresuid_np.
3794         * pthread_setgid_np.c: New file.
3795         * pthread_setuid_np.c: New file.
3796         * pthread_setegid_np.c: New file.
3797         * pthread_seteuid_np.c: New file.
3798         * pthread_setregid_np.c: New file.
3799         * pthread_setreuid_np.c: New file.
3800         * pthread_setresgid_np.c: New file.
3801         * pthread_setresuid_np.c: New file.
3802         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3803         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3804         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3805         and pthread_setresuid_np.
3806         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3807         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3808         pthread_setregid, and pthread_setresgid.
3810 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3812         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3813         ENOMEM when out of memory.
3815 2004-09-10  Roland McGrath  <roland@redhat.com>
3817         [BZ #379]
3818         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3819         code, since we don't try to use the broken CLONE_STOPPED any more.
3820         * pthread_create.c (start_thread): Likewise.
3822 2004-09-15  Richard Henderson  <rth@redhat.com>
3824         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3826 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3828         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3829         (__libc_unwind_longjmp): Delete macro and declare as function.
3830         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3831         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3832         nptl directory.
3833         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3834         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3835         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3837 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3839         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3840         for __USE_XOPEN2K.
3841         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3842         types also for __USE_XOPEN2K.
3843         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3844         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3845         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3846         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3847         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3848         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3849         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3850         [BZ #320]
3852 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3854         * sysdeps/pthread/pthread.h
3855         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3856         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3857         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3858         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3859         [BZ #375]
3861 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3863         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3864         PSEUDO to be used with . prefix.
3866         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3867         Use atomic_increment instead of atomic_exchange_and_add.
3868         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3869         Likewise.
3870         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3871         Likewise.
3872         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3873         Likewise.
3875         * allocatestack.c (allocate_stack): Use atomic_increment_val
3876         instead of atomic_exchange_and_add.
3877         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3878         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3879         Likewise.
3880         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3881         Likewise.
3883         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3884         the initialization function might throw.
3886 2005-09-05  Richard Henderson  <rth@redhat.com>
3888         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3889         Move definition inside libpthread, libc, librt check.  Provide
3890         definition for rtld.
3892 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3894         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3895         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3896         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3897         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3898         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3899         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3900         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3901         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3902         * unwind.c: Use it.
3904         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3905         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3906         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3907         Likewise.
3908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3909         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3910         this is the last waiter, signal pthread_cond_destroy caller and
3911         avoid using the pthread_cond_t structure after unlock.
3912         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3914         Read clock type from the least significant bits of __nwaiters instead
3915         of __clock.
3916         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3917         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3919 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3921         [BZ #342]
3922         * Makefile (tests): Add tst-cond20 and tst-cond21.
3923         * tst-cond20.c: New test.
3924         * tst-cond21.c: New test.
3925         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3926         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3927         it unsigned int.
3928         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3929         Likewise.
3930         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3931         (pthread_cond_t): Likewise.
3932         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3933         Likewise.
3934         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3935         Likewise.
3936         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3937         Likewise.
3938         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3939         (cond_nwaiters): New.
3940         (clock_bits): New.
3941         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3942         if there are waiters not signalled yet.
3943         Wait until all already signalled waiters wake up.
3944         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3945         __nwaiters.  If pthread_cond_destroy has been called and this is the
3946         last waiter, signal pthread_cond_destroy caller and avoid using
3947         the pthread_cond_t structure after unlock.
3948         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3949         decrement it when leaving.  If pthread_cond_destroy has been called
3950         and this is the last waiter, signal pthread_cond_destroy caller.
3951         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3952         Likewise.  Read clock type from the least significant bits of
3953         __nwaiters instead of __clock.
3954         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3955         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3956         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3957         clock type just from the last COND_CLOCK_BITS bits of value.
3958         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3959         instead of __clock, just from second bit of condattr's value.
3961 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3963         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3964         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3965         != 64.
3966         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3968 2004-08-15  Roland McGrath  <roland@frob.com>
3970         * pthread_atfork.c: Update copyright terms including special exception
3971         for these trivial files, which are statically linked into executables
3972         that use dynamic linking for the significant library code.
3974 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3976         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3977         pthread_rwlock_rdlock.
3978         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3979         Decrease __nr_readers_queued after reacquiring lock.
3980         * sysdeps/pthread/pthread_rwlock_timedrdlock
3981         (pthread_rwlock_timedrdlock): Likewise.
3982         Reported by Bob Cook <bobcook47@hotmail.com>.
3984 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3986         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3987         before pthread_barrier_wait.
3989 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3992         Remove unnecessary exception handling data.
3994 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3996         [BZ #284]
3997         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3998         instead of clockid_t.
4000 2004-07-21  Roland McGrath  <roland@redhat.com>
4002         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4004 2004-07-19  Roland McGrath  <roland@redhat.com>
4006         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4008 2004-07-02  Roland McGrath  <roland@redhat.com>
4010         * configure: Don't exit.
4012 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4014         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4015         (__pthread_cond_timedwait): Check for invalid nanosecond in
4016         timeout value.
4018 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4020         * Makefile: Add rules to build and run tst-fini1.
4021         * tst-fini1.c: New file.
4022         * tst-fini1mod.c: New file.
4024 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4026         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4027         if no cancellation support is needed.
4028         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4029         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4030         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4031         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4032         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4033         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4034         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4035         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4036         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4038         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4039         only if not already defined.
4041 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4043         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4044         constraint "m" instead of "0" for futex.
4046         * shlib-versions: Add powerpc64-.*-linux.*.
4048 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4051         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4052         for valid tv_nsec.
4053         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4054         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4055         bits.
4057 2004-06-29  Roland McGrath  <roland@redhat.com>
4059         * Banner: NPTL no longer has its own version number.
4060         * Makefile (nptl-version): Variable removed.
4061         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4062         using $(version), the glibc version number.
4064 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4066         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4067         Fix branch offset for a PLT entry.
4068         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4069         Likewise.
4070         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4071         Likewise.
4072         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4073         Likewise.
4074         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4075         Likewise.
4077 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4079         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4080         unconditionally.
4082 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4084         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4085         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4086         instead of tv_sec.
4087         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4088         (pthread_rwlock_timedrdlock): Likewise.
4090 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4092         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4093         Set __r7 to val, not mutex.
4095 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4097         * Makefile: Add rules to build tst-rwlock14.
4098         * tst-rwlock14.c: New file.
4100 2004-06-24  Boris Hu  <boris.hu@intel.com>
4102         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4103         check.
4104         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4106 2004-06-19  Andreas Jaeger  <aj@suse.de>
4108         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4109         assembler in last patch.
4111 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4113         * sysdeps/pthread/pthread_cond_timedwait.c
4114         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4115         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4116         (__pthread_cond_timedwait): Check for invalid nanosecond in
4117         timeout value.
4118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4119         * tst-cond19.c: New file.
4120         * Makefile: Add rules to build and run tst-cond19.
4122 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4124         * tst-context1.c (GUARD_PATTERN): Defined.
4125         (tst_context_t): Define struct containing ucontext_t & guard words.
4126         (ctx): Declare as an array of tst_context_t.
4127         (fct): Verify uc_link & guard words are still valid.
4128         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4130 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4132         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4133         Add __data.__futex field, reshuffle __data.__clock.
4134         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4135         (__pthread_cond_signal): Increment __futex at the same time as
4136         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4137         address of low 32-bits of __wakeup_seq to futex syscall.
4138         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4139         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4140         releasing internal lock to FUTEX_WAIT.
4141         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4142         (__pthread_cond_timedwait): Likewise.
4143         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4144         (FUTEX_CMP_REQUEUE): Define.
4145         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4146         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4147         Pass __futex value from before the unlock and __futex address instead
4148         of address of low 32-bits of __wakeup_seq to futex syscall.
4149         Fallback to FUTEX_WAKE all on any errors.
4151 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4153         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4154         comment typo.
4155         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4156         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4157         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4158         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4159         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4161 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4163         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4164         Add memory clobber to inline assembly.
4165         (__lll_mutex_trylock): Likewise.
4166         (__lll_mutex_cond_trylock): Likewise.
4168 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4170         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4171         Pass val argument as 6th system call argument in %r7.
4173 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4175         * Makefile (tests): Add tst-cond16.
4176         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4177         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4178         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4179         Add __data.__futex field, reshuffle __data.__clock.
4180         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4181         (__pthread_cond_signal): Increment __futex at the same time as
4182         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4183         address of low 32-bits of __wakeup_seq to futex syscall.
4184         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4185         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4186         releasing internal lock to FUTEX_WAIT.
4187         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4188         (__pthread_cond_timedwait): Likewise.
4189         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4190         (FUTEX_CMP_REQUEUE): Define.
4191         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4192         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4193         Pass __futex value from before the unlock and __futex address instead
4194         of address of low 32-bits of __wakeup_seq to futex syscall.
4195         Fallback to FUTEX_WAKE all on any errors.
4196         * sysdeps/unix/sysv/linux/alpha/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/alpha/bits/pthreadtypes.h (pthread_cond_t):
4201         Add __data.__futex field, reshuffle __data.__clock.
4202         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4203         Define.
4204         (lll_futex_requeue): Add val argument, return 1 unconditionally
4205         for the time being.
4206         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4207         Add __data.__futex field, reshuffle __data.__clock.
4208         * sysdeps/unix/sysv/linux/powerpc/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/powerpc/bits/pthreadtypes.h
4213         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4214         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4215         Define.
4216         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4217         internally.  Return non-zero if error, zero if success.
4218         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4219         Add __data.__futex field, reshuffle __data.__clock.
4220         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4221         Define.
4222         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4223         internally.  Return non-zero if error, zero if success.
4224         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4225         Add __data.__futex field, reshuffle __data.__clock.
4226         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4227         Add __data.__futex field, reshuffle __data.__clock.
4228         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4229         Increment __futex at the same time as __wakeup_seq or __total_seq.
4230         Pass address of __futex instead of address of low 32-bits of
4231         __wakeup_seq to futex syscall.
4232         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4233         Pass __futex value from before releasing internal lock
4234         to FUTEX_WAIT.
4235         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4236         Likewise.  Avoid unnecessary shadowing of variables.
4237         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4238         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4239         unlock and __futex address instead of address of low 32-bits of
4240         __wakeup_seq to futex_requeue macro, adjust for new return value
4241         meaning.
4242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4243         (__pthread_cond_signal): Increment __futex at the same time as
4244         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4245         address of low 32-bits of __wakeup_seq to futex syscall.
4246         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4247         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4248         releasing internal lock to FUTEX_WAIT.
4249         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4250         (__pthread_cond_timedwait): Likewise.
4251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4252         (FUTEX_CMP_REQUEUE): Define.
4253         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4254         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4255         Pass __futex value from before the unlock and __futex address instead
4256         of address of low 32-bits of __wakeup_seq to futex syscall.
4257         Fallback to FUTEX_WAKE all on any errors.
4259 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4261         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4262         Add nop to align the end of critical section.
4263         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4265 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4267         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4268         Add __broadcast_seq field.
4269         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4270         all waiters as woken with woken_seq and bump broadcast counter.
4271         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4272         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4273         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4274         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4276 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4279         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4280         Reported by Kaz Kojima.
4282 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4284         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4286 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4288         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4289         __broadcast_seq with bc_seq after acquiring internal lock instead of
4290         before it.
4292 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4294         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4295         compilation.
4296         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4297         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4298         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4299         (pthread_cond_t): Add __data.__broadcast_seq field.
4300         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4301         (FRAME_SIZE): Define.
4302         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4303         Comment typo fixes.
4304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4305         Define.
4306         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4307         typo fixes.
4308         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4309         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4310         fixes.
4312 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4314         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4315         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4316         Add __broadcast_seq field.
4317         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4318         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4319         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4320         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4321         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4323         all waiters as woken with woken_seq and bump broadcast counter.
4324         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4326         __broadcast_seq field.
4327         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4328         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4329         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4330         * pthread_cond_init.c: Initialize __broadcast_seq field.
4331         * Makefile (tests): Add tst-cond17 and tst-cond18.
4332         Add .NOTPARALLEL goal.
4333         * tst-cond16.c: New file.  From Jakub.
4334         * tst-cond17.c: New file.  From Jakub.
4335         * tst-cond18.c: New file.  From Jakub.
4337 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4339         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4340         unwind info.
4342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4343         Parametrize frame size.  Correct some unwind info.
4344         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4346 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4348         * tst-stack3.c: Note testing functionality beyond POSIX.
4350 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4352         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4353         Change conditional from ifdef to if.
4355 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4357         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4358         SYSDEP_CANCEL_ERROR): Define.
4359         (PSEUDO): Use it.
4361 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4363         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4365 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4367         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4369 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4371         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4372         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4373         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4374         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4376 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4378         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4379         thread has all signals blocked.
4381 2004-04-18  Andreas Jaeger  <aj@suse.de>
4383         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4384         (SEM_VALUE_MAX): Add missing brace.
4386 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4388         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4389         in rt subdir.
4390         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4391         * sysdeps/pthread/tst-mqueue8x.c: New test.
4392         * tst-cancel4.c: Update comment about message queues.
4394         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4395         return it_value { 0, 0 }.
4396         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4397         like SIGEV_SIGNAL.
4398         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4399         assertion for SIGEV_NONE.
4400         (thread_attr_compare): Compare all attributes, not just a partial
4401         subset.
4403 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4405         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4407 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4409         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4410         Just use a plain number.
4411         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4412         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4413         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4414         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4415         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4416         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4417         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4419 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4421         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4422         frame info.
4423         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4425 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4427         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4428         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4429         of calling sigwaitinfo.
4431 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4433         * allocatestack.c (allocate_stack): Set reported_guardsize
4434         unconditionally.
4435         * pthread_getattr_np.c (pthread_getattr_np): Use
4436         reported_guardsize instead of guardsize.
4437         * descr.h (struct pthread): Add reported_guardsize field.
4439 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4441         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4443 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4445         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4447 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4449         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4450         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4451         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4452         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4453         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4454         Define.
4455         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4456         (_POSIX_MESSAGE_PASSING): Define.
4457         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4458         (_POSIX_MESSAGE_PASSING): Define.
4459         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4460         (_POSIX_MESSAGE_PASSING): Define.
4462 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4464         * tst-context1.c (fct): Check whether correct stack is used.
4466 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4468         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4469         matching constraints for asm mem parameters.
4471         * tst-clock2.c (tf): Don't define unless needed.
4473 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4475         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4476         $(gnulib).
4478 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4480         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4481         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4482         * pthreadP.h: Declare __nptl_deallocate_tsd.
4483         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4484         Adjust caller.
4486         * Makefile (tests): Add tst-tsd5.
4487         * tst-tsd5.c: New file.
4489 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4491         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4492         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4493         is SHLIB_COMPAT check.
4494         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4495         (__pthread_attr_getaffinity_old): Likewise.
4496         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4497         (__pthread_getaffinity_old): Likewise.
4498         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4499         (__pthread_setaffinity_old): Likewise.
4501 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4503         * allocatestack.c (_make_stacks_executable): Call
4504         _dl_make_stack_executable first.
4506 2004-03-24  Roland McGrath  <roland@redhat.com>
4508         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4509         constraint instead of "0".
4511 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4513         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4514         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4516         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4517         code to avoid warning.
4519 2004-03-24  Andreas Jaeger  <aj@suse.de>
4521         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4522         (__pthread_attr_setaffinity_old): Remove const.
4524 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4526         * sysdeps/unix/sysv/linux/smp.h: New file.
4527         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4528         * init.c: Define __is_smp.
4529         (__pthread_initialize_minimal_internal): Call is_smp_system to
4530         initialize __is_smp.
4531         * pthreadP.h: Declare __is_smp.
4532         Define MAX_ADAPTIVE_COUNT is necessary.
4533         * pthread_mutex_init.c: Add comment regarding __spins field.
4534         * pthread_mutex_lock.c: Implement adaptive mutex type.
4535         * pthread_mutex_timedlock.c: Likewise.
4536         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4537         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4538         Add __spins field.
4539         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4540         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4541         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4542         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4543         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4544         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4545         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4546         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4547         lll_mutex_cond_trylock.
4548         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4549         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4550         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4551         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4552         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4553         Define BUSY_WAIT_NOP.
4554         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4555         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4557         * tst-mutex5.c: Add support for testing adaptive mutexes.
4558         * tst-mutex7.c: Likewise.
4559         * tst-mutex5a.c: New file.
4560         * tst-mutex7a.c: New file.
4561         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4563         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4564         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4565         vgettimeofday call might destroy the content.
4567         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4568         @pause in the loop.
4570         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4571         No need to restrict type of ret.  Make it int.  Add comment.
4573         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4574         Remove unnecessary setne instruction.
4576 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4578         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4579         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4580         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4581         If realloc fails, break out of the loop.
4583 2004-03-20  Andreas Jaeger  <aj@suse.de>
4585         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4586         (__pthread_setaffinity_old): Fix interface.
4587         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4588         (__pthread_getaffinity_old): Likewise.
4590         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4591         (__pthread_setaffinity_new): Remove duplicate declaration.
4593 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4595         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4596         the return value to a safe register.
4597         (CDISABLE): Set the function argument correctly.
4599 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4601         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4602         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4603         Rewrite so that only one locked memory operation per round is needed.
4604         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4605         (pthread_barrier_wait): After wakeup, release lock only when the
4606         last thread stopped using the barrier object.
4607         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4608         (__pthread_cond_wait): Don't store mutex address if the current
4609         value is ~0l.  Add correct cleanup support and unwind info.
4610         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4611         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4612         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4613         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4614         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4615         Add correct cleanup support and unwind info.
4616         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4617         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4618         information for syscall wrappers.
4620 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4622         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4623         cpusetsize field, remove next.
4624         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4625         parameter for size of the CPU set.
4626         (pthread_setaffinity_np): Likewise.
4627         (pthread_attr_getaffinity_np): Likewise.
4628         (pthread_attr_setaffinity_np): Likewise.
4629         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4630         interface change, keep compatibility code.
4631         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4632         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4633         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4634         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4635         __pthread_getaffinity_np.
4636         * Versions: Add version for changed interfaces.
4637         * tst-attr3.c: Adjust test for interface change.
4638         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4639         increasing buffer sizes.
4640         * pthread_attr_destroy.c: Remove unused list handling.
4641         * pthread_attr_init.c: Likewise.
4643 2004-03-17  Roland McGrath  <roland@redhat.com>
4645         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4646         first argument to clock_getres so we ever enable kernel timers.
4648 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4650         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4652 2004-03-12  Richard Henderson  <rth@redhat.com>
4654         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4655         oldvalue from CENABLE to CDISABLE.
4657 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4659         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4660         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4661         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4662         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4664 2004-03-11  Richard Henderson  <rth@redhat.com>
4666         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4667         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4668         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4670 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4672         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4673         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4674         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4676 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4678         * forward.c (__pthread_cond_broadcast_2_0,
4679         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4680         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4681         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4683 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4685         * sysdeps/sh/tcb-offsets.sym: Add PID.
4686         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4687         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4689 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4691         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4692         include <sysdep-cancel.h>, vfork is no cancellation point.
4693         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4694         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4695         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4697 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4699         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4700         libc_hidden_def.
4701         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4702         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4703         Likewise.
4704         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4705         Likewise.
4706         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4707         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4708         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4709         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4710         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4712         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4713         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4714         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4715         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4716         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4717         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4719         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4720         a local register for saving old PID.  Negate PID in parent upon exit.
4722         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4723         tcb-offsets.h.
4724         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4725         before syscall, set to the old value in the parent afterwards.
4726         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4727         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4728         tcb-offsets.h.
4729         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4730         before syscall, set to the old value in the parent afterwards.
4731         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4732         * sysdeps/s390/tcb-offsets.sym: Add PID.
4734         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4735         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4736         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4737         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4738         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4739         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4741 2004-03-10  Andreas Schwab  <schwab@suse.de>
4743         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4744         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4745         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4747 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4749         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4750         * tst-cancel21.c (do_one_test): Likewise.
4751         Reported by Gordon Jin <gordon.jin@intel.com>.
4753 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4755         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4756         if non-zero and set to INT_MIN if zero.
4757         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4758         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4759         (SAVE_PID, RESTORE_PID): Define.
4760         (__vfork): Use it.
4761         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4762         Use relative path to avoid including NPTL i386/vfork.S.
4763         (SAVE_PID, RESTORE_PID): Define.
4764         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4765         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4766         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4767         tst-vfork2x.
4768         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4769         * tst-vfork1.c: New test.
4770         * tst-vfork2.c: New test.
4771         * tst-vfork1x.c: New test.
4772         * tst-vfork2x.c: New test.
4774 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4776         * sysdeps/i386/tcb-offsets.sym: Add PID.
4777         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4778         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4779         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4781 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4783         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4785 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4787         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4788         _rtld_global_ro.
4790 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4792         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4793         _rtld_global_ro.
4795         * tst-once4.c: Remove unnecessary macro definition.
4797         * tst-mutex7.c (do_test): Limit thread stack size.
4798         * tst-once2.c (do_test): Likewise.
4799         * tst-tls3.c (do_test): Likewise.
4800         * tst-tls1.c (do_test): Likewise.
4801         * tst-signal3.c (do_test): Likewise.
4802         * tst-kill6.c (do_test): Likewise.
4803         * tst-key4.c (do_test): Likewise.
4804         * tst-join4.c (do_test): Likewise.
4805         * tst-fork1.c (do_test): Likewise.
4806         * tst-context1.c (do_test): Likewise.
4807         * tst-cond2.c (do_test): Likewise.
4808         * tst-cond10.c (do_test): Likewise.
4809         * tst-clock2.c (do_test): Likewise.
4810         * tst-cancel10.c (do_test): Likewise.
4811         * tst-basic2.c (do_test): Likewise.
4812         * tst-barrier4.c (do_test): Likewise.
4814 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4816         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4818 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4821         (__pthread_cond_timedwait): Optimize wakeup test.
4822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4823         (__pthread_cond_wait): Likewise.
4824         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4825         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4826         Likewise.
4828 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4830         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4831         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4832         the atomic instruction needed.
4833         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4834         (__lll_mutex_lock_wait): Likewise.
4836 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4838         * Makefile (tests): Add tst-cond14 and tst-cond15.
4839         * tst-cond14.c: New file.
4840         * tst-cond15.c: New file.
4842 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4844         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4845         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4846         needs to be implemented differently to be useful.
4848 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4850         * pthread_attr_setschedparam.c: Don't test priority against limits
4851         here.  Set ATTR_FLAG_SCHED_SET flag.
4852         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4853         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4854         from parent thread to child.  If attribute is used and scheduling
4855         parameters are not inherited, copy parameters from attribute or
4856         compute them.  Check priority value.
4857         * pthread_getschedparam.c: If the parameters aren't known yet get
4858         them from the kernel.
4859         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4860         ATTR_FLAG_POLICY_SET flag for thread.
4861         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4862         and ATTR_FLAG_POLICY_SET.
4864         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4866         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4867         fail if stack address hasn't been set.  Just return 0.
4869 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4871         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4872         libpthread for the files in this list.
4873         (CFLAGS-tst-unload): Removed.
4874         * tst-unload.c (do_test): Don't use complete path for
4875         LIBPHREAD_SO.
4877         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4878         tst-_res1mod2.
4880 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4882         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4883         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4884         operation per round is needed.
4885         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4886         (__lll_mutex_lock_wait): Likewise.
4888 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4890         * tst-cancel9.c (cleanup): Don't print to stderr.
4892 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4894         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4896 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4898         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4899         (__syscall_error_handler2): Call CDISABLE.
4900         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4901         (__syscall_error_handler2): Call CDISABLE.
4903         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4904         Release lock before the loop, don't reacquire it.
4906         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4908 2004-02-19  Andreas Schwab  <schwab@suse.de>
4910         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4911         Fix last change.
4913 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4915         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4916         (pthread_barrier_wait): After wakeup, release lock only when the
4917         last thread stopped using the barrier object.
4918         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4919         (pthread_barrier_wait): Likewise.
4920         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4921         Likewise.
4922         * Makefile (tests): Add tst-barrier4.
4923         * tst-barrier4.c: New file.
4925         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4926         (__pthread_cond_timedwait): Perform timeout test while holding
4927         internal lock to prevent wakeup race.
4928         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4929         * sysdeps/pthread/pthread_cond_timedwait.c
4930         (__pthread_cond_timedwait): Likewise.
4931         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4932         (__pthread_cond_timedwait): Likewise.
4934 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4936         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4937         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4938         * Makefile (tests): Add tst-rwlock13.
4939         * tst-rwlock13.c: New test.
4941 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4944         (__condvar_tw_cleanup): Little optimization.
4945         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4947 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4949         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4950         libpthread as "lib" parameter to SHLIB_COMPAT.
4951         (__novmx_siglongjmp): Fix typo in function name.
4952         (__novmx_longjmp): Fix typo in function name.
4954 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4956         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4957         __builtin_expect.
4959         * sysdeps/generic/pt-longjmp.c: Moved to...
4960         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4962 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4964         * Makefile (libpthread-routines): Add pt-cleanup.
4965         * pt-longjmp.c: Removed.
4966         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4967         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4968         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4969         Version longjmp, siglongjmp for GLIBC_2.3.4.
4970         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4972 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4974         * sysdeps/pthread/pthread_cond_timedwait.c
4975         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4976         Reuse code.  Add __builtin_expects.
4978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4979         (__pthread_cond_timedwait): Get internal lock in case timeout has
4980         passed before the futex syscall.
4981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4983 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4985         * allocatestack.c: Pretty printing.
4987         * sysdeps/pthread/createthread.c (create_thread): Don't add
4988         CLONE_DETACHED bit if it is not necessary.
4990 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4992         * pthread_getattr_np.c: Include ldsodefs.h.
4994 2004-01-16  Richard Henderson  <rth@redhat.com>
4996         * allocatestack.c: Don't declare __libc_stack_end.
4997         * init.c (__pthread_initialize_minimal_internal): Likewise.
4998         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5000 2004-01-15  Richard Henderson  <rth@redhat.com>
5002         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5003         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5004         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5005         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5006         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5007         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5008         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5009         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5011 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5013         * init.c (pthread_functions): Make array const.
5015 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5017         * allocatestack.c (__make_stacks_executable): Change interface.
5018         Check parameters.  Pass parameter on to libc counterpart.
5019         * pthreadP.h: Change declaration.
5021 2004-01-13  Richard Henderson  <rth@redhat.com>
5023         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5024         prototype form.
5025         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5026         Likewise.
5028         * sysdeps/alpha/Makefile: New file.
5029         * sysdeps/alpha/tcb-offsets.sym: New file.
5030         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5031         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5033         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5034         on powerpc version.
5036 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5038         * Makefile (tests): Add tst-backtrace1.
5039         * tst-backtrace1.c: New test.
5041 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5043         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5044         register as second parameter to the REGISTER macro.
5045         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5046         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5047         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5048         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5049         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5050         of thread register as second parameter to REGISTER macro in 64 case.
5052 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5054         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5055         (CFLAGS-getpid.o): Defined.
5056         (CFLAGS-getpid.os): Defined.
5058 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5060         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5061         returned for main thread does not overlap with any other VMA.
5062         Patch by Jakub Jelinek.
5064 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5066         * tst-raise1.c: Include stdio.h.
5068 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5070         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5071         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5072         If pid is 0, set it to selftid.
5073         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5074         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5075         != 0, return self->tid without doing a syscall.
5076         * descr.h (struct pthread): Move pid field after tid.
5078         * Makefile (tests): Add tst-raise1.
5079         * tst-raise1.c: New file.
5081 2003-12-23  Roland McGrath  <roland@redhat.com>
5083         * tst-oddstacklimit.c: New file.
5084         * Makefile (tests): Add it.
5085         (tst-oddstacklimit-ENV): New variable.
5087         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5088         value up to page size for __default_stacksize.
5090 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5092         * Makefile (tests): Add tst-eintr5.
5093         * tst-eintr5.c: New file.
5095         * eintr.c (eintr_source): Prevent sending signal to self.
5097         * tst-eintr2.c (tf1): Improve error message.
5099 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5101         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5102         * sysdeps/unix/sysv/linux/getpid.c: New file.
5103         * pthread_cancel.c: Add comment explaining use of PID field.
5104         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5105         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5106         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5107         temporarily to signal the field must not be relied on and updated
5108         by getpid().
5109         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5110         temporarily negative.
5111         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5113 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5115         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5116         (eintr_source): If ARG != NULL, use pthread_kill.
5117         * tst-eintr1.c: Adjust for this change.
5118         * tst-eintr2.c: Likewise.
5119         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5120         * tst-eintr3.c: New file.
5121         * tst-eintr4.c: New file.
5123 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5125         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5126         if CANCELSTATE_BITMASK is set.
5127         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5128         Likewise.
5130         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5131         (tests-reverse): Add tst-cancel23.
5132         * tst-cancel22.c: New test.
5133         * tst-cancel23.c: New test.
5135 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5137         * tst-eintr1.c: Better error messages.
5139         * Makefile (tests): Add tst-eintr2.
5140         * tst-eintr2.c: New file.
5142 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5144         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5145         (CFLAGS-tst-cancelx21.c): Set.
5146         * tst-cancel21.c: New test.
5147         * tst-cancelx21.c: New test.
5149         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5150         comparison operand.
5151         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5152         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5153         * pt-longjmp.c: Include jmpbuf-unwind.h.
5154         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5155         _JMPBUF_UNWINDS.  Adjust compared pointers.
5156         * init.c (__pthread_initialize_minimal_internal): Initialize
5157         pd->stackblock_size.
5158         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5159         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5160         * sysdeps/i386/jmpbuf-unwind.h: New file.
5161         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5162         * sysdeps/s390/jmpbuf-unwind.h: New file.
5163         * sysdeps/sh/jmpbuf-unwind.h: New file.
5164         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5165         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5166         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5167         (_JMPBUF_CFA_UNWINDS): Remove.
5168         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5170 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5172         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5173         (CFLAGS-tst-cancelx20.c): Set.
5174         * tst-cancel20.c: New test.
5175         * tst-cancelx20.c: New test.
5177 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5179         * init.c (__pthread_initialize_minimal_internal): Don't treat
5180         architectures with separate register stack special here when
5181         computing default stack size.
5183 2003-12-17  Roland McGrath  <roland@redhat.com>
5185         * Makefile (tst-cancelx7-ARGS): New variable.
5186         Reportd by Greg Schafer <gschafer@zip.com.au>.
5188 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5190         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5191         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5192         (tst-stack3-ENV): Set.
5193         ($(objpfx)tst-stack3-mem): New.
5194         * tst-stack3.c: New test.
5196 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5198         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5199         Add unwind directives.  Drop unused .regstk directive.
5200         (_fini_EPILOG_BEGINS): Add unwind directives.
5202 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5204         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5205         Assume parameter is a pointer.
5206         (lll_futex_wake): Likewise.
5207         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5208         Likewise.
5209         (lll_futex_wake): Likewise.
5210         Reported by Boris Hu.
5211         * sysdeps/unix/sysv/linux/unregister-atfork.c
5212         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5214         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5216 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5218         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5219         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5220         __rtld_lock_initialize for ld.so lock.
5221         Patch in part by Adam Li <adam.li@intel.com>.
5223 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5225         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5226         in $(gnulib).  Also, remove stale comment.
5228 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5230         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5231         advantage of new syscall stub and optimize accordingly.
5233         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5234         from SYS_futex, to match expectations of
5235         sysdep.h:DO_INLINE_SYSCALL.
5236         (lll_futex_clobbers): Remove.
5237         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5238         (lll_futex_wake): Likewise.
5239         (lll_futex_requeue): Likewise.
5240         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5241         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5242         Jelinek).
5243         (__lll_mutex_lock): Likewise.
5244         (__lll_mutex_cond_lock): Likewise.
5245         (__lll_mutex_timed_lock): Likewise.
5246         (__lll_mutex_unlock): Likewise.
5247         (__lll_mutex_unlock_force): Likewise.
5249         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5250         comes before the include of <sysdep.h>.
5251         (THREAD_SELF_SYSINFO): New macro.
5252         (THREAD_SYSINFO): Likewise.
5253         (INIT_SYSINFO): New macro.
5254         (TLS_INIT_TP): Call INIT_SYSINFO.
5256         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5258         * sysdeps/pthread/createthread.c (create_thread): Use
5259         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5260         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5261         THREAD_SELF_SYSINFO instead of open code.
5262         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5263         (THREAD_SYSINFO): Likewise.
5265         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5267         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5269 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5271         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5272         instead of .init.  Patch by David Mosberger.
5274 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5276         * sysdeps/pthread/configure.in: Remove broken declaration in C
5277         cleanup handling check.
5279 2003-11-30  Andreas Jaeger  <aj@suse.de>
5281         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5282         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5283         Likewise.
5285 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5287         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5288         * pthread_attr_destroy.c: Include shlib-compat.h.
5289         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5290         is set in iattr->flags.
5291         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5293 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5295         * Makefile (distribute): Add tst-cleanup4aux.c.
5297         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5298         include.
5300 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5302         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5303         pthread_cond_signal.
5305         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5306         store mutex address if the current value is ~0l.
5307         * sysdeps/pthread/pthread_cond_timedwait.c
5308         (__pthread_cond_timedwait): Likewise.
5309         * sysdeps/pthread/pthread_cond_broadcast.c
5310         (__pthread_cond_broadcast): Don't use requeue for pshared
5311         condvars.
5313         * sysdeps/unix/sysv/linux/x86_64/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/x86_64/pthread_cond_timedwait.S
5317         (__pthread_cond_timedwait): Likewise.
5318         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5319         (__pthread_cond_broadcast): Don't use requeue for pshared
5320         condvars.
5322         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5323         element with ~0l for pshared condvars, with NULL otherwise.
5325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5326         (__pthread_cond_wait): Don't store mutex address if the current
5327         value is ~0l.
5328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5329         (__pthread_cond_timedwait): Likewise.
5330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5331         (__pthread_cond_broadcast): Don't use requeue for pshared
5332         condvars.
5334         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5335         * tst-cond12.c: New file.
5336         * tst-cond13.c: New file.
5338 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5340         * sysdeps/pthread/configure.in: Make missing forced unwind support
5341         fatal.
5343 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5345         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5347 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5349         * Makefile: Add magic to clean up correctly.
5351 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5353         * unwind.c (FRAME_LEFT): Define.
5354         (unwind_stop): Handle old style cleanups here.
5355         (__pthread_unwind): Handle old style cleanups only if
5356         !HAVE_FORCED_UNWIND.
5357         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5358         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5359         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5360         ($(objpfx)tst-cleanupx4): Likewise.
5361         * tst-cleanup4.c: New test.
5362         * tst-cleanup4aux.c: New.
5363         * tst-cleanupx4.c: New test.
5365 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5367         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5368         lll_mutex_*lock macros to skip atomic operations on some archs.
5370 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5372         * sysdeps/pthread/tst-timer.c (main): Initialize
5373         sigev2.sigev_value as well.
5375 2003-10-15  Roland McGrath  <roland@redhat.com>
5377         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5378         is missing.
5379         * sysdeps/pthread/configure: Regenerated.
5381 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5383         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5384         locking macros.  No distinction between normal and mutex locking
5385         anymore.
5386         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5387         Merge bits from lowlevelmutex.S we still need.
5388         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5389         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5390         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5391         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5392         new mutex implementation.
5393         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5394         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5395         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5396         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5397         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5398         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5399         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5400         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5401         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5402         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5403         symbol for entry point to avoid cancellation.
5405 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5407         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5408         changes.
5409         (SAVE_OLDTYPE_0): Fix a typo.
5411 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5413         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5414         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5416 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5418         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5419         correct offset.
5421 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5423         * Makefile (tests): Add tst-cancel19.
5424         * tst-cancel19.c: New test.
5426 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5428         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5429         restoring of the old cancellation type.
5431 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5433         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5435 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5437         * sysdeps/pthread/malloc-machine.h: New file
5439 2003-09-24  Roland McGrath  <roland@redhat.com>
5441         * allocatestack.c (__make_stacks_executable): Don't ignore return
5442         value from _dl_make_stack_executable.
5444 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5446         * allocatestack.c (__make_stacks_executable): Also change
5447         permission of the currently unused stacks.
5449         * allocatestack.c (change_stack_perm): Split out from
5450         __make_stacks_executable.
5451         (allocate_stack): If the required permission changed between the time
5452         we started preparing the stack and queueing it, change the permission.
5453         (__make_stacks_executable): Call change_stack_perm.
5455         * Makefile: Build tst-execstack-mod locally.
5456         * tst-execstack-mod.c: New file.
5458 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5460         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5462 2003-09-23  Roland McGrath  <roland@redhat.com>
5464         * tst-execstack.c: New file.
5465         * Makefile (tests): Add it.
5466         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5467         (LDFLAGS-tst-execstack): New variable.
5469         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5470         whether to use PROT_EXEC for stack mmap.
5471         (__make_stacks_executable): New function.
5472         * pthreadP.h: Declare it.
5473         * init.c (__pthread_initialize_minimal_internal): Set
5474         GL(dl_make_stack_executable_hook) to that.
5476 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5478         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5479         recommendation from AMD re avoidance of lock prefix.
5481 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5483         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5484         lll_futex_timed_wait instead of lll_futex_wait.
5485         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5486         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5487         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5488         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5489         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5490         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5491         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5492         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5493         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5494         Completely revamp the locking macros.  No distinction between
5495         normal and mutex locking anymore.
5496         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5497         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5498         __lll_lock_timedwait): Fix prototypes.
5499         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5500         __lll_lock_timedwait): Likewise.
5501         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5502         macros, add __builtin_expect.
5503         (lll_mutex_timedlock): Likewise.  Fix return value.
5504         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5505         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5506         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5507         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5508         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5509         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5510         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5511         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5513 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5515         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5516         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5517         operation if possible.
5519         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5520         like jumping over the lock prefix.
5522 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5524         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5525         locking macros.  No distinction between normal and mutex locking
5526         anymore.
5527         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5528         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5529         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5530         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5531         locking.  Merge bits from lowlevelmutex.S we still need.
5532         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5533         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5534         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5535         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5536         * Makefile (routines): Remove libc-lowlevelmutex.
5537         (libpthread-rountines): Remove lowlevelmutex.
5538         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5539         for new mutex implementation.
5540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5541         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5542         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5543         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5544         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5545         Likewise.
5546         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5547         Likewise.
5548         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5549         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5550         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5551         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5553         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5554         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5555         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5556         Likewise.
5557         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5558         Likewise.
5559         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5560         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5561         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5562         Don't use requeue.
5563         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5564         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5566 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5568         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5569         in parameters of asm with output parameters.
5571         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5572         type of DECR parameter to int.
5573         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5575 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5577         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5578         guardsize for each thread.
5580 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5582         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5583         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5584         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5586         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5587         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5588         NULL.
5589         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5590         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5591         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5592         (pthread_getaffinity_np): Add hidden_def.
5594         * Makefile (tests): Add tst-attr3.
5595         * tst-attr3.c: New test.
5597         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5599 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5601         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5602         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5604 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5606         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5607         * tst-align.c: Include tst-stack-align.h.
5608         (tf, do_test): Use TEST_STACK_ALIGN macro.
5610 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5612         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5613         variable.
5615 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5617         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5618         stack-related values for the initial thread.
5620 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5622         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5624 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5626         * pthread_mutex_lock.c: Minor code rearrangements.
5628 2003-09-05  Roland McGrath  <roland@redhat.com>
5630         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5631         Instead, include ../nptl_db/db_info.c to do its magic.
5632         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5633         (__pthread_pthread_key_2ndlevel_size): Likewise.
5634         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5635         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5636         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5637         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5638         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5639         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5640         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5641         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5642         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5643         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5644         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5645         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5646         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5647         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5648         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5649         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5650         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5652 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5654         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5655         of pthread_t to be compatible with LT.
5656         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5657         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5658         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5659         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5660         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5661         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5662         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5664 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5666         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5668 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5670         * unwind-forcedunwind.c: Move to...
5671         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5672         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5673         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5674         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5675         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5676         * unwind.c: Include jmpbuf-unwind.h.
5677         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5679 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5681         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5682         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5683         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5684         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5685         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5686         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5687         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5688         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5689         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5690         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5691         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5692         function.
5693         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5694         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5695         * Makefile (tests): Add tst-stack2.
5696         * tst-stack2.c: New test.
5697         * tst-stack1.c: Include limits.h and sys/param.h.
5698         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5700         * pthread_condattr_setpshared.c: Include errno.h.
5701         (pthread_condattr_setpshared): Return EINVAL if pshared
5702         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5704         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5705         defined symbol for entry point to avoid cancellation.
5706         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5707         Likewise.
5708         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5709         Likewise.
5710         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5711         Likewise.
5712         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5713         Likewise.
5714         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5715         Likewise.
5716         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5717         __close_nocancel, __read_nocancel, __write_nocancel,
5718         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5719         libpthread.so or librt.so, define to corresponding function
5720         without _nocancel suffix.
5721         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5722         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5723         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5725         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5727 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5729         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5730         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5732         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5733         in subsections has a symbol associated with it.
5735         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5736         defined symbol for entry point to avoid cancellation.
5737         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5739 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5741         * Makefile (tests): Add tst-tls5.
5742         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5743         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5744         ($(objpfx)tst-tls5): New.
5745         ($(objpfx)tst-tls6.out): Likewise.
5746         (tests): Depend on $(objpfx)tst-tls6.out.
5747         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5748         (do_test): Check pthread_self () return value alignment.
5749         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5750         (tf): Check pthread_self () return value alignment.
5751         * tst-tls5.c: New test.
5752         * tst-tls5.h: New.
5753         * tst-tls5mod.c: New.
5754         * tst-tls5moda.c: New.
5755         * tst-tls5modb.c: New.
5756         * tst-tls5modc.c: New.
5757         * tst-tls5modd.c: New.
5758         * tst-tls5mode.c: New.
5759         * tst-tls5modf.c: New.
5760         * tst-tls6.sh: New test.
5762         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5763         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5764         * init.c (pthread_functions): Initialize them.
5765         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5766         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5767         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5768         pthread_cond_timedwait@@GLIBC_2.3.2.
5770 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5772         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5773         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5774         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5775         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5776         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5777         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5779         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5781         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5782         _POSIX_THREAD_PRIORITY_SCHEDULING.
5783         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5785 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5787         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5788         nested function, use static inline function from libio.h.
5789         Code by Richard Henderson.
5791         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5792         weak.
5794 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5796         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5797         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5798         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5799         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5800         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5801         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5802         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5803         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5804         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5805         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5806         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5807         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5808         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5809         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5810         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5811         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5812         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5813         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5814         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5815         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5816         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5817         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5818         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5819         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5820         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5821         * sysdeps/sparc/tls.h: New file.
5822         * sysdeps/sparc/tcb-offsets.sym: New file.
5823         * sysdeps/sparc/Makefile: New file.
5824         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5825         * init.c [__sparc__] (__NR_set_tid_address): Define.
5827 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5829         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5830         _IO_release_lock): Define.
5832 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5834         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5835         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5837 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5839         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5840         (__pthread_cleanup_class): Add missing return types of member
5841         functions.
5843 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5845         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5846         (lll_mutex_unlock_force): Add memory barrier between store and futex
5847         syscall.
5849 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5851         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5852         tempmsg in first loop.
5854 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5856         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5857         _POSIX_THREAD_PRIORITY_SCHEDULING.
5858         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5860 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5862         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5863         (__rtld_lock_default_lock_recursive,
5864         __rtld_lock_default_unlock_recursive): Define.
5865         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5866         __rtld_lock_unlock_recursive): Define using
5867         GL(_dl_rtld_*lock_recursive).
5868         * init.c (__pthread_initialize_minimal_internal): Initialize
5869         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5870         Lock GL(_dl_load_lock) the same number of times as
5871         GL(_dl_load_lock) using non-mt implementation was nested.
5873         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5874         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5876 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5878         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5879         PIPE_BUF.
5881 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5883         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5885 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5887         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5888         to first syscall error check.  Move syscall error check for tkill
5889         into __ASSUME_CLONE_STOPPED #ifdef.
5891 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5893         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5894         is not defined, do explicit synchronization.
5895         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5896         is not defined also unlock pd->lock for non-debugging case in case
5897         it is necessary.
5898         * pthread_create.c (start_thread): Always get and release pd->lock
5899         if __ASSUME_CLONE_STOPPED is not defined.
5900         (start_thread_debug): Removed.  Adjust users.
5901         * allocatestack.c (allocate_stack): Always initialize lock if
5902         __ASSUME_CLONE_STOPPED is not defined.
5903         * Makefile (tests): Add tst-sched1.
5904         * tst-sched1.c: New file.
5906         * sysdeps/pthread/createthread.c (do_clone): Only use
5907         sched_setschduler and pass correct parameters.
5909 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5911         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5912         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5913         PTHREAD_STACK_MIN in comments.
5915 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5917         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5918         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5919         argument.
5920         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5921         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5922         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5923         (__pthread_cleanup_upto): Fix prototype.
5924         (_longjmp_unwind): Adjust caller.
5925         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5926         Change second argument to const struct pointer.
5927         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5928         * tst-sem9.c (main): Likewise.
5929         * unwind.c: Include string.h for strlen prototype.
5931 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5933         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5934         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5935         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5936         Define HAVE_CMOV.
5937         Patch by Nicholas Miell <nmiell@attbi.com>.
5939 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5941         * init.c (__pthread_initialize_minimal_internal): Initialize
5942         GL(dl_init_static_tls).
5943         * pthreadP.h (__pthread_init_static_tls): New prototype.
5944         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5945         New functions.
5946         * Makefile (tests): Add tst-tls4.
5947         (modules-names): Add tst-tls4moda and tst-tls4modb.
5948         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5949         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5950         tst-tls4modb.so.
5951         * tst-tls4.c: New file.
5952         * tst-tls4moda.c: New file.
5953         * tst-tls4modb.c: New file.
5955 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5957         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5958         before __timer_dealloc.
5959         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5960         Don't call list_unlink.
5962 2003-07-29  Roland McGrath  <roland@redhat.com>
5964         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5966 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5968         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5969         Don't reuse struct aiocb A if it failed.
5970         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5971         not just one byte, as that does not block.
5973 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5975         * sysdeps/pthread/unwind-resume.c: New file.
5976         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5977         unwind-resume in csu subdir.
5978         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5979         exceptions.
5980         (librt-sysdep_routines, librt-shared-only-routines): Add
5981         rt-unwind-resume.
5982         * sysdeps/pthread/rt-unwind-resume.c: New file.
5983         * unwind-forcedunwind.c: New file.
5984         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5985         (libpthread-shared-only-routines): Likewise.
5986         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5987         * pthreadP.h (pthread_cancel_init): New prototype.
5988         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5990         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5991         attr argument const struct pthread_attr *.
5993         * res.c (__res_state): Return __resp.
5994         * descr.h: Include resolv.h.
5995         (struct pthread): Add res field.
5996         * pthread_create.c: Include resolv.h.
5997         (start_thread): Initialize __resp.
5998         * Makefile (tests): Add tst-_res1.
5999         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6000         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6001         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6002         libpthread.
6003         * tst-_res1.c: New file.
6004         * tst-_res1mod1.c: New file.
6005         * tst-_res1mod2.c: New file.
6007 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6009         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6011         * Makefile: Define various *-no-z-defs variables for test DSOs
6012         which has undefined symbols.
6014 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6016         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6017         Retry if the stwcx fails to store once_control.
6019 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6021         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6022         pthread_attr_setaffinity.
6023         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6024         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6025         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6026         * pthread_attr_destroy.c: Free cpuset element if allocated.
6027         * pthread_create.c: Pass iattr as additional parameter to
6028         create_thread.
6029         * sysdeps/pthread/createthread.c: If attribute is provided and
6030         a new thread is created with affinity set or scheduling parameters,
6031         start thread with CLONE_STOPPED.
6032         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6033         pthread_attr_setaffinity.
6034         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6035         cpuset element.
6037 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6039         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6041 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6043         * sysdeps/pthread/configure.in: Require CFI directives also for
6044         ppc and s390.
6046 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6048         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6049         Add cfi directives.
6051 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6053         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6054         CLEANUP_JMP_BUF.
6055         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6056         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6057         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6058         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6059         not self pointer in __writer.  Compare with TID to determine
6060         deadlocks.
6061         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6062         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6063         Likewise.
6064         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6065         Likewise.
6066         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6067         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6068         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6069         macros also when compiling librt.
6071 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6073         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6074         -fasynchronous-unwind-tables.
6075         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6076         (PSEUDO): Add cfi directives.
6077         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6078         Likewise.
6079         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6080         Likewise.
6082 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6084         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6085         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6086         * unwind.c (__pthread_unwind_next): Add hidden_def.
6087         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6088         Likewise.
6089         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6090         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6091         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6092         Likewise.
6093         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6094         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6095         Likewise.
6096         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6097         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6098         __pthread_unregister_cancel and __pthread_unwind_next.
6100 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6102         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6103         different symbol for the cancellation syscall wrapper and
6104         non-cancellation syscall wrapper.
6105         (PSEUDO_END): Define.
6107 2003-07-05  Richard Henderson  <rth@redhat.com>
6109         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6110         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6111         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6112         return actual return value from the syscall, not 0.
6114 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6116         * descr.h (struct pthread): Add pid field.
6117         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6118         (__reclaim_stacks): Likewise.
6119         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6120         also check for PID of the signal source.
6121         (__pthread_initialize_minimal_internal): Also initialize pid field
6122         of initial thread's descriptor.
6123         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6124         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6125         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6126         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6127         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6129 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6131         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6132         Fix use of parameter.
6133         (__libc_cleanup_pop): Likewise.
6135 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6137         * init.c (sigcancel_handler): Change parameters to match handler
6138         for SA_SIGACTION.  Check signal number and code to recognize
6139         invalid invocations.
6141 2003-07-03  Roland McGrath  <roland@redhat.com>
6143         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6144         Apply sizeof (struct pthread) bias to r13 value.
6146 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6148         * sysdeps/pthread/configure.in: Require CFI directives.
6150         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6151         definition.
6152         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6153         libpthread compilation.
6154         * unwind.c (__pthread_unwind): Add hidden_def.
6155         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6157 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6159         * libc-cancellation.c (__libc_cleanup_routine): Define.
6160         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6161         (__pthread_cleanup_pop): Define.
6163 2003-07-01  Richard Henderson  <rth@redhat.com>
6165         * sysdeps/alpha/elf/pt-initfini.c: New file.
6166         * sysdeps/alpha/pthread_spin_lock.S: New file.
6167         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6168         * sysdeps/alpha/pthreaddef.h: New file.
6169         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6170         * sysdeps/alpha/tls.h: New file.
6171         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6172         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6173         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6174         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6175         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6176         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6177         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6178         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6179         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6180         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6182 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6184         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6185         cleanup support and unwind info.
6187 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6189         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6190         Use correct cleanup handler registration.  Add unwind info.
6191         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6192         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6193         * tst-once3.c: Add cleanup handler and check it is called.
6194         * tst-once4.c: Likewise.
6195         * tst-oncex3.c: New file.
6196         * tst-oncex4.c: New file.
6197         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6199 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6201         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6203 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6205         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6206         (tf_msgsnd): Likewise.
6208         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6209         premature returns a bit more.
6211 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6213         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6214         definition to the front.
6216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6217         the cleanup functions to make the names unique.  Fix dwarf opcode
6218         un unwind table.
6219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6220         functions to make the names unique.  Fix CFA offset for two blocks.
6222 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6224         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6225         missing closing braces.
6226         Patch by Christophe Saout <christophe@saout.de>.
6228 2003-06-24  Roland McGrath  <roland@redhat.com>
6230         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6232 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6234         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6235         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6237         * pthreadP.h: Declare __find_thread_by_id.
6238         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6239         * pthread_clock_gettime.c: Allow using other thread's clock.
6240         * pthread_clock_settime.c: Likewise.
6241         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6242         * Makefile: Add rules to build and run tst-clock2.
6243         * tst-clock2.c: New file.
6245 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6248         to use exception-based cleanup handler.
6249         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6251         * tst-cond8.c (ch): Announce that we are done.
6253         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6255         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6256         Also test aio_suspend with timeout value.
6258 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6260         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6261         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6262         attribute_hidden.
6264         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6265         (__pthread_mutex_lock_internal): Likewise.
6266         (__pthread_mutex_unlock_internal): Likewise.
6267         (__pthread_mutex_unlock_usercnt): Declare.
6268         * pthread_mutex_destroy.c: Always fail if used in any way.
6269         * pthread_mutex_init.c: Update comment.
6270         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6271         * pthread_mutex_timedlock.c: Adjust __nusers.
6272         * pthread_mutex_trylock.c: Adjust __nusers.
6273         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6274         and public interfaces are wrapper with pass additional parameter.
6275         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6276         parameter zero.
6277         * tst-mutex8.c: New file.
6278         * Makefile (tests): Add tst-mutex8.
6279         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6280         __pthread_mutex_unlock_usercnt.
6281         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6283         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6285         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6286         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6287         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6288         Add __nusers.
6289         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6290         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6291         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6292         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6293         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6295         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6296         * pthread_mutex_timedlock.c: Likewise.
6297         * pthread_mutex_trylock.c: Adjust __nusers.
6298         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6299         * tst-mutex9.c: New file.
6300         * Makefile (tests): Add tst-mutex9.
6301         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6302         * sysdeps/ia64/tls.h: Likewise.
6303         * sysdeps/powerpc/tls.h: Likewise.
6304         * sysdeps/s390/tls.h: Likewise.
6305         * sysdeps/sh/tls.h: Likewise.
6306         * sysdeps/x86_64/tls.h: Likewise.
6307         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6308         Change type of __owner.
6309         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6310         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6311         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6312         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6313         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6315 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6317         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6318         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6320         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6321         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6322         instead of nr to lll_futex_wake.  Only set errno and return -1
6323         if err < 0.
6325         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6326         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6327         return actual return value from the syscall, not 0.
6329 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6331         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6332         find a random value.
6333         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6334         errno==EIDRM.
6336         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6337         compat_timer_settime.
6338         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6339         compat_timer_gettime.
6340         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6341         compat_timer_getoverrun.
6342         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6343         compat_timer_delete.
6345         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6346         error-checking mutex detect busy mutexes.
6348 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6350         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6351         Add ax to clobber list.
6352         (lll_mutex_cond_lock): Likewise.
6353         (lll_mutex_unlock): Likewise.
6354         (lll_lock): Likewise.
6355         (lll_unlock): Likewise.
6357         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6358         * tst-cancel18.c: New file.
6359         * tst-cancelx18.c: New file.
6361         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6362         and tcdrain.
6364         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6365         * tst-cancel17.c: New file.
6366         * tst-cancelx17.c: New file.
6368         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6369         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6370         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6372         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6374 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6376         * sysdeps/pthread/createthread.c (create_thread): Set
6377         header.multiple_threads unconditionally.
6378         * allocatestack.c (allocate_stack): Likewise.
6379         * descr.h (struct pthread): Add header.multiple_threads
6380         unconditionally.
6381         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6382         Define for librt.  #error if neither libpthread, libc nor librt.
6383         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6384         Likewise.
6385         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6386         CDISABLE): Likewise.
6387         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6388         CDISABLE): Likewise.
6389         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6390         CDISABLE): Likewise.
6391         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6392         CDISABLE): Likewise.  Access header.multiple_threads outside of
6393         libc and libpthread.
6394         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6395         Likewise.
6396         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6397         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6399 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6401         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6402         Also test early cancellation before the thread reaches the cancellation
6403         point.
6405         * Makefile: Compile forward.c with exceptions.
6407         * sysdeps/unix/sysv/linux/sleep.c: New file.
6409 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6411         * Makefile: Add CFLAGS definition to compile function wrappers
6412         duplicated from libc with exceptions.
6413         * tst-cancel4.c: Also check cancellation handlers.
6415         * Makefile: Add rules to build and run tst-cancel16 and
6416         tst-cancelx16.  Add missing CFLAGS definitions.
6417         * tst-cancel16.c: New file.
6418         * tst-cancelx16.c: New file.
6420 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6422         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6423         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6424         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6425         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6427         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6428         (LIBC_CANCEL_RESET): Likewise.
6429         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6430         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6431         librt-cancellation.
6432         (CFLAGS-libcrt-cancellation.c): Define.
6433         * sysdeps/pthread/librt-cancellation.c: New file.
6434         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6435         macros also when compiling librt.
6436         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6437         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6438         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6439         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6440         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6441         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6442         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6444         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6445         compat_timer_create.
6447 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6449         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6451         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6452         __register_atfork.
6453         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6454         Add libc_hidden_def.
6456 2003-06-13  Roland McGrath  <roland@redhat.com>
6458         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6459         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6461 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6463         * allocatestack.c (queue_stack): Always inline.
6464         * ptreadhP.h (__do_cancel): Likewise.
6466 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6468         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6469         a typo.
6471 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6474         (__pthread_cond_signal): Remove incorrect second addition for
6475         cond_lock!=0.
6477 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6479         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6480         (__pthread_cond_signal): Use correct futex pointer in
6481         __lll_mutex_lock_wait call.
6483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6484         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6486 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6488         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6489         cancelable.
6490         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6491         Likewise.
6493         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6494         hand-written CFI generation code.  Since ENTRY/END also initiated
6495         CFI frames this caused two CFI sets to be generated.
6497 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6499         * cleanup_routine.c: New file.
6500         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6501         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6502         cleanup handling.
6503         * Makefile (libpthread-routines): Add cleanup_routine.
6504         Add more CFLAGS variables to compile with exceptions.  Add comments
6505         why which file needs unwind tables.
6506         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6507         tests.
6508         * tst-cancelx1.c: New file.
6509         * tst-cancelx2.c: New file.
6510         * tst-cancelx3.c: New file.
6511         * tst-cancelx4.c: New file.
6512         * tst-cancelx5.c: New file.
6513         * tst-cancelx6.c: New file.
6514         * tst-cancelx7.c: New file.
6515         * tst-cancelx8.c: New file.
6516         * tst-cancelx9.c: New file.
6517         * tst-cancelx10.c: New file.
6518         * tst-cancelx11.c: New file.
6519         * tst-cancelx12.c: New file.
6520         * tst-cancelx13.c: New file.
6521         * tst-cancelx14.c: New file.
6522         * tst-cancelx15.c: New file.
6523         * tst-cleanupx0.c: New file.
6524         * tst-cleanupx0.expect: New file.
6525         * tst-cleanupx1.c: New file.
6526         * tst-cleanupx2.c: New file.
6527         * tst-cleanupx3.c: New file.
6529         * tst-cleanup0.c: Make standard compliant.
6530         * tst-cleanup1.c: Likewise.
6532         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6533         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6534         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6535         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6536         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6537         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6538         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6539         CLEANUP_JMP_BUF.
6540         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6541         * tst-cancel12.c: New file.
6542         * tst-cancel13.c: New file.
6543         * tst-cancel14.c: New file.
6544         * tst-cancel15.c: New file.
6545         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6546         and tst-cancel15.
6548         * tst-cancel1.c: Add some comments.
6550         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6551         timeout correctly.
6553 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6555         * Makefile (CFLAGS-pthread_cancel.c): Define.
6557 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6559         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6560         Change type of __writer element to int.
6561         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6562         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6563         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6564         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6565         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6566         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6567         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6568         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6569         Compare with TID to determine deadlocks.
6570         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6571         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6572         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6573         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6574         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6575         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6576         Likewise.
6577         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6578         Likewise.
6579         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6580         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6581         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6582         Likewise.
6583         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6584         Likewise.
6585         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6586         * Makefile (tests): Add tst-rwlock12.
6587         * tst-rwlock12.c: New file.
6589 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6591         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6592         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6593         Remove bogus hidden_proto.
6594         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6595         Likewise.
6596         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6597         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6598         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6599         ___lll_mutex_timedlock): Likewise.
6601 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6604         (__pthread_cond_signal): Add some code to eventually handle
6605         cond_lock!=0.
6607 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6609         * Makefile (tests): Add tst-exec4.
6610         (tst-exec4-ARGS): Define.
6611         * tst-exec4.c: New file.
6613 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6615         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6616         Also fail if tv_nsec < 0.
6617         (__lll_timedwait_tid): Likewise.
6618         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6619         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6620         Likewise.
6621         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6622         Likewise.
6623         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6624         Likewise.
6625         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6626         Likewise.
6627         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6628         Likewise.
6629         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6630         Likewise.
6632         * Makefile (tests): Add tst-sem8 and tst-sem9.
6633         * tst-sem8.c: New file.
6634         * tst-sem9.c: New file.
6635         * sem_open.c: Fix creation of in_use record if the file exists but
6636         no internal record.
6638         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6639         definitions.
6641         * sysdeps/pthread/timer_create.c (timer_create): In case
6642         evp==NULL, assign timer ID to sival_ptr.
6644         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6645         struct pthread_unwind_buf *.
6646         (struct pthread): Likewise for cleanup_jmp_buf element.
6648         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6649         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6650         * unwind.c (__pthread_unwind_next): Likewise.
6652 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6654         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6655         (lll_futex_timed_wait): Use int for futex value parameter.
6656         (lll_futex_wake): Likewise.
6657         (lll_futex_requeue): Likewise.
6659         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6660         Replace one memory operation with one register operation.
6662         * tst-join4.c (do_test): Fix error message.
6664         * tst-rwlock6.c (do_test): Use correct format specifier.
6666         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6667         (__lll_mutex_lock_wait): Replace one memory operation with one
6668         register operation.
6669         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6670         (__lll_mutex_lock_wait): Likewise.
6672         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6673         (__lll_mutex_cond_lock): Add one to value parameter of
6674         __lll_lock_wait to reflect reality in the futex syscall.
6675         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6676         (lll_mutex_cond_lock): Likewise.
6678 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6680         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6681         New function.
6682         (lll_mutex_cond_lock): Define.
6684 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6686         * Makefile (tests): Add tst-signal6.
6687         * tst-signal6.c: New file.
6689         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6690         (__lll_mutex_unlock_force): New function
6691         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6693         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6694         (__lll_mutex_unlock_force): New function.
6695         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6697         * tst-rwlock7.c (do_test): Use correct format specifier.
6699         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6700         Find break parameter in correct asm argument.
6702 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6704         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6705         Remove out4.
6706         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6707         error occured.
6708         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6709         Add __mutex.
6710         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6711         lll_futex_requeue, lll_mutex_unlock_force): Define.
6713 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6715         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6716         (pthread_cond_t): Add __mutex.
6717         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6718         lll_futex_requeue, lll_mutex_unlock_force): Define.
6720 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6722         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6723         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6724         Add __mutex field.
6725         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6726         Define.
6727         (lll_futex_wait, lll_futex_wake): Define.
6728         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6729         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6730         FUTEX_REQUEUE instead of FUTEX_WAIT.
6731         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6732         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6733         mutex which was used in condvar structure.  Call
6734         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6735         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6737         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6738         include tcb-offsets.h.  Read wakeup value in locked region.
6739         Use the value of gbr register as THREAD_ID.
6740         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6741         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6742         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6744         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6745         macros.
6747 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6749         * sysdeps/pthread/pthread_cond_broadcast.c
6750         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6752 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6754         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6755         typo in register name.
6756         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6757         correctly.  Actually use requeue.  Little optimization.
6758         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6759         mutex address early.  Handle cancellation state as 32-bit value.
6760         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6761         Remove unnecessary label.
6763 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6765         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6766         instead of FUTEX_WAIT.
6767         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6769         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6770         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6771         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6772         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6773         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6774         of __pthread_mutex_lock_internal.
6775         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6776         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6777         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6778         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6779         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6780         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6781         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6782         Add pthread_mutex_cond_lock.
6783         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6784         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6785         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6786         lll_mutex_cond_lock.
6787         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6788         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6789         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6790         Add __mutex field.
6791         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6792         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6794         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6795         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6797         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6798         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6799         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6800         macro don't define aliases.
6802         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6803         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6804         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6805         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6807         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6808         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6812 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6814         * sem_open.c: Fix one endless loop.  Implement correct semantics
6815         wrt opening the same semaphore more then once.
6816         * sem_close.c: Adjust for sem_open change.
6817         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6818         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6819         * Makefile (tests): Add tst-sem7.
6820         * tst-sem7.c: New file.
6822 2003-05-16  Roland McGrath  <roland@redhat.com>
6824         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6825         uninitialized variable braino.
6827 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6829         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6830         test for syscall availability.
6832         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6833         __no_posix_timers to -1 if the syscalls don't exist.
6835         * pthread_join.c (pthread_join): Set tid field of the joined
6836         thread to -1.  This isn't necessary but helps to recognize some
6837         error conditions with almost no cost.
6839         * allocatestack.c (FREE_P): Also negative values indicate an
6840         unused stack.
6842         * unwind.c: Include <unistd.h>.
6844 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6846         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6848 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6850         * Makefile (crti-objs, crtn-objs): New variables.
6851         (omit-deps, extra-objs): Add crtn.
6852         ($(objpfx)libpthread.so): Depend on both crti and crtn
6853         and links to them in multidir.
6854         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6856 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6858         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6859         (lll_mutex_unlock): Use atomic_exchange_rel.
6861 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6863         * cond-perf.c (cons): Add missing locking around setting of alldone.
6865 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6867         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6868         related macros.
6869         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6871 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6873         * tst-sem6.c: New file.
6874         * Makefile (tests): Add tst-sem6.
6876         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6877         Use atomic_exchange_rel instead of atomic_exchange.
6878         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6879         Likewise.
6881         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6882         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6883         vsyscall is possible.
6885         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6886         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6887         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6888         pthread_setaffinity_np.
6889         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6890         and pthread_setaffinity_np.
6891         * Makefile (libpthread-routines): Add pthread_getaffinity and
6892         pthread_setaffinity.
6894         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6895         use it in case mmap to allocate the stack fails.
6896         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6897         ARCH_MAP_FLAGS here.
6898         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6899         ARCH_RETRY_MMAP.
6901 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6903         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6904         handler implementation.  It is now lockless in fork().
6905         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6906         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6907         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6908         declare the __fork_*_lists.
6909         (struct fork_handler): Include pointers to all three functions.
6910         Add next, refcntr and need_signal elements.
6911         (__fork_handlers): New declaration.
6912         (__register_atfork_malloc): Remove declaration.
6913         (HAVE_register_atfork_malloc): Remove definition.
6914         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6915         __pthread_child_handler variable.
6916         (__libc_pthread_init): Use __register_atfork instead of explicitly
6917         adding to the list.
6918         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6919         and lll_futex_wake.
6920         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6922         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6923         function must never be reached.
6925         * cond-perf.c: New file.
6927 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6929         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6931 2003-05-04  Roland McGrath  <roland@redhat.com>
6933         * Makefile ($(objpfx)../libc.so): New target.
6935 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6937         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6938         (pthread_condattr_t): Size is only an int, don't use long for
6939         alignment.
6940         (pthread_mutexattr_t): Likewise.
6941         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6942         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6943         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6945 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6947         * sysdeps/i386/tls.h: Define THREAD_ID.
6948         * sysdeps/ia64/tls.h: Likewise.
6949         * sysdeps/powerpc/tls.h: Likewise.
6950         * sysdeps/s390/tls.h: Likewise.
6951         * sysdeps/sh/tls.h: Likewise.
6952         * sysdeps/x86_64/tls.h: Likewise.
6953         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6954         record ownership.
6955         * pthread_mutex_timedlock.c: Likewise.
6956         * pthread_mutex_trylock.c: Likewise.
6957         * pthread_mutex_unlock.c: Likewise.
6958         * pthread_rwlock_trywrlock.c: Likewise.
6959         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6960         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6961         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6962         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6964         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6965         flag.
6967 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6969         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6970         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6971         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6972         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6973         Make __align long long instead of long.
6974         (pthread_rwlock_t): Formatting.
6975         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6976         (pthread_rwlock_t): Formatting.
6977         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6978         (pthread_cond_t): Make __align long long instead of long.
6979         (pthread_rwlock_t): Move __flags field to the same position as in
6980         linuxthreads.
6982 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6984         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6985         * tst-rwlock7.c (do_test): Likewise.
6987 2003-04-26  Roland McGrath  <roland@redhat.com>
6989         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6991 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6993         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6994         sizeof (struct pthread).
6995         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6996         1 struct pthread.
6997         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6998         to 0.
6999         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7000         struct pthread.
7001         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7002         to 32-bit bytes.
7003         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7004         tcbp.
7005         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7006         unneccessarily.
7007         (NO_TLS_OFFSET): Define.
7008         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7009         add TLS_TCB_SIZE unnecessarily.
7011 2003-04-22  Roland McGrath  <roland@redhat.com>
7013         * Makeconfig (shared-thread-library): Reverse link order to work
7014         around linker bug.
7016 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7018         * semaphore.h: Fix typo in comment.
7020 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7022         * sysdeps/pthread/sigfillset.c: New file.
7024         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7025         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7026         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7027         * sysdeps/pthread/sigaction.c: Likewise.
7028         * sysdeps/pthread/sigprocmask.c: New file.
7029         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7030         __SIGRTMIN+1.
7031         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7032         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7033         in this case.
7035 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7037         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7038         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7040         * sysdeps/unix/sysv/linux/unregister-atfork.c
7041         (__unregister_atfork): Don't free memory not allocated dynamically.
7043         * semaphore.h: Remove __THROW marker from cancellation points.
7044         * nptl/sysdeps/pthread/pthread.h: Likewise.
7046 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7048         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7049         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7050         __THROW.
7052 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7054         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7056 2003-04-15  Roland McGrath  <roland@redhat.com>
7058         * forward.c (__pthread_unwind): Tweak to avoid warning.
7060 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7062         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7064 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7066         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7067         overflow CFA advance instructions.
7068         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7070 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7072         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7073         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7074         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7075         defined.
7077         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7078         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7079         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7080         DW_CFA_advance_loc for .Laddl-.Lsubl.
7082 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7084         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7085         position-independent unwind data for static libraries.
7086         Add missing unwind info.  Add comments.
7088         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7089         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7090         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7091         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7093 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7095         * Makefile: Make sure all cancellation points are compiled with
7096         exception and asynchronous unwind tables.
7098         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7099         which mishandles loading of global object addresses in PIC.
7100         (THREAD_SETMEM_NC): Likewise.
7102 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7104         * pthread.h: Define new data structure for cleanup buffer.  Declare
7105         new cleanup handler interfaces.
7106         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7107         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7108         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7109         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7110         it.  Declare old cleanup handler installation functions.
7111         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7112         handling.
7113         * cleanup_defer.c: Likewise.
7114         * cleanup_compat.c: New file.  Old cleanup code.
7115         * cleanup_def_compat.c: New file.  Old cleanup code.
7116         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7117         if own thread descriptor.
7118         * unwind.c: New file.
7119         * forward.c: Add __pthread_unwind.
7120         * init.c (pthread_functions): Add __pthread_unwind.
7121         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7122         Add ptr___pthread_unwind.
7123         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7124         and unwind function.
7125         * Makefile (libpthread-routines): Add cleanup_compat,
7126         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7127         table generation if necessary.
7128         * version.c: Record whether unwind support is compiled in.
7129         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7130         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7131         handler interfaces.
7132         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7133         complication to generate unwind information for syscall wrappers.
7134         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7135         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7136         __cleanup_fct_attribute.
7138         * Makefile: Add rules to build and run tst-cleanup0.
7139         * tst-cleanup0.c: New file.
7140         * tst-cleanup0.expect: New file.
7142         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7143         caller.  Optimize to avoid often unecessary local variable.
7145 2003-04-11  Roland McGrath  <roland@redhat.com>
7147         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7148         sets variable `multidir'; include that.
7149         (generated): Add it.
7150         ($(objpfx)$(multidir)/crti.o): New target.
7151         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7153 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7155         * tst-attr2.c (do_test): Add cast to avoid warning.
7156         * tst-mutex4.c (do_test): Likewise.
7158 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7160         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7161         in child.
7163 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7165         * Makefile (tests): Add tst-detach1.
7166         * tst-detach1.c: New file.
7168 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7170         * sysdeps/pthread/pthread.h: Remove duplicate
7171         pthread_cleanup_{push,pop} definitions.
7173         * tst-barrier2.c: Eliminate warnings.
7174         * tst-cancel4.c: Likewise.
7175         * tst-cond4.c: Likewise.
7176         * tst-cond6.c: Likewise.
7177         * tst-detach1.c: Likewise.
7178         * tst-rwlock4.c: Likewise.
7179         * tst-rwlock6.c: Likewise.
7180         * tst-rwlock7.c: Likewise.
7181         * tst-sem3.c: Likewise.
7182         * tst-spin2.c: Likewise.
7183         * tst-umask1.c: Likewise.
7185 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7187         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7189 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7191         * descr.h (struct pthread): Move cancelhandling member to the front.
7193 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7195         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7196         malloc_parent, and malloc_child statically.
7197         (__register_atfork_malloc): New function.
7198         (free_mem): Don't free any of the malloc_* variables on the list.
7199         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7200         Define HAVE_register_atfork_malloc.
7202 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7204         * sysdeps/pthread/createthread.c (create_thread): Add some more
7205         comments explaining when to set multiple_threads and when not.
7207         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7208         THREAD_ATOMIC_BIT_SET if not already defined.
7209         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7210         THREAD_ATOMIC_BIT_SET:
7211         * sysdeps/x86_64/tls.h: Likewise.
7212         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7213         THREAD_ATOMIC_CMPXCHG_VAL.
7214         (_pthread_cleanup_pop_restore): Likewise.
7215         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7216         (__pthread_enable_asynccancel_2): Likewise.
7217         (__pthread_disable_asynccancel): Likewise.
7218         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7219         (__libc_disable_asynccancel): Likewise.
7220         * init.c (sigcancel_handler): Likewise.
7221         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7222         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7224 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7226         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7227         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7228         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7229         * Makefile (tests): Add tst-cancel11.
7230         * tst-cancel11.c: New file.
7232 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7234         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7235         round, not the first.  Use specific_used flag instead of local
7236         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7237         (__free_tcb): Don't call deallocate_tsd here.
7238         (start_thread): Call deallocate_tsd here.
7239         * pthread_setspecific.c: Set specific_used flag really only when
7240         needed.
7241         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7242         * tst-tsd3.c: New file.
7243         * tst-tsd4.c: New file.
7245 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7247         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7248         Use atomic_exchange_and_add instead of __lll_add.
7249         (__lll_mutex_timedlock): Likewise.
7250         Patch by Ian Wienand.
7252 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7254         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7255         (SINGLE_THREAD_P): Fix typo.
7256         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7258 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7260         * Makefile (tests): Add tst-align.
7261         * tst-align.c: New file.
7262         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7264         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7265         function correctly.
7267         * tst-tsd2.c: Add casts to avoid warnings.
7269 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7271         * descr.h (struct pthread): Move most often used elements to the front.
7273 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7275         * Makefile (libpthread-routines): Add pthread_atfork.
7276         (libpthread-static-only-routines): Add pthread_atfork.
7278 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7280         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7281         of TLS_DTV_AT_TP.
7282         (INSTALL_DTV): Add parens.
7283         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7284         Use passed descr instead of THREAD_SELF.
7285         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7286         (__lll_mutex_timedlock_wait): Correct expected value after
7287         spurious wakeup.
7288         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7289         Release lock before waking up the waiters.
7290         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7291         criteria.  Reorderstruct passed to cleanup handler.  Fix
7292         handling of cancellation and failung pthread_mutex_unlock call.
7293         Use __pthread_enable_asynccancel_2 instead of
7294         __pthread_enable_asynccancel.
7295         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7296         Return result of lock re-get if it fails.
7297         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7298         for __pthread_cleanup_push.
7299         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7300         completely broken rwlock implementation.
7301         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7302         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7303         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7304         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7305         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7306         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7307         versioned_symbol macro.
7308         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7309         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7311 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7313         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7314         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7315         and __helper_tid.
7316         (struct timer): Remove th and bar field.
7317         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7318         debugging code.  Create only one helper thread.
7319         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7320         helper thread.
7321         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7322         Renamed.  Define statically.  Use thread info from siginfo.
7323         (__helper_once): New variable.
7324         (__helper_tid): New variable.
7325         (__reset_helper_control): New function.
7326         (__start_helper_thread): New function.
7328         * pthread_create.c (start_thread): Don't use setjmp inside
7329         __builtin_expect to work around gcc bug.
7331         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7332         timer_delete syscall fails, but not with ENOSYS, set
7333         __no_posix_timers.
7335         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7336         (timer_settime): Fix typo.
7337         * sysdeps/unix/sysv/linux/timer_getoverr.c
7338         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7340 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7343         offset of cleanupbuf.__prev.
7345 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7347         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7348         of included file.
7350 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7352         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7353         NULL provide default definition to syscall.
7355 2003-03-25  Roland McGrath  <roland@redhat.com>
7357         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7358         (timer_id2ptr): Fix typo.
7360 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7362         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7363         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7364         * sysdeps/ia64/pthreaddef.h: Likewise.
7365         * sysdeps/powerpc/pthreaddef.h: Likewise.
7366         * sysdeps/s390/pthreaddef.h: Likewise.
7367         * sysdeps/sh/pthreaddef.h: Likewise.
7368         * sysdeps/x86_64/pthreaddef.h: Likewise.
7369         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7370         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7371         being changed.
7372         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7373         SIGTIMER is not unblocked.
7374         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7375         RT signal taken.
7376         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7377         be send.
7378         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7379         pass pointer through as ID.
7380         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7381         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7382         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7383         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7384         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7385         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7386         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7387         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7388         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7389         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7390         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7391         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7392         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7393         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7394         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7395         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7396         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7397         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7398         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7399         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7400         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7401         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7402         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7403         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7404         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7405         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7406         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7407         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7408         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7409         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7410         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7411         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7412         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7414         * pthreadP.h: Remove FRAME_LEFT definition.
7415         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7416         already left frame.  Programs which have this problem are not POSIX
7417         compliant.
7418         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7420 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7422         * sysdeps/pthread/tst-timer.c: Check return values of the
7423         functions we test.
7425 2003-03-23  Roland McGrath  <roland@redhat.com>
7427         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7428         * tst-tls3mod.c: Likewise.
7429         * tst-tls1.c: Likewise.
7430         * tst-tls2.c: Likewise.
7432         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7433         undefined behavior.
7435         * tst-join5.c (tf1, tf2): Add a cast.
7437         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7439         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7440         Don't test anything.
7441         * tst-cond4.c: Likewise.
7442         * tst-cond6.c: Likewise.
7443         * tst-flock2.c: Likewise.
7444         * tst-mutex4.c: Likewise.
7445         * tst-rwlock4.c: Likewise.
7446         * tst-signal1.c: Likewise.
7447         * tst-spin2.c: Likewise.
7448         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7450         * tst-mutex4.c: Use test-skeleton.c.
7451         * tst-spin2.c: Likewise.
7452         * tst-sysconf.c: Likewise.
7453         * tst-barrier2.c: Likewise.
7454         * tst-cond4.c: Likewise.
7455         * tst-cond6.c: Likewise.
7456         * tst-rwlock4.c: Likewise.
7457         * tst-unload.c: Likewise.
7458         * tst-flock2.c (do_test): Use return instead of exit.
7460 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7462         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7464 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7466         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7467         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7468         instead of __lll_compare_and_swap.
7469         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7470         Likewise.
7471         Removed definition if __lll_compare_and_swap.
7473         * cancellation.c: Adjust for new form of compare&exchange macros.
7474         * cleanup_defer.c: Likewise.
7475         * init.c: Likewise.
7476         * libc-cancellation.c: Likewise.
7477         * old_pthread_cond_broadcast.c: Likewise.
7478         * old_pthread_cond_signal.c: Likewise.
7479         * old_pthread_cond_timedwait.c: Likewise.
7480         * old_pthread_cond_wait.c: Likewise.
7481         * pthread_cancel.c: Likewise.
7482         * pthread_create.c: Likewise.
7483         * pthread_detach.c: Likewise.
7484         * pthread_join.c: Likewise.
7485         * pthread_key_delete.c: Likewise.
7486         * pthread_setcancelstate.c: Likewise.
7487         * pthread_setcanceltype.c: Likewise.
7488         * pthread_timedjoin.c: Likewise.
7489         * pthread_tryjoin.c: Likewise.
7490         * sysdeps/pthread/createthread.c: Likewise.
7492 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7494         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7495         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7496         definitions.  Replace uses with calls to atomic_* functions.
7497         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7498         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7499         __lll_test_and_set calls with atomic_exchange_and_add and
7500         atomic_exchange calls respectively.
7501         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7502         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7503         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7504         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7505         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7506         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7507         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7509         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7510         returns the old value.
7512 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7514         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7515         int for variable OLDVAL and correct inline assembler contraint.
7516         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7517         type int for variable OLD.
7519         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7520         only for s390-32.
7521         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7522         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7523         instead of multiple_threads field in the TCB.
7525 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7527         * sysdeps/i386/i686/bits/atomic.h: Removed.
7528         * sysdeps/i386/i586/bits/atomic.h: Removed.
7529         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7530         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7531         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7532         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7533         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7534         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7535         * atomic.h: Removed.  Moved to glibc.
7537         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7538         support for clock selection.
7540         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7541         signalling waiters.
7543 2003-03-18  Roland McGrath  <roland@redhat.com>
7545         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7546         Add __lll_rel_instr first.  Add memory clobber.
7547         (lll_mutex_unlock): Use __lll_test_and_set.
7548         From Paul Mackerras <paulus@samba.org>.
7550         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7551         unconditionally.
7552         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7553         (SINGLE_THREAD_P):  Add `header.' prefix.
7554         From Paul Mackerras <paulus@samba.org>.
7556         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7557         pthread_timedjoin_np to ...
7558         (libpthread: GLIBC_2.3.3): ... here.
7559         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7561         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7562         Avoid shadowing VAL variable.
7564         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7565         New macro.
7567 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7569         * Makefile (tests): Add tst-cond11.
7570         * tst-cond11.c: New file.
7572         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7573         struct passed to cleanup handler to eliminate one more
7574         instruction.
7575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7577         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7578         (pthrad_cond_t): Replace __unused field with __clock.
7580         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7581         waken all waiters in cleanup handler.
7582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7583         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7585         * pthread_condattr_getclock.c: New file.
7586         * pthread_condattr_setclock.c: New file.
7587         * sysdeps/pthread/pthread.h: Declare these new functions.
7588         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7589         * Makefile (libpthread-routines): Add the new functions.
7590         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7591         Renamed field to value.  Document use of the bits.
7592         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7593         change.
7594         * pthread_condattr_setpshared.c: Likewise.
7595         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7596         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7597         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7598         Add __clock field.
7599         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7600         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7601         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7602         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7604         Implement clock selection.
7605         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7606         * pthread-errnos.sym: Add ENOSYS.
7607         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7608         _POSIX_CLOCK_SELECTION.
7609         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7611         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7612         invalid .size directive.
7614 2003-03-17  Roland McGrath  <roland@redhat.com>
7616         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7617         Formatting tweaks.
7619 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7621         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7622         Use __lll_add instead of spelling it out.  Use protected symbol names.
7623         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7624         Use __lll_add.
7625         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7626         Renamed from lll_compare_and_swap.  Use new name where necessary.
7627         (__lll_add): Defined.
7628         (__lll_dec_if_positive): Defined.
7629         (__lll_test_and_set): Defined.
7630         * sysdeps/ia64/pthread_spin_init.c: Removed.
7631         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7632         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7633         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7634         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7635         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7636         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7637         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7638         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7639         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7640         __sync_lock_release_si.
7641         Patch by Jakub Jelinek.
7643         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7644         Fix timeout handling.
7645         (__lll_timedwait_tid): Likewise.
7646         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7647         Patch by Jakub Jelinek.
7649         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7651 2003-03-17  Roland McGrath  <roland@redhat.com>
7653         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7654         * sysdeps/pthread/pthread_spin_init.c: New file.
7655         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7656         * sysdeps/powerpc/Makefile: New file.
7657         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7658         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7659         * sysdeps/powerpc/pthreaddef.h: New file.
7660         * sysdeps/powerpc/tcb-offsets.sym: New file.
7661         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7662         * sysdeps/powerpc/tls.h: New file.
7663         * sysdeps/powerpc/bits/atomic.h: New file.
7664         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7665         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7666         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7668         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7669         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7670         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7671         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7672         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7673         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7674         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7675         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7676         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7677         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7678         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7679         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7680         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7681         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7682         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7684         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7685         not gettimeofday.
7686         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7687         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7688         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7689         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7690         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7692 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7694         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7695         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7697         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7698         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7700 2003-03-16  Roland McGrath  <roland@redhat.com>
7702         * tst-fork4.c: Include <string.h>.
7703         * tst-signal2.c: Likewise.
7704         * tst-mutex5.c (do_test): exit -> return.
7705         * tst-mutex2.c: Include <stdlib.h>.
7707 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7709         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7710         (__lll_mutex_timedlock_wait): Correct expected value after
7711         spurious wakeup.  Otherwise we would never wait again.
7713         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7714         zone versus inline asm stupidity.  Use correct instructions.
7716         * tst-rwlock6.c: Add some more status output.
7718 2003-03-15  Roland McGrath  <roland@redhat.com>
7720         * sysdeps/pthread/configure.in: New file.
7721         * sysdeps/pthread/configure: New file (generated).
7723 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7725         * allocatestack.c (allocate_stack): Store the exact stack size of
7726         user allocated stacks.
7728 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7730         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7731         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7732         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7733         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7734         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7735         Use `header.' prefix.
7736         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7738 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7740         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7741         __builtin_frame_address, use stack pointer.
7743         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7744         instead of __builtin_frame_pointer.
7746 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7748         * tst-basic1.c (do_test): Add cast to avoid warning.
7749         * tst-basic2.c (do_test): Likewise.
7751         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7752         amount of stack correction.
7754         * tst-fork4.c: Use test-skeleton.c.
7756 2003-03-14  Roland McGrath  <roland@redhat.com>
7758         * init.c: Fix typo "#eli" for "#else".
7760 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7762         * allocatestack.c (__stack_user): Use hidden_data_def.
7763         * pthread_create.c (__pthread_keys): Likewise.
7765         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7767 2003-03-14  Roland McGrath  <roland@redhat.com>
7769         * tst-fork4.c: New file.
7770         * Makefile (tests): Add it.
7772         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7773         we always define the padding space.
7774         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7775         stopped supporting its own extensions fully.
7776         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7777         struct also called `header', so `header.multiple_threads' is the field
7778         name to use on all machines.
7779         * allocatestack.c (allocate_stack): Use `header.' prefix.
7780         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7781         * pthread_create.c (__pthread_create_2_1): Likewise.
7782         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7783         (THREAD_SELF): Likewise.
7784         * sysdeps/x86_64/tls.h: Likewise.
7785         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7786         (SINGLE_THREAD_P): Likewise.
7787         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7788         (SINGLE_THREAD_P): Likewise.
7789         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7790         (SINGLE_THREAD_P): Likewise.
7792         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7793         value directly.
7795 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7797         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7798         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7800         * pthread_create.c (start_thread): setjmp is expected to return 0.
7802         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7803         (THREAD_GETMEM_NC): Likewise.
7805 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7807         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7808         and the size of the stack which must be allocated is a multiple,
7809         allocate one more page.
7810         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7811         MULTI_PAGE_ALIASING.
7813 2003-03-13  Roland McGrath  <roland@redhat.com>
7815         * pthread_create.c (start_thread): Set EXITING_BIT after the
7816         event-reporting (and destructors), not before.
7818 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7820         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7821         lll_futex_wake): Declare register variables as long int instead of
7822         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7823         Make syscall arguments clobbered by the syscall.
7824         (lll_futex_wait): Define using lll_futex_timed_wait.
7826         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7827         to void *.
7829         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7830         PPID if [! NDEBUG].
7832         * allocatestack.c (nptl_ncreated): Only declare if
7833         COLORING_INCREMENT != 0.
7835         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7836         (__libc_enable_asynccancel_2): Remove prototype.
7838         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7839         ctid to match kernel.
7841 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7843         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7844         libc_multiple_threads.
7845         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7846         __libc_multiple_threads to...
7847         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7849         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7850         versioning.
7851         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7852         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7854         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7855         (__pthread_once_internal): Define.
7857         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7858         macros instead of .symver directly.
7859         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7860         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7862         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7863         * sysdeps/x86_64/tcb-offsets.sym: New file.
7864         * sysdeps/x86_64/Makefile: New file.
7866         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7867         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7868         to access own pthread_t in TCB.
7869         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7870         Likewise.
7871         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7872         Likewise.
7873         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7875 2003-03-12  Roland McGrath  <roland@redhat.com>
7877         * pthread-errnos.sym: New file.
7878         * Makefile (gen-as-const-headers): New variable, list that file.
7879         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7880         header <pthread-errnos.h> instead of defining errno values here.
7881         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7882         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7883         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7884         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7885         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7886         Likewise.
7887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7888         Likewise.
7889         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7891         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7892         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7893         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7894         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7895         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7896         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7898         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7899         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7900         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7901         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7902         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7903         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7904         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7905         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7906         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7907         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7908         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7909         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7910         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7911         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7912         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7913         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7914         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7915         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7917         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7918         CLONE_CHILD_SETTID worked.
7920 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7922         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7923         file.
7924         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7925         file.
7927         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7928         (pthread_cond_t): Add padding.
7930         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7931         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7932         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7934         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7935         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7936         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7937         (__pthread_rwlock_timedrdlock): Likewise.
7938         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7939         (__pthread_rwlock_wrlock): Likewise.
7940         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7941         (__pthread_rwlock_rdlock): Likewise.
7943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7945         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7946         result of lock re-get if it fails.
7948 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7950         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7951         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7952         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7953         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7954         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7955         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7956         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7957         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7958         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7959         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7961         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7962         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7964         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7965         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7966         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7967         (create_thread): Likewise.
7968         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7969         * init.c (__pthread_initialize_minimal_internal): Initialize
7970         __libc_multiple_threads_ptr if necessary.
7971         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7972         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7973         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7974         __libc_multiple_threads.
7975         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7976         necessary.
7978         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7979         (THREAD_SETMEM_NC): Likewise.
7981         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7982         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7983         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7984         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7986         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7987         Eliminate one entire instruction.
7989         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7990         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7992         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7993         instead of __pthread_enable_asynccancel.
7994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7995         (__pthread_cond_wait): Likewise.
7996         * sysdeps/pthread/pthread_cond_timedwait.c
7997         (__pthread_cond_timedwait): Likewise.
7998         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8000         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8001         (__condvar_cleanup): Wake up all waiters in case we got signaled
8002         after being woken up but before disabling asynchronous
8003         cancellation.
8004         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8005         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8006         (__condvar_cleanup): Likewise.
8008         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8009         Make it an error if architecture has no #if case.  Add x86-64.
8011         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8012         pt-initfini.s generation.
8014         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8015         (TLS_INIT_TP): Fix typo.
8017 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8019         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8020         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8022         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8023         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8024         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8025         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8026         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8027         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8028         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8029         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8031 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8033         * sysdeps/pthread/pthread_cond_timedwait.c
8034         (__pthread_cond_timedwait): Return the result of the final
8035         locking.  If it succeeds, the regular function return value.
8037         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8038         Return result of the final locking.
8039         * version.c (__nptl_main): Work around problems with the strange
8040         INTERNAL_SYSCALL macro on ppc32.
8041         * init.c (__pthread_initialize_minimal_internal): Unblock
8042         SIGCANCEL in case the parent blocked it.
8043         Reported by Paul Mackerras <paulus@samba.org>.
8045         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8046         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8047         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8049 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8051         * sysdeps/pthread/pthread_cond_timedwait.c
8052         (__pthread_cond_timedwait): Unlock and fail if
8053         __pthread_mutex_unlock_internal failed.
8055         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8056         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8057         Use ARCH_CLONE.
8058         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8059         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8060         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8061         ALLOCATE_STACK): New macros.
8062         (TLS_TPADJ): New macro.
8063         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8064         (allocate_stack): Handle TLS_DTV_AT_TP and
8065         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8066         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8067         Don't set PD->self.
8068         * init.c [__ia64__] (__NR_set_tid_address): Define.
8070         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8071         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8072         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8073         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8074         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8075         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8076         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8077         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8078         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8079         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8080         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8081         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8082         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8083         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8084         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8085         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8086         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8087         * sysdeps/ia64/bits/atomic.h: New file.
8088         * sysdeps/ia64/Makefile: New file.
8089         * sysdeps/ia64/pthread_spin_init.c: New file.
8090         * sysdeps/ia64/pthread_spin_lock.c: New file.
8091         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8092         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8093         * sysdeps/ia64/pthreaddef.h: New file.
8094         * sysdeps/ia64/tcb-offsets.sym: New file.
8095         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8096         * sysdeps/ia64/tls.h: New file.
8098         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8099         to syscall instead of no arguments.
8101 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8103         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8104         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8105         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8106         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8108         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8109         unused code.
8111         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8113         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8114         lowlevelbarrier.sym.
8115         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8116         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8117         Include lowlevelbarrier.h and don't define offsets locally.
8118         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8120         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8121         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8122         (__lll_mutex_timedlock_wait): Likewise.
8123         (lll_mutex_lock): Adjust asm for that.
8124         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8125         (lll_lock): Adjust asm for operand order change.
8126         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8127         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8129         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8130         Reverse order of parameters.
8131         (__lll_timedwait_tid): Remove regparms attribute.
8132         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8133         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8135         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8136         (__lll_timedwait_tid): Remove one unnecessary instruction.
8138         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8139         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8140         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8141         lowlevelmutex.S.
8143         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8144         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8145         for NOT_IN_libc.
8146         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8147         lowlevellock.S.
8149         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8150         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8151         for libc.so.
8152         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8153         define LOCK here (if UP is not defined).  The actual code is in
8154         lowlevelmutex.S.
8156         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8157         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8158         __lll_timedwait_tid for libc.so.
8159         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8160         define LOCK here (if UP is not defined).  The actual code is in
8161         lowlevellock.S.
8163         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8164         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8165         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8166         instead of lowlevelsem.h.
8167         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8168         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8169         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8171         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8172         lowlevelrwlock.sym.
8173         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8174         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8175         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8177         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8178         register loading.
8179         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8180         last changed.  D'oh.
8182         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8184         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8185         of __libc_locking_needed.
8186         (lll_trylock): Initialize %eax to zero.
8188         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8189         pthread_cond_t definition.
8191 2003-03-10  Roland McGrath  <roland@redhat.com>
8193         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8194         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8195         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8196         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8197         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8199         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8200         Instead of setting PD->multiple_threads, set globals
8201         __pthread_multiple_threads and __libc_multiple_threads.
8202         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8203         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8204         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8206         * descr.h (struct pthread): Conditionalize first member on
8207         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8208         containing an anonymous tcbhead_t.  Move `list' member out.
8209         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8210         * allocatestack.c: Remove use of `header.data.' prefix.
8211         * pthread_create.c: Likewise.
8212         * init.c (__pthread_initialize_minimal_internal): Likewise.
8213         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8214         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8215         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8216         * sysdeps/x86_64/tls.h: Likewise.
8217         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8218         (SINGLE_THREAD_P): Likewise.
8219         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8220         (SINGLE_THREAD_P): Likewise.
8221         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8222         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8224 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8226         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8228         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8229         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8231         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8232         leftovers from the ia32 code.
8234         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8235         memory load.
8236         (clear_once_control): Don't load %esi.
8238         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8239         handling.
8241         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8243         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8244         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8246         * Makefile (tests): Add tst-cond10.
8247         * tst-cond10.c: New file.
8249 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8251         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8252         * tst-signal3.c (do_test): Likewise.
8253         * tst-sem5.c (do_test): Likewise.
8254         * tst-kill6.c (do_test): Likewise.
8255         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8257         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8258         of inc/dec.
8259         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8260         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8261         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8262         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8263         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8264         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8265         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8266         Likewise.
8267         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8268         Likewise.
8269         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8270         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8274         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8275         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8276         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8278         * allocatestack.c (allocate_stack): If mprotect() fails free the
8279         TLS memory.
8281 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8283         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8285         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8286         lll_wake_tid.  This was used only to work around kernel limits in
8287         the early days.
8288         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8289         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8290         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8291         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8293         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8294         (__pthread_initialize_minimal_internal): Change initialization of
8295         __static_tls_align_m1 appropriately.
8296         * pthreadP.h (__static_tls_align_m1): Renamed from
8297         __static_tls_align.
8298         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8299         instead of __static_tls_align-1.
8301 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8303         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8305         * pthread_create.c: Define __pthread_keys using nocommon
8306         attribute, not by placing it explicitly in bss.
8307         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8309         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8310         Use it in mmap call to allocate stacks.
8312         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8314         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8315         result of the thread function.
8317 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8319         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8320         version is just fine.
8322         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8323         (__pthread_child_handler): Renamed from pthread_child_handler,
8324         exported, and marked hidden.  Change all users.
8325         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8326         free __pthread_child_handler from child list.
8328 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8330         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8332         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8333         Fix handling of cancellation and failing pthread_mutex_unlock call.
8334         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8335         (__pthread_cond_wait): Likewise.
8337         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8338         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8339         lll_futex_timed_wait call.
8340         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8341         (pthread_rwlock_timedwrlock): Likewise.
8343         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8344         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8345         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8347         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8348         check of lll_futex_wake return value.
8350 2003-03-03  Roland McGrath  <roland@redhat.com>
8352         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8354         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8355         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8356         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8358 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8360         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8361         error for CPU clocks.
8363         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8364         _POSIX_MONOTONIC_CLOCK.
8365         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8367         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8368         recent kernels.
8370 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8372         * descr.h (struct pthread): Move cleanup field to the front.
8374 2003-03-01  Roland McGrath  <roland@redhat.com>
8376         * sem_open.c (sem_open): Braino fix.
8378 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8380         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8381         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8382         __pthread_cleanup_pop functionality.
8383         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8385         * descr.h (struct pthread): Move tid field to the front now that
8386         it is often used.
8388         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8389         (__lll_mutex_timedlock_wait): Remove.
8390         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8391         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8392         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8393         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8394         (lll_unlock_wake_cb): Don't save and restore %esi.
8395         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8396         %esi.
8397         (__lll_timedwait_tid): Add alignment.
8398         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8399         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8400         %esi.
8401         (__lll_timedwait_tid): Removed.
8402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8403         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8404         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8405         (pthread_barrier_wait): Don't save, load, and restore %esi for
8406         last thread.
8407         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8408         (__pthread_cond_signal): Don't save, load, and restore %esi.
8409         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8410         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8411         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8412         Don't save, load, and restore %esi.
8414 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8416         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8417         Release lock before waking up the waiters.
8419         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8421         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8422         (reader_thread): Likewise.
8424         * sysdeps/pthread/pthread_rwlock_unlock.c
8425         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8426         to wake up readers if there are none.
8428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8429         Release internal lock before wake threads.
8431 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8433         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8434         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8435         predefined.
8436         * tst-rwlock9.c: Likewise.
8437         * tst-rwlock10.c: New file.
8438         * tst-rwlock11.c: New file.
8440         * Makefile (tests): Add tst-dlsym1.
8441         * tst-dlsym1.c: New file.
8443         * init.c (__pthread_initialize_minimal_internal): Set
8444         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8445         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8447 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8449         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8451         * tst-cond2.c: Fix sychronization with child.
8453         * tst-rwlock8.c (reader_thread): Remove unused variable.
8455         * Makefile: Add rules to build and run tst-tls3.
8456         * tst-tls3.c: New file.
8457         * tst-tls3mod.c: New file.
8459         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8460         * tst-rwlock8.c: New file.
8461         * tst-rwlock9.c: New file.
8462         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8463         complete broken rwlock implementation.
8464         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8465         Likewise.
8466         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8467         Likewise.
8468         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8469         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8470         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8471         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8472         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8473         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8474         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8476 2003-02-23  Roland McGrath  <roland@redhat.com>
8478         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8480 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8482         * Makefile (tests): Add tst-context1.
8483         * tst-context1.c: New file.
8485         * Makefile (tests): Add tst-tls1 and tst-tls2.
8486         * tst-tls1.c: New file.
8487         * tst-tls2.c: New file.
8489         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8490         for failed cmpxchg.
8492         * pthread_create.c (start_thread): Set EXITING_BIT early.
8494         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8495         (THREAD_GETMEM_NC): Likewise.
8497 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8499         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8500         off 3 more bytes by using offset-less instructions when possible.
8502         * Makefile: Add dependency for $(objpfx)version.d.
8504         * eintr.c (eintr_source): Add unnecessary return but the compiler
8505         insists.
8507         * tst-kill3.c: Include <unistd.h>.
8509 2003-02-21  Roland McGrath  <roland@redhat.com>
8511         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8513 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8515         * Makefile (tests): Add tst-eintr1.
8516         (distribute): Add eintr.c.
8517         * tst-eintr1.c: New file.
8518         * eintr.c: New file.
8520         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8522         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8523         Disallow sending SIGCANCEL.
8525         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8526         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8527         * tst-kill1.c: New file.
8528         * tst-kill2.c: New file.
8529         * tst-kill3.c: New file.
8530         * tst-kill5.c: New file.
8531         * tst-kill6.c: New file.
8532         * tst-basic7.c: Renamed to...
8533         * tst-kill4.c: ...this.
8535 2003-02-21  Roland McGrath  <roland@redhat.com>
8537         * Makefile (install-lib-ldscripts): New variable.
8539 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8541         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8542         * pthread_cancel.c: Use INVALID_TD_P.
8543         * pthread_detach.c: Likewise.
8544         * pthread_getschedparam.c: Likewise.
8545         * pthread_setschedparam.c: Likewise.
8546         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8547         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8548         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8549         * pthread_timedjoin.c: Likewise.
8551         * tst-basic7.c: Include <signal.h>.
8553         * pthread_join.c (pthread_join): Limited checking for invalid
8554         descriptors.
8555         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8557 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8559         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8560         beginning of the loop.  Clear the entire first block of TSD.
8561         * Makefile (tests): Add tst-key4.
8562         * tst-key4.c: New file.
8564 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8566         * Makefile (tests): Add tst-basic7.
8567         * tst-basic7.c: New file.
8569         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8570         Add some more __builtin_expect.
8572         * pthreadP.h: Define dummy version of DEBUGGING_P.
8574 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8576         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8577         _POSIX_THREAD_PRIORITY_SCHEDULING.
8578         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8579         _XOPEN_REALTIME_THREADS.
8580         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8582         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8583         kernel returns EINVAL for PID <= 0, work around it.
8585         * Makefile (tests): Add tst-signal5.
8586         * tst-signal5.c: New file.
8588         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8589         and LOGIN_NAME_MAX.
8591         * tst-cancel1.c (tf): Block all signals.
8593         * Makefile (tests): Add tst-basic6.
8594         * tst-basic6.c: New file.
8596         * tst-basic1.c: Add test for process ID.
8598         * Makefile (tests): Add tst-cancel10.
8599         * tst-cancel10.c: New file.
8601         * Makefile (tests): Add tst-signal4.
8602         * tst-signal4.c: New file.
8604         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8605         __sigismember instead of sigismember.  Add __builtin_expect.
8607 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8609         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8610         pthread_setcancelstate, and pthread_rwlock_setpshared.
8612         * tst-cancel7.c (do_test): Make sure the pid file exists before
8613         canceling the thread.
8615         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8616         pthread_rwlock_timedrdlock tests.
8617         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8618         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8619         Check for invalid tv_nsec field.
8620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8621         Likewise.
8623         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8624         recursive mutex of overflow.
8626         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8628         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8629         going into an endless loop.
8630         * Makefile (tests): Add tst-cancel9.
8631         * tst-cancel9.c: New file.
8633         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8635 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8637         * tst-mutex5.c (do_test): Add more timedlock tests.
8639         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8640         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8642         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8643         use INLINE_SYSCALL.  Error number is returned, not -1.
8645         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8646         and __deallocate_stack with internal_function.
8647         * pthread_create.c: Adjust definitions appropriately.
8648         * allocatestack.c: Likewise.
8650         * pthread_join.c: Add one more __builtin_expect.
8651         * pthread_timedjoin.c: Likewise.
8653         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8654         not data of sequence number does not match.
8655         Add one __builtin_expect.
8657         * Makefile (tests): Add tst-clock1.
8658         * tst-clock1.c: New file.
8660         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8661         negative arguments.
8662         * Makefile (tests): Add tst-basic5.
8663         * tst-basic5.c: New file.
8665 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8667         * Makefile (tests): Add tst-basic4.
8668         * tst-basic4.c: New file.
8670         * pthreadP.h: Add declaraction for __nptl_nthreads.
8671         * pthread_create.c: Define __nptl_nthreads
8672         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8673         after thread is done.  If then zero, call exit(0).
8674         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8675         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8676         * init.c (pthread_functions): Initialize ptr_nthreads.
8677         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8678         (__reclaim_stacks): Decrement __nptl_nthreads.
8679         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8680         Define.
8681         * Makefile (tests): Add tst-basic3.
8682         * tst-basic3.c: New file.
8684         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8685         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8686         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8687         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8688         if asynchronous canceling is enabled.
8689         * pthread_join.c (pthread_join): When recognizing circular joins,
8690         take into account the other thread might be already canceled.
8691         * Makefile (tests): Add tst-join5.
8692         * tst-join5.c: New file.
8694         * Makefile (tests): Add tst-join4.
8695         * tst-join4.c: New file.
8697 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8699         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8701 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8703         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8704         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8705         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8706         warning.
8707         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8708         to avoid warning.
8709         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8710         error if lll_futex_wake failed.
8712 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8714         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8715         handling of cancellation and failung pthread_mutex_unlock call.
8716         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8717         * Makefile (tests): Add tst-cond8 and tst-cond9.
8718         * tst-cond8.c: New file.
8719         * tst-cond9.c: New file.
8721         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8723         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8724         non-standard initializers with __USE_GNU.
8726         * Makefile (tests): Add tst-cleanup3.
8727         * tst-cleanup3.c: New file.
8729 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8731         * Makefile (tests): Add tst-attr1 and tst-attr2.
8732         * tst-attr1.c: New file.
8733         * tst-attr2.c: New file.
8735         * Makefile: Add rules to build and run tst-atfork2 test.
8736         * tst-atfork2.c: New file.
8737         * tst-atfork2mod.c: New file.
8739         * sysdeps/unix/sysv/linux/unregister-atfork.c
8740         (__unregister_atfork): Free the memory allocated for the handlers
8741         after removing them from the lists.
8743         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8744         cleanup function.
8746         * tst-atfork1.c (do_test): Wait for the child we forked.
8747         Report error in child.
8749         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8751         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8753 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8755         * Makefile (tests): Add tst-cancel8.
8756         * tst-cancel8.c: New file.
8758         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8759         clearing of control variable.
8760         * Makefile (tests): Add tst-once3 and tst-once4.
8761         * tst-once3.c: New file.
8762         * tst-once4.c: New file.
8764 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8766         * sysdeps/sh/Makefile: New file.
8767         * sysdeps/sh/bits/atomic.h: New file.
8768         * sysdeps/sh/pthread_spin_init.c: New file.
8769         * sysdeps/sh/pthread_spin_lock.c: New file.
8770         * sysdeps/sh/pthread_spin_trylock.S: New file.
8771         * sysdeps/sh/pthread_spin_unlock.S: New file.
8772         * sysdeps/sh/pthreaddef.h: New file.
8773         * sysdeps/sh/tcb-offsets.sym: New file.
8774         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8775         * sysdeps/sh/tls.h: New file.
8776         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8777         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8778         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8779         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8780         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8781         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8782         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8783         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8784         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8785         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8786         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8787         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8788         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8789         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8790         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8791         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8792         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8793         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8794         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8795         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8796         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8797         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8798         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8799         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8800         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8801         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8802         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8803         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8804         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8805         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8807 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8809         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8810         according to POSIX.
8812         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8814 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8816         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8817         (TLS_GET_FS): New #define.
8818         (TLS_SET_FS): New #define.
8819         Correct value of __NR_set_thread_area.
8821         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8823 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8825         * Makefile (tests): Add tst-popen1.
8826         * tst-popen1.c: New file.
8828         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8829         but inactive generalization.
8830         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8832         Minor optimization, remove one instruction.
8833         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8835 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8837         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8839 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8841         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8842         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8843         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8844         * sysdeps/pthread/pthread_cond_signal.c: New file.
8845         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8846         * sysdeps/pthread/pthread_cond_wait.c: New file.
8847         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8848         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8849         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8850         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8851         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8852         * sysdeps/s390/Makefile: New file.
8853         * sysdeps/s390/bits/atomic.h: New file.
8854         * sysdeps/s390/pthread_spin_init.c: New file.
8855         * sysdeps/s390/pthread_spin_lock.c: New file.
8856         * sysdeps/s390/pthread_spin_trylock.c: New file.
8857         * sysdeps/s390/pthread_spin_unlock.c: New file.
8858         * sysdeps/s390/pthreaddef.h: New file.
8859         * sysdeps/s390/tcb-offsets.sym: New file.
8860         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8861         * sysdeps/s390/tls.h: New file.
8862         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8863         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8864         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8865         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8866         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8867         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8868         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8869         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8870         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8871         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8872         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8873         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8874         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8875         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8876         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8877         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8878         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8879         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8880         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8881         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8882         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8883         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8884         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8886 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8888         * atomic.h: Add a couple more default implementations.
8889         (atomic_compare_and_exchange_acq): Use
8890         __arch_compare_and_exchange_32_acq in return value definition.  It
8891         always exists.
8892         (atomic_bit_set): Renamed from atomic_set_bit.
8893         Add missing atomic_ prefixes.
8895         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8896         thread library is available, use correct value to mark initialized
8897         once variable.
8899 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8901         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8902         __sysconf to determine pagesize.
8904         * pthread_create.c: Include <atomic.h>.
8905         * allocatestack.c (allocate_stack): Implement coloring of the
8906         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8907         size minus one.  Adjust users.
8908         * sysdeps/i386/i686/Makefile: New file.
8910 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8912         * allocatestack.c: Improve comment throughout the file.
8914         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8915         (__lll_lock_wait): Add branch prediction.
8916         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8917         (__lll_lock_wait): Likewise.
8918         (lll_unlock_wake_cb): Removed.
8920 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8922         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8923         _POSIX_THREAD_PRIORITY_SCHEDULING.
8925 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8927         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8928         Fix return type of ptr___pthread_getspecific.
8930 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8932         * Makefile (tests): Add tst-umask1.
8933         (tst-umask1-ARGS): Define.
8934         * tst-umask1.c: New file.
8936 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8938         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8939         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8940         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8941         pthread_rwlock_unlock.
8942         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8943         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8944         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8945         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8946         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8947         New file.
8948         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8949         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8950         New file.
8951         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8952         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8953         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8954         New file.
8955         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8956         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8957         New file.
8958         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8959         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8960         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8961         New file.
8962         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8963         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8964         New file.
8965         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8967         * Makefile (libpthread-routines): Remove lowlevelcond and
8968         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8969         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8970         and pthread_cond_broadcast.
8971         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8972         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8973         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8974         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8975         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8976         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8977         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8978         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8979         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8980         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8981         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8982         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8985         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8986         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8987         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8988         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8989         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8990         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8991         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8992         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8993         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8994         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8995         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8996         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8997         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8998         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8999         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9000         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9001         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9003         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9004         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9005         of the code is moved to ...
9006         * sysdeps/pthread/createthread.c: ...here.  New file.
9008 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9010         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9011         (__new_sem_post): Clear %eax before returning.
9012         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9014         * Makefile (tests): Add tst-cleanup2.
9015         * tst-cleanup2.c: New file.
9017         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9018         Interpret first parameter correctly.
9020 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9022         * Makefile (headers): Add bits/semaphore.h.
9024 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9026         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9027         if not SHARED.
9029 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9031         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9032         must be used and mapping failed.
9033         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9035         * Makefile (CFLAGS-pthread_self.os): Define this, not
9036         CFLAGS-pthread_self.c.
9038 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9040         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9041         lll_unlock_wake_cb.
9043         * Makefile (libpthread-routines): Add version.  Add rules to build
9044         version.os and banner.h.
9045         * version.c: New file.
9047 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9049         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9050         the alias unconditional.
9051         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9053 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9055         * Makefile (CFLAGS-pthread_self.c): New definition.
9057 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9059         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9060         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9061         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9062         * init.c (__pthread_initialize_minimal_internal): Likewise.
9064 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9066         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9068         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9069         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9070         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9071         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9072         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9073         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9075 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9077         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9078         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9079         * tst-cancel-wrappers.sh: Remove all exceptions.
9081 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9083         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9084         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9086         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9087         Use __libc_pthread_functions array if SHARED.
9089         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9090         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9092         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9093         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9094         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9095         __libc_ptf_call instead of __libc_maybe_call.
9096         (PTF): New #define.
9097         (__libc_cleanup_region_start): Wrap function name with PTF call.
9098         (__libc_cleanup_region_end): Likewise.
9099         (__libc_cleanup_end): Likewise.
9101         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9102         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9103         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9104         * pthreadP.h: Add prototypes.
9106         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9107         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9108         __pthread_rwlock_unlock aliases.
9109         * pthreadP.h: Add prototypes for new aliases.
9111         * pthreadP.h (struct pthead_functions): Moved to...
9112         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9113         * init.c (pthread_functions): Add initializers for new elements.
9115         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9116         __pthread_cleanup_pop_restore aliases.
9117         * pthreadP.h: Add prototypes.
9119         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9120         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9121         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9122         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9123         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9124         * pthreadP.h: Adjust prototypes and callers.
9126 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9128         * Makefile (tests): Add tst-cancel7.
9129         (tst-cancel7-ARGS): New variable.
9130         * tst-cancel7.c: New file.
9132         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9133         around gcc defficiencies.
9134         * old_pthread_cond_signal.c: Likewise.
9135         * old_pthread_cond_timedwait.c: Likewise.
9136         * old_pthread_cond_wait.c: Likewise.
9138         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9140 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9142         * Makefile (tests): Add tst-cond7.
9143         * tst-cond7.c: New file.
9145         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9146         (condvar_cleanup): Get condvar address from the right place.
9148         * atomic.h: Correct definitions of atomic_full_barrier,
9149         atomic_read_barrier, atomic_write_barrier.
9151         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9152         race-free.
9153         * old_pthread_cond_signal.c: Likewise.
9154         * old_pthread_cond_timedwait.c: Likewise.
9155         * old_pthread_cond_wait.c: Likewise.
9157 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9159         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9161 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9163         * pthreadP.h (pthread_cond_2_0_t): New type.
9164         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9165         Use new type for the 2.0 condvar function prototypes.
9166         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9167         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9168         parameter.
9169         * old_pthread_cond_destroy.c: Likewise.
9170         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9171         * old_pthread_cond_signal.c: Likewise.
9172         * old_pthread_cond_timedwait.c: Likewise.
9173         * old_pthread_cond_wait.c: Likewise.
9175         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9176         (__pthread_cond_wait): Don't save cancellation mode and seq value
9177         in same location.
9179         * herrno.c (__h_errno_location): Don't define as weak.
9181 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9183         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9184         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9185         and pthread_cond_wait.
9186         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9187         Renamed to...
9188         (__pthread_cond_broadcast_2_0): ... this.
9189         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9190         Renamed to...
9191         (__pthread_cond_destroy_2_0): ... this.
9192         * old_pthread_cond_init.c (__old_pthread_cond_init):
9193         Renamed to...
9194         (__pthread_cond_init_2_0): ... this.
9195         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9196         Renamed to...
9197         (__pthread_cond_signal_2_0): ... this.
9198         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9199         Renamed to...
9200         (__pthread_cond_wait_2_0): ... this.
9201         * pthread_cond_destroy.c: Include shlib-compat.h.
9202         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9203         * pthread_cond_init.c: Include shlib-compat.h.
9204         (pthread_cond_init): Change strong_alias into versioned_symbol.
9205         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9206         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9207         fields.
9208         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9209         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9210         __pthread_cond_wait_2_0): New prototypes.
9211         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9212         __old_pthread_cond_init, __old_pthread_cond_signal,
9213         __old_pthread_cond_wait): Removed.
9214         * init.c: Include shlib-compat.h.
9215         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9216         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9217         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9218         ptr___pthread_cond_*_2_0 fields.
9219         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9220         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9222         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9223         LIBC_SIGACTION was not yet defined.
9224         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9225         [!defined LIBC_SIGACTION] (__sigaction): New function and
9226         libc_hidden_weak.
9227         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9228         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9230 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9232         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9234 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9236         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9237         New, larger type definition.
9238         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9239         implementation.
9240         * Versions [libpthread]: Add definitions for new pthread_cond_*
9241         interfaces for version GLIBC_2.3.2.
9242         * pthread_cond_init.c: Update initialization for new type definition.
9243         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9244         pthread_cond_timedwait, pthread_cond_signal, and
9245         pthread_cond_broadcast.  Add old_pthread_cond_init,
9246         old_pthread_cond_destroy, old_pthread_cond_wait,
9247         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9248         old_pthread_cond_broadcast.
9249         * old_pthread_cond_broadcast.c: New file.
9250         * old_pthread_cond_destroy.c: New file.
9251         * old_pthread_cond_init.c: New file.
9252         * old_pthread_cond_signal.c: New file.
9253         * old_pthread_cond_timedwait.c: New file.
9254         * old_pthread_cond_wait.c: New file.
9255         * pthreadP.h: Add prototypes for the compatibility interfaces.
9257         * pthread_cond_destroy.c: Don't include <errno.h>.
9259 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9261         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9262         unnecessary zero offset when addressing MUTEX.
9264 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9266         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9267         __register_atfork.
9268         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9269         for __register_atfork.
9271 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9273         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9274         instead of ASSEMBLER test macro.
9276         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9277         __libc_current_sigrtmax): Add libc_hidden_def.
9279         * sysdeps/pthread/list.h: Remove assert.h include.
9281 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9283         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9284         __pthread_initialize_minimal_internal not
9285         __pthread_initialize_minimal.
9287 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9289         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9290         __pthread_initialize_minimal as hidden.
9292         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9293         constructor.
9295 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9297         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9298         $(common-objpfx)format.lds, include that into the output script.
9299         Fix comment.
9300         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9302 2002-12-28  Andreas Jaeger  <aj@suse.de>
9304         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9305         nsec resolution changes.
9306         (xstat64_conv): Likewise.
9307         (xstat32_conv): Likewise.
9308         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9309         struct kernel_stat.
9310         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9311         structs stat and stat64.
9312         * time/time.h (__timespec_defined): Define for __USE_MISC.
9313         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9315 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9317         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9318         argument.
9319         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9320         (pthread_exit): Use strong_alias to avoid warnings.
9321         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9322         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9323         ptr___pthread_attr_init_2_*.
9324         * init.c (pthread_functions): Adjust.
9326 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9328         * forward.c: Make all functions available by default again.  It
9329         caused too much trouble.
9331         * pt-siglongjmp.c: Removed.
9333 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9335         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9336         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9337         * sysdeps/i386/Makefile: New file.
9338         * sysdeps/i386/tcb-offsets.sym: New file.
9339         * sysdeps/pthread/tcb-offsets.h: New file.
9340         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9341         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9343         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9344         __register_atfork...
9345         (GLIBC_2.3.2): ...here.
9347 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9349         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9350         pthread_attr_setstackaddr with __attribute_deprecated__.
9352 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9354         * pt-system.c (system): Remove cancellation handling.
9355         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9356         cancellation routines.
9358 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9360         * descr.h: Include <dl-sysdep.h>.
9361         (struct pthread): Move header.data.list to the back of the struct.
9362         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9363         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9364         (SYSINFO_OFFSEET): Likewise.
9366 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9368         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9369         Define.
9370         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9371         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9372         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9373         (USE_DL_SYSINFO): Undef.
9375 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9377         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9378         $(common-objpfx)libc.so.
9379         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9380         it is bigger than pipe buffer size even on arches with bigger
9381         page size.
9382         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9384 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9386         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9387         correct errno access for case that USE___THREAD is not defined.
9389 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9391         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9392         Patch by Marijn Ros <marijn@mad.scientist.com>.
9394 2002-12-22  Roland McGrath  <roland@redhat.com>
9396         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9398 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9400         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9402 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9404         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9405         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9406         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9408         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9409         of int $0x80.
9410         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9411         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9412         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9413         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9414         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9415         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9416         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9417         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9419         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9420         sysenter.
9421         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9423         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9425         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9426         in new TCB.
9427         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9428         that sysinfo is properly initialized.
9429         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9430         to 1 only for ld.so.
9432         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9433         RTLD_CORRECT_DYNAMIC_WEAK.
9435 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9437         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9438         Use return 0 as 6th argument to FORWARD4.
9439         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9441 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9443         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9444         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9445         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9446         (INIT_SYSINFO): New #define.
9447         (TLS_TP_INIT): Use INIT_SYSINFO.
9448         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9449         At test to make sure SYSINFO_OFFSET value is correct.
9450         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9452 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9454         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9455         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9456         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9457         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9458         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9459         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9460         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9462 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9464         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9465         macro instead of using int $0x80 directly.
9467         * sysdeps/pthread/bits/stdio-lock.h: New file.
9468         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9469         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9470         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9471         * Makefile (routines): Add libc-lowlevelmutex.
9473         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9474         __i686.get_pc_thunk.dx.
9476 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9478         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9479         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9480         ($(objpfx)tst-cancel-wrappers.out): New rule.
9481         * tst-cancel-wrappers.sh: New test.
9482         * tst-locale1.c: Include signal.h.
9483         (uselocale): Test static linking of __libc_current_sigrt*.
9485 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9487         * Makefile (tests): Add tst-cancel6.
9488         * tst-cancel6.c: New file
9490 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9492         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9493         Define meaningfully for assembler as well.
9494         * pthreadP.h (struct pthread_functions): Remove
9495         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9496         and ptr_pthread_attr_init_2_1 fields.
9497         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9498         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9499         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9500         (FORWARD3): Define using FORWARD4.
9501         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9502         versions.
9503         * pt-system.c: Remove duplicate stdlib.h include.
9505 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9507         * sem_init.c: Define sem_init@GLIBC_2.0.
9508         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9509         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9511         * flockfile.c: Moved to...
9512         * sysdeps/pthread/flockfile.c: ...here.  New file.
9513         * funlockfile.c: Moved to...
9514         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9515         * ftrylockfile.c: Moved to...
9516         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9518 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9520         * libc-cancellation.c: Guard both function with
9521         #if !defined NOT_IN_libc.
9522         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9523         automatically provided pthread wrappers.
9524         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9525         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9526         nor in libpthread.
9527         * pt-open.c: Removed.
9528         * pt-fcntl.c: Removed.
9529         * pt-fsync.c: Removed.
9530         * pt-lseek.c: Removed.
9531         * pt-msgrcv.c: Removed.
9532         * pt-msgsnd.c: Removed.
9533         * pt-msync.c: Removed.
9534         * pt-nanosleep.c: Removed.
9535         * pt-open64.c: Removed.
9536         * pt-pause.c: Removed.
9537         * pt-pread.c: Removed.
9538         * pt-pread64.c: Removed.
9539         * pt-pwrite.c: Removed.
9540         * pt-pwrite64.c: Removed.
9541         * pt-read.c: Removed.
9542         * pt-recv.c: Removed.
9543         * pt-recvfrom.c: Removed.
9544         * pt-recvmsg.c: Removed.
9545         * pt-send.c: Removed.
9546         * pt-sendto.c: Removed.
9547         * pt-sigtimedwait.c: Removed.
9548         * pt-sigwait.c: Removed.
9549         * pt-wait.c: Removed.
9550         * pt-waitpid.c: Removed.
9551         * pt-write.c: Removed.
9552         * pt-accept.c: Removed.
9553         * pt-close.c: Removed.
9554         * pt-connect.c: Removed.
9555         * pt-lseek64.c: Removed.
9556         * pt-sendmsg.c: Removed.
9557         * pt-tcdrain.c: Removed.
9559 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9561         * init.c (__pthread_initialize_minimal_internal): Renamed from
9562         __pthread_initialize_minimal.  Make old name an alias.  This
9563         converts a normal relocation into a relative relocation.
9565         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9567         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9568         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9569         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9570         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9571         pt-sigwaitinfo, pt-waitid, and pt-writev.
9572         * pt-creat.c: Removed.
9573         * pt-poll.c: Removed.
9574         * pt-pselect.c: Removed.
9575         * pt-readv.c: Removed.
9576         * pt-select.c: Removed.
9577         * pt-sigpause.c: Removed.
9578         * pt-sigsuspend.c: Removed.
9579         * pt-sigwaitinfo.c: Removed.
9580         * pt-waitid.c: Removed.
9581         * pt-writev.c: Removed.
9583         * init.c (pthread_functions): New variable.
9584         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9585         (or NULL) to __libc_pthread_init.
9586         * forward.c: Rewrite to use __libc:pthread_functions array to get
9587         function addresses.
9588         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9589         prototype.
9590         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9591         Take new parameter.  Copy content of variable pointed to by it
9592         to __libc_pthread_init.
9594         * pthreadP.h (struct pthread_functions): New type.
9595         (__libc_pthread_init): Declare.
9597         * pthread_attr_destroy.c: Add namespace protected alias.
9598         * pthread_attr_getdetachstate.c: Likewise.
9599         * pthread_attr_getinheritsched.c: Likewise.
9600         * pthread_attr_getschedparam.c: Likewise.
9601         * pthread_attr_getschedpolicy.c: Likewise.
9602         * pthread_attr_getscope.c: Likewise.
9603         * pthread_attr_setdetachstate.c: Likewise.
9604         * pthread_attr_setinheritsched.c: Likewise.
9605         * pthread_attr_setschedparam.c: Likewise.
9606         * pthread_attr_setschedpolicy.c: Likewise.
9607         * pthread_attr_setscope.c: Likewise.
9608         * pthread_cond_broadcast.c: Likewise.
9609         * pthread_cond_destroy.c: Likewise.
9610         * pthread_cond_init.c: Likewise.
9611         * pthread_cond_signal.c: Likewise.
9612         * pthread_cond_wait.c: Likewise.
9613         * pthread_condattr_destroy.c: Likewise.
9614         * pthread_condattr_init.c: Likewise.
9615         * pthread_equal.c: Likewise.
9616         * pthread_exit.c: Likewise.
9617         * pthread_getschedparam.c: Likewise.
9618         * pthread_self.c: Likewise.
9619         * pthread_setcancelstate.c: Likewise.
9620         * pthread_setschedparam.c: Likewise.
9621         * pthread_mutex_destroy.c: Likewise.
9622         * pthread_mutex_init.c: Likewise.
9623         * pthreadP.h: Add prototypes for the aliases.
9625         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9626         multiple_threads member in correct TCB to 1.
9628         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9629         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9630         member of thread decriptor, otherwise return unconditionally 1.
9632 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9634         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9635         regular Linux version.  Remove file.
9636         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9637         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9638         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9639         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9640         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9641         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9642         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9643         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9644         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9645         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9646         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9647         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9648         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9649         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9650         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9651         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9652         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9653         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9654         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9655         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9656         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9657         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9658         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9659         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9660         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9661         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9662         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9663         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9664         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9665         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9667 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9669         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9670         * sysdeps/unix/sysv/linux/open.c: Removed.
9671         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9672         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9673         * sysdeps/unix/sysv/linux/msync.c: Removed.
9674         * sysdeps/unix/sysv/linux/read.c: Removed.
9675         * sysdeps/unix/sysv/linux/close.c: Removed.
9676         * sysdeps/unix/sysv/linux/creat.c: Removed.
9677         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9678         * sysdeps/unix/sysv/linux/pause.c: Removed.
9679         * sysdeps/unix/sysv/linux/select.c: Removed.
9680         * sysdeps/unix/sysv/linux/write.c: Removed.
9682 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9684         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9685         element in TCB to see whether locking is needed.
9687         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9688         MULTIPLE_THREADS_OFFSET value is correct.
9690         * sysdeps/unix/sysv/linux/close.c: New file.
9691         * sysdeps/unix/sysv/linux/connect.S: New file.
9692         * sysdeps/unix/sysv/linux/creat.c: New file.
9693         * sysdeps/unix/sysv/linux/fsync.c: New file.
9694         * sysdeps/unix/sysv/linux/llseek.c: New file.
9695         * sysdeps/unix/sysv/linux/lseek.c: New file.
9696         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9697         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9698         * sysdeps/unix/sysv/linux/msync.c: New file.
9699         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9700         * sysdeps/unix/sysv/linux/open.c: New file.
9701         * sysdeps/unix/sysv/linux/open64.c: New file.
9702         * sysdeps/unix/sysv/linux/pause.c: New file.
9703         * sysdeps/unix/sysv/linux/poll.c: New file.
9704         * sysdeps/unix/sysv/linux/pread.c: New file.
9705         * sysdeps/unix/sysv/linux/pread64.c: New file.
9706         * sysdeps/unix/sysv/linux/pselect.c: New file.
9707         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9708         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9709         * sysdeps/unix/sysv/linux/readv.c: New file.
9710         * sysdeps/unix/sysv/linux/recv.S: New file.
9711         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9712         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9713         * sysdeps/unix/sysv/linux/select.c: New file.
9714         * sysdeps/unix/sysv/linux/send.S: New file.
9715         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9716         * sysdeps/unix/sysv/linux/sendto.S: New file.
9717         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9718         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9719         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9720         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9721         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9722         * sysdeps/unix/sysv/linux/system.c: New file.
9723         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9724         * sysdeps/unix/sysv/linux/wait.c: New file.
9725         * sysdeps/unix/sysv/linux/waitid.c: New file.
9726         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9727         * sysdeps/unix/sysv/linux/writev.c: New file.
9728         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9730         * pt-readv.c: Fix comment.
9732 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9734         * tst-cleanup1.c: Include stdlib.h.
9736         * tst-cancel5.c: New test.
9737         * Makefile (tests): Add tst-cancel5.
9738         (tst-cancel5): Link against libc.so libpthread.so in that order.
9740 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9742         * forward.c (test_loaded): Prevent recursive calls.
9744         * Makefile (routines): Add libc-cancellation.
9745         * libc-cancellation.c: New file.
9746         * descr.h (struct pthread): Add multiple_threads field.
9747         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9748         new thread descriptor to 1.
9749         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9750         Initialize multiple_thread field after successful thread creation.
9751         * cancellation.c (__do_cancel): Move to pthreadP.h.
9752         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9753         (__pthread_disable_asynccancel): Add internal_function attribute.
9754         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9755         * pthread_setcancelstate.c: Likewise.
9756         * pthread_setcanceltype.c: Likewise.
9757         * pthread_exit.c: Likewise.
9758         * pthreadP.h (CANCELLATION_P): Likewise.
9759         (__do_cancel): Define as static inline.
9760         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9761         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9762         declarations.
9763         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9764         fields.  Define MULTIPLE_THREADS_OFFSET.
9765         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9766         declaration.
9767         * sysdeps/unix/sysv/linux/accept.S: New file.
9768         * sysdeps/unix/sysv/linux/read.c: New file.
9769         * sysdeps/unix/sysv/linux/write.c: New file.
9770         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9771         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9772         initialization of __libc_locking_needed.
9773         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9774         __libc_locking_needed, use multiple_threads field in TCB.
9775         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9777 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9779         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9780         version.
9781         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9783         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9784         access to __libc_locking_needed for PIC.
9786 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9788         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9789         declare for libc.so.
9790         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9791         expression.
9792         (__libc_lock_lock): Put into statement expression.
9793         (__libc_lock_unlock): Remove trailing semicolon.
9794         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9796 2002-12-12  Roland McGrath  <roland@redhat.com>
9798         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9799         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9801 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9803         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9804         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9805         Initialize __libc_locking_needed.
9806         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9807         instead of __register_pthread_fork_handler.
9808         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9809         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9810         fork-gen with libc_pthread_init.
9811         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9812         of __register_pthread_fork_handler.
9813         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9814         of __register_pthread_fork_handler.
9815         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9816         __libc_locking_needed to determine whether lock prefix can be avoided.
9817         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9819 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9821         * Makefile (tests): Add tst-cleanup1.
9822         * tst-cleanup1.c: New file.
9823         * cancellation.c (__cleanup_thread): Removed.
9824         (__do_cancel): Remove call to __cleanup_thread.
9825         * pthreadP.h: Remove __cleanup_thread prorotype.
9827         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9828         Remember function and argument even if cancellation handler
9829         function is not available.
9830         (__libc_cleanup_region_end): Execute registered function directly if
9831         pthread functions are not available.
9832         (__libc_cleanup_end): Likewise.
9834         * init.c (__pthread_initialize_minimal): Fix initialization in
9835         static lib by preventing gcc from being too clever.
9837 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9839         * init.c (__pthread_initialize_minimal): Remove unneccesary
9840         sigaddset call.
9842         * Makefile (tests): We can run tst-locale2 now.
9844 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9846         * Versions: Remove duplicated sigwait entry.
9848 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9850         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9851         inside libpthread.
9853         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9855         * pthreadP.h: Declare __pthread_enable_asynccancel and
9856         __pthread_disable_asynccancel.
9857         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9858         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9859         * cancellation.c (__pthread_enable_asynccancel): New function.
9860         (__pthread_disable_asynccancel): New function.
9861         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9862         * pt-close.c: Likewise.
9863         * pt-connect.c: Likewise.
9864         * pt-creat.c: Likewise.
9865         * pt-fcntl.c: Likewise.
9866         * pt-fsync.c: Likewise.
9867         * pt-lseek.c: Likewise.
9868         * pt-lseek64.c: Likewise.
9869         * pt-msgrcv.c: Likewise.
9870         * pt-msgsnd.c: Likewise.
9871         * pt-msync.c: Likewise.
9872         * pt-nanosleep.c: Likewise.
9873         * pt-open.c: Likewise.
9874         * pt-open64.c: Likewise.
9875         * pt-pause.c: Likewise.
9876         * pt-poll.c: Likewise.
9877         * pt-pread.c: Likewise.
9878         * pt-pread64.c: Likewise.
9879         * pt-pselect.c: Likewise.
9880         * pt-pwrite.c: Likewise.
9881         * pt-pwrite64.c: Likewise.
9882         * pt-read.c: Likewise.
9883         * pt-readv.c: Likewise.
9884         * pt-recv.c: Likewise.
9885         * pt-recvfrom.c: Likewise.
9886         * pt-recvmsg.c: Likewise.
9887         * pt-select.c: Likewise.
9888         * pt-send.c: Likewise.
9889         * pt-sendmsg.c: Likewise.
9890         * pt-sendto.c: Likewise.
9891         * pt-sigpause.c: Likewise.
9892         * pt-sigsuspend.c: Likewise.
9893         * pt-sigtimedwait.c: Likewise.
9894         * pt-sigwait.c: Likewise.
9895         * pt-sigwaitinfo.c: Likewise.
9896         * pt-system.c: Likewise.
9897         * pt-tcdrain.c: Likewise.
9898         * pt-wait.c: Likewise.
9899         * pt-waitid.c: Likewise.
9900         * pt-waitpid.c: Likewise.
9901         * pt-write.c: Likewise.
9902         * pt-writev.c: Likewise.
9903         * pthread_join.c: Likewise.
9904         * pthread_timedjoin.c: Likewise.
9906         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9907         (__xpg_sigpause): New function.
9908         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9910 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9912         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9914         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9915         _GI_pthread_cleanup_pop to pthreadP.h.
9917         * ftrylockfile.c: Use _IO_lock_trylock instead of
9918         pthread_mutex_trylock.
9920         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9921         (CANCEL_RESET): Likewise.
9922         (__pthread_setcanceltype_): Declare.
9923         (__pthread_mutex_lock_internal): Declare.
9924         (__pthread_mutex_unlock_internal): Declare.
9925         (__pthread_once_internal): Declare.
9926         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9927         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9929         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9930         and pthread_mutex_unlock.
9931         * pthread_cond_wait.c: Likewise.
9932         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9933         * pthread_mutex_unlock.c: Likewise.
9935         * pthread_setcanceltype.c: Add additional alias
9936         __pthread_setcanceltype.
9938         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9939         * sem_open.c (sem_open): Likewise.
9940         Use __libc_open, __libc_write, and __libc_close instead of
9941         open, write, and close respectively.
9943         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9944         Rewrite as statement expression since it must return a value.
9946         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9947         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9948         __pthread_kill.
9950         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9951         alias __pthread_once_internal.
9953         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9955 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9957         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9958         * tst-stdio1.c: New file.
9959         * tst-stdio2.c: New file.
9961         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9963         * Makefile (tests): Comment out tst-locale2 for now.
9964         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9966         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9967         -D_IO_MTSAFE_IO.
9968         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9969         Use _IO_lock_init instead of explicit assignment.
9971         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9972         Define __libc_lock_* and __libc_lock_recursive macros with
9973         lowlevellock macros, not pthread mutexes.
9975         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9976         of pthread_mutex_lock.
9977         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9978         instead of pthread_mutex_unlock.
9980 2002-12-06  Roland McGrath  <roland@redhat.com>
9982         * allocatestack.c (__stack_user): Use uninitialized defn.
9983         * init.c (__pthread_initialize_minimal): Initialize it here.
9985 2002-12-05  Roland McGrath  <roland@redhat.com>
9987         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9988         string.
9989         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9991         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9992         missing & here too.
9994 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9996         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9997         lowlevellock.
9998         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9999         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10000         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10001         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10002         for __libc_lock_* macros.
10003         * Makefile (routines): Add libc-lowlevellock.
10005 2002-10-09  Roland McGrath  <roland@redhat.com>
10007         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10008         Under [__PIC__], call the function via the pointer fetched for
10009         comparison rather than a call by name that uses the PLT.
10010         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10011         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10012         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10013         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10014         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10016 2002-12-04  Roland McGrath  <roland@redhat.com>
10018         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10020         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10021         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10023         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10025 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10027         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10028         a completely opaque, non-integer type.
10029         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10031 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10033         * sysdeps/i386/tls.h: Include stdlib.h.
10034         * sysdeps/x86_64/tls.h: Likewise.
10036 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10038         * Makefile (tests): Add tst-locale2.
10039         (tests-static): Likewise.
10040         * tst-locale2.c: New file.
10042         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10043         volatile and add memory clobbers to lock operations.
10045 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10047         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10048         * sysdeps/i386/i486/bits/atomic.h: New file.
10049         * sysdeps/i386/i586/bits/atomic.h: New file.
10050         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10051         include i486 version.
10052         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10053         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10054         Patch by Marijn Ros <marijn@mad.scientist.com>.
10056         * allocatestack.c (get_cached_stack): Don't crash if we first
10057         found a stack with a larger size then needed.
10058         Reported by Hui Huang <hui.huang@sun.com>.
10060         * Makefile (tests): Add tst-sysconf.
10061         * tst-sysconf.c: New file.
10063         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10064         PTHREAD_THREADS_MAX.
10066 2002-12-02  Roland McGrath  <roland@redhat.com>
10068         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10069         Declare using hidden_proto instead of attribute_hidden, so there are
10070         non-.hidden static symbols for gdb to find.
10071         (__pthread_keys): Likewise.
10072         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10073         * allocatestack.c (__stack_user): Likewise.
10074         * pthread_create.c (__pthread_keys): Likewise.
10075         (__nptl_threads_events, __nptl_last_event): Make these static instead
10076         of hidden.
10077         * pthread_key_create.c (__pthread_pthread_keys_max,
10078         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10080 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10082         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10083         statically.
10084         * tst-locale1.c: New file.
10086         * pthread_cond_timedwait.c: Include <stdlib.h>.
10088         * Makefile (tests): Add tst-fork2 and tst-fork3.
10089         * tst-fork2.c: New file.
10090         * tst-fork3.c: New file.
10092 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10094         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10096         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10097         require it to 200112L.
10099         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10100         instruction only if HAVE_CMOV is defined.
10101         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10103         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10105         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10109         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10111 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10113         * sysdeps/x86_64/bits/atomic.h: New file.
10115         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10116         16-bit operations.
10118         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10119         possible since gettid cannot fail.
10121         * sysdeps/x86_64/pthreaddef.h: New file.
10123         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10125         * sysdeps/x86_64/pthread_spin_init.c: New file.
10126         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10127         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10128         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10130         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10131         Add missing lock prefix.  Minute optimization.
10133         * tst-spin2.c (main): Also check successful trylock call.
10135         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10136         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10138         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10139         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10141         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10142         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10143         value in case of an error.  Add support for INTERNAL_SYSCALL.
10145         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10146         value in case of an error.
10148         * sysdeps/x86_64/tls.h: New file.
10150 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10152         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10153         takes the array member name and the index as parameters.
10154         (THREAD_SETMEM_NC): Likewise.
10155         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10156         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10157         interfaces.
10159         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10160         to decide which code to use.
10161         (THREAD_SETMEM_NC): Likewise.
10163         * allocatestack.c (queue_stack): Don't remove stack from list here.
10164         Do it in the caller.  Correct condition to prematurely terminate
10165         loop to free stacks.
10166         (__deallocate_stack): Remove stack from list here.
10168 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10170         * Makefile (tests): Add tst-stack1.
10171         * tst-stack1.c: New file.
10173         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10174         provided stack.
10176         * pthread_attr_getstack.c: Return bottom of the thread area.
10178 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10180         * Makefile (libpthread-routines): Add pt-allocrtsig and
10181         pthread_kill_other_threads.
10182         * pt-allocrtsig.c: New file.
10183         * pthread_kill_other_threads.c: New file.
10184         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10185         all three functions.
10186         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10187         allocrtsig.
10188         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10189         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10190         and __libc_allocate_rtsig_private.
10191         * Versions (libpthread): Export pthread_kill_other_threads_np,
10192         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10194 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10196         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10197         the end of the stack.  Adjust computations.
10198         When mprotect call fails dequeue stack and free it.
10199         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10200         attribute.
10201         * pthread_getattr_np.c: Likewise.
10203         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10204         surprises.
10206 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10208         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10209         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10211 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10213         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10214         * pthread_setspecific.c: Likewise.
10216 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10218         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10219         definitions.  Get them from the official place.
10220         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10222         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10223         Use new CLONE_ flags in clone() calls.
10225         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10226         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10228         * Versions: Add pthread_* functions for libc.
10229         * forward.c: New file.
10231         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10232         errno-loc.
10233         * herrno.c: New file.
10234         * res.c: New file.
10236         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10237         sem_trywait, and sem_timedwait.  Add herrno and res.
10238         * sem_init.c: Don't initialize lock and waiters members.
10239         * sem_open.c: Likewise.
10240         * sem_post.c: Removed.
10241         * sem_wait.c: Removed.
10242         * sem_trywait.c: Removed.
10243         * sem_timedwait.c: Removed.
10244         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10245         Includes full implementations of sem_post, sem_wait, sem_trywait,
10246         and sem_timedwait.
10247         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10248         for new implementation.
10249         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10250         and waiters fields.
10252         * tst-sem3.c: Improve error message.
10253         * tst-signal3.c: Likewise.
10255         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10256         to tell the kernel about the termination futex and to initialize tid
10257         member.  Don't initialize main_thread.
10258         * descr.h (struct pthread): Remove main_thread member.
10259         * cancelllation.c (__do_cancel): Remove code handling main thread.
10260         The main thread is not special anymore.
10262         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10263         size of the stacks to stack_cache_actsize.
10265         * pt-readv.c: Add missing "defined".
10266         * pt-sigwait.c: Likewise.
10267         * pt-writev.c: Likewise.
10269 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10271         * Versions: Export __connect from libpthread.
10272         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10274         * Makefile (libpthread-routines): Add pt-raise.
10275         * sysdeps/unix/sysv/linux/raise.c: New file.
10276         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10277         * sysdeps/generic/pt-raise.c: New file.
10279         * pthread_cond_init.c: Initialize all data elements of the condvar
10280         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10282         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10283         * pthread_create.c: Likewise.
10285         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10286         * tst-key1.c: New file.
10287         * tst-key2.c: New file.
10288         * tst-key3.c: New file.
10290         * Versions: Export pthread_detach for version GLIBC_2.0.
10291         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10293 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10295         * pthread_key_create.c: Terminate search after an unused key was found.
10296         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10298         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10299         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10301 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10303         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10304         dynamic lookup for errno in PIC.
10306         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10307         release the stack lock as soon as possible.
10308         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10309         the static TLS block.
10310         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10312         * cancellation.c: Renamed from cancelation.c.
10313         * Makefile: Adjust accordingly.
10314         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10315         * cleanup_defer.c: Use CANCELLATION_P.
10316         * pthread_testcancel.c: Likewise.
10317         * descr.h: Fix spelling in comments.
10318         * init.c: Likewise.
10319         * pthread_getattr_np.c: Likewise.
10320         * pthread_getschedparam.c: Likewise.
10321         * pthread_setschedparam.c: Likewise.
10322         * Versions: Likewise.
10324         * pt-pselect.c: New file.
10325         * Makefile (libpthread-routines): Add pt-pselect.
10326         * Versions: Add pselect.
10328         * tst-cancel4.c: New file.
10329         * Makefile (tests): Add tst-cancel4.
10331 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10333         * pthread_mutex_lock.c: Always record lock ownership.
10334         * pthread_mutex_timedlock.c: Likewise.
10335         * pthread_mutex_trylock.c: Likewise.
10337         * pt-readv.c: New file.
10338         * pt-writev.c: New file.
10339         * pt-creat.c: New file.
10340         * pt-msgrcv.c: New file.
10341         * pt-msgsnd.c: New file.
10342         * pt-poll.c: New file.
10343         * pt-select.c: New file.
10344         * pt-sigpause.c: New file.
10345         * pt-sigsuspend.c: New file.
10346         * pt-sigwait.c: New file.
10347         * pt-sigwaitinfo.c: New file.
10348         * pt-waitid.c: New file.
10349         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10350         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10351         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10352         * Versions: Add all the new functions.
10354         * tst-exit1.c: New file.
10355         * Makefile (tests): Add tst-exit1.
10357         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10359 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10361         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10363         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10364         call.  pthread_join is an official cancellation point.
10365         * pthread_timedjoin.c: Likewise.
10367         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10368         and the condvar's mutex are retrieved.
10369         * pthread_cond_timedwait.c: Likewise.
10370         Reported by dice@saros.East.Sun.COM.
10372 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10374         * pthreadP.h: Cut out all type definitions and move them...
10375         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10376         * pthreadP.h: Include <internaltypes.h>.
10378         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10379         performance tweaks.
10381         * sem_trywait.c: Shuffle #includes around to get right order.
10382         * sem_timedwait.c: Likewise.
10383         * sem_post.c: Likewise.
10384         * sem_wait.c: Likewise.
10386         * nptl 0.3 released.
10388         * Makefile (tests): Add tst-signal3.
10389         * tst-signal3.c: New file.
10391 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10393         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10394         the asms modify the sem object.
10395         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10397         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10398         the actual members.
10399         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10400         * semaphoreP.h: Include pthreadP.h.
10401         * sem_getvalue.c: Adjust to sem_t change.
10402         * sem_init.c: Likewise.
10403         * sem_open.c: Likewise.
10404         * sem_post.c: Likewise.
10405         * sem_timedwait.c: Likewise.
10406         * sem_trywait.c: Likewise.
10407         * sem_wait.c: Likewise.
10409 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10411         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10412         * tst-basic2.c: New file.
10413         * tst-exec1.c: New file.
10414         * tst-exec2.c: New file.
10415         * tst-exec3.c: New file.
10417         * tst-fork1.c: Remove extra */.
10419         * nptl 0.2 released.  The API for IA-32 is complete.