Remove useless more "if" tests before "free".
[glibc.git] / nptl / ChangeLog
blob0f100e4349e545a127060c19df94181c6e32995d
1 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
3         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
4         cfi directives.
5         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
12 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
14         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
15         cfi directives.
16         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
17         Likewise.
18         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
19         Likewise.
20         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
21         Likewise.
23 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
25         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
27 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
29         David S. Miller  <davem@davemloft.net>
31         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
33 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
35         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
36         __pshared correctly.
37         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
38         Likewise.
39         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
40         Likewise.
41         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
42         Likewise.
43         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
44         Likewise.
45         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
47 2008-04-14  David S. Miller  <davem@davemloft.net>
49         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
50         (__old_sem_wait): Fix argument to lll_futex_wait().
52 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
54         * pthread_create.c: Require pthread_mutex_trylock and
55         pthread_key_delete for libgcc.
57 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
59         [BZ #6020]
60         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
61         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
62         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
64 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
66         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
67         <linux/limits.h> has defined it.
68         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
69         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
70         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
71         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
73 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
75         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
76         of ASSEMBLER.
77         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
78         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
80 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
82         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
83         HAVE_DL_DISCOVER_OSVERSION.
84         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
85         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
87 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
89         [BZ #5778]
90         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
91         _POSIX_CHOWN_RESTRICTED value to zero.
93 2008-01-31  Roland McGrath  <roland@redhat.com>
95         * Makefile (omit-deps): Variable removed.
97 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
99         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
100         unnecessary addr32 prefix.
102 2008-01-29  Roland McGrath  <roland@redhat.com>
104         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
106 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
108         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
110 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
112         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
113         a scratch register.
114         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
115         (__lll_lock_wait_private): Fix typo.
116         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
117         (pthread_barrier_wait): Likewise.  Adjust XADD use.
118         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
119         Adjust XADD use.
120         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
121         (pthread_rwlock_timedrdlock): Return correct return value.
122         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
123         (pthread_rwlock_timedwrlock): Likewise.
125 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
127         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
128         thread returns the program exits with an error code.
130 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
132         * pthread-errnos.sym: Add EOVERFLOW.
133         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
134         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
135         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
136         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
138 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
140         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
141         parameter.  Passed it as permission to mmap.
142         * allocatestack.c (allocate_stack): Pass prot as second parameter
143         to ARCH_RETRY_MMAP.
145 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
147         * tst-basic7.c: Allocate memory for the stack.
149         [BZ #5465]
150         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
151         (__pthread_cond_timedwait): Don't use VDSO.
152         Patch by Michal Januszewski.
154 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
156         [BZ #5455]
157         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
158         Allow label before pthread_cleanup_pop.
159         (pthread_cleanup_pop_restore_np): Likewise.
161 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
163         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
164         Store 2 before returning ETIMEDOUT.
166 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
168         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
169         Store 2 before returning ETIMEDOUT.
170         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
171         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
172         (__lll_lock_wait_private): Optimize.
173         (__lll_lock_wait): Likewise.
175 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
177         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
178         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
179         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
181 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
183         [BZ #5240]
184         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
185         If we time out, try one last time to lock the futex to avoid
186         losing a wakeup signal.
187         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
188         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
190         [BZ #5245]
191         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
192         if necessary.
194 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
196         [BZ #5245]
197         * allocatestack.c (allocate_stack): Change ENOMEM error in case
198         mmap failed to EAGAIN.
199         * Makefile (tests): Add tst-basic7.
200         * tst-basic7.c: New file.
202 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
204         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
205         Use __linkin_atfork.
207 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
209         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
210         missing line continuations.
211         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
212         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
214 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
216         [BZ #5220]
217         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
218         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
219         (struct timer): Add next element.
220         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
221         enqueue timer structure into __active_timer_sigev_thread list.
222         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
223         remove timer struct from __active_timer_sigev_thread.
224         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
225         Before using timer structure make sure it is still on the
226         __active_timer_sigev_thread list.  Keep lock until done.
227         Define __active_timer_sigev_thread and
228         __active_timer_sigev_thread_lock.
230 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
232         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
233         Redefine thread_atfork for use of ATFORK_MEM.
234         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
235         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
236         function.
237         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
238         Use atomic operation when removing first element of list.
240 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
242         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
243         routine instead of an alias to __new_sem_post.
245 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
247         * init.c (__pthread_initialize_minimal): Initialize word to appease
248         valgrind.
250 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
252         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
253         libc.so just clear NAME.
254         (__libc_rwlock_fini): Nop inside of libc.so.
255         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
256         all zeros.
258 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
260         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
261         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
262         unlocking failed.
263         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
265 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
267         [BZ #4938]
268         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
269         reclaimed stack if necessary.
270         * Makefile (tests): Add tst-tsd6.
271         * tst-tsd6.c: New file.
273 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
275         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
276         Add private argument.
278 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
280         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
281         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
283 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
285         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
286         (__lll_robust_timedlock): Pass private as last argument to
287         __lll_robust_timedlock_wait.
288         (__lll_unlock): Fix a pasto.
290 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
292         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
293         sparc_old_sem): New structs.
294         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
295         (__sem_wait_cleanup): New function.
296         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
297         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
298         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
299         lll_futex_wait.
300         (__old_sem_wait): New function.
301         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
302         nptl/sysdeps/unix/sysv/linux/sparc version.
303         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
304         Likewise.
305         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
306         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
307         (__new_sem_trywait): Use sparc_old_sem structure.
308         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
309         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
310         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
311         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
312         lll_futex_timed_wait.
313         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
314         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
315         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
316         lll_futex_wake.
317         (__old_sem_post): New function.
318         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
319         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
320         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
321         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
322         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
323         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
325 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
327         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
328         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
329         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
330         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
331         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
332         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
333         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
334         Use FUTEX_WAKE_OP.
335         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
336         kernel-features.h and tcb-offsets.h.
337         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
338         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
339         process private.
340         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
341         tcb-offsets.h.
342         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
343         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
344         process private.
345         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
346         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
347         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
348         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
349         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
350         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
353 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
355         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
356         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
357         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
358         lll_futex_timed_wait.
360         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
361         __lll_robust_unlock): Rewrite as macros instead of inline functions.
362         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
363         __lll_robust_unlock, __lll_wait_tid): Likewise.
365 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
367         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
368         Fix a pasto.
369         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
370         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
371         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
372         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
373         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
374         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
375         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
377         kernel-features.h.
378         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
379         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
380         process private.  Switch DW_CFA_advance_loc1 and some
381         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
383         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
384         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
385         process private.  Switch DW_CFA_advance_loc{1,2} and some
386         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
387         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
388         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
389         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
390         Likewise.
391         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
392         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
393         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
394         Likewise.
395         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
396         (__pthread_cond_broadcast): Compare %r8 instead of
397         dep_mutex-cond_*(%rdi) with $-1.
398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
399         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
400         of oring.
402 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
404         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
406 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
408         * allocatestack.c: Include kernel-features.h.
409         * pthread_create.c: Likewise.
410         * pthread_mutex_init.c: Likewise.
411         * init.c: Likewise.
412         * pthread_cond_timedwait.c: Likewise.
413         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
414         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
415         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
416         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
417         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
420         Likewise.
421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
422         Likewise.
423         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
424         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
425         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
426         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
428 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
430         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
431         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
432         byte elements.  One of them is the new __shared element.
433         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
434         adjust names of other padding elements.
435         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
436         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
437         byte elements.  One of them is the new __shared element.
438         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
439         adjust names of other padding elements.
440         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
441         Renamed __pad1 element to __shared, adjust names of other padding
442         elements.
443         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
444         (pthread_rwlock_t): Likewise.
445         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
446         typo.
448 2007-08-09  Anton Blanchard  <anton@samba.org>
450         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
452 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
455         <kernel-features.h>.
456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
458 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
460         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
461         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
462         dealing with robust mutexes.
463         * pthread_mutex_timedlock.c: Likewise.
464         * pthread_mutex_trylock.c: Likewise.
465         * pthread_mutex_unlock.c: Likewise.
466         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
468 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
470         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
471         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
472         (PTHREAD_MUTEX_PSHARED): Define.
473         * pthread_mutex_init.c (__pthread_mutex_init): Set
474         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
475         mutexes.
476         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
477         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
478         as second argument to lll_lock.
479         (LLL_MUTEX_TRYLOCK): Take mutex as argument
480         instead of its __data.__lock field.
481         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
482         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
483         to lll_robust_lock.
484         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
485         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
486         instead of mutex->__data.__kind directly, pass
487         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
488         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
489         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
490         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
491         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
492         to lll_timedlock, lll_robust_timedlock, lll_unlock and
493         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
494         of mutex->__data.__kind directly.
495         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
496         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
497         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
498         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
499         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
500         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
501         and lll_futex_wake.
502         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
503         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
504         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
505         directly.
506         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
507         Take mutex as argument instead of its __data.__lock field, pass
508         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
509         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
510         __data.__lock field.
511         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
512         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
513         to lll_robust_cond_lock.
514         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
515         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
516         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
517         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
518         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
519         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
520         lll_futex_wait.
521         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
522         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
523         lll_futex_wake.
524         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
525         pshared variable, pass it to lll_lock, lll_unlock,
526         lll_futex_timedwait and lll_futex_wake.
527         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
528         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
529         and lll_futex_wake.
530         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
531         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
532         macro.
533         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
534         lll_futex_wake_unlock): Likewise.
535         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
536         Likewise.
537         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
538         lll_futex_wake_unlock): Likewise.
539         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
540         Likewise.
541         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
542         lll_futex_wake_unlock): Likewise.
543         (lll_futex_wake): Fix a typo.
544         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
545         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
546         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
547         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
548         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
549         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
550         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
551         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
553         (__pthread_cond_timedwait): Likewise.
554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
555         (__condvar_cleanup, __pthread_cond_wait): Likewise.
557 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
559         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
560         Don't use CGOTSETUP and CGOTRESTORE macros.
561         (CGOTSETUP, CGOTRESTORE): Remove.
562         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
563         @local symbol.
565 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
567         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
568         definitions for private futexes.
569         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
570         kernel-features.h and lowlevellock.h.  Use private futexes if
571         they are available.
572         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
573         (__lll_mutex_lock_wait): Rename to
574         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
575         (__lll_mutex_timedlock_wait): Rename to ...
576         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
577         Don't compile in for libc.so.
578         (__lll_mutex_unlock_wake): Rename to ...
579         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
580         (__lll_timedwait_tid): Use __NR_gettimeofday.
581         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
582         the header from assembler.  Renamed all lll_mutex_* resp.
583         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
584         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
585         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
586         Define.
587         (__lll_lock_wait_private): Add prototype.
588         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
589         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
590         __lll_unlock_wake): Likewise.
591         (lll_lock): Add private argument.  Call __lll_lock_wait_private
592         if private is constant LLL_PRIVATE.
593         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
594         lll_timedlock, lll_robust_timedlock): Add private argument.
595         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
596         if private is constant LLL_PRIVATE.
597         (lll_robust_unlock, lll_robust_dead): Add private argument.
598         (lll_lock_t): Remove.
599         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
600         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
601         lll_cond_wake, lll_cond_broadcast): Remove.
602         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
603         kernel-features.h and lowlevellock.h.
604         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
605         (LOAD_FUTEX_WAIT): Define.
606         (__lll_robust_mutex_lock_wait): Rename to ...
607         (__lll_robust_lock_wait): ... this.  Add private argument.
608         Use LOAD_FUTEX_WAIT macro.
609         (__lll_robust_mutex_timedlock_wait): Rename to ...
610         (__lll_robust_timedlock_wait): ... this.    Add private argument.
611         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
612         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
613         lowlevellock.h.
614         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
615         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
616         __lll_mutex_{lock,unlock}_*.
617         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
618         lowlevellock.h and pthread-errnos.h.
619         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
620         FUTEX_CMP_REQUEUE, EINVAL): Remove.
621         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
622         __lll_mutex_{lock,unlock}_*.
623         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
624         lowlevellock.h and pthread-errnos.h.
625         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
626         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
627         __lll_mutex_{lock,unlock}_*.
628         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
629         lowlevellock.h.
630         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
631         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
632         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
633         (__condvar_tw_cleanup): Likewise.
634         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
635         lowlevellock.h.
636         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
637         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
638         __lll_mutex_{lock,unlock}_*.
639         ( __condvar_w_cleanup): Likewise.
640         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
641         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
642         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
643         lowlevellock.h.
644         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
645         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
646         __lll_mutex_{lock,unlock}_*.
647         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
648         lowlevellock.h.
649         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
650         FUTEX_PRIVATE_FLAG): Remove.
651         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
652         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
653         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
654         lowlevellock.h.
655         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
656         FUTEX_PRIVATE_FLAG): Remove.
657         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
658         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
659         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
660         lowlevellock.h.
661         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
662         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
663         __lll_mutex_{lock,unlock}_*.
664         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
665         lowlevellock.h.
666         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
667         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
668         __lll_mutex_{lock,unlock}_*.
669         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
670         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
671         (__new_sem_post): Use standard initial exec code sequences.
672         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
673         lowlevellock.h.
674         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
675         FUTEX_PRIVATE_FLAG): Remove.
676         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
677         exec code sequences.
678         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
679         (__new_sem_trywait): Use standard initial exec code sequences.
680         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
681         (__new_sem_wait): Use standard initial exec code sequences.
683 2007-07-31  Anton Blanchard  <anton@samba.org>
685         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
686         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
687         atomic_full_barrier.
689 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
691         * allocatestack.c (stack_cache_lock): Change type to int.
692         (get_cached_stack, allocate_stack, __deallocate_stack,
693         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
694         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
695         as second argument to lll_lock and lll_unlock macros on
696         stack_cache_lock.
697         * pthread_create.c (__find_in_stack_list): Likewise.
698         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
699         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
700         as second argument.
701         * descr.h (struct pthread): Change lock and setxid_futex field
702         type to int.
703         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
704         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
705         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
706         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
707         Likewise.
708         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
709         * pthread_cond_init.c (__pthread_cond_init): Likewise.
710         * pthreadP.h (__attr_list_lock): Change type to int.
711         * pthread_attr_init.c (__attr_list_lock): Likewise.
712         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
713         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
714         lll_{,un}lock.
715         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
716         also for lll_futex_{wake,wait}.
717         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
718         a pointer to const.
719         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
720         LLL_SHARED as second argument to lll_{,un}lock.
721         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
722         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
723         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
724         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
725         Likewise.
726         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
727         as second argument to lll_{,un}lock macros on pd->lock.
728         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
729         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
730         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
731         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
732         Likewise.
733         * sysdeps/pthread/createthread.c (do_clone, create_thread):
734         Likewise.
735         * pthread_once.c (once_lock): Change type to int.
736         (__pthread_once): Pass LLL_PRIVATE as second argument to
737         lll_{,un}lock macros on once_lock.
738         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
739         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
740         rwlock->__data.__shared as second argument to them and similarly
741         for lll_futex_w*.
742         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
743         Likewise.
744         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
745         Likewise.
746         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
747         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
748         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
749         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
750         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
751         to lll_{,un}lock macros on __sem_mappings_lock.
752         * sem_open.c (check_add_mapping): Likewise.
753         (__sem_mappings_lock): Change type to int.
754         * semaphoreP.h (__sem_mappings_lock): Likewise.
755         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
756         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
757         instead of lll_*mutex_*, pass LLL_SHARED as last
758         argument.
759         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
760         pass LLL_SHARED as last argument.
761         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
762         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
763         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
764         pass LLL_SHARED as last argument.
765         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
766         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
767         LLL_SHARED as last argument.
768         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
769         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
770         Similarly.
771         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
772         __libc_lock_lock_recursive, __libc_lock_unlock,
773         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
774         argument to lll_{,un}lock.
775         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
776         _IO_lock_unlock): Likewise.
777         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
778         compound literal.
779         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
780         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
781         __fork_lock.
782         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
783         free_mem): Likewise.
784         (__fork_lock): Change type to int.
785         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
786         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
787         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
788         lll_futex_wake.
789         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
790         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
791         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
792         New function.
793         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
794         pass it through to lll_futex_*wait, only compile in when
795         IS_IN_libpthread.
796         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
797         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
798         argument and pass it through to lll_futex_*wait.
799         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
800         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
801         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
802         inline functions to __lll_* resp. __lll_robust_*.
803         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
804         (lll_mutex_dead): Add private argument.
805         (__lll_lock_wait_private): New prototype.
806         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
807         __lll_robust_lock_timedwait): Add private argument to prototypes.
808         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
809         call __lll_lock_wait_private, otherwise pass private to
810         __lll_lock_wait.
811         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
812         __lll_robust_timedlock): Add private argument, pass it to
813         __lll_*wait functions.
814         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
815         call __lll_unlock_wake_private, otherwise pass private to
816         __lll_unlock_wake.
817         (__lll_robust_unlock): Add private argument, pass it to
818         __lll_robust_unlock_wake.
819         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
820         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
821         argument, pass it through to __lll_* inline function.
822         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
823         (lll_lock_t): Remove.
824         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
825         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
826         lll_cond_wake, lll_cond_broadcast): Remove.
827         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
828         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
829         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
830         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
831         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
832         the header from assembler.  Renamed all lll_mutex_* resp.
833         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
834         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
835         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
836         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
837         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
838         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
839         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
840         Remove prototype.
841         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
842         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
843         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
844         (lll_trylock): Likewise, use __lll_trylock_asm, pass
845         MULTIPLE_THREADS_OFFSET as another asm operand.
846         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
847         MULTIPLE_THREADS_OFFSET as last asm operand, call
848         __lll_lock_wait_private if private is constant LLL_PRIVATE,
849         otherwise pass private as another argument to __lll_lock_wait.
850         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
851         lll_timedlock, lll_robust_timedlock): Add private argument, pass
852         private as another argument to __lll_*lock_wait call.
853         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
854         MULTIPLE_THREADS_OFFSET as another asm operand, call
855         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
856         otherwise pass private as another argument to __lll_unlock_wake.
857         (lll_robust_unlock): Add private argument, pass private as another
858         argument to __lll_unlock_wake.
859         (lll_robust_dead): Add private argument, use __lll_private_flag
860         macro.
861         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
862         LLL_MUTEX_LOCK_INITIALIZER.
863         (lll_lock_t): Remove.
864         (LLL_LOCK_INITIALIZER_WAITERS): Define.
865         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
866         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
867         lll_cond_wake, lll_cond_broadcast): Remove.
868         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
869         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
870         2007-05-2{3,9} changes.
871         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
872         kernel-features.h and lowlevellock.h.
873         (LOAD_PRIVATE_FUTEX_WAIT): Define.
874         (LOAD_FUTEX_WAIT): Rewritten.
875         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
876         define.
877         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
878         (__lll_mutex_lock_wait): Rename to ...
879         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
880         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
881         (__lll_mutex_timedlock_wait): Rename to ...
882         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
883         contains private argument.  Don't compile in for libc.so.
884         (__lll_mutex_unlock_wake): Rename to ...
885         (__lll_unlock_wake): ... this.  %ecx contains private argument.
886         Don't compile in for libc.so.
887         (__lll_timedwait_tid): Use __NR_gettimeofday.
888         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
889         kernel-features.h and lowlevellock.h.
890         (LOAD_FUTEX_WAIT): Define.
891         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
892         define.
893         (__lll_robust_mutex_lock_wait): Rename to ...
894         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
895         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
896         macro.
897         (__lll_robust_mutex_timedlock_wait): Rename to ...
898         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
899         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
900         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
901         lowlevellock.h.
902         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
903         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
904         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
905         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
906         to __lll_lock_wait in %edx.
907         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
908         Include lowlevellock.h and pthread-errnos.h.
909         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
910         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
911         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
912         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
913         pass LLL_SHARED in %ecx to both __lll_lock_wait and
914         __lll_unlock_wake.
915         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
916         Include lowlevellock.h and pthread-errnos.h.
917         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
918         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
919         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
920         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
921         pass LLL_SHARED in %ecx to both __lll_lock_wait and
922         __lll_unlock_wake.
923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
924         Include lowlevellock.h.
925         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
926         Don't define.
927         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
928         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
929         pass LLL_SHARED in %ecx to both __lll_lock_wait and
930         __lll_unlock_wake.  Use __NR_gettimeofday.
931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
932         Include lowlevellock.h.
933         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
934         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
935         to __lll_*, pass cond_lock address in %edx rather than %ecx to
936         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
937         and __lll_unlock_wake.
938         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
939         Include lowlevellock.h.
940         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
941         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
942         MUTEX(%ebx) address in %edx rather than %ecx to
943         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
944         and __lll_unlock_wake.  Move return value from %ecx to %edx
945         register.
946         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
947         Include lowlevellock.h.
948         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
949         Don't define.
950         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
951         MUTEX(%ebp) address in %edx rather than %ecx to
952         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
953         and __lll_unlock_wake.  Move return value from %ecx to %edx
954         register.  Use __NR_gettimeofday.
955         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
956         Include lowlevellock.h.
957         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
958         Don't define.
959         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
960         MUTEX(%ebp) address in %edx rather than %ecx to
961         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
962         and __lll_unlock_wake.  Move return value from %ecx to %edx
963         register.  Use __NR_gettimeofday.
964         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
965         Include lowlevellock.h.
966         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
967         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
968         MUTEX(%edi) address in %edx rather than %ecx to
969         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
970         and __lll_unlock_wake.
971         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
972         Include lowlevellock.h.
973         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
974         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
975         MUTEX(%ebx) address in %edx rather than %ecx to
976         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
977         and __lll_unlock_wake.  Move return value from %ecx to %edx
978         register.
979         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
980         lowlevellock.h.
981         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
982         define.
983         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
984         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
985         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
986         lowlevellock.h.
987         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
988         (sem_timedwait): Use __NR_gettimeofday.
989         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
990         lowlevellock.h.
991         (LOCK): Don't define.
992         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
993         lowlevellock.h.
994         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
995         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
996         are waiters.
997         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
998         2007-05-2{3,9} changes.
999         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1000         kernel-features.h and lowlevellock.h.
1001         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1002         (LOAD_FUTEX_WAIT): Rewritten.
1003         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1004         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1005         (__lll_mutex_lock_wait): Rename to ...
1006         (__lll_lock_wait): ... this.  %esi is now private argument.
1007         Don't compile in for libc.so.
1008         (__lll_mutex_timedlock_wait): Rename to ...
1009         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1010         Don't compile in for libc.so.
1011         (__lll_mutex_unlock_wake): Rename to ...
1012         (__lll_unlock_wake): ... this.  %esi contains private argument.
1013         Don't compile in for libc.so.
1014         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1015         kernel-features.h and lowlevellock.h.
1016         (LOAD_FUTEX_WAIT): Define.
1017         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1018         (__lll_robust_mutex_lock_wait): Rename to ...
1019         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1020         Use LOAD_FUTEX_WAIT macro.
1021         (__lll_robust_mutex_timedlock_wait): Rename to ...
1022         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1023         private, use LOAD_FUTEX_WAIT macro.
1024         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1025         lowlevellock.h.
1026         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1027         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1028         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1029         __lll_lock_wait and __lll_unlock_wake.
1030         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1031         Include lowlevellock.h and pthread-errnos.h.
1032         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1033         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1034         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1035         pass LLL_SHARED in %esi to both __lll_lock_wait and
1036         __lll_unlock_wake.
1037         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1038         Include lowlevellock.h and pthread-errnos.h.
1039         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1040         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1041         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1042         pass LLL_SHARED in %esi to both __lll_lock_wait and
1043         __lll_unlock_wake.
1044         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1045         Include lowlevellock.h.
1046         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1047         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1048         pass LLL_SHARED in %esi to both __lll_lock_wait and
1049         __lll_unlock_wake.
1050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1051         Include lowlevellock.h.
1052         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1053         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1054         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1055         and __lll_unlock_wake.
1056         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1057         Include lowlevellock.h.
1058         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1059         Don't define.
1060         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1061         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1062         and __lll_unlock_wake.
1063         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1064         Include lowlevellock.h.
1065         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1066         Don't define.
1067         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1068         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1069         and __lll_unlock_wake.
1070         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1071         Include lowlevellock.h.
1072         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1073         Don't define.
1074         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1075         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1076         and __lll_unlock_wake.
1077         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1078         Include lowlevellock.h.
1079         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1080         Don't define.
1081         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1082         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1083         and __lll_unlock_wake.
1084         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1085         Include lowlevellock.h.
1086         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1087         Don't define.
1088         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1089         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1090         and __lll_unlock_wake.
1091         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1092         lowlevellock.h.
1093         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1094         define.
1095         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1096         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1097         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1098         lowlevellock.h.
1099         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1100         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1101         lowlevellock.h.
1102         (LOCK): Don't define.
1103         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1104         lowlevellock.h.
1105         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1106         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1107         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1108         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1109         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1110         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1111         (__lll_lock_wait_private): New function.
1112         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1113         it to lll_futex_*wait.  Don't compile in for libc.so.
1114         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1115         Remove.
1116         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1117         (struct sparc_pthread_barrier): Remove.
1118         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1119         struct sparc_pthread_barrier.  Pass
1120         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1121         and lll_futex_wait macros.
1122         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1123         Remove.
1124         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1125         Include sparc pthread_barrier_wait.c instead of generic one.
1127 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1129         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1132         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1133         %ecx.
1134         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1135         (pthread_rwlock_timedwrlock): Likewise.
1136         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1137         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1139 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1141         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1143 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1145         * tst-locale2.c (useless): Add return statement.
1147 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1149         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1150         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1151         * pthread_create.c (start_thread): Likewise.
1152         * init.c (sighandler_setxid): Likewise.
1153         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1154         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1155         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1156         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1157         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1158         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1159         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1160         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1161         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1162         Likewise.
1163         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1164         Likewise.
1165         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1166         Likewise.
1167         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1168         __rtld_notify): Likewise.
1169         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1170         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1171         __pthread_once): Likewise.
1172         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1173         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1174         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1175         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1176         (lll_futex_wait): Add private argument, define as wrapper around
1177         lll_futex_timed_wait.
1178         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1179         use __lll_private_flag macro.
1180         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1181         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1182         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1183         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1184         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1185         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1186         (lll_futex_wait): Add private argument, define as wrapper around
1187         lll_futex_timed_wait.
1188         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1189         use __lll_private_flag macro.
1190         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1191         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1192         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1193         Define.
1194         (lll_futex_timed_wait, lll_futex_wake): Use it.
1195         (lll_private_futex_wait, lll_private_futex_timed_wait,
1196         lll_private_futex_wake): Removed.
1197         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1198         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1199         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1200         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1201         (lll_futex_wait): Add private argument, define as wrapper around
1202         lll_futex_timed_wait.
1203         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1204         use __lll_private_flag macro.
1205         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1206         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1207         to lll_futex_*.
1208         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1209         (lll_private_futex_wait, lll_private_futex_timed_wait,
1210         lll_private_futex_wake): Removed.
1211         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1212         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1213         (lll_private_futex_wait, lll_private_futex_timed_wait,
1214         lll_private_futex_wake): Removed.
1215         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1216         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1217         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1218         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1219         (lll_futex_wait): Add private argument, define as wrapper around
1220         lll_futex_timed_wait.
1221         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1222         use __lll_private_flag macro.
1223         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1224         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1225         to lll_futex_*.
1226         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1227         Define.
1228         (lll_futex_timed_wait, lll_futex_wake): Use it.
1229         (lll_private_futex_wait, lll_private_futex_timed_wait,
1230         lll_private_futex_wake): Removed.
1232 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1234         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1235         of the structure for sparc32.
1237 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1239         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1241 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1243         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1244         code used when private futexes are assumed.
1245         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1246         Likewise.
1248 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1250         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1251         (__lll_private_flag): Define.
1252         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1253         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1254         __lll_private_flag.
1255         (lll_private_futex_wait, lll_private_futex_timedwait,
1256         lll_private_futex_wake): Define as wrapper around non-_private
1257         macros.
1258         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1259         (__lll_private_flag): Define.
1260         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1261         (lll_private_futex_wait, lll_private_futex_timedwait,
1262         lll_private_futex_wake): Define as wrapper around non-_private
1263         macros.
1265 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1267         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1268         parameter to lll_futex_wait call.
1269         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1271         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1272         Replace lll_futex_wait with lll_private_futex_wait.
1273         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1274         Add LLL_SHARED parameter to lll_futex_wake().
1276         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1277         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1278         lll_private_futex_wake.
1279         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1280         bit from private parm before syscall.
1281         (lll_futex_timed_wait): Likewise.
1282         (lll_futex_wake): Likewise.
1283         (lll_futex_wake_unlock): Likewise.
1284         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1285         (lll_robust_mutex_unlock): Likewise.
1286         (lll_mutex_unlock_force): Likewise.
1287         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1289 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1291         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1292         compilation when unconditionally using private futexes.
1293         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1294         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1295         Likewise.
1296         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1297         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1299 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1301         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1302         Define.
1304 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1306         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1307         kernel-features.h.
1309 2007-05-16  Roland McGrath  <roland@redhat.com>
1311         * init.c (__nptl_initial_report_events): New variable.
1312         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1313         to that.
1315 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1317         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1318         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1320 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1322         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1323         implementation.
1325 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1327         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1328         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1329         * pthread_mutex_timedlock.c: Likewise.
1330         * pthread_mutex_trylock.c: Likewise.
1331         * pthread_mutex_unlock.c: Likewise.
1333 2007-06-17  Andreas Schwab  <schwab@suse.de>
1335         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1336         sections.
1338 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1340         * allocatestack.c (allocate_stack): Make code compile if
1341         __ASSUME_PRIVATE_FUTEX is set.
1343 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1345         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1346         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1347         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1348         (__pthread_rwlock_wrlock): Likewise.
1349         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1350         (pthread_rwlock_timedrdlock): Likewise.
1351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1352         (pthread_rwlock_timedwrlock): Likewise.
1353         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1354         (__pthread_rwlock_unlock): Likewise.
1356 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1358         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1359         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1360         Split __flags into __flags, __shared, __pad1 and __pad2.
1361         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1362         futexes if they are available.
1363         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1364         in libc-lowlevellock.S allow using private futexes.
1365         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1366         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1367         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1368         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1369         lll_private_futex_timed_wait and lll_private_futex_wake.
1370         (lll_robust_mutex_unlock): Fix typo.
1371         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1372         field in futex command setup.
1373         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1374         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1375         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1376         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1377         if they are available.  Remove clear_once_control.
1378         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1379         futexes if they are available.
1380         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1381         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1382         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1383         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1384         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1385         Wake only when there are waiters.
1386         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1387         support.  Indicate that there are waiters.  Remove unnecessary
1388         extra cancellation test.
1389         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1390         left-over duplication of __sem_wait_cleanup.
1392 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1394         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1395         parameter to lll_futex_wait, lll_futex_timed_wait, and
1396         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1397         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1398         lll_private_futex_wake.
1399         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1400         * allocatestack.c: Adjust use of lll_futex_* macros.
1401         * init.c: Likewise.
1402         * lowlevellock.h: Likewise.
1403         * pthread_barrier_wait.c: Likewise.
1404         * pthread_cond_broadcast.c: Likewise.
1405         * pthread_cond_destroy.c: Likewise.
1406         * pthread_cond_signal.c: Likewise.
1407         * pthread_cond_timedwait.c: Likewise.
1408         * pthread_cond_wait.c: Likewise.
1409         * pthread_create.c: Likewise.
1410         * pthread_mutex_lock.c: Likewise.
1411         * pthread_mutex_setprioceiling.c: Likewise.
1412         * pthread_mutex_timedlock.c: Likewise.
1413         * pthread_mutex_unlock.c: Likewise.
1414         * pthread_rwlock_timedrdlock.c: Likewise.
1415         * pthread_rwlock_timedwrlock.c: Likewise.
1416         * pthread_rwlock_unlock.c: Likewise.
1417         * sysdeps/alpha/tls.h: Likewise.
1418         * sysdeps/i386/tls.h: Likewise.
1419         * sysdeps/ia64/tls.h: Likewise.
1420         * sysdeps/powerpc/tls.h: Likewise.
1421         * sysdeps/pthread/aio_misc.h: Likewise.
1422         * sysdeps/pthread/gai_misc.h: Likewise.
1423         * sysdeps/s390/tls.h: Likewise.
1424         * sysdeps/sh/tls.h: Likewise.
1425         * sysdeps/sparc/tls.h: Likewise.
1426         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1427         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1428         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1429         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1430         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1431         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1432         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1433         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1434         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1435         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1436         Likewise.
1437         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1438         * sysdeps/x86_64/tls.h: Likewise.
1440 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1442         * pthread_getattr_np.c: No need to install a cancellation handler,
1443         this is no cancellation point.
1444         * pthread_getschedparam.c: Likewise.
1445         * pthread_setschedparam.c: Likewise.
1446         * pthread_setschedprio.c: Likewise.
1447         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1448         lll_unlock_wake_cb.
1449         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1450         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1451         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1452         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1453         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1454         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1455         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1456         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1457         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1458         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1459         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1460         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1462         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1463         whether there are more than one thread makes no sense here since
1464         we only call the slow path if the locks are taken.
1465         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1467         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1468         COND_NWAITERS_SHIFT.
1469         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1470         COND_CLOCK_BITS.
1471         * pthread_cond_init.c: Likewise.
1472         * pthread_cond_timedwait.c: Likewise.
1473         * pthread_cond_wait.c: Likewise.
1474         * pthread_condattr_getclock.c: Likewise.
1475         * pthread_condattr_setclock.c: Likewise.
1476         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1477         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1478         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1479         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1480         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1482 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1484         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1485         unistd.h.
1487         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1488         insn suffix.
1489         (THREAD_GSCOPE_GET_FLAG): Remove.
1490         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1491         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1492         changes.
1493         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1494         (THREAD_GSCOPE_GET_FLAG): Remove.
1495         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1496         instead of THREAD_GSCOPE_GET_FLAG.
1497         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1498         it.
1499         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1500         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1501         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1502         THREAD_GSCOPE_WAIT): Define.
1503         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1504         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1505         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1506         THREAD_GSCOPE_WAIT): Define.
1507         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1508         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1509         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1510         THREAD_GSCOPE_WAIT): Define.
1511         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1512         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1513         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1514         THREAD_GSCOPE_WAIT): Define.
1516 2007-05-24  Richard Henderson  <rth@redhat.com>
1518         * descr.h (struct pthread): Add header.gscope_flag.
1519         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1520         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1521         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1522         THREAD_GSCOPE_WAIT): Define.
1524 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1526         * init.c: Make it compile with older kernel headers.
1528         * tst-initializers1.c: Show through exit code which test failed.
1530         * pthread_rwlock_init.c: Also initialize __shared field.
1531         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1532         element in rwlock structure into four byte elements.  One of them is
1533         the new __shared element.
1534         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1535         Likewise.
1536         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1537         __shared, adjust names of other padding elements.
1538         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1539         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1540         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1541         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1542         FUTEX_PRIVATE_FLAG.
1543         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1544         futex to use private operations if possible.
1545         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1546         Likewise.
1547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1548         Likewise.
1549         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1550         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1551         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1552         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1553         Likewise.
1554         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1555         Likewise.
1556         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1557         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1559 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1561         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1562         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1563         * pthread_rwlock_timedrdlock.c: Likewise.
1564         * pthread_rwlock_tryrdlock.c: Likewise.
1566         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1567         optimization.
1569         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1570         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1571         duplication of __sem_wait_cleanup.
1573         * allocatestack.c: Revert last change.
1574         * init.c: Likewise.
1575         * sysdeps/i386/tls.h: Likewise.
1576         * sysdeps/x86_64/tls.h: Likewise.
1577         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1578         header structure.
1579         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1581         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1582         Add private field.
1583         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1584         * pthread_barrier_init.c: Set private flag if pshared and private
1585         futexes are supported.
1586         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1587         private field in futex command setup.
1588         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1590 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1592         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1593         support.
1594         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1595         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1596         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1597         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1598         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1600         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1601         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1602         fields in the structure.
1603         (__old_sem_init): New function.
1604         * sem_open.c: Initialize all fields of the structure.
1605         * sem_getvalue.c: Adjust for renamed element.
1606         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1607         (gen-as-const-headers): Add structsem.sym.
1608         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1609         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1610         struct new_sem.  Add struct old_sem.
1611         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1612         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1613         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1614         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1615         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1616         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1617         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1618         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1619         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1620         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1621         * tst-sem10.c: New file.
1622         * tst-sem11.c: New file.
1623         * tst-sem12.c: New file.
1624         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1625         of struct sem.
1627 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1628             Jakub Jelinek  <jakub@redhat.com>
1630         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1631         Move __pthread_enable_asynccancel right before futex syscall.
1632         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1633         Likewise.
1635 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1637         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1638         THREAD_COPY_PRIVATE_FUTEX): Define.
1639         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1640         THREAD_COPY_PRIVATE_FUTEX): Define.
1641         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1642         * init.c (__pthread_initialize_minimal_internal): Use
1643         THREAD_SET_PRIVATE_FUTEX.
1645         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1646         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1647         THREAD_GSCOPE_FLAG_WAIT): Define.
1648         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1649         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1650         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1651         PTR_DEMANGLE.
1652         (THREAD_GSCOPE_GET_FLAG): Define.
1653         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1654         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1655         instead of ->header.gscope_flag directly.
1657 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1659         * init.c (__pthread_initialize_minimal_internal): Check whether
1660         private futexes are available.
1661         * allocatestack.c (allocate_stack): Copy private_futex field from
1662         current thread into the new stack.
1663         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1664         futexes if they are available.
1665         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1666         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1667         in libc-lowlevellock.S allow using private futexes.
1668         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1669         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1670         FUTEX_PRIVATE_FLAG.
1671         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1672         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1673         if they are available.
1674         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1675         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1676         * sysdeps/i386/tcb-offsets.sym: Likewise.
1677         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1678         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1680 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1682         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1683         Remove ptr_wait_lookup_done again.
1684         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1685         (__pthread_initialize_minimal_internal): Initialize
1686         _dl_wait_lookup_done pointer in _rtld_global directly.
1687         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1688         Remove code to code _dl_wait_lookup_done.
1689         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1690         encrypted for now.
1692 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1694         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1695         pthread_mutex_init failed with ENOTSUP.
1697 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1699         * allocatestack.c (__wait_lookup_done): New function.
1700         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1701         Add ptr_wait_lookup_done.
1702         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1703         * pthreadP.h: Declare __wait_lookup_done.
1704         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1705         Define macros to implement reference handling of global scope.
1706         * sysdeps/x86_64/tls.h: Likewise.
1707         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1708         Initialize GL(dl_wait_lookup_done).
1710 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1712         [BZ #4512]
1713         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1714         is detected.
1715         * pthread_mutex_timedlock.c: Likewise.
1716         * pthread_mutex_trylock.c: Likewise.
1717         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1719         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1720         * tst-robust9.c: New file.
1721         * tst-robustpi9.c: New file.
1723         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1724         unnecessary extra cancellation test.
1726 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1728         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1729         extra cancellation test.
1730         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1732 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1734         * descr.h (struct pthread): Rearrange members to fill hole in
1735         64-bit layout.
1737         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1738         (__pthread_setaffinity_new): If syscall was successful and
1739         RESET_VGETCPU_CACHE is defined, use it before returning.
1740         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1742 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1744         [BZ #4455]
1745         * tst-align2.c: Include stackinfo.h.
1746         * tst-getpid1.c: Likewise.
1748 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1750         [BZ #4455]
1751         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1752         * tst-getpid1.c (do_test): Likewise.
1754         [BZ #4456]
1755         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1756         (allocate_stack): Likewise.
1758 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1760         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1761         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1762         (__lll_robust_timedlock_wait): Likewise.
1763         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1765 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1767         [BZ #4465]
1768         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1769         * tst-cancel4.c (tf_fdatasync): New test.
1771 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1773         [BZ #4392]
1774         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1775         check mutexes like normal mutexes.
1777         [BZ #4306]
1778         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1779         Initialize the whole sigevent structure to appease valgrind.
1781 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1783         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1784         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1786 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1788         * tst-locale1.c: Avoid warnings.
1789         * tst-locale2.c: Likewise.
1791 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1793         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1794         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1796 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1798         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1799         __extern_always_inline where appropriate.
1800         * sysdeps/pthread/pthread.h: Likewise.
1802 2007-03-13  Richard Henderson  <rth@redhat.com>
1804         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1805         separate cfi regions for the two subsections.
1807 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1809         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1810         new thread, don't just decrement it.
1811         Patch by Suzuki K P <suzuki@in.ibm.com>.
1813 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1815         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1816         PTHFCT_CALL definition.
1818 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1820         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1821         available, don't use it.
1823 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1825         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1826         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1827         call into the kernel to delay.
1829 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1831         * tst-initializers1.c: We want to test the initializers as seen
1832         outside of libc, so undefined _LIBC.
1834         * pthread_join.c (cleanup): Avoid warning.
1836 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1839         (__lll_timedwait_tid): Add unwind info.
1841         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1842         function table, mangle the pointers.
1843         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1844         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1845         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1846         demangle pointers before use.
1847         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1848         demangle pointer.
1849         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1850         * sysdeps/pthread/setxid.h: Likewise.
1852 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1854         * tst-rwlock7.c: Show some more information in case of correct
1855         behavior.
1857 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1859         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1860         (lll_futex_timed_wait): Undo part of last change, don't negate
1861         return value.
1863 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1865         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1866         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1868 2006-12-28  David S. Miller  <davem@davemloft.net>
1870         * shlib-versions: Fix sparc64 linux target specification.
1872 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1874         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1875         Adjust include path for pthread_barrier_wait.c move.
1877 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1879         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1880         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1882 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1884         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1885         6 argument cancellable syscalls.
1886         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1887         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1888         6 argument cancellable syscalls.
1889         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1891 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1893         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1894         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1896 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1898         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1899         __sync_lock_release instead of __sync_lock_release_si.
1901 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1903         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1904         Define.
1905         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1906         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1907         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1908         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1909         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1910         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1911         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1912         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1913         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1914         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1915         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1917 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1919         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1920         * pthread_barrier_wait.c: ...here.
1921         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1922         * pthread_cond_broadcast.c: ...here.
1923         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1924         * pthread_cond_signal.c: ...here.
1925         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1926         * pthread_cond_timedwait.c: ...here.
1927         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1928         * pthread_cond_wait.c: ...here.
1929         * sysdeps/pthread/pthread_once.c: Move to...
1930         * pthread_once.c: ...here.
1931         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1932         * pthread_rwlock_rdlock.c: ...here.
1933         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1934         * pthread_rwlock_timedrdlock.c: ...here.
1935         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1936         * pthread_rwlock_timedwrlock.c: ...here.
1937         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1938         * pthread_rwlock_unlock.c: ...here.
1939         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1940         * pthread_rwlock_wrlock.c: ...here.
1941         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1942         * pthread_spin_destroy.c: ...here.
1943         * sysdeps/pthread/pthread_spin_init.c: Move to...
1944         * pthread_spin_init.c: ...here.
1945         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1946         * pthread_spin_unlock.c: ...here.
1947         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1948         * pthread_getcpuclockid.c: ...here.
1950         * init.c: USE_TLS support is now always enabled.
1951         * tst-tls5.h: Likewise.
1952         * sysdeps/alpha/tls.h: Likewise.
1953         * sysdeps/i386/tls.h: Likewise.
1954         * sysdeps/ia64/tls.h: Likewise.
1955         * sysdeps/powerpc/tls.h: Likewise.
1956         * sysdeps/s390/tls.h: Likewise.
1957         * sysdeps/sh/tls.h: Likewise.
1958         * sysdeps/sparc/tls.h: Likewise.
1959         * sysdeps/x86_64/tls.h: Likewise.
1961 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1963         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1964         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1965         failed.
1967         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1968         Define to THREAD_SELF->header.multiple_threads.
1969         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1970         Likewise.
1971         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1972         Likewise.
1973         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1974         (SINGLE_THREAD_P): Likewise.
1975         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1976         (SINGLE_THREAD_P): Likewise.
1977         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1978         (SINGLE_THREAD_P): Likewise.
1979         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1980         (SINGLE_THREAD_P): Likewise.
1981         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1982         Likewise.
1983         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1984         (SINGLE_THREAD_P): Likewise.
1985         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1986         (SINGLE_THREAD_P): Likewise.
1987         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1988         Likewise.
1990 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1992         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1993         by default rather than 2_3_3.
1995 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1997         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1998         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1999         atomic_* instead of catomic_* macros.
2001 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2003         [BZ #3285]
2004         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2005         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2006         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2007         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2008         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2009         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2010         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2011         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2012         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2013         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2014         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2015         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2016         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2018 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2020         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2021         cancelable syscalls with six parameters.
2023         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2024         operations instead of atomic_*.
2026 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2028         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2030 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2032         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2033         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2034         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2035         New file.
2036         * pthread_attr_setstack.c: Allow overwriting the version number of the
2037         new symbol.
2038         * pthread_attr_setstacksize.c: Likewise.
2039         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2040         it.
2041         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2042         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2044 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2046         [BZ #3251]
2047         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2048         Patch by Petr Baudis.
2050 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2052         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2054         * tst-cancel2.c (tf): Loop as long as something was written.
2056 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2058         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2059         mutexes wake all mutexes.
2060         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2061         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2062         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2064 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2066         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2067         to guarantee the thread is always canceled.
2069 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2071         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2072         Include stdlib.h.
2073         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2074         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2075         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2077         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2079 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2081         [BZ #3123]
2082         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2083         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2086         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2087         * Makefile (tests): Add tst-cond22.
2088         * tst-cond22.c: New file.
2090 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2092         [BZ #3124]
2093         * descr.h (struct pthread): Add parent_cancelhandling.
2094         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2095         cancelhandling value to child.
2096         * pthread_create.c (start_thread): If parent thread was canceled
2097         reset the SIGCANCEL mask.
2098         * Makefile (tests): Add tst-cancel25.
2099         * tst-cancel25.c: New file.
2101 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2102             Ulrich Drepper  <drepper@redhat.com>
2104         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2105         counterp if it is already zero.
2106         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2108 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2109             Roland McGrath  <roland@redhat.com>
2111         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2112         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2113         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2114         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2115         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2116         lll_robust_mutex_timedlock, lll_mutex_unlock,
2117         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2118         Add _L_*_ symbols around the subsection.
2119         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2120         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2122 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2123             Roland McGrath  <roland@redhat.com>
2125         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2126         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2127         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2128         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2129         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2130         lll_robust_mutex_timedlock, lll_mutex_unlock,
2131         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2132         Add _L_*_ symbols around the subsection.
2133         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2134         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2136 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2138         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2139         change because it can disturb too much existing code.  If real hard
2140         reader preference is needed we'll introduce another type.
2141         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2142         (pthread_rwlock_timedwrlock): Likewise.
2143         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2144         Likewise.
2146 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2148         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2149         reader preference.
2150         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2151         (pthread_rwlock_timedwrlock): Likewise.
2152         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2153         Likewise.
2155 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2157         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2158         Only define ifdef SHARED.
2160 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2162         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2163         (free_stacks): ...here.
2164         (__free_stack_cache): New function.
2165         * pthreadP.h: Declare __free_stack_cache.
2166         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2167         ptr_freeres.
2168         * init.c (pthread_functions): Initialize ptr_freeres.
2169         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2170         New freeres function.
2172 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2174         [BZ #3018]
2175         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2177 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2179         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2180         _XOPEN_REALTIME_THREADS.
2182 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2184         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2185         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2186         HAVE_CLOCK_GETTIME_VSYSCALL.
2187         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2189 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2191         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2192         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2193         * descr.h (struct priority_protection_data): New type.
2194         (struct pthread): Add tpp field.
2195         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2196         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2197         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2198         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2199         TPP mutexes.
2200         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2201         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2202         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2203         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2204         * tpp.c: New file.
2205         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2206         boosted by TPP.
2207         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2208         * pthread_mutexattr_getprioceiling.c
2209         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2210         in the SCHED_FIFO priority range.
2211         * pthread_mutexattr_setprioceiling.c
2212         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2213         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2214         if mutex is not TPP.  Ceiling is now in __data.__lock.
2215         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2216         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2217         is now in __data.__lock.  Add locking.
2218         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2219         * Makefile (libpthread-routines): Add tpp.
2220         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2221         * tst-tpp.h: New file.
2222         * tst-mutexpp1.c: New file.
2223         * tst-mutexpp6.c: New file.
2224         * tst-mutexpp10.c: New file.
2225         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2226         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2228 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2230         [BZ #2843]
2231         * pthread_join.c (pthread_join): Account for self being canceled
2232         when checking for deadlocks.
2233         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2234         (tf1): Don't print anything after pthread_join returns, this would be
2235         another cancellation point.
2236         (tf2): Likewise.
2237         * tst-join6.c: New file.
2238         * Makefile (tests): Add tst-join6.
2240 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2242         [BZ #2892]
2243         * pthread_setspecific.c (__pthread_setspecific): Check
2244         out-of-range index before checking for unused key.
2246         * sysdeps/pthread/gai_misc.h: New file.
2248 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2250         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2251         file.  Don't use sysctl.
2252         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2253         overwrite the file if this is likely not true.
2255 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2257         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2258         * Makefile (tests): Add tst-getpid3.
2259         * tst-getpid3.c: New file.
2261 2006-07-30  Roland McGrath  <roland@redhat.com>
2263         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2265         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2266         (pause_not_cancel): New macro.
2267         (nanosleep_not_cancel): New macro.
2268         (sigsuspend_not_cancel): New macro.
2269         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2270         nanosleep_not_cancel macro from <not-cancel.h>.
2271         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2272         macro from <not-cancel.h>.
2274 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2275             Jakub Jelinek  <jakub@redhat.com>
2277         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2278         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2279         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2280         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2281         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2282         * pthread_mutex_lock.c: Likewise.
2283         * pthread_mutex_timedlock.c: Likewise.
2284         * pthread_mutex_trylock.c: Likewise.
2285         * pthread_mutex_unlock.c: Likewise.
2286         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2287         all mutexes.
2288         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2289         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2290         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2291         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2292         pthread-pi-defines.sym.
2293         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2294         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2296         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2297         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2298         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2299         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2300         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2301         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2302         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2303         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2304         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2305         * tst-mutex2.c: Likewise.
2306         * tst-mutex3.c: Likewise.
2307         * tst-mutex4.c: Likewise.
2308         * tst-mutex5.c: Likewise.
2309         * tst-mutex6.c: Likewise.
2310         * tst-mutex7.c: Likewise.
2311         * tst-mutex7a.c: Likewise.
2312         * tst-mutex8.c: Likewise.
2313         * tst-mutex9.c: Likewise.
2314         * tst-robust1.c: Likewise.
2315         * tst-robust7.c: Likewise.
2316         * tst-robust8.c: Likewise.
2317         * tst-mutexpi1.c: New file.
2318         * tst-mutexpi2.c: New file.
2319         * tst-mutexpi3.c: New file.
2320         * tst-mutexpi4.c: New file.
2321         * tst-mutexpi5.c: New file.
2322         * tst-mutexpi6.c: New file.
2323         * tst-mutexpi7.c: New file.
2324         * tst-mutexpi7a.c: New file.
2325         * tst-mutexpi8.c: New file.
2326         * tst-mutexpi9.c: New file.
2327         * tst-robust1.c: New file.
2328         * tst-robust2.c: New file.
2329         * tst-robust3.c: New file.
2330         * tst-robust4.c: New file.
2331         * tst-robust5.c: New file.
2332         * tst-robust6.c: New file.
2333         * tst-robust7.c: New file.
2334         * tst-robust8.c: New file.
2335         * Makefile (tests): Add the new tests.
2337         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2338         * pthread_mutex_destroy.c: Remove unneeded label.
2340 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2342         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2343         computations to compile time.
2345 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2347         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2349 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2351         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2353 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2355         * pthread_key_create.c (__pthread_key_create): Do away with
2356         __pthread_keys_lock.
2358         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2359         (__kernel_cpumask_size): Mark as hidden.
2360         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2362         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2363         * semaphoreP.h (__sem_mappings_lock): Likewise.
2365 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2367         * pthread_atfork.c: Mark __dso_handle as hidden.
2369 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2371         [BZ #2644]
2372         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2373         the reload problem.  Change the one path in pthread_cancel_init
2374         which causes the problem.  Force gcc to reload.  Simplify callers.
2375         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2376         (_Unwind_GetBSP): Undo last patch.
2378 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2380         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2381         function pointer is reloaded after pthread_cancel_init calls.
2383         [BZ #2644]
2384         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2385         pointers are reloaded after pthread_cancel_init calls.
2387 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2389         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2390         __always_inline.
2392 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2394         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2395         Allocate new object which is passed to timer_sigev_thread so that
2396         the timer can be deleted before the new thread is scheduled.
2398 2006-04-26  Roland McGrath  <roland@redhat.com>
2400         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2402 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2404         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2405         suffix for conditional jumps.
2406         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2407         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2408         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2409         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2410         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2411         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2413         * init.c (sigcancel_handler): Compare with correct PID even if the
2414         thread is in the middle of a fork call.
2415         (sighandler_setxid): Likewise.
2416         Reported by Suzuki K P <suzuki@in.ibm.com> .
2418 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2420         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2422 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2424         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2425         fails [Coverity CID 105].
2427 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2429         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2431 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2433         [BZ #2505]
2434         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2435         Define __lll_rel_instr using lwsync.
2437 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2439         * allocatestack.c (allocate_stack): Always initialize robust_head.
2440         * descr.h: Define struct robust_list_head.
2441         (struct pthread): Use robust_list_head in robust mutex list definition.
2442         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2443         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2444         (__pthread_initialize_minimal_internal): Register robust_list with
2445         the kernel.
2446         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2447         Declare __set_robust_list_avail.
2448         * pthread_create.c (start_thread): Register robust_list of new thread.
2449         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2450         waiters.
2451         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2452         number of users, it's unreliable.
2453         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2454         set_robust_list syscall is available.
2455         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2456         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2457         Set robust_head.list_op_pending before trying to lock a robust mutex.
2458         * pthread_mutex_timedlock.c: Likewise.
2459         * pthread_mutex_trylock.c: Likewise.
2460         * pthread_mutex_unlock.c: Likewise for unlocking.
2461         * Makefile (tests): Add tst-robust8.
2462         * tst-robust8.c: New file.
2464 2006-03-08  Andreas Schwab  <schwab@suse.de>
2466         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2467         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2469 2006-03-05  Roland McGrath  <roland@redhat.com>
2471         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2472         and $config_os doesn't match *linux*.
2474 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2476         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2477         Use __syscall_error.
2478         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2479         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2480         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2481         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2482         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2483         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2485 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2487         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2489 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2491         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2492         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2493         mutex.
2494         (__lll_robust_timedlock_wait): Likewise.
2495         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2496         (__lll_robust_lock_wait): Likewise.
2497         (__lll_robust_timedlock_wait): Likewise.
2498         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2499         (__lll_robust_lock_wait): Likewise.
2500         (__lll_robust_timedlock_wait): Likewise.
2502 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2504         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2505         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2506         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2507         lll_robust_mutex_unlock): Define.
2508         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2510 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2512         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2513         instead of <clone.S>.
2515 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2517         * Makefile (libpthread-routines): Add
2518         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2519         and pthread_mutex_[sg]etprioceiling.
2520         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2521         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2522         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2523         pthread_mutex_setprioceiling.
2524         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2525         PTHREAD_PRIO_PROTECT): New enum values.
2526         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2527         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2528         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2529         prototypes.
2530         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2531         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2532         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2533         Define.
2534         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2535         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2536         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2537         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2538         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2539         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2540         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2541         protocol mutexes.
2542         * pthread_mutex_getprioceiling.c: New file.
2543         * pthread_mutex_setprioceiling.c: New file.
2544         * pthread_mutexattr_getprioceiling.c: New file.
2545         * pthread_mutexattr_setprioceiling.c: New file.
2546         * pthread_mutexattr_getprotocol.c: New file.
2547         * pthread_mutexattr_setprotocol.c: New file.
2549 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2551         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2553 2006-02-27  Roland McGrath  <roland@redhat.com>
2555         * sysdeps/pthread/Subdirs: List nptl here too.
2556         * configure (libc_add_on_canonical): New variable.
2558         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2560         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2561         self to get main source tree's file.
2562         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2563         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2564         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2565         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2566         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2567         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2568         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2569         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2570         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2571         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2572         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2573         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2574         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2576         * Makefile: Use $(sysdirs) in vpath directive.
2578         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2579         (CPPFLAGS-timer_routines.c): Likewise.
2581         * Makeconfig (includes): Variable removed.
2583 2006-02-26  Roland McGrath  <roland@redhat.com>
2585         * sysdeps/generic/pt-raise.c: Moved to ...
2586         * pt-raise.c: ... here.
2587         * sysdeps/generic/lowlevellock.h: Moved to ...
2588         * lowlevellock.h: ... here.
2590 2006-02-23  Roland McGrath  <roland@redhat.com>
2592         * descr.h (struct pthread): Add final member `end_padding'.
2593         (PTHREAD_STRUCT_END_PADDING): Use it.
2595 2006-02-20  Roland McGrath  <roland@redhat.com>
2597         * sysdeps/mips: Directory removed, saved in ports repository.
2598         * sysdeps/unix/sysv/linux/mips: Likewise.
2600 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2602         * tst-robust1.c: Add second mutex to check that the mutex list is
2603         handled correctly.
2605 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2607         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2608         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2609         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2610         lll_robust_mutex_unlock): New macros.
2611         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2612         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2613         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2614         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2615         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2617 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2619         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2620         definitions.
2621         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2623 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2625         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2626         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2627         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2628         (lll_robust_mutex_unlock): Likewise.
2630 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2632         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2633         Set robust_list.__next rather than robust_list.
2634         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2635         (__pthread_list_t): New typedef.
2636         (pthread_mutex_t): Replace __next and __prev fields with __list.
2637         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2638         (__pthread_list_t): New typedef.
2639         (pthread_mutex_t): Replace __next and __prev fields with __list.
2640         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2641         (__pthread_list_t, __pthread_slist_t): New typedefs.
2642         (pthread_mutex_t): Replace __next and __prev fields with __list.
2643         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2644         (__pthread_list_t, __pthread_slist_t): New typedefs.
2645         (pthread_mutex_t): Replace __next and __prev fields with __list.
2646         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2647         (__pthread_list_t, __pthread_slist_t): New typedefs.
2648         (pthread_mutex_t): Replace __next and __prev fields with __list.
2649         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2650         (__pthread_slist_t): New typedef.
2651         (pthread_mutex_t): Replace __next field with __list.
2653 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2655         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2656         PTHREAD_MUTEX_OWNERDEAD.
2657         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2658         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2659         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2660         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2661         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2662         to PTHREAD_MUTEX_INCONSISTENT.
2663         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2664         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2665         * pthread_mutex_trylock.c: Likewise.
2666         * pthread_mutex_timedlock.c: Likewise.
2667         * pthread_mutex_unlock.c: Likewise.
2668         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2669         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2670         lowlevelrobustlock.sym.
2671         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2672         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2673         definitions.
2674         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2675         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2676         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2677         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2678         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2680 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2682         * allocatestack.c (allocate_stack): Initialize robust_list.
2683         * init.c (__pthread_initialize_minimal_internal): Likewise.
2684         * descr.h (struct xid_command): Pretty printing.
2685         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2686         robust_list.  Adjust macros.
2687         * pthread_create.c (start_thread): Adjust robust_list handling.
2688         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2689         but the owner for all robust mutex types.
2690         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2691         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2692         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2693         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2695         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2696         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2698 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2700         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2701         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2703 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2705         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2706         Return status.
2707         (lll_futex_timed_wait): Define.
2709 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2711         * tst-cancel4.c: Test ppoll.
2713 2006-01-18  Andreas Jaeger  <aj@suse.de>
2715         [BZ #2167]
2716         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2717         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2718         by Jim Gifford <patches@jg555.com>.
2720 2006-01-13  Richard Henderson  <rth@redhat.com>
2722         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2724 2006-01-10  Roland McGrath  <roland@redhat.com>
2726         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2727         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2728         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2729         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2730         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2731         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2732         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2733         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2734         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2735         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2737 2006-01-09  Roland McGrath  <roland@redhat.com>
2739         * tst-initializers1-c89.c: New file.
2740         * tst-initializers1-c99.c: New file.
2741         * tst-initializers1-gnu89.c: New file.
2742         * tst-initializers1-gnu99.c: New file.
2743         * Makefile (tests): Add them.
2744         (CFLAGS-tst-initializers1-c89.c): New variable.
2745         (CFLAGS-tst-initializers1-c99.c): New variable.
2746         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2747         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2749         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2750         Use __extension__ on anonymous union definition.
2751         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2752         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2753         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2754         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2755         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2757 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2759         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2760         Don't give the union a name because it changes the mangled name.
2761         Instead name the struct for __data.
2762         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2763         Likewise.
2764         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2765         Likewise.
2767 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2769         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2770         stack bias to mc_ftp field.
2772 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2774         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2775         being too clever and reloading the futex value where it shouldn't.
2777 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2779         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2780         correct type.
2782 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2784         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2785         Add cfi directives.
2787 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2789         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2790         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2791         rename in tcbhead_t.
2793         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2794         Don't give the union a name because it changes the mangled name.
2795         Instead name the struct for __data.
2796         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2797         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2798         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2799         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2800         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2801         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2803 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2805         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2806         Return status.
2807         (lll_futex_timed_wait): Define.
2808         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2809         * sysdeps/pthread/aio_misc.h: New file.
2811 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2813         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2815 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2817         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2818         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2819         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2821 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2823         * tst-cancel24.cc: Use C headers instead of C++ headers.
2825 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2827         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2828         sparc-linux configured glibc.
2829         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2830         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2831         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2832         atomic_compare_and_exchange_val_24_acq instead of
2833         atomic_compare_and_exchange_val_acq.
2834         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2835         instead of atomic_exchange_rel.
2836         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2837         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2838         file.
2839         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2840         file.
2841         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2842         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2843         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2844         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2845         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2846         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2847         New file.
2848         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2849         New file.
2850         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2851         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2852         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2853         file.
2854         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2855         file.
2856         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2858 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2860         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2861         mutex initializers.
2863 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2865         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2866         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2867         THREAD_COPY_POINTER_GUARD): Define.
2868         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2869         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2871 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2873         * version.c: Update copyright year.
2875 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2877         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2878         .eh_frame section, use cfi_* directives.
2879         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2881 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2883         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2884         now.
2886 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2888         * sysdeps/pthread/sigaction.c: Removed.
2889         * sigaction.c: New file.
2890         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2892 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2894         * Makefile (tests): Add tst-signal7.
2895         * tst-signal7.c: New file.
2897 2005-12-27  Roland McGrath  <roland@redhat.com>
2899         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2900         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2901         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2902         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2903         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2904         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2905         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2906         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2907         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2908         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2909         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2911 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2913         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2914         and __prev field to pthread_mutex_t.
2915         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2916         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2917         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2918         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2919         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2920         to pthread_mutex_t.
2922 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2924         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2925         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2926         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2927         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2928         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2929         and PTHREAD_MUTEXATTR_FLAG_BITS.
2930         * descr.h (struct pthread): Add robust_list field and define
2931         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2932         * pthread_mutexattr_getrobust.c: New file.
2933         * pthread_mutexattr_setrobust.c: New file.
2934         * pthread_mutex_consistent.c: New file.
2935         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2936         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2937         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2938         Adjust pthread_mutex_t initializers.
2939         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2940         field to pthread_mutex_t.
2941         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2942         and __prev field to pthread_mutex_t.
2943         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2944         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2945         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2946         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2947         * pthread_mutexattr_gettype.c: Likewise.
2948         * pthread_mutexattr_setpshared.c: Likewise.
2949         * pthread_mutexattr_settype.c: Likewise.
2950         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2951         Initialize mutex kind according to robust flag.
2952         * pthread_mutex_lock.c: Implement local robust mutex.
2953         * pthread_mutex_timedlock.c: Likewise.
2954         * pthread_mutex_trylock.c: Likewise.
2955         * pthread_mutex_unlock.c: Likewise.
2956         * pthread_create.c (start_thread): Mark robust mutexes which remained
2957         locked as dead.
2958         * tst-robust1.c: New file.
2959         * tst-robust2.c: New file.
2960         * tst-robust3.c: New file.
2961         * tst-robust4.c: New file.
2962         * tst-robust5.c: New file.
2963         * tst-robust6.c: New file.
2964         * tst-robust7.c: New file.
2965         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2966         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2967         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2968         tst-robust5, tst-robust6, and tst-robust7.
2970         * tst-typesizes.c: New file.
2971         * Makefile (tests): Add tst-typesizes.
2973         * tst-once3.c: More debug output.
2975 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2977         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2978         missing after last change.
2980         * version.c: Update copyright year.
2982 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2984         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2985         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2986         * pthread_mutex_trylock.c: Likewise.
2987         * pthread_mutex_timedlock.c: Likewise.
2988         * pthread_mutex_unlock.c: Likewise.
2990 2005-12-22  Roland McGrath  <roland@redhat.com>
2992         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2993         so that #include_next's search location is not reset to the -I..
2994         directory where <nptl/...> can be found.
2996 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2998         [BZ #1913]
2999         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3000         Fix unwind info.  Remove useless branch prediction prefix.
3001         * tst-cancel24.cc: New file.
3002         * Makefile: Add rules to build and run tst-cancel24.
3004 2005-12-21  Roland McGrath  <roland@redhat.com>
3006         * libc-cancellation.c: Use <> rather than "" #includes.
3007         * pt-cleanup.c: Likewise.
3008         * pthread_create.c: Likewise.
3009         * pthread_join.c: Likewise.
3010         * pthread_timedjoin.c: Likewise.
3011         * pthread_tryjoin.c: Likewise.
3012         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3013         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3014         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3015         * unwind.c: Likewise.
3017 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3019         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3020         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3021         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3022         THREAD_COPY_POINTER_GUARD): Define.
3024 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3026         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3027         rather than one.
3028         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3029         THREAD_COPY_POINTER_GUARD): Define.
3030         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3031         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3032         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3033         THREAD_COPY_POINTER_GUARD): Define.
3034         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3035         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3036         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3037         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3038         Use PTR_DEMANGLE for B0 if defined.
3040 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3042         * pthread_create.c (__pthread_create_2_1): Use
3043         THREAD_COPY_POINTER_GUARD if available.
3044         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3045         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3046         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3047         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3048         * sysdeps/x86_64/tls.h: Likewise.
3050 2005-12-15  Roland McGrath  <roland@redhat.com>
3052         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3054 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3056         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3057         sysdeps/generic.
3058         * errno-loc.c: New file.
3060 2005-12-12  Roland McGrath  <roland@redhat.com>
3062         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3063         adjustments before choosing stack size.  Update minimum stack size
3064         calculation to match allocate_stack change.
3066 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3068         * allocatestack.c (allocate_stack): Don't demand that there is an
3069         additional full page available on the stack beside guard, TLS, the
3070         minimum stack.
3072 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3074         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3075         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3077         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3078         compiling 32-bit code we must define __cleanup_fct_attribute.
3080 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3082         [BZ #1920]
3083         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3084         __attribute__ instead of __attribute.
3085         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3086         (__cleanup_fct_attribute): Likewise.
3088 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3090         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3091         a write barrier before writing libgcc_s_getcfa.
3093 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3095         * sysdeps/unix/sysv/linux/configure: Removed.
3097 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3099         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3100         optional init_array/fini_array support.
3102 2005-10-24  Roland McGrath  <roland@redhat.com>
3104         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3105         versioned_symbol use.
3107 2005-10-16  Roland McGrath  <roland@redhat.com>
3109         * init.c (__pthread_initialize_minimal_internal): Even when using a
3110         compile-time default stack size, apply the minimum that allocate_stack
3111         will require, and round up to page size.
3113 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3115         * Makefile ($(test-modules)): Remove static pattern rule.
3117 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3118             Ulrich Drepper  <drepper@redhat.com>
3120         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3121         alignment in callback function.
3122         * Makefile: Add rules to build and run tst-align3.
3123         * tst-align3.c: New file.
3125 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3127         * allocatestack.c (setxid_signal_thread): Add
3128         INTERNAL_SYSCALL_DECL (err).
3130 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3132         * allocatestack.c (setxid_signal_thread): Need to use
3133         atomic_compare_and_exchange_bool_acq.
3135 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3136             Jakub Jelinek  <jakub@redhat.com>
3138         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3139         CANCEL_RESTMASK.
3140         (struct pthread): Move specific_used field to avoid padding.
3141         Add setxid_futex field.
3142         * init.c (sighandler_setxid): Reset setxid flag and release the
3143         setxid futex.
3144         * allocatestack.c (setxid_signal_thread): New function.  Broken
3145         out of the bodies of the two loops in __nptl_setxid.  For undetached
3146         threads check whether they are exiting and if yes, don't send a signal.
3147         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3148         * pthread_create.c (start_thread): For undetached threads, check
3149         whether setxid bit is set.  If yes, wait until signal has been
3150         processed.
3152         * allocatestack.c (STACK_VARIABLES): Initialize them.
3153         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3155 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3157         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3158         waiters, awake all waiters on the associated mutex.
3160 2005-09-22  Roland McGrath  <roland@redhat.com>
3162         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3163         ../sysdeps/x86_64/hp-timing.h).
3165 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3167         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3168         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3169         (lll_futex_wake_unlock): Define.
3170         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3171         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3172         (lll_futex_wake_unlock): Define.
3173         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3174         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3175         (lll_futex_wake_unlock): Define.
3176         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3177         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3178         (lll_futex_wake_unlock): Define.
3179         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3180         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3181         (lll_futex_wake_unlock): Define.
3182         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3183         lll_futex_wake_unlock.
3184         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3185         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3186         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3188         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3189         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3191 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3193         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3194         Fix typo in register name.
3196 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3198         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3199         Use __sigfillset.  Document that sigfillset does the right thing wrt
3200         to SIGSETXID.
3202 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3204         [BZ #1102]
3205         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3206         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3207         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3208         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3209         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3210         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3211         in the structure.
3212         * Makefile (tests): Add tst-initializers1.
3213         (CFLAGS-tst-initializers1.c): Set.
3214         * tst-initializers1.c: New test.
3216 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3218         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3219         Make sure __flags are located at offset 48 from the start of the
3220         structure.
3222 2005-07-02  Roland McGrath  <roland@redhat.com>
3224         * Makeconfig: Comment fix.
3226 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3228         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3229         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3230         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3231         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3232         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3233         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3234         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3235         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3236         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3237         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3239 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3241         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3242         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3243         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3244         fields.
3245         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3246         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3247         field.  Put in sysinfo field unconditionally.
3248         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3249         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3250         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3251         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3252         fields.
3253         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3254         * pthread_create.c (__pthread_create_2_1): Use
3255         THREAD_COPY_STACK_GUARD macro.
3256         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3257         tests.
3258         * tst-stackguard1.c: New file.
3259         * tst-stackguard1-static.c: New file.
3261 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3263         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3264         Invoke CGOTSETUP and CGOTRESTORE.
3265         (CGOTSETUP, CGOTRESTORE): Define.
3267 2005-05-29  Richard Henderson  <rth@redhat.com>
3269         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3270         (tf_write, tf_writev): Use it.
3271         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3272         the system minimum.
3274 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3276         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3277         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3278         __librt_*_asynccancel@local.
3280 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3282         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3283         all occurrences of JUMPTARGET.  Instead append @local to labels.
3285 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3287         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3288         size/alignment of struct pthread rather than tcbhead_t.
3289         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3290         Likewise.
3291         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3292         Likewise.
3293         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3294         Likewise.
3296 2005-05-19  Richard Henderson  <rth@redhat.com>
3298         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3299         __sync_val_compare_and_swap, not explicit _si variant.
3300         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3302 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3304         [BZ #915]
3305         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3307 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3309         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3310         .eh_frame section, use cfi_* directives.
3312 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3314         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3315         of "" includes.
3317 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3319         [BZ #1075]
3320         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3321         aio_write blocks.
3323 2005-04-27  Roland McGrath  <roland@redhat.com>
3325         * Makefile (tests): Remove tst-clock2.
3327         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3328         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3329         translating to the kernel clockid_t for our own process/thread clock.
3331         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3333 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3335         * old_pthread_cond_init.c: Include <errno.h>.
3336         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3337         process shared or uses clock other than CLOCK_REALTIME.
3338         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3340 2005-04-13  David S. Miller  <davem@davemloft.net>
3342         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3343         * sysdeps/sparc/sparc64/clone.S: New file.
3345 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3347         [BZ #1102]
3348         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3349         __inline instead of inline.
3350         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3352 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3354         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3355         functionally equivalent, but shorter instructions.
3356         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3357         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3359         Likewise.
3360         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3361         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3362         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3363         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3365         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3366         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3367         Likewise.
3368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3369         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3370         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3371         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3372         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3374 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3376         * sysdeps/mips/Makefile: New file.
3377         * sysdeps/mips/nptl-sysdep.S: New file.
3378         * sysdeps/mips/tcb-offsets.sym: New file.
3379         * sysdeps/mips/pthread_spin_lock.S: New file.
3380         * sysdeps/mips/pthread_spin_trylock.S: New file.
3381         * sysdeps/mips/pthreaddef.h: New file.
3382         * sysdeps/mips/tls.h: New file.
3383         * sysdeps/mips/jmpbuf-unwind.h: New file.
3384         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3385         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3386         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3387         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3388         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3389         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3390         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3391         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3392         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3393         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3395 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3397         [BZ #1112]
3398         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3399         variable to scerr.
3401 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3403         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3405 2005-02-25  Roland McGrath  <roland@redhat.com>
3407         * alloca_cutoff.c: Correct license text.
3408         * tst-unload.c: Likewise.
3409         * sysdeps/pthread/allocalim.h: Likewise.
3410         * sysdeps/pthread/pt-initfini.c: Likewise.
3411         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3412         * sysdeps/pthread/bits/sigthread.h: Likewise.
3413         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3414         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3416 2005-02-16  Roland McGrath  <roland@redhat.com>
3418         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3419         Use unsigned int * for ptr_nthreads.
3421 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3423         [BZ #721]
3424         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3425         gcc4.
3427 2005-02-07  Richard Henderson  <rth@redhat.com>
3429         [BZ #787]
3430         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3431         argument.
3433 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3435         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3436         order of arguments in invocation of atomic_add_zero.
3438 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3440         [BZ #737]
3441         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3442         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3443         at least gotntpoff relocation and addition.
3444         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3445         Likewise.
3446         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3447         Likewise.
3448         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3449         Likewise.
3451 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3453         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3454         entry for static tls deallocation fix.
3455         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3456         also contains information whether the memory pointed to is static
3457         TLS or not.
3458         * sysdeps/i386/tls.h: Likewise.
3459         * sysdeps/ia64/tls.h: Likewise.
3460         * sysdeps/powerpc/tls.h: Likewise.
3461         * sysdeps/s390/tls.h: Likewise.
3462         * sysdeps/sh/tls.h: Likewise.
3463         * sysdeps/sparc/tls.h: Likewise.
3464         * sysdeps/x86_64/tls.h: Likewise.
3466 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3468         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3470 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3472         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3473         %esp.
3474         * Makefile (tests): Add tst-align2.
3475         * tst-align2.c: New test.
3476         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3477         -mpreferred-stack-boundary=4.
3479 2004-12-18  Roland McGrath  <roland@redhat.com>
3481         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3482         New file removed withdrawn for the moment.
3484 2004-12-17  Richard Henderson  <rth@redhat.com>
3486         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3487         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3489 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3491         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3492         Increased PTHREAD_STACK_MIN.
3494         * tst-context1.c (stacks): Use bigger stack size.
3496 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3498         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3499         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3501 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3503         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3504         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3505         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3507 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3509         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3511 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3513         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3514         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3516         * tst-getpid1.c: If child crashes, report this first.  Print which
3517         signal.
3519 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3521         * init.c (__pthread_initialize_minimal_internal): Also unblock
3522         SIGSETXID.
3524 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3526         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3527         _POSIX_THREAD_CPUTIME): Define to 0.
3528         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3529         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3530         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3531         __timer_signal_thread_tclk): Remove.
3532         (init_module): Remove their initialization.
3533         (thread_cleanup): Remove their cleanup assertions.
3534         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3535         __timer_signal_thread_tclk): Remove.
3536         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3537         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3538         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3540 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3542         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3543         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3545         * Makefile (tests): Add tst-getpid2.
3546         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3547         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3548         * tst-getpid2.c: New test.
3550 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3552         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3554 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3556         * Makefile (tests): Add tst-getpid1.
3557         * tst-getpid1.c: New file.
3558         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3559         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3561 2004-12-02  Roland McGrath  <roland@redhat.com>
3563         * Makefile (libpthread-nonshared): Variable removed.
3564         ($(objpfx)libpthread_nonshared.a): Target removed.
3565         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3566         These are now handled by generic magic from
3567         libpthread-static-only-routines being set.
3569 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3571         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3572         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3573         _POSIX_THREAD_PRIO_PROTECT): Define.
3574         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3575         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3576         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3578 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3580         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3581         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3582         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3583         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3584         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3585         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3586         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3588 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3590         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3592         * Makefile (libpthread-routines): Add pthread_setschedprio.
3593         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3594         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3595         * pthread_setschedprio.c: New file.
3597 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3599         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3600         * pthread_cancel.c (pthread_create): Likewise.
3602         * Makefile (libpthread-routines): Add vars.
3603         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3604         * init.c (__default_stacksize, __is_smp): Remove.
3605         * vars.c: New file.
3606         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3607         and define a wrapper macro.
3608         (PTHREAD_STATIC_FN_REQUIRE): Define.
3609         * allocatestack.c (__find_thread_by_id): Undefine.
3610         * pthread_create (__pthread_keys): Remove.
3611         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3612         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3613         PTHREAD_STATIC_FN_REQUIRE.
3615 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3617         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3618         parameter to REGISTER macro.
3620 2004-11-17  Roland McGrath  <roland@redhat.com>
3622         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3623         Make sure SIGCANCEL is blocked as well.
3625 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3627         * sysdeps/pthread/setxid.h: New file.
3628         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3629         (struct xid_command): Add forward decl.
3630         (struct pthread_functions): Change return type of __nptl_setxid hook
3631         to int.
3632         * pthreadP.h (__nptl_setxid): Change return type to int.
3633         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3634         calling thread, return its return value and set errno on failure.
3635         * descr.h (struct xid_command): Change id type to long array.
3637         * Makefile: Add rules to build and test tst-setuid1 and
3638         tst-setuid1-static.
3639         * tst-setuid1.c: New test.
3640         * tst-setuid1-static.c: New test.
3642 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3644         * Makefile (tests): Add tst-exit3.
3645         * tst-exit3.c: New test.
3647 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3649         * Makefile (tests): Add tst-exit2.
3650         * tst-exit2.c: New file.
3652 2004-11-09  Roland McGrath  <roland@redhat.com>
3654         [BZ #530]
3655         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3656         here, before calling clone.
3657         * pthread_create.c (start_thread): Don't do it here.
3659 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3661         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3663 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3665         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3666         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3667         assembler warning.
3669 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3671         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3672         if sched_priority is not between minprio and maxprio.
3674 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3676         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3677         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3679         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3680         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3682 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3684         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3685         not-cancelable I/O functions.
3687 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3689         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3690         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3691         make sure 2 is stored in the futex and we looked at the old value.
3692         Fix a few other problems to return the correct value.
3694 2004-10-14  Richard Henderson  <rth@redhat.com>
3696         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3697         make gcc4 happy.
3699 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3701         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3702         of pthread-functions.h and pthreaddef.h.
3703         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3706         Change __data.__nwaiters from int to unsigned int.
3708         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3709         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3711         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3712         before return type.
3714         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3715         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3717 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3719         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3720         test fails, remove message queue.
3721         (tf_msgsnd): Likewise.
3723 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3725         * tst-clock1.c: Change #ifdef to #if defined.
3726         * tst-clock2.c: Likewise.
3727         * tst-cond11.c: Likewise.
3729         * sysdeps/pthread/timer_create.c (timer_create): Use
3730         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3731         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3732         THREAD_CPUTIME.
3734 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3736         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3737         _POSIX_THREAD_CPUTIME): Define to 0.
3739 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3741         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3742         and _POSIX_THREAD_CPUTIME to zero.
3743         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3744         * tst-barrier2.c: Fix testing for POSIX feature.
3745         * tst-clock1.c: Likewise.
3746         * tst-clock2.c: Likewise.
3747         * tst-cond11.c: Likewise.
3748         * tst-cond4.c: Likewise.
3749         * tst-cond6.c: Likewise.
3750         * tst-flock2.c: Likewise.
3751         * tst-mutex4.c: Likewise.
3752         * tst-mutex9.c: Likewise.
3753         * tst-rwlock12.c: Likewise.
3754         * tst-rwlock4.c: Likewise.
3755         * tst-signal1.c: Likewise.
3756         * tst-spin2.c: Likewise.
3757         * sysdeps/pthread/posix-timer.h: Likewise.
3758         * sysdeps/pthread/timer_create.c: Likewise.
3759         * sysdeps/pthread/timer_routines.c: Likewise.
3761 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3763         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3764         (__lll_mutex_timedlock_wait): Address futex correctly.
3766         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3767         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3768         make sure 2 is stored in the futex and we looked at the old value.
3769         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3770         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3771         which might very well made the code not working at all before.
3772         [BZ #417]
3774 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3776         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3777         allow SIGSETXID to be sent.
3778         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3779         for SIGSETXID to be defined.
3780         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3781         SIGSETXID cannot be blocked.
3783         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3784         Add __extension__ to long long types.
3785         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3786         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3787         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3788         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3789         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3790         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3791         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3793 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3795         * descr.h (struct pthread): Add stopped_start field.
3796         * sysdeps/pthread/createthread.c (create_thread): Set
3797         start_stopped flag in descriptor for new thread appropriately.
3798         * pthread_create.c (start_thread): Only take lock to be stopped on
3799         startup if stopped_start flag says so.
3801 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3803         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3804         is created detached and if yes, do not try to free the stack in case
3805         the thread creation failed.
3806         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3807         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3808         case there has been no error.  [BZ #405]
3810         * pthread_create.c (start_thread): Don't wait for scheduler data
3811         etc to be set at the beginning of the function.  The cancellation
3812         infrastructure must have been set up.  And enable async
3813         cancellation before potentially going to sleep.  [BZ #401]
3815 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3817         * Versions: Remove exports for pthread_set*id_np functions.
3818         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3819         for now.
3820         * Makefile: Don't build pthread_set*id code for now.
3822 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3824         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3825         internal use.
3826         * allocatestack.c (__nptl_setxid): New function.
3827         * descr.h (struct xid_command): Define type.
3828         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3829         (sighandler_setxid): New function.
3830         (__pthread_initialize_minimal): Register sighandler_setxid for
3831         SIGCANCEL.
3832         * pt-allocrtsig.c: Update comment.
3833         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3834         Declare __nptl_setxid.
3835         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3836         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3837         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3838         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3839         and pthread_setresuid_np.
3840         * pthread_setgid_np.c: New file.
3841         * pthread_setuid_np.c: New file.
3842         * pthread_setegid_np.c: New file.
3843         * pthread_seteuid_np.c: New file.
3844         * pthread_setregid_np.c: New file.
3845         * pthread_setreuid_np.c: New file.
3846         * pthread_setresgid_np.c: New file.
3847         * pthread_setresuid_np.c: New file.
3848         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3849         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3850         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3851         and pthread_setresuid_np.
3852         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3853         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3854         pthread_setregid, and pthread_setresgid.
3856 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3858         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3859         ENOMEM when out of memory.
3861 2004-09-10  Roland McGrath  <roland@redhat.com>
3863         [BZ #379]
3864         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3865         code, since we don't try to use the broken CLONE_STOPPED any more.
3866         * pthread_create.c (start_thread): Likewise.
3868 2004-09-15  Richard Henderson  <rth@redhat.com>
3870         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3872 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3874         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3875         (__libc_unwind_longjmp): Delete macro and declare as function.
3876         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3877         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3878         nptl directory.
3879         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3880         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3881         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3883 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3885         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3886         for __USE_XOPEN2K.
3887         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3888         types also for __USE_XOPEN2K.
3889         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3890         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3891         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3892         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3893         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3894         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3895         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3896         [BZ #320]
3898 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3900         * sysdeps/pthread/pthread.h
3901         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3902         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3903         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3904         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3905         [BZ #375]
3907 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3909         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3910         PSEUDO to be used with . prefix.
3912         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3913         Use atomic_increment instead of atomic_exchange_and_add.
3914         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3915         Likewise.
3916         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3917         Likewise.
3918         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3919         Likewise.
3921         * allocatestack.c (allocate_stack): Use atomic_increment_val
3922         instead of atomic_exchange_and_add.
3923         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3924         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3925         Likewise.
3926         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3927         Likewise.
3929         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3930         the initialization function might throw.
3932 2005-09-05  Richard Henderson  <rth@redhat.com>
3934         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3935         Move definition inside libpthread, libc, librt check.  Provide
3936         definition for rtld.
3938 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3940         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3941         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3942         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3943         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3944         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3945         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3946         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3947         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3948         * unwind.c: Use it.
3950         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3951         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3952         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3953         Likewise.
3954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3955         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3956         this is the last waiter, signal pthread_cond_destroy caller and
3957         avoid using the pthread_cond_t structure after unlock.
3958         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3960         Read clock type from the least significant bits of __nwaiters instead
3961         of __clock.
3962         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3963         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3965 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3967         [BZ #342]
3968         * Makefile (tests): Add tst-cond20 and tst-cond21.
3969         * tst-cond20.c: New test.
3970         * tst-cond21.c: New test.
3971         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3972         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3973         it unsigned int.
3974         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3975         Likewise.
3976         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3977         (pthread_cond_t): Likewise.
3978         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3979         Likewise.
3980         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3981         Likewise.
3982         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3983         Likewise.
3984         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3985         (cond_nwaiters): New.
3986         (clock_bits): New.
3987         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3988         if there are waiters not signalled yet.
3989         Wait until all already signalled waiters wake up.
3990         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3991         __nwaiters.  If pthread_cond_destroy has been called and this is the
3992         last waiter, signal pthread_cond_destroy caller and avoid using
3993         the pthread_cond_t structure after unlock.
3994         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3995         decrement it when leaving.  If pthread_cond_destroy has been called
3996         and this is the last waiter, signal pthread_cond_destroy caller.
3997         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3998         Likewise.  Read clock type from the least significant bits of
3999         __nwaiters instead of __clock.
4000         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4001         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4002         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4003         clock type just from the last COND_CLOCK_BITS bits of value.
4004         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4005         instead of __clock, just from second bit of condattr's value.
4007 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4009         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4010         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4011         != 64.
4012         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4014 2004-08-15  Roland McGrath  <roland@frob.com>
4016         * pthread_atfork.c: Update copyright terms including special exception
4017         for these trivial files, which are statically linked into executables
4018         that use dynamic linking for the significant library code.
4020 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4022         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4023         pthread_rwlock_rdlock.
4024         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4025         Decrease __nr_readers_queued after reacquiring lock.
4026         * sysdeps/pthread/pthread_rwlock_timedrdlock
4027         (pthread_rwlock_timedrdlock): Likewise.
4028         Reported by Bob Cook <bobcook47@hotmail.com>.
4030 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4032         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4033         before pthread_barrier_wait.
4035 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4038         Remove unnecessary exception handling data.
4040 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4042         [BZ #284]
4043         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4044         instead of clockid_t.
4046 2004-07-21  Roland McGrath  <roland@redhat.com>
4048         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4050 2004-07-19  Roland McGrath  <roland@redhat.com>
4052         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4054 2004-07-02  Roland McGrath  <roland@redhat.com>
4056         * configure: Don't exit.
4058 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4060         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4061         (__pthread_cond_timedwait): Check for invalid nanosecond in
4062         timeout value.
4064 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4066         * Makefile: Add rules to build and run tst-fini1.
4067         * tst-fini1.c: New file.
4068         * tst-fini1mod.c: New file.
4070 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4072         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4073         if no cancellation support is needed.
4074         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4075         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4076         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4077         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4078         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4079         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4080         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4081         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4082         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4084         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4085         only if not already defined.
4087 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4089         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4090         constraint "m" instead of "0" for futex.
4092         * shlib-versions: Add powerpc64-.*-linux.*.
4094 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4096         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4097         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4098         for valid tv_nsec.
4099         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4100         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4101         bits.
4103 2004-06-29  Roland McGrath  <roland@redhat.com>
4105         * Banner: NPTL no longer has its own version number.
4106         * Makefile (nptl-version): Variable removed.
4107         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4108         using $(version), the glibc version number.
4110 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4112         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4113         Fix branch offset for a PLT entry.
4114         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4115         Likewise.
4116         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4117         Likewise.
4118         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4119         Likewise.
4120         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4121         Likewise.
4123 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4125         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4126         unconditionally.
4128 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4130         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4131         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4132         instead of tv_sec.
4133         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4134         (pthread_rwlock_timedrdlock): Likewise.
4136 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4138         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4139         Set __r7 to val, not mutex.
4141 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4143         * Makefile: Add rules to build tst-rwlock14.
4144         * tst-rwlock14.c: New file.
4146 2004-06-24  Boris Hu  <boris.hu@intel.com>
4148         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4149         check.
4150         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4152 2004-06-19  Andreas Jaeger  <aj@suse.de>
4154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4155         assembler in last patch.
4157 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4159         * sysdeps/pthread/pthread_cond_timedwait.c
4160         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4161         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4162         (__pthread_cond_timedwait): Check for invalid nanosecond in
4163         timeout value.
4164         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4165         * tst-cond19.c: New file.
4166         * Makefile: Add rules to build and run tst-cond19.
4168 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4170         * tst-context1.c (GUARD_PATTERN): Defined.
4171         (tst_context_t): Define struct containing ucontext_t & guard words.
4172         (ctx): Declare as an array of tst_context_t.
4173         (fct): Verify uc_link & guard words are still valid.
4174         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4176 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4178         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4179         Add __data.__futex field, reshuffle __data.__clock.
4180         * sysdeps/unix/sysv/linux/sh/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/sh/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/sh/pthread_cond_timedwait.S
4188         (__pthread_cond_timedwait): Likewise.
4189         * sysdeps/unix/sysv/linux/sh/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.
4197 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4199         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4200         comment typo.
4201         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4202         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4203         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4204         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4205         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4207 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4209         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4210         Add memory clobber to inline assembly.
4211         (__lll_mutex_trylock): Likewise.
4212         (__lll_mutex_cond_trylock): Likewise.
4214 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4216         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4217         Pass val argument as 6th system call argument in %r7.
4219 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4221         * Makefile (tests): Add tst-cond16.
4222         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4223         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4224         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4225         Add __data.__futex field, reshuffle __data.__clock.
4226         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4227         (__pthread_cond_signal): Increment __futex at the same time as
4228         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4229         address of low 32-bits of __wakeup_seq to futex syscall.
4230         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4231         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4232         releasing internal lock to FUTEX_WAIT.
4233         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4234         (__pthread_cond_timedwait): Likewise.
4235         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4236         (FUTEX_CMP_REQUEUE): Define.
4237         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4238         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4239         Pass __futex value from before the unlock and __futex address instead
4240         of address of low 32-bits of __wakeup_seq to futex syscall.
4241         Fallback to FUTEX_WAKE all on any errors.
4242         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4243         Define.
4244         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4245         internally.  Return non-zero if error, zero if success.
4246         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4247         Add __data.__futex field, reshuffle __data.__clock.
4248         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4249         Define.
4250         (lll_futex_requeue): Add val argument, return 1 unconditionally
4251         for the time being.
4252         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4253         Add __data.__futex field, reshuffle __data.__clock.
4254         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4255         Define.
4256         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4257         internally.  Return non-zero if error, zero if success.
4258         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4259         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4260         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4261         Define.
4262         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4263         internally.  Return non-zero if error, zero if success.
4264         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4265         Add __data.__futex field, reshuffle __data.__clock.
4266         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4267         Define.
4268         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4269         internally.  Return non-zero if error, zero if success.
4270         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4271         Add __data.__futex field, reshuffle __data.__clock.
4272         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4273         Add __data.__futex field, reshuffle __data.__clock.
4274         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4275         Increment __futex at the same time as __wakeup_seq or __total_seq.
4276         Pass address of __futex instead of address of low 32-bits of
4277         __wakeup_seq to futex syscall.
4278         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4279         Pass __futex value from before releasing internal lock
4280         to FUTEX_WAIT.
4281         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4282         Likewise.  Avoid unnecessary shadowing of variables.
4283         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4284         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4285         unlock and __futex address instead of address of low 32-bits of
4286         __wakeup_seq to futex_requeue macro, adjust for new return value
4287         meaning.
4288         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4289         (__pthread_cond_signal): Increment __futex at the same time as
4290         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4291         address of low 32-bits of __wakeup_seq to futex syscall.
4292         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4293         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4294         releasing internal lock to FUTEX_WAIT.
4295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4296         (__pthread_cond_timedwait): Likewise.
4297         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4298         (FUTEX_CMP_REQUEUE): Define.
4299         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4300         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4301         Pass __futex value from before the unlock and __futex address instead
4302         of address of low 32-bits of __wakeup_seq to futex syscall.
4303         Fallback to FUTEX_WAKE all on any errors.
4305 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4307         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4308         Add nop to align the end of critical section.
4309         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4311 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4313         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4314         Add __broadcast_seq field.
4315         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4316         all waiters as woken with woken_seq and bump broadcast counter.
4317         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4318         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4319         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4320         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4322 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4325         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4326         Reported by Kaz Kojima.
4328 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4330         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4332 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4334         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4335         __broadcast_seq with bc_seq after acquiring internal lock instead of
4336         before it.
4338 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4340         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4341         compilation.
4342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4343         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4344         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4345         (pthread_cond_t): Add __data.__broadcast_seq field.
4346         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4347         (FRAME_SIZE): Define.
4348         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4349         Comment typo fixes.
4350         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4351         Define.
4352         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4353         typo fixes.
4354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4355         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4356         fixes.
4358 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4360         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4361         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4362         Add __broadcast_seq field.
4363         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4364         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4365         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4366         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4367         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4368         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4369         all waiters as woken with woken_seq and bump broadcast counter.
4370         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4372         __broadcast_seq field.
4373         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4374         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4375         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4376         * pthread_cond_init.c: Initialize __broadcast_seq field.
4377         * Makefile (tests): Add tst-cond17 and tst-cond18.
4378         Add .NOTPARALLEL goal.
4379         * tst-cond16.c: New file.  From Jakub.
4380         * tst-cond17.c: New file.  From Jakub.
4381         * tst-cond18.c: New file.  From Jakub.
4383 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4385         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4386         unwind info.
4388         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4389         Parametrize frame size.  Correct some unwind info.
4390         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4392 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4394         * tst-stack3.c: Note testing functionality beyond POSIX.
4396 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4398         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4399         Change conditional from ifdef to if.
4401 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4403         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4404         SYSDEP_CANCEL_ERROR): Define.
4405         (PSEUDO): Use it.
4407 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4409         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4411 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4413         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4415 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4417         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4418         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4419         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4420         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4422 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4424         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4425         thread has all signals blocked.
4427 2004-04-18  Andreas Jaeger  <aj@suse.de>
4429         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4430         (SEM_VALUE_MAX): Add missing brace.
4432 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4434         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4435         in rt subdir.
4436         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4437         * sysdeps/pthread/tst-mqueue8x.c: New test.
4438         * tst-cancel4.c: Update comment about message queues.
4440         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4441         return it_value { 0, 0 }.
4442         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4443         like SIGEV_SIGNAL.
4444         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4445         assertion for SIGEV_NONE.
4446         (thread_attr_compare): Compare all attributes, not just a partial
4447         subset.
4449 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4451         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4453 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4455         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4456         Just use a plain number.
4457         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4458         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4459         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4460         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4461         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4462         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4463         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4465 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4467         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4468         frame info.
4469         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4471 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4473         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4474         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4475         of calling sigwaitinfo.
4477 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4479         * allocatestack.c (allocate_stack): Set reported_guardsize
4480         unconditionally.
4481         * pthread_getattr_np.c (pthread_getattr_np): Use
4482         reported_guardsize instead of guardsize.
4483         * descr.h (struct pthread): Add reported_guardsize field.
4485 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4487         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4489 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4491         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4493 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4495         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4496         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4497         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4498         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4499         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4500         Define.
4501         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4502         (_POSIX_MESSAGE_PASSING): Define.
4503         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4504         (_POSIX_MESSAGE_PASSING): Define.
4505         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4506         (_POSIX_MESSAGE_PASSING): Define.
4508 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4510         * tst-context1.c (fct): Check whether correct stack is used.
4512 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4514         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4515         matching constraints for asm mem parameters.
4517         * tst-clock2.c (tf): Don't define unless needed.
4519 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4521         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4522         $(gnulib).
4524 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4526         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4527         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4528         * pthreadP.h: Declare __nptl_deallocate_tsd.
4529         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4530         Adjust caller.
4532         * Makefile (tests): Add tst-tsd5.
4533         * tst-tsd5.c: New file.
4535 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4537         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4538         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4539         is SHLIB_COMPAT check.
4540         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4541         (__pthread_attr_getaffinity_old): Likewise.
4542         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4543         (__pthread_getaffinity_old): Likewise.
4544         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4545         (__pthread_setaffinity_old): Likewise.
4547 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4549         * allocatestack.c (_make_stacks_executable): Call
4550         _dl_make_stack_executable first.
4552 2004-03-24  Roland McGrath  <roland@redhat.com>
4554         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4555         constraint instead of "0".
4557 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4559         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4560         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4562         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4563         code to avoid warning.
4565 2004-03-24  Andreas Jaeger  <aj@suse.de>
4567         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4568         (__pthread_attr_setaffinity_old): Remove const.
4570 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4572         * sysdeps/unix/sysv/linux/smp.h: New file.
4573         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4574         * init.c: Define __is_smp.
4575         (__pthread_initialize_minimal_internal): Call is_smp_system to
4576         initialize __is_smp.
4577         * pthreadP.h: Declare __is_smp.
4578         Define MAX_ADAPTIVE_COUNT is necessary.
4579         * pthread_mutex_init.c: Add comment regarding __spins field.
4580         * pthread_mutex_lock.c: Implement adaptive mutex type.
4581         * pthread_mutex_timedlock.c: Likewise.
4582         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4583         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4584         Add __spins field.
4585         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4586         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4587         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4588         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4589         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4590         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4591         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4592         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4593         lll_mutex_cond_trylock.
4594         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4595         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4596         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4597         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4598         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4599         Define BUSY_WAIT_NOP.
4600         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4601         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4603         * tst-mutex5.c: Add support for testing adaptive mutexes.
4604         * tst-mutex7.c: Likewise.
4605         * tst-mutex5a.c: New file.
4606         * tst-mutex7a.c: New file.
4607         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4609         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4610         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4611         vgettimeofday call might destroy the content.
4613         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4614         @pause in the loop.
4616         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4617         No need to restrict type of ret.  Make it int.  Add comment.
4619         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4620         Remove unnecessary setne instruction.
4622 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4624         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4625         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4626         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4627         If realloc fails, break out of the loop.
4629 2004-03-20  Andreas Jaeger  <aj@suse.de>
4631         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4632         (__pthread_setaffinity_old): Fix interface.
4633         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4634         (__pthread_getaffinity_old): Likewise.
4636         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4637         (__pthread_setaffinity_new): Remove duplicate declaration.
4639 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4641         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4642         the return value to a safe register.
4643         (CDISABLE): Set the function argument correctly.
4645 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4647         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4648         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4649         Rewrite so that only one locked memory operation per round is needed.
4650         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4651         (pthread_barrier_wait): After wakeup, release lock only when the
4652         last thread stopped using the barrier object.
4653         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4654         (__pthread_cond_wait): Don't store mutex address if the current
4655         value is ~0l.  Add correct cleanup support and unwind info.
4656         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4657         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4658         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4659         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4660         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4661         Add correct cleanup support and unwind info.
4662         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4663         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4664         information for syscall wrappers.
4666 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4668         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4669         cpusetsize field, remove next.
4670         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4671         parameter for size of the CPU set.
4672         (pthread_setaffinity_np): Likewise.
4673         (pthread_attr_getaffinity_np): Likewise.
4674         (pthread_attr_setaffinity_np): Likewise.
4675         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4676         interface change, keep compatibility code.
4677         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4678         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4679         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4680         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4681         __pthread_getaffinity_np.
4682         * Versions: Add version for changed interfaces.
4683         * tst-attr3.c: Adjust test for interface change.
4684         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4685         increasing buffer sizes.
4686         * pthread_attr_destroy.c: Remove unused list handling.
4687         * pthread_attr_init.c: Likewise.
4689 2004-03-17  Roland McGrath  <roland@redhat.com>
4691         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4692         first argument to clock_getres so we ever enable kernel timers.
4694 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4696         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4698 2004-03-12  Richard Henderson  <rth@redhat.com>
4700         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4701         oldvalue from CENABLE to CDISABLE.
4703 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4705         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4706         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4707         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4708         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4710 2004-03-11  Richard Henderson  <rth@redhat.com>
4712         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4713         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4714         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4716 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4718         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4719         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4720         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4722 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4724         * forward.c (__pthread_cond_broadcast_2_0,
4725         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4726         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4727         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4729 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4731         * sysdeps/sh/tcb-offsets.sym: Add PID.
4732         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4733         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4735 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4737         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4738         include <sysdep-cancel.h>, vfork is no cancellation point.
4739         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4740         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4741         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4743 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4745         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4746         libc_hidden_def.
4747         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4748         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4749         Likewise.
4750         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4751         Likewise.
4752         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4753         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4754         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4755         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4756         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4758         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4759         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4760         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4761         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4762         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4763         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4765         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4766         a local register for saving old PID.  Negate PID in parent upon exit.
4768         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4769         tcb-offsets.h.
4770         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4771         before syscall, set to the old value in the parent afterwards.
4772         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4773         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4774         tcb-offsets.h.
4775         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4776         before syscall, set to the old value in the parent afterwards.
4777         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4778         * sysdeps/s390/tcb-offsets.sym: Add PID.
4780         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4781         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4782         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4783         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4784         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4785         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4787 2004-03-10  Andreas Schwab  <schwab@suse.de>
4789         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4790         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4791         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4793 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4795         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4796         * tst-cancel21.c (do_one_test): Likewise.
4797         Reported by Gordon Jin <gordon.jin@intel.com>.
4799 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4801         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4802         if non-zero and set to INT_MIN if zero.
4803         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4804         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4805         (SAVE_PID, RESTORE_PID): Define.
4806         (__vfork): Use it.
4807         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4808         Use relative path to avoid including NPTL i386/vfork.S.
4809         (SAVE_PID, RESTORE_PID): Define.
4810         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4811         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4812         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4813         tst-vfork2x.
4814         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4815         * tst-vfork1.c: New test.
4816         * tst-vfork2.c: New test.
4817         * tst-vfork1x.c: New test.
4818         * tst-vfork2x.c: New test.
4820 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4822         * sysdeps/i386/tcb-offsets.sym: Add PID.
4823         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4824         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4825         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4827 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4829         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4831 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4833         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4834         _rtld_global_ro.
4836 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4838         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4839         _rtld_global_ro.
4841         * tst-once4.c: Remove unnecessary macro definition.
4843         * tst-mutex7.c (do_test): Limit thread stack size.
4844         * tst-once2.c (do_test): Likewise.
4845         * tst-tls3.c (do_test): Likewise.
4846         * tst-tls1.c (do_test): Likewise.
4847         * tst-signal3.c (do_test): Likewise.
4848         * tst-kill6.c (do_test): Likewise.
4849         * tst-key4.c (do_test): Likewise.
4850         * tst-join4.c (do_test): Likewise.
4851         * tst-fork1.c (do_test): Likewise.
4852         * tst-context1.c (do_test): Likewise.
4853         * tst-cond2.c (do_test): Likewise.
4854         * tst-cond10.c (do_test): Likewise.
4855         * tst-clock2.c (do_test): Likewise.
4856         * tst-cancel10.c (do_test): Likewise.
4857         * tst-basic2.c (do_test): Likewise.
4858         * tst-barrier4.c (do_test): Likewise.
4860 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4862         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4864 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4867         (__pthread_cond_timedwait): Optimize wakeup test.
4868         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4869         (__pthread_cond_wait): Likewise.
4870         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4871         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4872         Likewise.
4874 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4876         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4877         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4878         the atomic instruction needed.
4879         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4880         (__lll_mutex_lock_wait): Likewise.
4882 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4884         * Makefile (tests): Add tst-cond14 and tst-cond15.
4885         * tst-cond14.c: New file.
4886         * tst-cond15.c: New file.
4888 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4890         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4891         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4892         needs to be implemented differently to be useful.
4894 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4896         * pthread_attr_setschedparam.c: Don't test priority against limits
4897         here.  Set ATTR_FLAG_SCHED_SET flag.
4898         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4899         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4900         from parent thread to child.  If attribute is used and scheduling
4901         parameters are not inherited, copy parameters from attribute or
4902         compute them.  Check priority value.
4903         * pthread_getschedparam.c: If the parameters aren't known yet get
4904         them from the kernel.
4905         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4906         ATTR_FLAG_POLICY_SET flag for thread.
4907         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4908         and ATTR_FLAG_POLICY_SET.
4910         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4912         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4913         fail if stack address hasn't been set.  Just return 0.
4915 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4917         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4918         libpthread for the files in this list.
4919         (CFLAGS-tst-unload): Removed.
4920         * tst-unload.c (do_test): Don't use complete path for
4921         LIBPHREAD_SO.
4923         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4924         tst-_res1mod2.
4926 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4928         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4929         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4930         operation per round is needed.
4931         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4932         (__lll_mutex_lock_wait): Likewise.
4934 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4936         * tst-cancel9.c (cleanup): Don't print to stderr.
4938 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4940         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4942 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4944         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4945         (__syscall_error_handler2): Call CDISABLE.
4946         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4947         (__syscall_error_handler2): Call CDISABLE.
4949         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4950         Release lock before the loop, don't reacquire it.
4952         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4954 2004-02-19  Andreas Schwab  <schwab@suse.de>
4956         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4957         Fix last change.
4959 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4961         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4962         (pthread_barrier_wait): After wakeup, release lock only when the
4963         last thread stopped using the barrier object.
4964         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4965         (pthread_barrier_wait): Likewise.
4966         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4967         Likewise.
4968         * Makefile (tests): Add tst-barrier4.
4969         * tst-barrier4.c: New file.
4971         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4972         (__pthread_cond_timedwait): Perform timeout test while holding
4973         internal lock to prevent wakeup race.
4974         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4975         * sysdeps/pthread/pthread_cond_timedwait.c
4976         (__pthread_cond_timedwait): Likewise.
4977         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4978         (__pthread_cond_timedwait): Likewise.
4980 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4982         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4983         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4984         * Makefile (tests): Add tst-rwlock13.
4985         * tst-rwlock13.c: New test.
4987 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4990         (__condvar_tw_cleanup): Little optimization.
4991         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4993 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4995         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4996         libpthread as "lib" parameter to SHLIB_COMPAT.
4997         (__novmx_siglongjmp): Fix typo in function name.
4998         (__novmx_longjmp): Fix typo in function name.
5000 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5002         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5003         __builtin_expect.
5005         * sysdeps/generic/pt-longjmp.c: Moved to...
5006         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5008 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5010         * Makefile (libpthread-routines): Add pt-cleanup.
5011         * pt-longjmp.c: Removed.
5012         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5013         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5014         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5015         Version longjmp, siglongjmp for GLIBC_2.3.4.
5016         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5018 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5020         * sysdeps/pthread/pthread_cond_timedwait.c
5021         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5022         Reuse code.  Add __builtin_expects.
5024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5025         (__pthread_cond_timedwait): Get internal lock in case timeout has
5026         passed before the futex syscall.
5027         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5029 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5031         * allocatestack.c: Pretty printing.
5033         * sysdeps/pthread/createthread.c (create_thread): Don't add
5034         CLONE_DETACHED bit if it is not necessary.
5036 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5038         * pthread_getattr_np.c: Include ldsodefs.h.
5040 2004-01-16  Richard Henderson  <rth@redhat.com>
5042         * allocatestack.c: Don't declare __libc_stack_end.
5043         * init.c (__pthread_initialize_minimal_internal): Likewise.
5044         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5046 2004-01-15  Richard Henderson  <rth@redhat.com>
5048         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5049         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5050         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5051         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5052         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5053         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5054         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5055         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5057 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5059         * init.c (pthread_functions): Make array const.
5061 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5063         * allocatestack.c (__make_stacks_executable): Change interface.
5064         Check parameters.  Pass parameter on to libc counterpart.
5065         * pthreadP.h: Change declaration.
5067 2004-01-13  Richard Henderson  <rth@redhat.com>
5069         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5070         prototype form.
5071         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5072         Likewise.
5074         * sysdeps/alpha/Makefile: New file.
5075         * sysdeps/alpha/tcb-offsets.sym: New file.
5076         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5077         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5079         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5080         on powerpc version.
5082 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5084         * Makefile (tests): Add tst-backtrace1.
5085         * tst-backtrace1.c: New test.
5087 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5089         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5090         register as second parameter to the REGISTER macro.
5091         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5092         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5093         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5094         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5095         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5096         of thread register as second parameter to REGISTER macro in 64 case.
5098 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5100         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5101         (CFLAGS-getpid.o): Defined.
5102         (CFLAGS-getpid.os): Defined.
5104 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5106         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5107         returned for main thread does not overlap with any other VMA.
5108         Patch by Jakub Jelinek.
5110 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5112         * tst-raise1.c: Include stdio.h.
5114 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5116         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5117         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5118         If pid is 0, set it to selftid.
5119         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5120         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5121         != 0, return self->tid without doing a syscall.
5122         * descr.h (struct pthread): Move pid field after tid.
5124         * Makefile (tests): Add tst-raise1.
5125         * tst-raise1.c: New file.
5127 2003-12-23  Roland McGrath  <roland@redhat.com>
5129         * tst-oddstacklimit.c: New file.
5130         * Makefile (tests): Add it.
5131         (tst-oddstacklimit-ENV): New variable.
5133         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5134         value up to page size for __default_stacksize.
5136 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5138         * Makefile (tests): Add tst-eintr5.
5139         * tst-eintr5.c: New file.
5141         * eintr.c (eintr_source): Prevent sending signal to self.
5143         * tst-eintr2.c (tf1): Improve error message.
5145 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5147         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5148         * sysdeps/unix/sysv/linux/getpid.c: New file.
5149         * pthread_cancel.c: Add comment explaining use of PID field.
5150         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5151         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5152         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5153         temporarily to signal the field must not be relied on and updated
5154         by getpid().
5155         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5156         temporarily negative.
5157         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5159 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5161         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5162         (eintr_source): If ARG != NULL, use pthread_kill.
5163         * tst-eintr1.c: Adjust for this change.
5164         * tst-eintr2.c: Likewise.
5165         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5166         * tst-eintr3.c: New file.
5167         * tst-eintr4.c: New file.
5169 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5171         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5172         if CANCELSTATE_BITMASK is set.
5173         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5174         Likewise.
5176         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5177         (tests-reverse): Add tst-cancel23.
5178         * tst-cancel22.c: New test.
5179         * tst-cancel23.c: New test.
5181 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5183         * tst-eintr1.c: Better error messages.
5185         * Makefile (tests): Add tst-eintr2.
5186         * tst-eintr2.c: New file.
5188 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5190         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5191         (CFLAGS-tst-cancelx21.c): Set.
5192         * tst-cancel21.c: New test.
5193         * tst-cancelx21.c: New test.
5195         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5196         comparison operand.
5197         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5198         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5199         * pt-longjmp.c: Include jmpbuf-unwind.h.
5200         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5201         _JMPBUF_UNWINDS.  Adjust compared pointers.
5202         * init.c (__pthread_initialize_minimal_internal): Initialize
5203         pd->stackblock_size.
5204         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5205         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5206         * sysdeps/i386/jmpbuf-unwind.h: New file.
5207         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5208         * sysdeps/s390/jmpbuf-unwind.h: New file.
5209         * sysdeps/sh/jmpbuf-unwind.h: New file.
5210         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5211         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5212         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5213         (_JMPBUF_CFA_UNWINDS): Remove.
5214         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5216 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5218         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5219         (CFLAGS-tst-cancelx20.c): Set.
5220         * tst-cancel20.c: New test.
5221         * tst-cancelx20.c: New test.
5223 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5225         * init.c (__pthread_initialize_minimal_internal): Don't treat
5226         architectures with separate register stack special here when
5227         computing default stack size.
5229 2003-12-17  Roland McGrath  <roland@redhat.com>
5231         * Makefile (tst-cancelx7-ARGS): New variable.
5232         Reportd by Greg Schafer <gschafer@zip.com.au>.
5234 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5236         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5237         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5238         (tst-stack3-ENV): Set.
5239         ($(objpfx)tst-stack3-mem): New.
5240         * tst-stack3.c: New test.
5242 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5244         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5245         Add unwind directives.  Drop unused .regstk directive.
5246         (_fini_EPILOG_BEGINS): Add unwind directives.
5248 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5250         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5251         Assume parameter is a pointer.
5252         (lll_futex_wake): Likewise.
5253         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5254         Likewise.
5255         (lll_futex_wake): Likewise.
5256         Reported by Boris Hu.
5257         * sysdeps/unix/sysv/linux/unregister-atfork.c
5258         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5260         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5262 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5264         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5265         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5266         __rtld_lock_initialize for ld.so lock.
5267         Patch in part by Adam Li <adam.li@intel.com>.
5269 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5271         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5272         in $(gnulib).  Also, remove stale comment.
5274 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5276         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5277         advantage of new syscall stub and optimize accordingly.
5279         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5280         from SYS_futex, to match expectations of
5281         sysdep.h:DO_INLINE_SYSCALL.
5282         (lll_futex_clobbers): Remove.
5283         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5284         (lll_futex_wake): Likewise.
5285         (lll_futex_requeue): Likewise.
5286         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5287         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5288         Jelinek).
5289         (__lll_mutex_lock): Likewise.
5290         (__lll_mutex_cond_lock): Likewise.
5291         (__lll_mutex_timed_lock): Likewise.
5292         (__lll_mutex_unlock): Likewise.
5293         (__lll_mutex_unlock_force): Likewise.
5295         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5296         comes before the include of <sysdep.h>.
5297         (THREAD_SELF_SYSINFO): New macro.
5298         (THREAD_SYSINFO): Likewise.
5299         (INIT_SYSINFO): New macro.
5300         (TLS_INIT_TP): Call INIT_SYSINFO.
5302         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5304         * sysdeps/pthread/createthread.c (create_thread): Use
5305         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5306         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5307         THREAD_SELF_SYSINFO instead of open code.
5308         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5309         (THREAD_SYSINFO): Likewise.
5311         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5313         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5315 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5317         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5318         instead of .init.  Patch by David Mosberger.
5320 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5322         * sysdeps/pthread/configure.in: Remove broken declaration in C
5323         cleanup handling check.
5325 2003-11-30  Andreas Jaeger  <aj@suse.de>
5327         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5328         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5329         Likewise.
5331 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5333         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5334         * pthread_attr_destroy.c: Include shlib-compat.h.
5335         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5336         is set in iattr->flags.
5337         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5339 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5341         * Makefile (distribute): Add tst-cleanup4aux.c.
5343         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5344         include.
5346 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5348         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5349         pthread_cond_signal.
5351         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5352         store mutex address if the current value is ~0l.
5353         * sysdeps/pthread/pthread_cond_timedwait.c
5354         (__pthread_cond_timedwait): Likewise.
5355         * sysdeps/pthread/pthread_cond_broadcast.c
5356         (__pthread_cond_broadcast): Don't use requeue for pshared
5357         condvars.
5359         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5360         (__pthread_cond_wait): Don't store mutex address if the current
5361         value is ~0l.
5362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5363         (__pthread_cond_timedwait): Likewise.
5364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5365         (__pthread_cond_broadcast): Don't use requeue for pshared
5366         condvars.
5368         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5369         element with ~0l for pshared condvars, with NULL otherwise.
5371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5372         (__pthread_cond_wait): Don't store mutex address if the current
5373         value is ~0l.
5374         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5375         (__pthread_cond_timedwait): Likewise.
5376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5377         (__pthread_cond_broadcast): Don't use requeue for pshared
5378         condvars.
5380         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5381         * tst-cond12.c: New file.
5382         * tst-cond13.c: New file.
5384 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5386         * sysdeps/pthread/configure.in: Make missing forced unwind support
5387         fatal.
5389 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5391         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5393 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5395         * Makefile: Add magic to clean up correctly.
5397 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5399         * unwind.c (FRAME_LEFT): Define.
5400         (unwind_stop): Handle old style cleanups here.
5401         (__pthread_unwind): Handle old style cleanups only if
5402         !HAVE_FORCED_UNWIND.
5403         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5404         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5405         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5406         ($(objpfx)tst-cleanupx4): Likewise.
5407         * tst-cleanup4.c: New test.
5408         * tst-cleanup4aux.c: New.
5409         * tst-cleanupx4.c: New test.
5411 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5413         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5414         lll_mutex_*lock macros to skip atomic operations on some archs.
5416 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5418         * sysdeps/pthread/tst-timer.c (main): Initialize
5419         sigev2.sigev_value as well.
5421 2003-10-15  Roland McGrath  <roland@redhat.com>
5423         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5424         is missing.
5425         * sysdeps/pthread/configure: Regenerated.
5427 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5429         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5430         locking macros.  No distinction between normal and mutex locking
5431         anymore.
5432         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5433         Merge bits from lowlevelmutex.S we still need.
5434         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5435         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5436         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5437         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5438         new mutex implementation.
5439         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5440         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5441         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5442         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5443         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5444         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5445         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5446         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5447         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5448         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5449         symbol for entry point to avoid cancellation.
5451 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5453         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5454         changes.
5455         (SAVE_OLDTYPE_0): Fix a typo.
5457 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5459         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5460         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5462 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5464         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5465         correct offset.
5467 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5469         * Makefile (tests): Add tst-cancel19.
5470         * tst-cancel19.c: New test.
5472 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5474         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5475         restoring of the old cancellation type.
5477 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5479         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5481 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5483         * sysdeps/pthread/malloc-machine.h: New file
5485 2003-09-24  Roland McGrath  <roland@redhat.com>
5487         * allocatestack.c (__make_stacks_executable): Don't ignore return
5488         value from _dl_make_stack_executable.
5490 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5492         * allocatestack.c (__make_stacks_executable): Also change
5493         permission of the currently unused stacks.
5495         * allocatestack.c (change_stack_perm): Split out from
5496         __make_stacks_executable.
5497         (allocate_stack): If the required permission changed between the time
5498         we started preparing the stack and queueing it, change the permission.
5499         (__make_stacks_executable): Call change_stack_perm.
5501         * Makefile: Build tst-execstack-mod locally.
5502         * tst-execstack-mod.c: New file.
5504 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5506         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5508 2003-09-23  Roland McGrath  <roland@redhat.com>
5510         * tst-execstack.c: New file.
5511         * Makefile (tests): Add it.
5512         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5513         (LDFLAGS-tst-execstack): New variable.
5515         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5516         whether to use PROT_EXEC for stack mmap.
5517         (__make_stacks_executable): New function.
5518         * pthreadP.h: Declare it.
5519         * init.c (__pthread_initialize_minimal_internal): Set
5520         GL(dl_make_stack_executable_hook) to that.
5522 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5524         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5525         recommendation from AMD re avoidance of lock prefix.
5527 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5529         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5530         lll_futex_timed_wait instead of lll_futex_wait.
5531         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5532         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5533         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5534         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5535         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5536         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5537         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5538         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5539         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5540         Completely revamp the locking macros.  No distinction between
5541         normal and mutex locking anymore.
5542         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5543         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5544         __lll_lock_timedwait): Fix prototypes.
5545         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5546         __lll_lock_timedwait): Likewise.
5547         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5548         macros, add __builtin_expect.
5549         (lll_mutex_timedlock): Likewise.  Fix return value.
5550         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5551         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5552         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5553         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5554         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5555         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5556         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5557         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5559 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5561         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5562         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5563         operation if possible.
5565         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5566         like jumping over the lock prefix.
5568 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5570         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5571         locking macros.  No distinction between normal and mutex locking
5572         anymore.
5573         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5574         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5575         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5576         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5577         locking.  Merge bits from lowlevelmutex.S we still need.
5578         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5579         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5580         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5581         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5582         * Makefile (routines): Remove libc-lowlevelmutex.
5583         (libpthread-rountines): Remove lowlevelmutex.
5584         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5585         for new mutex implementation.
5586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5587         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5588         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5590         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5591         Likewise.
5592         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5593         Likewise.
5594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5595         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5596         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5597         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5599         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5600         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5601         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5602         Likewise.
5603         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5604         Likewise.
5605         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5606         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5608         Don't use requeue.
5609         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5610         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5612 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5614         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5615         in parameters of asm with output parameters.
5617         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5618         type of DECR parameter to int.
5619         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5621 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5623         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5624         guardsize for each thread.
5626 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5628         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5629         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5630         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5632         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5633         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5634         NULL.
5635         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5636         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5637         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5638         (pthread_getaffinity_np): Add hidden_def.
5640         * Makefile (tests): Add tst-attr3.
5641         * tst-attr3.c: New test.
5643         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5645 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5647         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5648         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5650 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5652         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5653         * tst-align.c: Include tst-stack-align.h.
5654         (tf, do_test): Use TEST_STACK_ALIGN macro.
5656 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5658         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5659         variable.
5661 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5663         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5664         stack-related values for the initial thread.
5666 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5668         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5670 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5672         * pthread_mutex_lock.c: Minor code rearrangements.
5674 2003-09-05  Roland McGrath  <roland@redhat.com>
5676         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5677         Instead, include ../nptl_db/db_info.c to do its magic.
5678         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5679         (__pthread_pthread_key_2ndlevel_size): Likewise.
5680         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5681         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5682         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5683         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5684         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5685         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5686         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5687         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5688         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5689         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5690         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5691         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5692         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5693         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5694         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5695         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5696         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5698 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5700         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5701         of pthread_t to be compatible with LT.
5702         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5703         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5704         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5705         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5706         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5707         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5708         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5710 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5712         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5714 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5716         * unwind-forcedunwind.c: Move to...
5717         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5718         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5719         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5720         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5721         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5722         * unwind.c: Include jmpbuf-unwind.h.
5723         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5725 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5727         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5728         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5729         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5730         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5731         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5732         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5733         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5734         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5735         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5736         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5737         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5738         function.
5739         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5740         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5741         * Makefile (tests): Add tst-stack2.
5742         * tst-stack2.c: New test.
5743         * tst-stack1.c: Include limits.h and sys/param.h.
5744         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5746         * pthread_condattr_setpshared.c: Include errno.h.
5747         (pthread_condattr_setpshared): Return EINVAL if pshared
5748         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5750         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5751         defined symbol for entry point to avoid cancellation.
5752         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5753         Likewise.
5754         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5755         Likewise.
5756         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5757         Likewise.
5758         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5759         Likewise.
5760         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5761         Likewise.
5762         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5763         __close_nocancel, __read_nocancel, __write_nocancel,
5764         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5765         libpthread.so or librt.so, define to corresponding function
5766         without _nocancel suffix.
5767         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5768         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5769         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5771         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5773 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5775         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5776         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5778         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5779         in subsections has a symbol associated with it.
5781         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5782         defined symbol for entry point to avoid cancellation.
5783         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5785 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5787         * Makefile (tests): Add tst-tls5.
5788         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5789         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5790         ($(objpfx)tst-tls5): New.
5791         ($(objpfx)tst-tls6.out): Likewise.
5792         (tests): Depend on $(objpfx)tst-tls6.out.
5793         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5794         (do_test): Check pthread_self () return value alignment.
5795         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5796         (tf): Check pthread_self () return value alignment.
5797         * tst-tls5.c: New test.
5798         * tst-tls5.h: New.
5799         * tst-tls5mod.c: New.
5800         * tst-tls5moda.c: New.
5801         * tst-tls5modb.c: New.
5802         * tst-tls5modc.c: New.
5803         * tst-tls5modd.c: New.
5804         * tst-tls5mode.c: New.
5805         * tst-tls5modf.c: New.
5806         * tst-tls6.sh: New test.
5808         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5809         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5810         * init.c (pthread_functions): Initialize them.
5811         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5812         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5813         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5814         pthread_cond_timedwait@@GLIBC_2.3.2.
5816 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5818         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5819         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5820         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5821         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5822         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5823         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5825         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5827         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5828         _POSIX_THREAD_PRIORITY_SCHEDULING.
5829         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5831 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5833         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5834         nested function, use static inline function from libio.h.
5835         Code by Richard Henderson.
5837         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5838         weak.
5840 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5842         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5843         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5844         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5845         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5846         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5847         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5848         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5849         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5850         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5851         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5852         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5853         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5854         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5855         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5856         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5857         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5858         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5859         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5860         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5861         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5862         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5863         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5864         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5865         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5866         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5867         * sysdeps/sparc/tls.h: New file.
5868         * sysdeps/sparc/tcb-offsets.sym: New file.
5869         * sysdeps/sparc/Makefile: New file.
5870         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5871         * init.c [__sparc__] (__NR_set_tid_address): Define.
5873 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5875         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5876         _IO_release_lock): Define.
5878 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5880         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5881         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5883 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5885         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5886         (__pthread_cleanup_class): Add missing return types of member
5887         functions.
5889 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5891         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5892         (lll_mutex_unlock_force): Add memory barrier between store and futex
5893         syscall.
5895 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5897         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5898         tempmsg in first loop.
5900 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5902         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5903         _POSIX_THREAD_PRIORITY_SCHEDULING.
5904         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5906 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5908         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5909         (__rtld_lock_default_lock_recursive,
5910         __rtld_lock_default_unlock_recursive): Define.
5911         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5912         __rtld_lock_unlock_recursive): Define using
5913         GL(_dl_rtld_*lock_recursive).
5914         * init.c (__pthread_initialize_minimal_internal): Initialize
5915         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5916         Lock GL(_dl_load_lock) the same number of times as
5917         GL(_dl_load_lock) using non-mt implementation was nested.
5919         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5920         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5922 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5924         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5925         PIPE_BUF.
5927 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5929         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5931 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5933         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5934         to first syscall error check.  Move syscall error check for tkill
5935         into __ASSUME_CLONE_STOPPED #ifdef.
5937 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5939         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5940         is not defined, do explicit synchronization.
5941         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5942         is not defined also unlock pd->lock for non-debugging case in case
5943         it is necessary.
5944         * pthread_create.c (start_thread): Always get and release pd->lock
5945         if __ASSUME_CLONE_STOPPED is not defined.
5946         (start_thread_debug): Removed.  Adjust users.
5947         * allocatestack.c (allocate_stack): Always initialize lock if
5948         __ASSUME_CLONE_STOPPED is not defined.
5949         * Makefile (tests): Add tst-sched1.
5950         * tst-sched1.c: New file.
5952         * sysdeps/pthread/createthread.c (do_clone): Only use
5953         sched_setschduler and pass correct parameters.
5955 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5957         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5958         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5959         PTHREAD_STACK_MIN in comments.
5961 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5963         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5964         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5965         argument.
5966         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5967         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5968         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5969         (__pthread_cleanup_upto): Fix prototype.
5970         (_longjmp_unwind): Adjust caller.
5971         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5972         Change second argument to const struct pointer.
5973         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5974         * tst-sem9.c (main): Likewise.
5975         * unwind.c: Include string.h for strlen prototype.
5977 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5979         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5980         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5981         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5982         Define HAVE_CMOV.
5983         Patch by Nicholas Miell <nmiell@attbi.com>.
5985 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5987         * init.c (__pthread_initialize_minimal_internal): Initialize
5988         GL(dl_init_static_tls).
5989         * pthreadP.h (__pthread_init_static_tls): New prototype.
5990         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5991         New functions.
5992         * Makefile (tests): Add tst-tls4.
5993         (modules-names): Add tst-tls4moda and tst-tls4modb.
5994         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5995         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5996         tst-tls4modb.so.
5997         * tst-tls4.c: New file.
5998         * tst-tls4moda.c: New file.
5999         * tst-tls4modb.c: New file.
6001 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6003         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6004         before __timer_dealloc.
6005         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6006         Don't call list_unlink.
6008 2003-07-29  Roland McGrath  <roland@redhat.com>
6010         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6012 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6014         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6015         Don't reuse struct aiocb A if it failed.
6016         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6017         not just one byte, as that does not block.
6019 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6021         * sysdeps/pthread/unwind-resume.c: New file.
6022         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6023         unwind-resume in csu subdir.
6024         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6025         exceptions.
6026         (librt-sysdep_routines, librt-shared-only-routines): Add
6027         rt-unwind-resume.
6028         * sysdeps/pthread/rt-unwind-resume.c: New file.
6029         * unwind-forcedunwind.c: New file.
6030         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6031         (libpthread-shared-only-routines): Likewise.
6032         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6033         * pthreadP.h (pthread_cancel_init): New prototype.
6034         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6036         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6037         attr argument const struct pthread_attr *.
6039         * res.c (__res_state): Return __resp.
6040         * descr.h: Include resolv.h.
6041         (struct pthread): Add res field.
6042         * pthread_create.c: Include resolv.h.
6043         (start_thread): Initialize __resp.
6044         * Makefile (tests): Add tst-_res1.
6045         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6046         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6047         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6048         libpthread.
6049         * tst-_res1.c: New file.
6050         * tst-_res1mod1.c: New file.
6051         * tst-_res1mod2.c: New file.
6053 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6055         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6057         * Makefile: Define various *-no-z-defs variables for test DSOs
6058         which has undefined symbols.
6060 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6062         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6063         Retry if the stwcx fails to store once_control.
6065 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6067         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6068         pthread_attr_setaffinity.
6069         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6070         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6071         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6072         * pthread_attr_destroy.c: Free cpuset element if allocated.
6073         * pthread_create.c: Pass iattr as additional parameter to
6074         create_thread.
6075         * sysdeps/pthread/createthread.c: If attribute is provided and
6076         a new thread is created with affinity set or scheduling parameters,
6077         start thread with CLONE_STOPPED.
6078         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6079         pthread_attr_setaffinity.
6080         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6081         cpuset element.
6083 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6085         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6087 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6089         * sysdeps/pthread/configure.in: Require CFI directives also for
6090         ppc and s390.
6092 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6094         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6095         Add cfi directives.
6097 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6099         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6100         CLEANUP_JMP_BUF.
6101         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6102         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6103         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6105         not self pointer in __writer.  Compare with TID to determine
6106         deadlocks.
6107         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6108         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6109         Likewise.
6110         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6111         Likewise.
6112         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6113         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6114         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6115         macros also when compiling librt.
6117 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6119         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6120         -fasynchronous-unwind-tables.
6121         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6122         (PSEUDO): Add cfi directives.
6123         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6124         Likewise.
6125         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6126         Likewise.
6128 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6130         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6131         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6132         * unwind.c (__pthread_unwind_next): Add hidden_def.
6133         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6134         Likewise.
6135         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6136         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6137         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6138         Likewise.
6139         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6140         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6141         Likewise.
6142         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6143         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6144         __pthread_unregister_cancel and __pthread_unwind_next.
6146 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6148         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6149         different symbol for the cancellation syscall wrapper and
6150         non-cancellation syscall wrapper.
6151         (PSEUDO_END): Define.
6153 2003-07-05  Richard Henderson  <rth@redhat.com>
6155         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6156         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6157         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6158         return actual return value from the syscall, not 0.
6160 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6162         * descr.h (struct pthread): Add pid field.
6163         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6164         (__reclaim_stacks): Likewise.
6165         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6166         also check for PID of the signal source.
6167         (__pthread_initialize_minimal_internal): Also initialize pid field
6168         of initial thread's descriptor.
6169         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6170         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6171         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6172         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6173         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6175 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6177         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6178         Fix use of parameter.
6179         (__libc_cleanup_pop): Likewise.
6181 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6183         * init.c (sigcancel_handler): Change parameters to match handler
6184         for SA_SIGACTION.  Check signal number and code to recognize
6185         invalid invocations.
6187 2003-07-03  Roland McGrath  <roland@redhat.com>
6189         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6190         Apply sizeof (struct pthread) bias to r13 value.
6192 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6194         * sysdeps/pthread/configure.in: Require CFI directives.
6196         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6197         definition.
6198         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6199         libpthread compilation.
6200         * unwind.c (__pthread_unwind): Add hidden_def.
6201         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6203 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6205         * libc-cancellation.c (__libc_cleanup_routine): Define.
6206         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6207         (__pthread_cleanup_pop): Define.
6209 2003-07-01  Richard Henderson  <rth@redhat.com>
6211         * sysdeps/alpha/elf/pt-initfini.c: New file.
6212         * sysdeps/alpha/pthread_spin_lock.S: New file.
6213         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6214         * sysdeps/alpha/pthreaddef.h: New file.
6215         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6216         * sysdeps/alpha/tls.h: New file.
6217         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6218         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6219         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6220         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6221         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6222         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6223         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6224         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6225         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6226         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6228 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6230         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6231         cleanup support and unwind info.
6233 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6235         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6236         Use correct cleanup handler registration.  Add unwind info.
6237         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6238         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6239         * tst-once3.c: Add cleanup handler and check it is called.
6240         * tst-once4.c: Likewise.
6241         * tst-oncex3.c: New file.
6242         * tst-oncex4.c: New file.
6243         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6245 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6247         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6249 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6251         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6252         (tf_msgsnd): Likewise.
6254         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6255         premature returns a bit more.
6257 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6259         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6260         definition to the front.
6262         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6263         the cleanup functions to make the names unique.  Fix dwarf opcode
6264         un unwind table.
6265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6266         functions to make the names unique.  Fix CFA offset for two blocks.
6268 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6270         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6271         missing closing braces.
6272         Patch by Christophe Saout <christophe@saout.de>.
6274 2003-06-24  Roland McGrath  <roland@redhat.com>
6276         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6278 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6280         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6281         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6283         * pthreadP.h: Declare __find_thread_by_id.
6284         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6285         * pthread_clock_gettime.c: Allow using other thread's clock.
6286         * pthread_clock_settime.c: Likewise.
6287         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6288         * Makefile: Add rules to build and run tst-clock2.
6289         * tst-clock2.c: New file.
6291 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6294         to use exception-based cleanup handler.
6295         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6297         * tst-cond8.c (ch): Announce that we are done.
6299         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6301         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6302         Also test aio_suspend with timeout value.
6304 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6306         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6307         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6308         attribute_hidden.
6310         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6311         (__pthread_mutex_lock_internal): Likewise.
6312         (__pthread_mutex_unlock_internal): Likewise.
6313         (__pthread_mutex_unlock_usercnt): Declare.
6314         * pthread_mutex_destroy.c: Always fail if used in any way.
6315         * pthread_mutex_init.c: Update comment.
6316         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6317         * pthread_mutex_timedlock.c: Adjust __nusers.
6318         * pthread_mutex_trylock.c: Adjust __nusers.
6319         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6320         and public interfaces are wrapper with pass additional parameter.
6321         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6322         parameter zero.
6323         * tst-mutex8.c: New file.
6324         * Makefile (tests): Add tst-mutex8.
6325         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6326         __pthread_mutex_unlock_usercnt.
6327         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6329         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6330         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6331         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6332         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6333         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6334         Add __nusers.
6335         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6336         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6337         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6338         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6339         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6341         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6342         * pthread_mutex_timedlock.c: Likewise.
6343         * pthread_mutex_trylock.c: Adjust __nusers.
6344         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6345         * tst-mutex9.c: New file.
6346         * Makefile (tests): Add tst-mutex9.
6347         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6348         * sysdeps/ia64/tls.h: Likewise.
6349         * sysdeps/powerpc/tls.h: Likewise.
6350         * sysdeps/s390/tls.h: Likewise.
6351         * sysdeps/sh/tls.h: Likewise.
6352         * sysdeps/x86_64/tls.h: Likewise.
6353         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6354         Change type of __owner.
6355         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6356         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6357         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6358         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6359         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6361 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6363         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6364         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6366         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6367         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6368         instead of nr to lll_futex_wake.  Only set errno and return -1
6369         if err < 0.
6371         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6372         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6373         return actual return value from the syscall, not 0.
6375 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6377         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6378         find a random value.
6379         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6380         errno==EIDRM.
6382         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6383         compat_timer_settime.
6384         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6385         compat_timer_gettime.
6386         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6387         compat_timer_getoverrun.
6388         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6389         compat_timer_delete.
6391         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6392         error-checking mutex detect busy mutexes.
6394 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6396         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6397         Add ax to clobber list.
6398         (lll_mutex_cond_lock): Likewise.
6399         (lll_mutex_unlock): Likewise.
6400         (lll_lock): Likewise.
6401         (lll_unlock): Likewise.
6403         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6404         * tst-cancel18.c: New file.
6405         * tst-cancelx18.c: New file.
6407         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6408         and tcdrain.
6410         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6411         * tst-cancel17.c: New file.
6412         * tst-cancelx17.c: New file.
6414         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6415         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6416         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6418         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6420 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6422         * sysdeps/pthread/createthread.c (create_thread): Set
6423         header.multiple_threads unconditionally.
6424         * allocatestack.c (allocate_stack): Likewise.
6425         * descr.h (struct pthread): Add header.multiple_threads
6426         unconditionally.
6427         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6428         Define for librt.  #error if neither libpthread, libc nor librt.
6429         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6430         Likewise.
6431         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6432         CDISABLE): Likewise.
6433         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6434         CDISABLE): Likewise.
6435         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6436         CDISABLE): Likewise.
6437         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6438         CDISABLE): Likewise.  Access header.multiple_threads outside of
6439         libc and libpthread.
6440         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6441         Likewise.
6442         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6443         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6445 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6447         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6448         Also test early cancellation before the thread reaches the cancellation
6449         point.
6451         * Makefile: Compile forward.c with exceptions.
6453         * sysdeps/unix/sysv/linux/sleep.c: New file.
6455 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6457         * Makefile: Add CFLAGS definition to compile function wrappers
6458         duplicated from libc with exceptions.
6459         * tst-cancel4.c: Also check cancellation handlers.
6461         * Makefile: Add rules to build and run tst-cancel16 and
6462         tst-cancelx16.  Add missing CFLAGS definitions.
6463         * tst-cancel16.c: New file.
6464         * tst-cancelx16.c: New file.
6466 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6468         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6469         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6470         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6471         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6473         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6474         (LIBC_CANCEL_RESET): Likewise.
6475         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6476         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6477         librt-cancellation.
6478         (CFLAGS-libcrt-cancellation.c): Define.
6479         * sysdeps/pthread/librt-cancellation.c: New file.
6480         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6481         macros also when compiling librt.
6482         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6483         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6484         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6485         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6486         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6487         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6488         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6490         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6491         compat_timer_create.
6493 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6495         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6497         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6498         __register_atfork.
6499         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6500         Add libc_hidden_def.
6502 2003-06-13  Roland McGrath  <roland@redhat.com>
6504         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6505         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6507 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6509         * allocatestack.c (queue_stack): Always inline.
6510         * ptreadhP.h (__do_cancel): Likewise.
6512 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6514         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6515         a typo.
6517 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6520         (__pthread_cond_signal): Remove incorrect second addition for
6521         cond_lock!=0.
6523 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6525         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6526         (__pthread_cond_signal): Use correct futex pointer in
6527         __lll_mutex_lock_wait call.
6529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6530         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6532 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6534         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6535         cancelable.
6536         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6537         Likewise.
6539         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6540         hand-written CFI generation code.  Since ENTRY/END also initiated
6541         CFI frames this caused two CFI sets to be generated.
6543 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6545         * cleanup_routine.c: New file.
6546         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6547         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6548         cleanup handling.
6549         * Makefile (libpthread-routines): Add cleanup_routine.
6550         Add more CFLAGS variables to compile with exceptions.  Add comments
6551         why which file needs unwind tables.
6552         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6553         tests.
6554         * tst-cancelx1.c: New file.
6555         * tst-cancelx2.c: New file.
6556         * tst-cancelx3.c: New file.
6557         * tst-cancelx4.c: New file.
6558         * tst-cancelx5.c: New file.
6559         * tst-cancelx6.c: New file.
6560         * tst-cancelx7.c: New file.
6561         * tst-cancelx8.c: New file.
6562         * tst-cancelx9.c: New file.
6563         * tst-cancelx10.c: New file.
6564         * tst-cancelx11.c: New file.
6565         * tst-cancelx12.c: New file.
6566         * tst-cancelx13.c: New file.
6567         * tst-cancelx14.c: New file.
6568         * tst-cancelx15.c: New file.
6569         * tst-cleanupx0.c: New file.
6570         * tst-cleanupx0.expect: New file.
6571         * tst-cleanupx1.c: New file.
6572         * tst-cleanupx2.c: New file.
6573         * tst-cleanupx3.c: New file.
6575         * tst-cleanup0.c: Make standard compliant.
6576         * tst-cleanup1.c: Likewise.
6578         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6579         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6580         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6581         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6582         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6583         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6584         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6585         CLEANUP_JMP_BUF.
6586         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6587         * tst-cancel12.c: New file.
6588         * tst-cancel13.c: New file.
6589         * tst-cancel14.c: New file.
6590         * tst-cancel15.c: New file.
6591         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6592         and tst-cancel15.
6594         * tst-cancel1.c: Add some comments.
6596         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6597         timeout correctly.
6599 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6601         * Makefile (CFLAGS-pthread_cancel.c): Define.
6603 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6605         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6606         Change type of __writer element to int.
6607         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6608         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6609         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6610         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6611         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6612         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6613         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6614         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6615         Compare with TID to determine deadlocks.
6616         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6617         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6618         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6619         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6622         Likewise.
6623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6624         Likewise.
6625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6626         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6627         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6628         Likewise.
6629         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6630         Likewise.
6631         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6632         * Makefile (tests): Add tst-rwlock12.
6633         * tst-rwlock12.c: New file.
6635 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6637         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6638         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6639         Remove bogus hidden_proto.
6640         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6641         Likewise.
6642         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6643         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6644         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6645         ___lll_mutex_timedlock): Likewise.
6647 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6649         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6650         (__pthread_cond_signal): Add some code to eventually handle
6651         cond_lock!=0.
6653 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6655         * Makefile (tests): Add tst-exec4.
6656         (tst-exec4-ARGS): Define.
6657         * tst-exec4.c: New file.
6659 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6661         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6662         Also fail if tv_nsec < 0.
6663         (__lll_timedwait_tid): Likewise.
6664         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6665         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6666         Likewise.
6667         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6668         Likewise.
6669         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6670         Likewise.
6671         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6672         Likewise.
6673         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6674         Likewise.
6675         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6676         Likewise.
6678         * Makefile (tests): Add tst-sem8 and tst-sem9.
6679         * tst-sem8.c: New file.
6680         * tst-sem9.c: New file.
6681         * sem_open.c: Fix creation of in_use record if the file exists but
6682         no internal record.
6684         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6685         definitions.
6687         * sysdeps/pthread/timer_create.c (timer_create): In case
6688         evp==NULL, assign timer ID to sival_ptr.
6690         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6691         struct pthread_unwind_buf *.
6692         (struct pthread): Likewise for cleanup_jmp_buf element.
6694         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6695         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6696         * unwind.c (__pthread_unwind_next): Likewise.
6698 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6700         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6701         (lll_futex_timed_wait): Use int for futex value parameter.
6702         (lll_futex_wake): Likewise.
6703         (lll_futex_requeue): Likewise.
6705         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6706         Replace one memory operation with one register operation.
6708         * tst-join4.c (do_test): Fix error message.
6710         * tst-rwlock6.c (do_test): Use correct format specifier.
6712         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6713         (__lll_mutex_lock_wait): Replace one memory operation with one
6714         register operation.
6715         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6716         (__lll_mutex_lock_wait): Likewise.
6718         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6719         (__lll_mutex_cond_lock): Add one to value parameter of
6720         __lll_lock_wait to reflect reality in the futex syscall.
6721         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6722         (lll_mutex_cond_lock): Likewise.
6724 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6726         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6727         New function.
6728         (lll_mutex_cond_lock): Define.
6730 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6732         * Makefile (tests): Add tst-signal6.
6733         * tst-signal6.c: New file.
6735         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6736         (__lll_mutex_unlock_force): New function
6737         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6739         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6740         (__lll_mutex_unlock_force): New function.
6741         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6743         * tst-rwlock7.c (do_test): Use correct format specifier.
6745         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6746         Find break parameter in correct asm argument.
6748 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6750         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6751         Remove out4.
6752         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6753         error occured.
6754         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6755         Add __mutex.
6756         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6757         lll_futex_requeue, lll_mutex_unlock_force): Define.
6759 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6761         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6762         (pthread_cond_t): Add __mutex.
6763         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6764         lll_futex_requeue, lll_mutex_unlock_force): Define.
6766 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6768         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6769         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6770         Add __mutex field.
6771         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6772         Define.
6773         (lll_futex_wait, lll_futex_wake): Define.
6774         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6775         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6776         FUTEX_REQUEUE instead of FUTEX_WAIT.
6777         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6778         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6779         mutex which was used in condvar structure.  Call
6780         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6781         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6783         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6784         include tcb-offsets.h.  Read wakeup value in locked region.
6785         Use the value of gbr register as THREAD_ID.
6786         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6787         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6788         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6790         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6791         macros.
6793 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6795         * sysdeps/pthread/pthread_cond_broadcast.c
6796         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6798 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6801         typo in register name.
6802         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6803         correctly.  Actually use requeue.  Little optimization.
6804         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6805         mutex address early.  Handle cancellation state as 32-bit value.
6806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6807         Remove unnecessary label.
6809 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6811         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6812         instead of FUTEX_WAIT.
6813         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6814         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6815         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6816         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6817         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6818         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6819         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6820         of __pthread_mutex_lock_internal.
6821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6822         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6823         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6824         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6826         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6827         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6828         Add pthread_mutex_cond_lock.
6829         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6830         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6831         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6832         lll_mutex_cond_lock.
6833         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6834         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6835         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6836         Add __mutex field.
6837         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6838         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6840         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6841         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6843         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6844         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6845         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6846         macro don't define aliases.
6848         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6849         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6850         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6851         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6852         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6853         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6854         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6858 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6860         * sem_open.c: Fix one endless loop.  Implement correct semantics
6861         wrt opening the same semaphore more then once.
6862         * sem_close.c: Adjust for sem_open change.
6863         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6864         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6865         * Makefile (tests): Add tst-sem7.
6866         * tst-sem7.c: New file.
6868 2003-05-16  Roland McGrath  <roland@redhat.com>
6870         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6871         uninitialized variable braino.
6873 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6875         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6876         test for syscall availability.
6878         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6879         __no_posix_timers to -1 if the syscalls don't exist.
6881         * pthread_join.c (pthread_join): Set tid field of the joined
6882         thread to -1.  This isn't necessary but helps to recognize some
6883         error conditions with almost no cost.
6885         * allocatestack.c (FREE_P): Also negative values indicate an
6886         unused stack.
6888         * unwind.c: Include <unistd.h>.
6890 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6892         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6894 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6896         * Makefile (crti-objs, crtn-objs): New variables.
6897         (omit-deps, extra-objs): Add crtn.
6898         ($(objpfx)libpthread.so): Depend on both crti and crtn
6899         and links to them in multidir.
6900         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6902 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6904         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6905         (lll_mutex_unlock): Use atomic_exchange_rel.
6907 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6909         * cond-perf.c (cons): Add missing locking around setting of alldone.
6911 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6913         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6914         related macros.
6915         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6917 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6919         * tst-sem6.c: New file.
6920         * Makefile (tests): Add tst-sem6.
6922         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6923         Use atomic_exchange_rel instead of atomic_exchange.
6924         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6925         Likewise.
6927         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6928         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6929         vsyscall is possible.
6931         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6932         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6933         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6934         pthread_setaffinity_np.
6935         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6936         and pthread_setaffinity_np.
6937         * Makefile (libpthread-routines): Add pthread_getaffinity and
6938         pthread_setaffinity.
6940         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6941         use it in case mmap to allocate the stack fails.
6942         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6943         ARCH_MAP_FLAGS here.
6944         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6945         ARCH_RETRY_MMAP.
6947 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6949         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6950         handler implementation.  It is now lockless in fork().
6951         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6952         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6953         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6954         declare the __fork_*_lists.
6955         (struct fork_handler): Include pointers to all three functions.
6956         Add next, refcntr and need_signal elements.
6957         (__fork_handlers): New declaration.
6958         (__register_atfork_malloc): Remove declaration.
6959         (HAVE_register_atfork_malloc): Remove definition.
6960         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6961         __pthread_child_handler variable.
6962         (__libc_pthread_init): Use __register_atfork instead of explicitly
6963         adding to the list.
6964         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6965         and lll_futex_wake.
6966         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6968         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6969         function must never be reached.
6971         * cond-perf.c: New file.
6973 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6975         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6977 2003-05-04  Roland McGrath  <roland@redhat.com>
6979         * Makefile ($(objpfx)../libc.so): New target.
6981 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6984         (pthread_condattr_t): Size is only an int, don't use long for
6985         alignment.
6986         (pthread_mutexattr_t): Likewise.
6987         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6988         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6989         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6991 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6993         * sysdeps/i386/tls.h: Define THREAD_ID.
6994         * sysdeps/ia64/tls.h: Likewise.
6995         * sysdeps/powerpc/tls.h: Likewise.
6996         * sysdeps/s390/tls.h: Likewise.
6997         * sysdeps/sh/tls.h: Likewise.
6998         * sysdeps/x86_64/tls.h: Likewise.
6999         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7000         record ownership.
7001         * pthread_mutex_timedlock.c: Likewise.
7002         * pthread_mutex_trylock.c: Likewise.
7003         * pthread_mutex_unlock.c: Likewise.
7004         * pthread_rwlock_trywrlock.c: Likewise.
7005         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7006         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7007         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7008         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7010         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7011         flag.
7013 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7015         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7016         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7017         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7018         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7019         Make __align long long instead of long.
7020         (pthread_rwlock_t): Formatting.
7021         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7022         (pthread_rwlock_t): Formatting.
7023         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7024         (pthread_cond_t): Make __align long long instead of long.
7025         (pthread_rwlock_t): Move __flags field to the same position as in
7026         linuxthreads.
7028 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7030         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7031         * tst-rwlock7.c (do_test): Likewise.
7033 2003-04-26  Roland McGrath  <roland@redhat.com>
7035         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7037 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7039         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7040         sizeof (struct pthread).
7041         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7042         1 struct pthread.
7043         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7044         to 0.
7045         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7046         struct pthread.
7047         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7048         to 32-bit bytes.
7049         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7050         tcbp.
7051         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7052         unneccessarily.
7053         (NO_TLS_OFFSET): Define.
7054         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7055         add TLS_TCB_SIZE unnecessarily.
7057 2003-04-22  Roland McGrath  <roland@redhat.com>
7059         * Makeconfig (shared-thread-library): Reverse link order to work
7060         around linker bug.
7062 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7064         * semaphore.h: Fix typo in comment.
7066 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7068         * sysdeps/pthread/sigfillset.c: New file.
7070         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7071         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7072         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7073         * sysdeps/pthread/sigaction.c: Likewise.
7074         * sysdeps/pthread/sigprocmask.c: New file.
7075         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7076         __SIGRTMIN+1.
7077         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7078         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7079         in this case.
7081 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7083         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7084         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7086         * sysdeps/unix/sysv/linux/unregister-atfork.c
7087         (__unregister_atfork): Don't free memory not allocated dynamically.
7089         * semaphore.h: Remove __THROW marker from cancellation points.
7090         * nptl/sysdeps/pthread/pthread.h: Likewise.
7092 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7094         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7095         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7096         __THROW.
7098 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7100         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7102 2003-04-15  Roland McGrath  <roland@redhat.com>
7104         * forward.c (__pthread_unwind): Tweak to avoid warning.
7106 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7108         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7110 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7113         overflow CFA advance instructions.
7114         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7116 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7118         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7119         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7120         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7121         defined.
7123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7124         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7126         DW_CFA_advance_loc for .Laddl-.Lsubl.
7128 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7130         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7131         position-independent unwind data for static libraries.
7132         Add missing unwind info.  Add comments.
7134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7137         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7139 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7141         * Makefile: Make sure all cancellation points are compiled with
7142         exception and asynchronous unwind tables.
7144         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7145         which mishandles loading of global object addresses in PIC.
7146         (THREAD_SETMEM_NC): Likewise.
7148 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7150         * pthread.h: Define new data structure for cleanup buffer.  Declare
7151         new cleanup handler interfaces.
7152         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7153         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7154         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7155         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7156         it.  Declare old cleanup handler installation functions.
7157         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7158         handling.
7159         * cleanup_defer.c: Likewise.
7160         * cleanup_compat.c: New file.  Old cleanup code.
7161         * cleanup_def_compat.c: New file.  Old cleanup code.
7162         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7163         if own thread descriptor.
7164         * unwind.c: New file.
7165         * forward.c: Add __pthread_unwind.
7166         * init.c (pthread_functions): Add __pthread_unwind.
7167         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7168         Add ptr___pthread_unwind.
7169         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7170         and unwind function.
7171         * Makefile (libpthread-routines): Add cleanup_compat,
7172         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7173         table generation if necessary.
7174         * version.c: Record whether unwind support is compiled in.
7175         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7176         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7177         handler interfaces.
7178         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7179         complication to generate unwind information for syscall wrappers.
7180         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7181         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7182         __cleanup_fct_attribute.
7184         * Makefile: Add rules to build and run tst-cleanup0.
7185         * tst-cleanup0.c: New file.
7186         * tst-cleanup0.expect: New file.
7188         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7189         caller.  Optimize to avoid often unecessary local variable.
7191 2003-04-11  Roland McGrath  <roland@redhat.com>
7193         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7194         sets variable `multidir'; include that.
7195         (generated): Add it.
7196         ($(objpfx)$(multidir)/crti.o): New target.
7197         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7199 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7201         * tst-attr2.c (do_test): Add cast to avoid warning.
7202         * tst-mutex4.c (do_test): Likewise.
7204 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7206         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7207         in child.
7209 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7211         * Makefile (tests): Add tst-detach1.
7212         * tst-detach1.c: New file.
7214 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7216         * sysdeps/pthread/pthread.h: Remove duplicate
7217         pthread_cleanup_{push,pop} definitions.
7219         * tst-barrier2.c: Eliminate warnings.
7220         * tst-cancel4.c: Likewise.
7221         * tst-cond4.c: Likewise.
7222         * tst-cond6.c: Likewise.
7223         * tst-detach1.c: Likewise.
7224         * tst-rwlock4.c: Likewise.
7225         * tst-rwlock6.c: Likewise.
7226         * tst-rwlock7.c: Likewise.
7227         * tst-sem3.c: Likewise.
7228         * tst-spin2.c: Likewise.
7229         * tst-umask1.c: Likewise.
7231 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7233         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7235 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7237         * descr.h (struct pthread): Move cancelhandling member to the front.
7239 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7241         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7242         malloc_parent, and malloc_child statically.
7243         (__register_atfork_malloc): New function.
7244         (free_mem): Don't free any of the malloc_* variables on the list.
7245         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7246         Define HAVE_register_atfork_malloc.
7248 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7250         * sysdeps/pthread/createthread.c (create_thread): Add some more
7251         comments explaining when to set multiple_threads and when not.
7253         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7254         THREAD_ATOMIC_BIT_SET if not already defined.
7255         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7256         THREAD_ATOMIC_BIT_SET:
7257         * sysdeps/x86_64/tls.h: Likewise.
7258         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7259         THREAD_ATOMIC_CMPXCHG_VAL.
7260         (_pthread_cleanup_pop_restore): Likewise.
7261         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7262         (__pthread_enable_asynccancel_2): Likewise.
7263         (__pthread_disable_asynccancel): Likewise.
7264         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7265         (__libc_disable_asynccancel): Likewise.
7266         * init.c (sigcancel_handler): Likewise.
7267         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7268         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7270 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7272         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7273         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7274         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7275         * Makefile (tests): Add tst-cancel11.
7276         * tst-cancel11.c: New file.
7278 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7280         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7281         round, not the first.  Use specific_used flag instead of local
7282         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7283         (__free_tcb): Don't call deallocate_tsd here.
7284         (start_thread): Call deallocate_tsd here.
7285         * pthread_setspecific.c: Set specific_used flag really only when
7286         needed.
7287         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7288         * tst-tsd3.c: New file.
7289         * tst-tsd4.c: New file.
7291 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7293         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7294         Use atomic_exchange_and_add instead of __lll_add.
7295         (__lll_mutex_timedlock): Likewise.
7296         Patch by Ian Wienand.
7298 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7300         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7301         (SINGLE_THREAD_P): Fix typo.
7302         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7304 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7306         * Makefile (tests): Add tst-align.
7307         * tst-align.c: New file.
7308         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7310         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7311         function correctly.
7313         * tst-tsd2.c: Add casts to avoid warnings.
7315 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7317         * descr.h (struct pthread): Move most often used elements to the front.
7319 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7321         * Makefile (libpthread-routines): Add pthread_atfork.
7322         (libpthread-static-only-routines): Add pthread_atfork.
7324 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7326         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7327         of TLS_DTV_AT_TP.
7328         (INSTALL_DTV): Add parens.
7329         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7330         Use passed descr instead of THREAD_SELF.
7331         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7332         (__lll_mutex_timedlock_wait): Correct expected value after
7333         spurious wakeup.
7334         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7335         Release lock before waking up the waiters.
7336         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7337         criteria.  Reorderstruct passed to cleanup handler.  Fix
7338         handling of cancellation and failung pthread_mutex_unlock call.
7339         Use __pthread_enable_asynccancel_2 instead of
7340         __pthread_enable_asynccancel.
7341         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7342         Return result of lock re-get if it fails.
7343         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7344         for __pthread_cleanup_push.
7345         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7346         completely broken rwlock implementation.
7347         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7348         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7349         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7350         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7351         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7352         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7353         versioned_symbol macro.
7354         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7355         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7357 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7359         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7360         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7361         and __helper_tid.
7362         (struct timer): Remove th and bar field.
7363         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7364         debugging code.  Create only one helper thread.
7365         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7366         helper thread.
7367         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7368         Renamed.  Define statically.  Use thread info from siginfo.
7369         (__helper_once): New variable.
7370         (__helper_tid): New variable.
7371         (__reset_helper_control): New function.
7372         (__start_helper_thread): New function.
7374         * pthread_create.c (start_thread): Don't use setjmp inside
7375         __builtin_expect to work around gcc bug.
7377         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7378         timer_delete syscall fails, but not with ENOSYS, set
7379         __no_posix_timers.
7381         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7382         (timer_settime): Fix typo.
7383         * sysdeps/unix/sysv/linux/timer_getoverr.c
7384         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7386 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7388         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7389         offset of cleanupbuf.__prev.
7391 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7393         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7394         of included file.
7396 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7398         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7399         NULL provide default definition to syscall.
7401 2003-03-25  Roland McGrath  <roland@redhat.com>
7403         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7404         (timer_id2ptr): Fix typo.
7406 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7408         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7409         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7410         * sysdeps/ia64/pthreaddef.h: Likewise.
7411         * sysdeps/powerpc/pthreaddef.h: Likewise.
7412         * sysdeps/s390/pthreaddef.h: Likewise.
7413         * sysdeps/sh/pthreaddef.h: Likewise.
7414         * sysdeps/x86_64/pthreaddef.h: Likewise.
7415         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7416         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7417         being changed.
7418         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7419         SIGTIMER is not unblocked.
7420         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7421         RT signal taken.
7422         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7423         be send.
7424         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7425         pass pointer through as ID.
7426         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7427         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7428         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7429         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7430         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7431         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7432         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7433         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7434         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7435         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7436         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7437         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7438         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7439         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7440         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7441         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7442         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7443         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7444         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7445         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7446         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7447         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7448         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7449         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7450         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7451         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7452         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7453         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7454         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7455         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7456         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7457         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7458         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7460         * pthreadP.h: Remove FRAME_LEFT definition.
7461         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7462         already left frame.  Programs which have this problem are not POSIX
7463         compliant.
7464         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7466 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7468         * sysdeps/pthread/tst-timer.c: Check return values of the
7469         functions we test.
7471 2003-03-23  Roland McGrath  <roland@redhat.com>
7473         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7474         * tst-tls3mod.c: Likewise.
7475         * tst-tls1.c: Likewise.
7476         * tst-tls2.c: Likewise.
7478         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7479         undefined behavior.
7481         * tst-join5.c (tf1, tf2): Add a cast.
7483         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7485         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7486         Don't test anything.
7487         * tst-cond4.c: Likewise.
7488         * tst-cond6.c: Likewise.
7489         * tst-flock2.c: Likewise.
7490         * tst-mutex4.c: Likewise.
7491         * tst-rwlock4.c: Likewise.
7492         * tst-signal1.c: Likewise.
7493         * tst-spin2.c: Likewise.
7494         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7496         * tst-mutex4.c: Use test-skeleton.c.
7497         * tst-spin2.c: Likewise.
7498         * tst-sysconf.c: Likewise.
7499         * tst-barrier2.c: Likewise.
7500         * tst-cond4.c: Likewise.
7501         * tst-cond6.c: Likewise.
7502         * tst-rwlock4.c: Likewise.
7503         * tst-unload.c: Likewise.
7504         * tst-flock2.c (do_test): Use return instead of exit.
7506 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7508         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7510 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7512         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7513         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7514         instead of __lll_compare_and_swap.
7515         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7516         Likewise.
7517         Removed definition if __lll_compare_and_swap.
7519         * cancellation.c: Adjust for new form of compare&exchange macros.
7520         * cleanup_defer.c: Likewise.
7521         * init.c: Likewise.
7522         * libc-cancellation.c: Likewise.
7523         * old_pthread_cond_broadcast.c: Likewise.
7524         * old_pthread_cond_signal.c: Likewise.
7525         * old_pthread_cond_timedwait.c: Likewise.
7526         * old_pthread_cond_wait.c: Likewise.
7527         * pthread_cancel.c: Likewise.
7528         * pthread_create.c: Likewise.
7529         * pthread_detach.c: Likewise.
7530         * pthread_join.c: Likewise.
7531         * pthread_key_delete.c: Likewise.
7532         * pthread_setcancelstate.c: Likewise.
7533         * pthread_setcanceltype.c: Likewise.
7534         * pthread_timedjoin.c: Likewise.
7535         * pthread_tryjoin.c: Likewise.
7536         * sysdeps/pthread/createthread.c: Likewise.
7538 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7540         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7541         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7542         definitions.  Replace uses with calls to atomic_* functions.
7543         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7544         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7545         __lll_test_and_set calls with atomic_exchange_and_add and
7546         atomic_exchange calls respectively.
7547         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7548         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7549         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7550         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7551         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7552         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7553         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7555         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7556         returns the old value.
7558 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7560         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7561         int for variable OLDVAL and correct inline assembler contraint.
7562         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7563         type int for variable OLD.
7565         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7566         only for s390-32.
7567         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7568         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7569         instead of multiple_threads field in the TCB.
7571 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7573         * sysdeps/i386/i686/bits/atomic.h: Removed.
7574         * sysdeps/i386/i586/bits/atomic.h: Removed.
7575         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7576         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7577         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7578         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7579         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7580         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7581         * atomic.h: Removed.  Moved to glibc.
7583         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7584         support for clock selection.
7586         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7587         signalling waiters.
7589 2003-03-18  Roland McGrath  <roland@redhat.com>
7591         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7592         Add __lll_rel_instr first.  Add memory clobber.
7593         (lll_mutex_unlock): Use __lll_test_and_set.
7594         From Paul Mackerras <paulus@samba.org>.
7596         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7597         unconditionally.
7598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7599         (SINGLE_THREAD_P):  Add `header.' prefix.
7600         From Paul Mackerras <paulus@samba.org>.
7602         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7603         pthread_timedjoin_np to ...
7604         (libpthread: GLIBC_2.3.3): ... here.
7605         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7607         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7608         Avoid shadowing VAL variable.
7610         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7611         New macro.
7613 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7615         * Makefile (tests): Add tst-cond11.
7616         * tst-cond11.c: New file.
7618         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7619         struct passed to cleanup handler to eliminate one more
7620         instruction.
7621         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7623         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7624         (pthrad_cond_t): Replace __unused field with __clock.
7626         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7627         waken all waiters in cleanup handler.
7628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7631         * pthread_condattr_getclock.c: New file.
7632         * pthread_condattr_setclock.c: New file.
7633         * sysdeps/pthread/pthread.h: Declare these new functions.
7634         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7635         * Makefile (libpthread-routines): Add the new functions.
7636         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7637         Renamed field to value.  Document use of the bits.
7638         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7639         change.
7640         * pthread_condattr_setpshared.c: Likewise.
7641         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7642         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7643         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7644         Add __clock field.
7645         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7646         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7647         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7648         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7649         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7650         Implement clock selection.
7651         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7652         * pthread-errnos.sym: Add ENOSYS.
7653         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7654         _POSIX_CLOCK_SELECTION.
7655         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7658         invalid .size directive.
7660 2003-03-17  Roland McGrath  <roland@redhat.com>
7662         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7663         Formatting tweaks.
7665 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7667         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7668         Use __lll_add instead of spelling it out.  Use protected symbol names.
7669         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7670         Use __lll_add.
7671         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7672         Renamed from lll_compare_and_swap.  Use new name where necessary.
7673         (__lll_add): Defined.
7674         (__lll_dec_if_positive): Defined.
7675         (__lll_test_and_set): Defined.
7676         * sysdeps/ia64/pthread_spin_init.c: Removed.
7677         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7678         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7679         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7680         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7681         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7682         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7683         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7684         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7685         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7686         __sync_lock_release_si.
7687         Patch by Jakub Jelinek.
7689         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7690         Fix timeout handling.
7691         (__lll_timedwait_tid): Likewise.
7692         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7693         Patch by Jakub Jelinek.
7695         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7697 2003-03-17  Roland McGrath  <roland@redhat.com>
7699         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7700         * sysdeps/pthread/pthread_spin_init.c: New file.
7701         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7702         * sysdeps/powerpc/Makefile: New file.
7703         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7704         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7705         * sysdeps/powerpc/pthreaddef.h: New file.
7706         * sysdeps/powerpc/tcb-offsets.sym: New file.
7707         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7708         * sysdeps/powerpc/tls.h: New file.
7709         * sysdeps/powerpc/bits/atomic.h: New file.
7710         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7711         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7712         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7714         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7715         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7716         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7717         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7718         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7719         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7720         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7721         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7722         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7723         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7724         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7725         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7726         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7727         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7728         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7730         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7731         not gettimeofday.
7732         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7733         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7734         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7735         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7736         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7738 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7740         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7741         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7744         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7746 2003-03-16  Roland McGrath  <roland@redhat.com>
7748         * tst-fork4.c: Include <string.h>.
7749         * tst-signal2.c: Likewise.
7750         * tst-mutex5.c (do_test): exit -> return.
7751         * tst-mutex2.c: Include <stdlib.h>.
7753 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7755         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7756         (__lll_mutex_timedlock_wait): Correct expected value after
7757         spurious wakeup.  Otherwise we would never wait again.
7759         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7760         zone versus inline asm stupidity.  Use correct instructions.
7762         * tst-rwlock6.c: Add some more status output.
7764 2003-03-15  Roland McGrath  <roland@redhat.com>
7766         * sysdeps/pthread/configure.in: New file.
7767         * sysdeps/pthread/configure: New file (generated).
7769 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7771         * allocatestack.c (allocate_stack): Store the exact stack size of
7772         user allocated stacks.
7774 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7776         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7777         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7778         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7779         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7780         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7781         Use `header.' prefix.
7782         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7784 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7786         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7787         __builtin_frame_address, use stack pointer.
7789         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7790         instead of __builtin_frame_pointer.
7792 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7794         * tst-basic1.c (do_test): Add cast to avoid warning.
7795         * tst-basic2.c (do_test): Likewise.
7797         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7798         amount of stack correction.
7800         * tst-fork4.c: Use test-skeleton.c.
7802 2003-03-14  Roland McGrath  <roland@redhat.com>
7804         * init.c: Fix typo "#eli" for "#else".
7806 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7808         * allocatestack.c (__stack_user): Use hidden_data_def.
7809         * pthread_create.c (__pthread_keys): Likewise.
7811         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7813 2003-03-14  Roland McGrath  <roland@redhat.com>
7815         * tst-fork4.c: New file.
7816         * Makefile (tests): Add it.
7818         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7819         we always define the padding space.
7820         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7821         stopped supporting its own extensions fully.
7822         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7823         struct also called `header', so `header.multiple_threads' is the field
7824         name to use on all machines.
7825         * allocatestack.c (allocate_stack): Use `header.' prefix.
7826         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7827         * pthread_create.c (__pthread_create_2_1): Likewise.
7828         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7829         (THREAD_SELF): Likewise.
7830         * sysdeps/x86_64/tls.h: Likewise.
7831         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7832         (SINGLE_THREAD_P): Likewise.
7833         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7834         (SINGLE_THREAD_P): Likewise.
7835         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7836         (SINGLE_THREAD_P): Likewise.
7838         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7839         value directly.
7841 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7843         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7844         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7846         * pthread_create.c (start_thread): setjmp is expected to return 0.
7848         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7849         (THREAD_GETMEM_NC): Likewise.
7851 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7853         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7854         and the size of the stack which must be allocated is a multiple,
7855         allocate one more page.
7856         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7857         MULTI_PAGE_ALIASING.
7859 2003-03-13  Roland McGrath  <roland@redhat.com>
7861         * pthread_create.c (start_thread): Set EXITING_BIT after the
7862         event-reporting (and destructors), not before.
7864 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7866         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7867         lll_futex_wake): Declare register variables as long int instead of
7868         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7869         Make syscall arguments clobbered by the syscall.
7870         (lll_futex_wait): Define using lll_futex_timed_wait.
7872         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7873         to void *.
7875         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7876         PPID if [! NDEBUG].
7878         * allocatestack.c (nptl_ncreated): Only declare if
7879         COLORING_INCREMENT != 0.
7881         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7882         (__libc_enable_asynccancel_2): Remove prototype.
7884         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7885         ctid to match kernel.
7887 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7889         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7890         libc_multiple_threads.
7891         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7892         __libc_multiple_threads to...
7893         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7895         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7896         versioning.
7897         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7898         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7900         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7901         (__pthread_once_internal): Define.
7903         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7904         macros instead of .symver directly.
7905         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7906         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7908         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7909         * sysdeps/x86_64/tcb-offsets.sym: New file.
7910         * sysdeps/x86_64/Makefile: New file.
7912         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7913         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7914         to access own pthread_t in TCB.
7915         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7916         Likewise.
7917         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7918         Likewise.
7919         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7921 2003-03-12  Roland McGrath  <roland@redhat.com>
7923         * pthread-errnos.sym: New file.
7924         * Makefile (gen-as-const-headers): New variable, list that file.
7925         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7926         header <pthread-errnos.h> instead of defining errno values here.
7927         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7928         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7929         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7930         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7931         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7932         Likewise.
7933         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7934         Likewise.
7935         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7937         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7938         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7939         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7940         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7941         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7942         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7944         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7945         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7946         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7947         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7948         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7949         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7950         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7951         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7953         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7955         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7956         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7957         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7958         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7959         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7960         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7961         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7963         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7964         CLONE_CHILD_SETTID worked.
7966 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7968         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7969         file.
7970         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7971         file.
7973         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7974         (pthread_cond_t): Add padding.
7976         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7977         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7978         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7980         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7981         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7982         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7983         (__pthread_rwlock_timedrdlock): Likewise.
7984         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7985         (__pthread_rwlock_wrlock): Likewise.
7986         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7987         (__pthread_rwlock_rdlock): Likewise.
7989         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7992         result of lock re-get if it fails.
7994 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7996         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7997         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7998         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8000         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8001         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8002         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8003         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8004         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8005         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8007         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8008         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8010         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8011         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8012         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8013         (create_thread): Likewise.
8014         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8015         * init.c (__pthread_initialize_minimal_internal): Initialize
8016         __libc_multiple_threads_ptr if necessary.
8017         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8018         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8019         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8020         __libc_multiple_threads.
8021         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8022         necessary.
8024         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8025         (THREAD_SETMEM_NC): Likewise.
8027         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8028         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8029         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8030         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8032         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8033         Eliminate one entire instruction.
8035         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8036         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8038         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8039         instead of __pthread_enable_asynccancel.
8040         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8041         (__pthread_cond_wait): Likewise.
8042         * sysdeps/pthread/pthread_cond_timedwait.c
8043         (__pthread_cond_timedwait): Likewise.
8044         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8047         (__condvar_cleanup): Wake up all waiters in case we got signaled
8048         after being woken up but before disabling asynchronous
8049         cancellation.
8050         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8051         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8052         (__condvar_cleanup): Likewise.
8054         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8055         Make it an error if architecture has no #if case.  Add x86-64.
8057         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8058         pt-initfini.s generation.
8060         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8061         (TLS_INIT_TP): Fix typo.
8063 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8065         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8066         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8068         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8069         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8070         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8071         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8072         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8073         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8074         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8075         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8077 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8079         * sysdeps/pthread/pthread_cond_timedwait.c
8080         (__pthread_cond_timedwait): Return the result of the final
8081         locking.  If it succeeds, the regular function return value.
8083         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8084         Return result of the final locking.
8085         * version.c (__nptl_main): Work around problems with the strange
8086         INTERNAL_SYSCALL macro on ppc32.
8087         * init.c (__pthread_initialize_minimal_internal): Unblock
8088         SIGCANCEL in case the parent blocked it.
8089         Reported by Paul Mackerras <paulus@samba.org>.
8091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8092         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8093         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8095 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8097         * sysdeps/pthread/pthread_cond_timedwait.c
8098         (__pthread_cond_timedwait): Unlock and fail if
8099         __pthread_mutex_unlock_internal failed.
8101         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8102         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8103         Use ARCH_CLONE.
8104         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8105         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8106         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8107         ALLOCATE_STACK): New macros.
8108         (TLS_TPADJ): New macro.
8109         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8110         (allocate_stack): Handle TLS_DTV_AT_TP and
8111         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8112         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8113         Don't set PD->self.
8114         * init.c [__ia64__] (__NR_set_tid_address): Define.
8116         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8117         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8118         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8119         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8120         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8121         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8122         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8123         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8124         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8125         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8126         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8127         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8128         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8129         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8130         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8131         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8132         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8133         * sysdeps/ia64/bits/atomic.h: New file.
8134         * sysdeps/ia64/Makefile: New file.
8135         * sysdeps/ia64/pthread_spin_init.c: New file.
8136         * sysdeps/ia64/pthread_spin_lock.c: New file.
8137         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8138         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8139         * sysdeps/ia64/pthreaddef.h: New file.
8140         * sysdeps/ia64/tcb-offsets.sym: New file.
8141         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8142         * sysdeps/ia64/tls.h: New file.
8144         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8145         to syscall instead of no arguments.
8147 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8149         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8150         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8151         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8152         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8154         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8155         unused code.
8157         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8159         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8160         lowlevelbarrier.sym.
8161         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8162         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8163         Include lowlevelbarrier.h and don't define offsets locally.
8164         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8166         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8167         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8168         (__lll_mutex_timedlock_wait): Likewise.
8169         (lll_mutex_lock): Adjust asm for that.
8170         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8171         (lll_lock): Adjust asm for operand order change.
8172         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8173         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8176         Reverse order of parameters.
8177         (__lll_timedwait_tid): Remove regparms attribute.
8178         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8179         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8181         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8182         (__lll_timedwait_tid): Remove one unnecessary instruction.
8184         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8185         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8186         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8187         lowlevelmutex.S.
8189         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8190         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8191         for NOT_IN_libc.
8192         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8193         lowlevellock.S.
8195         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8196         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8197         for libc.so.
8198         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8199         define LOCK here (if UP is not defined).  The actual code is in
8200         lowlevelmutex.S.
8202         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8203         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8204         __lll_timedwait_tid for libc.so.
8205         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8206         define LOCK here (if UP is not defined).  The actual code is in
8207         lowlevellock.S.
8209         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8210         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8211         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8212         instead of lowlevelsem.h.
8213         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8214         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8215         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8217         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8218         lowlevelrwlock.sym.
8219         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8220         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8221         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8223         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8224         register loading.
8225         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8226         last changed.  D'oh.
8228         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8230         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8231         of __libc_locking_needed.
8232         (lll_trylock): Initialize %eax to zero.
8234         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8235         pthread_cond_t definition.
8237 2003-03-10  Roland McGrath  <roland@redhat.com>
8239         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8240         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8241         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8242         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8243         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8245         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8246         Instead of setting PD->multiple_threads, set globals
8247         __pthread_multiple_threads and __libc_multiple_threads.
8248         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8249         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8250         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8252         * descr.h (struct pthread): Conditionalize first member on
8253         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8254         containing an anonymous tcbhead_t.  Move `list' member out.
8255         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8256         * allocatestack.c: Remove use of `header.data.' prefix.
8257         * pthread_create.c: Likewise.
8258         * init.c (__pthread_initialize_minimal_internal): Likewise.
8259         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8260         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8261         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8262         * sysdeps/x86_64/tls.h: Likewise.
8263         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8264         (SINGLE_THREAD_P): Likewise.
8265         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8266         (SINGLE_THREAD_P): Likewise.
8267         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8268         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8270 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8272         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8274         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8275         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8277         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8278         leftovers from the ia32 code.
8280         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8281         memory load.
8282         (clear_once_control): Don't load %esi.
8284         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8285         handling.
8287         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8289         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8290         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8292         * Makefile (tests): Add tst-cond10.
8293         * tst-cond10.c: New file.
8295 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8297         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8298         * tst-signal3.c (do_test): Likewise.
8299         * tst-sem5.c (do_test): Likewise.
8300         * tst-kill6.c (do_test): Likewise.
8301         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8303         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8304         of inc/dec.
8305         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8306         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8307         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8308         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8309         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8311         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8312         Likewise.
8313         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8314         Likewise.
8315         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8317         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8319         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8320         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8321         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8322         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8324         * allocatestack.c (allocate_stack): If mprotect() fails free the
8325         TLS memory.
8327 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8329         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8331         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8332         lll_wake_tid.  This was used only to work around kernel limits in
8333         the early days.
8334         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8335         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8336         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8337         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8339         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8340         (__pthread_initialize_minimal_internal): Change initialization of
8341         __static_tls_align_m1 appropriately.
8342         * pthreadP.h (__static_tls_align_m1): Renamed from
8343         __static_tls_align.
8344         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8345         instead of __static_tls_align-1.
8347 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8349         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8351         * pthread_create.c: Define __pthread_keys using nocommon
8352         attribute, not by placing it explicitly in bss.
8353         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8355         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8356         Use it in mmap call to allocate stacks.
8358         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8360         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8361         result of the thread function.
8363 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8365         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8366         version is just fine.
8368         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8369         (__pthread_child_handler): Renamed from pthread_child_handler,
8370         exported, and marked hidden.  Change all users.
8371         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8372         free __pthread_child_handler from child list.
8374 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8376         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8378         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8379         Fix handling of cancellation and failing pthread_mutex_unlock call.
8380         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8381         (__pthread_cond_wait): Likewise.
8383         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8384         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8385         lll_futex_timed_wait call.
8386         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8387         (pthread_rwlock_timedwrlock): Likewise.
8389         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8390         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8391         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8393         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8394         check of lll_futex_wake return value.
8396 2003-03-03  Roland McGrath  <roland@redhat.com>
8398         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8400         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8401         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8402         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8404 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8406         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8407         error for CPU clocks.
8409         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8410         _POSIX_MONOTONIC_CLOCK.
8411         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8413         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8414         recent kernels.
8416 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8418         * descr.h (struct pthread): Move cleanup field to the front.
8420 2003-03-01  Roland McGrath  <roland@redhat.com>
8422         * sem_open.c (sem_open): Braino fix.
8424 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8426         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8427         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8428         __pthread_cleanup_pop functionality.
8429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8431         * descr.h (struct pthread): Move tid field to the front now that
8432         it is often used.
8434         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8435         (__lll_mutex_timedlock_wait): Remove.
8436         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8437         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8438         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8439         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8440         (lll_unlock_wake_cb): Don't save and restore %esi.
8441         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8442         %esi.
8443         (__lll_timedwait_tid): Add alignment.
8444         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8445         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8446         %esi.
8447         (__lll_timedwait_tid): Removed.
8448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8449         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8450         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8451         (pthread_barrier_wait): Don't save, load, and restore %esi for
8452         last thread.
8453         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8454         (__pthread_cond_signal): Don't save, load, and restore %esi.
8455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8456         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8457         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8458         Don't save, load, and restore %esi.
8460 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8462         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8463         Release lock before waking up the waiters.
8465         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8467         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8468         (reader_thread): Likewise.
8470         * sysdeps/pthread/pthread_rwlock_unlock.c
8471         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8472         to wake up readers if there are none.
8474         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8475         Release internal lock before wake threads.
8477 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8479         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8480         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8481         predefined.
8482         * tst-rwlock9.c: Likewise.
8483         * tst-rwlock10.c: New file.
8484         * tst-rwlock11.c: New file.
8486         * Makefile (tests): Add tst-dlsym1.
8487         * tst-dlsym1.c: New file.
8489         * init.c (__pthread_initialize_minimal_internal): Set
8490         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8491         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8493 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8495         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8497         * tst-cond2.c: Fix sychronization with child.
8499         * tst-rwlock8.c (reader_thread): Remove unused variable.
8501         * Makefile: Add rules to build and run tst-tls3.
8502         * tst-tls3.c: New file.
8503         * tst-tls3mod.c: New file.
8505         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8506         * tst-rwlock8.c: New file.
8507         * tst-rwlock9.c: New file.
8508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8509         complete broken rwlock implementation.
8510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8511         Likewise.
8512         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8513         Likewise.
8514         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8516         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8517         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8518         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8519         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8520         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8522 2003-02-23  Roland McGrath  <roland@redhat.com>
8524         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8526 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8528         * Makefile (tests): Add tst-context1.
8529         * tst-context1.c: New file.
8531         * Makefile (tests): Add tst-tls1 and tst-tls2.
8532         * tst-tls1.c: New file.
8533         * tst-tls2.c: New file.
8535         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8536         for failed cmpxchg.
8538         * pthread_create.c (start_thread): Set EXITING_BIT early.
8540         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8541         (THREAD_GETMEM_NC): Likewise.
8543 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8545         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8546         off 3 more bytes by using offset-less instructions when possible.
8548         * Makefile: Add dependency for $(objpfx)version.d.
8550         * eintr.c (eintr_source): Add unnecessary return but the compiler
8551         insists.
8553         * tst-kill3.c: Include <unistd.h>.
8555 2003-02-21  Roland McGrath  <roland@redhat.com>
8557         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8559 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8561         * Makefile (tests): Add tst-eintr1.
8562         (distribute): Add eintr.c.
8563         * tst-eintr1.c: New file.
8564         * eintr.c: New file.
8566         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8568         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8569         Disallow sending SIGCANCEL.
8571         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8572         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8573         * tst-kill1.c: New file.
8574         * tst-kill2.c: New file.
8575         * tst-kill3.c: New file.
8576         * tst-kill5.c: New file.
8577         * tst-kill6.c: New file.
8578         * tst-basic7.c: Renamed to...
8579         * tst-kill4.c: ...this.
8581 2003-02-21  Roland McGrath  <roland@redhat.com>
8583         * Makefile (install-lib-ldscripts): New variable.
8585 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8587         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8588         * pthread_cancel.c: Use INVALID_TD_P.
8589         * pthread_detach.c: Likewise.
8590         * pthread_getschedparam.c: Likewise.
8591         * pthread_setschedparam.c: Likewise.
8592         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8593         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8594         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8595         * pthread_timedjoin.c: Likewise.
8597         * tst-basic7.c: Include <signal.h>.
8599         * pthread_join.c (pthread_join): Limited checking for invalid
8600         descriptors.
8601         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8603 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8605         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8606         beginning of the loop.  Clear the entire first block of TSD.
8607         * Makefile (tests): Add tst-key4.
8608         * tst-key4.c: New file.
8610 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8612         * Makefile (tests): Add tst-basic7.
8613         * tst-basic7.c: New file.
8615         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8616         Add some more __builtin_expect.
8618         * pthreadP.h: Define dummy version of DEBUGGING_P.
8620 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8622         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8623         _POSIX_THREAD_PRIORITY_SCHEDULING.
8624         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8625         _XOPEN_REALTIME_THREADS.
8626         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8628         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8629         kernel returns EINVAL for PID <= 0, work around it.
8631         * Makefile (tests): Add tst-signal5.
8632         * tst-signal5.c: New file.
8634         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8635         and LOGIN_NAME_MAX.
8637         * tst-cancel1.c (tf): Block all signals.
8639         * Makefile (tests): Add tst-basic6.
8640         * tst-basic6.c: New file.
8642         * tst-basic1.c: Add test for process ID.
8644         * Makefile (tests): Add tst-cancel10.
8645         * tst-cancel10.c: New file.
8647         * Makefile (tests): Add tst-signal4.
8648         * tst-signal4.c: New file.
8650         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8651         __sigismember instead of sigismember.  Add __builtin_expect.
8653 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8655         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8656         pthread_setcancelstate, and pthread_rwlock_setpshared.
8658         * tst-cancel7.c (do_test): Make sure the pid file exists before
8659         canceling the thread.
8661         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8662         pthread_rwlock_timedrdlock tests.
8663         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8664         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8665         Check for invalid tv_nsec field.
8666         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8667         Likewise.
8669         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8670         recursive mutex of overflow.
8672         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8674         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8675         going into an endless loop.
8676         * Makefile (tests): Add tst-cancel9.
8677         * tst-cancel9.c: New file.
8679         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8681 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8683         * tst-mutex5.c (do_test): Add more timedlock tests.
8685         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8686         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8688         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8689         use INLINE_SYSCALL.  Error number is returned, not -1.
8691         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8692         and __deallocate_stack with internal_function.
8693         * pthread_create.c: Adjust definitions appropriately.
8694         * allocatestack.c: Likewise.
8696         * pthread_join.c: Add one more __builtin_expect.
8697         * pthread_timedjoin.c: Likewise.
8699         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8700         not data of sequence number does not match.
8701         Add one __builtin_expect.
8703         * Makefile (tests): Add tst-clock1.
8704         * tst-clock1.c: New file.
8706         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8707         negative arguments.
8708         * Makefile (tests): Add tst-basic5.
8709         * tst-basic5.c: New file.
8711 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8713         * Makefile (tests): Add tst-basic4.
8714         * tst-basic4.c: New file.
8716         * pthreadP.h: Add declaraction for __nptl_nthreads.
8717         * pthread_create.c: Define __nptl_nthreads
8718         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8719         after thread is done.  If then zero, call exit(0).
8720         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8721         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8722         * init.c (pthread_functions): Initialize ptr_nthreads.
8723         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8724         (__reclaim_stacks): Decrement __nptl_nthreads.
8725         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8726         Define.
8727         * Makefile (tests): Add tst-basic3.
8728         * tst-basic3.c: New file.
8730         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8731         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8732         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8733         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8734         if asynchronous canceling is enabled.
8735         * pthread_join.c (pthread_join): When recognizing circular joins,
8736         take into account the other thread might be already canceled.
8737         * Makefile (tests): Add tst-join5.
8738         * tst-join5.c: New file.
8740         * Makefile (tests): Add tst-join4.
8741         * tst-join4.c: New file.
8743 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8745         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8747 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8749         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8750         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8751         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8752         warning.
8753         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8754         to avoid warning.
8755         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8756         error if lll_futex_wake failed.
8758 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8760         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8761         handling of cancellation and failung pthread_mutex_unlock call.
8762         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8763         * Makefile (tests): Add tst-cond8 and tst-cond9.
8764         * tst-cond8.c: New file.
8765         * tst-cond9.c: New file.
8767         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8769         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8770         non-standard initializers with __USE_GNU.
8772         * Makefile (tests): Add tst-cleanup3.
8773         * tst-cleanup3.c: New file.
8775 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8777         * Makefile (tests): Add tst-attr1 and tst-attr2.
8778         * tst-attr1.c: New file.
8779         * tst-attr2.c: New file.
8781         * Makefile: Add rules to build and run tst-atfork2 test.
8782         * tst-atfork2.c: New file.
8783         * tst-atfork2mod.c: New file.
8785         * sysdeps/unix/sysv/linux/unregister-atfork.c
8786         (__unregister_atfork): Free the memory allocated for the handlers
8787         after removing them from the lists.
8789         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8790         cleanup function.
8792         * tst-atfork1.c (do_test): Wait for the child we forked.
8793         Report error in child.
8795         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8797         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8799 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8801         * Makefile (tests): Add tst-cancel8.
8802         * tst-cancel8.c: New file.
8804         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8805         clearing of control variable.
8806         * Makefile (tests): Add tst-once3 and tst-once4.
8807         * tst-once3.c: New file.
8808         * tst-once4.c: New file.
8810 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8812         * sysdeps/sh/Makefile: New file.
8813         * sysdeps/sh/bits/atomic.h: New file.
8814         * sysdeps/sh/pthread_spin_init.c: New file.
8815         * sysdeps/sh/pthread_spin_lock.c: New file.
8816         * sysdeps/sh/pthread_spin_trylock.S: New file.
8817         * sysdeps/sh/pthread_spin_unlock.S: New file.
8818         * sysdeps/sh/pthreaddef.h: New file.
8819         * sysdeps/sh/tcb-offsets.sym: New file.
8820         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8821         * sysdeps/sh/tls.h: New file.
8822         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8823         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8824         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8825         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8826         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8827         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8828         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8829         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8830         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8831         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8832         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8833         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8834         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8835         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8836         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8837         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8838         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8839         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8840         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8841         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8842         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8843         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8844         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8845         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8847         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8848         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8849         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8850         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8851         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8853 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8855         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8856         according to POSIX.
8858         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8860 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8862         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8863         (TLS_GET_FS): New #define.
8864         (TLS_SET_FS): New #define.
8865         Correct value of __NR_set_thread_area.
8867         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8869 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8871         * Makefile (tests): Add tst-popen1.
8872         * tst-popen1.c: New file.
8874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8875         but inactive generalization.
8876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8878         Minor optimization, remove one instruction.
8879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8881 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8883         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8885 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8887         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8888         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8889         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8890         * sysdeps/pthread/pthread_cond_signal.c: New file.
8891         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8892         * sysdeps/pthread/pthread_cond_wait.c: New file.
8893         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8894         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8895         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8896         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8897         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8898         * sysdeps/s390/Makefile: New file.
8899         * sysdeps/s390/bits/atomic.h: New file.
8900         * sysdeps/s390/pthread_spin_init.c: New file.
8901         * sysdeps/s390/pthread_spin_lock.c: New file.
8902         * sysdeps/s390/pthread_spin_trylock.c: New file.
8903         * sysdeps/s390/pthread_spin_unlock.c: New file.
8904         * sysdeps/s390/pthreaddef.h: New file.
8905         * sysdeps/s390/tcb-offsets.sym: New file.
8906         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8907         * sysdeps/s390/tls.h: New file.
8908         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8909         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8910         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8911         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8912         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8913         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8914         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8915         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8916         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8917         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8918         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8919         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8920         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8921         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8922         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8923         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8924         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8925         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8926         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8927         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8928         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8929         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8930         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8932 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8934         * atomic.h: Add a couple more default implementations.
8935         (atomic_compare_and_exchange_acq): Use
8936         __arch_compare_and_exchange_32_acq in return value definition.  It
8937         always exists.
8938         (atomic_bit_set): Renamed from atomic_set_bit.
8939         Add missing atomic_ prefixes.
8941         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8942         thread library is available, use correct value to mark initialized
8943         once variable.
8945 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8947         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8948         __sysconf to determine pagesize.
8950         * pthread_create.c: Include <atomic.h>.
8951         * allocatestack.c (allocate_stack): Implement coloring of the
8952         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8953         size minus one.  Adjust users.
8954         * sysdeps/i386/i686/Makefile: New file.
8956 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8958         * allocatestack.c: Improve comment throughout the file.
8960         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8961         (__lll_lock_wait): Add branch prediction.
8962         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8963         (__lll_lock_wait): Likewise.
8964         (lll_unlock_wake_cb): Removed.
8966 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8968         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8969         _POSIX_THREAD_PRIORITY_SCHEDULING.
8971 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8973         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8974         Fix return type of ptr___pthread_getspecific.
8976 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8978         * Makefile (tests): Add tst-umask1.
8979         (tst-umask1-ARGS): Define.
8980         * tst-umask1.c: New file.
8982 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8984         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8985         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8986         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8987         pthread_rwlock_unlock.
8988         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8989         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8990         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8991         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8993         New file.
8994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8996         New file.
8997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8998         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8999         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9000         New file.
9001         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9002         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9003         New file.
9004         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9005         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9006         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9007         New file.
9008         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9009         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9010         New file.
9011         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9013         * Makefile (libpthread-routines): Remove lowlevelcond and
9014         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9015         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9016         and pthread_cond_broadcast.
9017         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9018         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9019         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9020         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9021         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9022         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9023         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9024         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9025         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9026         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9027         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9031         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9032         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9033         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9034         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9035         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9036         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9037         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9038         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9039         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9040         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9041         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9042         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9043         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9044         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9045         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9046         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9047         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9049         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9050         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9051         of the code is moved to ...
9052         * sysdeps/pthread/createthread.c: ...here.  New file.
9054 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9056         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9057         (__new_sem_post): Clear %eax before returning.
9058         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9060         * Makefile (tests): Add tst-cleanup2.
9061         * tst-cleanup2.c: New file.
9063         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9064         Interpret first parameter correctly.
9066 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9068         * Makefile (headers): Add bits/semaphore.h.
9070 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9072         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9073         if not SHARED.
9075 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9077         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9078         must be used and mapping failed.
9079         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9081         * Makefile (CFLAGS-pthread_self.os): Define this, not
9082         CFLAGS-pthread_self.c.
9084 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9086         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9087         lll_unlock_wake_cb.
9089         * Makefile (libpthread-routines): Add version.  Add rules to build
9090         version.os and banner.h.
9091         * version.c: New file.
9093 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9095         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9096         the alias unconditional.
9097         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9099 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9101         * Makefile (CFLAGS-pthread_self.c): New definition.
9103 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9105         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9106         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9107         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9108         * init.c (__pthread_initialize_minimal_internal): Likewise.
9110 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9112         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9114         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9115         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9116         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9117         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9118         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9119         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9121 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9123         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9124         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9125         * tst-cancel-wrappers.sh: Remove all exceptions.
9127 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9129         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9130         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9132         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9133         Use __libc_pthread_functions array if SHARED.
9135         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9136         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9138         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9139         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9140         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9141         __libc_ptf_call instead of __libc_maybe_call.
9142         (PTF): New #define.
9143         (__libc_cleanup_region_start): Wrap function name with PTF call.
9144         (__libc_cleanup_region_end): Likewise.
9145         (__libc_cleanup_end): Likewise.
9147         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9148         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9149         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9150         * pthreadP.h: Add prototypes.
9152         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9153         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9154         __pthread_rwlock_unlock aliases.
9155         * pthreadP.h: Add prototypes for new aliases.
9157         * pthreadP.h (struct pthead_functions): Moved to...
9158         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9159         * init.c (pthread_functions): Add initializers for new elements.
9161         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9162         __pthread_cleanup_pop_restore aliases.
9163         * pthreadP.h: Add prototypes.
9165         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9166         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9167         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9168         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9169         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9170         * pthreadP.h: Adjust prototypes and callers.
9172 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9174         * Makefile (tests): Add tst-cancel7.
9175         (tst-cancel7-ARGS): New variable.
9176         * tst-cancel7.c: New file.
9178         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9179         around gcc defficiencies.
9180         * old_pthread_cond_signal.c: Likewise.
9181         * old_pthread_cond_timedwait.c: Likewise.
9182         * old_pthread_cond_wait.c: Likewise.
9184         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9186 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9188         * Makefile (tests): Add tst-cond7.
9189         * tst-cond7.c: New file.
9191         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9192         (condvar_cleanup): Get condvar address from the right place.
9194         * atomic.h: Correct definitions of atomic_full_barrier,
9195         atomic_read_barrier, atomic_write_barrier.
9197         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9198         race-free.
9199         * old_pthread_cond_signal.c: Likewise.
9200         * old_pthread_cond_timedwait.c: Likewise.
9201         * old_pthread_cond_wait.c: Likewise.
9203 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9205         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9207 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9209         * pthreadP.h (pthread_cond_2_0_t): New type.
9210         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9211         Use new type for the 2.0 condvar function prototypes.
9212         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9213         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9214         parameter.
9215         * old_pthread_cond_destroy.c: Likewise.
9216         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9217         * old_pthread_cond_signal.c: Likewise.
9218         * old_pthread_cond_timedwait.c: Likewise.
9219         * old_pthread_cond_wait.c: Likewise.
9221         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9222         (__pthread_cond_wait): Don't save cancellation mode and seq value
9223         in same location.
9225         * herrno.c (__h_errno_location): Don't define as weak.
9227 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9229         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9230         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9231         and pthread_cond_wait.
9232         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9233         Renamed to...
9234         (__pthread_cond_broadcast_2_0): ... this.
9235         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9236         Renamed to...
9237         (__pthread_cond_destroy_2_0): ... this.
9238         * old_pthread_cond_init.c (__old_pthread_cond_init):
9239         Renamed to...
9240         (__pthread_cond_init_2_0): ... this.
9241         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9242         Renamed to...
9243         (__pthread_cond_signal_2_0): ... this.
9244         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9245         Renamed to...
9246         (__pthread_cond_wait_2_0): ... this.
9247         * pthread_cond_destroy.c: Include shlib-compat.h.
9248         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9249         * pthread_cond_init.c: Include shlib-compat.h.
9250         (pthread_cond_init): Change strong_alias into versioned_symbol.
9251         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9252         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9253         fields.
9254         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9255         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9256         __pthread_cond_wait_2_0): New prototypes.
9257         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9258         __old_pthread_cond_init, __old_pthread_cond_signal,
9259         __old_pthread_cond_wait): Removed.
9260         * init.c: Include shlib-compat.h.
9261         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9262         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9263         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9264         ptr___pthread_cond_*_2_0 fields.
9265         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9266         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9268         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9269         LIBC_SIGACTION was not yet defined.
9270         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9271         [!defined LIBC_SIGACTION] (__sigaction): New function and
9272         libc_hidden_weak.
9273         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9274         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9276 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9278         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9280 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9282         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9283         New, larger type definition.
9284         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9285         implementation.
9286         * Versions [libpthread]: Add definitions for new pthread_cond_*
9287         interfaces for version GLIBC_2.3.2.
9288         * pthread_cond_init.c: Update initialization for new type definition.
9289         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9290         pthread_cond_timedwait, pthread_cond_signal, and
9291         pthread_cond_broadcast.  Add old_pthread_cond_init,
9292         old_pthread_cond_destroy, old_pthread_cond_wait,
9293         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9294         old_pthread_cond_broadcast.
9295         * old_pthread_cond_broadcast.c: New file.
9296         * old_pthread_cond_destroy.c: New file.
9297         * old_pthread_cond_init.c: New file.
9298         * old_pthread_cond_signal.c: New file.
9299         * old_pthread_cond_timedwait.c: New file.
9300         * old_pthread_cond_wait.c: New file.
9301         * pthreadP.h: Add prototypes for the compatibility interfaces.
9303         * pthread_cond_destroy.c: Don't include <errno.h>.
9305 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9307         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9308         unnecessary zero offset when addressing MUTEX.
9310 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9312         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9313         __register_atfork.
9314         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9315         for __register_atfork.
9317 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9319         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9320         instead of ASSEMBLER test macro.
9322         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9323         __libc_current_sigrtmax): Add libc_hidden_def.
9325         * sysdeps/pthread/list.h: Remove assert.h include.
9327 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9329         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9330         __pthread_initialize_minimal_internal not
9331         __pthread_initialize_minimal.
9333 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9335         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9336         __pthread_initialize_minimal as hidden.
9338         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9339         constructor.
9341 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9343         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9344         $(common-objpfx)format.lds, include that into the output script.
9345         Fix comment.
9346         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9348 2002-12-28  Andreas Jaeger  <aj@suse.de>
9350         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9351         nsec resolution changes.
9352         (xstat64_conv): Likewise.
9353         (xstat32_conv): Likewise.
9354         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9355         struct kernel_stat.
9356         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9357         structs stat and stat64.
9358         * time/time.h (__timespec_defined): Define for __USE_MISC.
9359         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9361 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9363         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9364         argument.
9365         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9366         (pthread_exit): Use strong_alias to avoid warnings.
9367         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9368         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9369         ptr___pthread_attr_init_2_*.
9370         * init.c (pthread_functions): Adjust.
9372 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9374         * forward.c: Make all functions available by default again.  It
9375         caused too much trouble.
9377         * pt-siglongjmp.c: Removed.
9379 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9381         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9382         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9383         * sysdeps/i386/Makefile: New file.
9384         * sysdeps/i386/tcb-offsets.sym: New file.
9385         * sysdeps/pthread/tcb-offsets.h: New file.
9386         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9387         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9389         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9390         __register_atfork...
9391         (GLIBC_2.3.2): ...here.
9393 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9395         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9396         pthread_attr_setstackaddr with __attribute_deprecated__.
9398 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9400         * pt-system.c (system): Remove cancellation handling.
9401         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9402         cancellation routines.
9404 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9406         * descr.h: Include <dl-sysdep.h>.
9407         (struct pthread): Move header.data.list to the back of the struct.
9408         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9409         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9410         (SYSINFO_OFFSEET): Likewise.
9412 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9414         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9415         Define.
9416         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9417         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9418         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9419         (USE_DL_SYSINFO): Undef.
9421 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9423         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9424         $(common-objpfx)libc.so.
9425         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9426         it is bigger than pipe buffer size even on arches with bigger
9427         page size.
9428         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9430 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9432         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9433         correct errno access for case that USE___THREAD is not defined.
9435 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9437         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9438         Patch by Marijn Ros <marijn@mad.scientist.com>.
9440 2002-12-22  Roland McGrath  <roland@redhat.com>
9442         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9444 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9446         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9448 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9450         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9451         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9452         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9454         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9455         of int $0x80.
9456         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9457         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9458         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9459         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9460         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9461         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9462         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9463         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9465         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9466         sysenter.
9467         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9469         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9471         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9472         in new TCB.
9473         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9474         that sysinfo is properly initialized.
9475         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9476         to 1 only for ld.so.
9478         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9479         RTLD_CORRECT_DYNAMIC_WEAK.
9481 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9483         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9484         Use return 0 as 6th argument to FORWARD4.
9485         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9487 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9489         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9490         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9491         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9492         (INIT_SYSINFO): New #define.
9493         (TLS_TP_INIT): Use INIT_SYSINFO.
9494         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9495         At test to make sure SYSINFO_OFFSET value is correct.
9496         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9498 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9500         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9501         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9502         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9503         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9504         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9505         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9506         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9508 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9510         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9511         macro instead of using int $0x80 directly.
9513         * sysdeps/pthread/bits/stdio-lock.h: New file.
9514         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9515         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9516         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9517         * Makefile (routines): Add libc-lowlevelmutex.
9519         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9520         __i686.get_pc_thunk.dx.
9522 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9524         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9525         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9526         ($(objpfx)tst-cancel-wrappers.out): New rule.
9527         * tst-cancel-wrappers.sh: New test.
9528         * tst-locale1.c: Include signal.h.
9529         (uselocale): Test static linking of __libc_current_sigrt*.
9531 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9533         * Makefile (tests): Add tst-cancel6.
9534         * tst-cancel6.c: New file
9536 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9538         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9539         Define meaningfully for assembler as well.
9540         * pthreadP.h (struct pthread_functions): Remove
9541         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9542         and ptr_pthread_attr_init_2_1 fields.
9543         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9544         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9545         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9546         (FORWARD3): Define using FORWARD4.
9547         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9548         versions.
9549         * pt-system.c: Remove duplicate stdlib.h include.
9551 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9553         * sem_init.c: Define sem_init@GLIBC_2.0.
9554         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9555         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9557         * flockfile.c: Moved to...
9558         * sysdeps/pthread/flockfile.c: ...here.  New file.
9559         * funlockfile.c: Moved to...
9560         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9561         * ftrylockfile.c: Moved to...
9562         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9564 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9566         * libc-cancellation.c: Guard both function with
9567         #if !defined NOT_IN_libc.
9568         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9569         automatically provided pthread wrappers.
9570         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9571         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9572         nor in libpthread.
9573         * pt-open.c: Removed.
9574         * pt-fcntl.c: Removed.
9575         * pt-fsync.c: Removed.
9576         * pt-lseek.c: Removed.
9577         * pt-msgrcv.c: Removed.
9578         * pt-msgsnd.c: Removed.
9579         * pt-msync.c: Removed.
9580         * pt-nanosleep.c: Removed.
9581         * pt-open64.c: Removed.
9582         * pt-pause.c: Removed.
9583         * pt-pread.c: Removed.
9584         * pt-pread64.c: Removed.
9585         * pt-pwrite.c: Removed.
9586         * pt-pwrite64.c: Removed.
9587         * pt-read.c: Removed.
9588         * pt-recv.c: Removed.
9589         * pt-recvfrom.c: Removed.
9590         * pt-recvmsg.c: Removed.
9591         * pt-send.c: Removed.
9592         * pt-sendto.c: Removed.
9593         * pt-sigtimedwait.c: Removed.
9594         * pt-sigwait.c: Removed.
9595         * pt-wait.c: Removed.
9596         * pt-waitpid.c: Removed.
9597         * pt-write.c: Removed.
9598         * pt-accept.c: Removed.
9599         * pt-close.c: Removed.
9600         * pt-connect.c: Removed.
9601         * pt-lseek64.c: Removed.
9602         * pt-sendmsg.c: Removed.
9603         * pt-tcdrain.c: Removed.
9605 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9607         * init.c (__pthread_initialize_minimal_internal): Renamed from
9608         __pthread_initialize_minimal.  Make old name an alias.  This
9609         converts a normal relocation into a relative relocation.
9611         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9613         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9614         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9615         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9616         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9617         pt-sigwaitinfo, pt-waitid, and pt-writev.
9618         * pt-creat.c: Removed.
9619         * pt-poll.c: Removed.
9620         * pt-pselect.c: Removed.
9621         * pt-readv.c: Removed.
9622         * pt-select.c: Removed.
9623         * pt-sigpause.c: Removed.
9624         * pt-sigsuspend.c: Removed.
9625         * pt-sigwaitinfo.c: Removed.
9626         * pt-waitid.c: Removed.
9627         * pt-writev.c: Removed.
9629         * init.c (pthread_functions): New variable.
9630         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9631         (or NULL) to __libc_pthread_init.
9632         * forward.c: Rewrite to use __libc:pthread_functions array to get
9633         function addresses.
9634         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9635         prototype.
9636         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9637         Take new parameter.  Copy content of variable pointed to by it
9638         to __libc_pthread_init.
9640         * pthreadP.h (struct pthread_functions): New type.
9641         (__libc_pthread_init): Declare.
9643         * pthread_attr_destroy.c: Add namespace protected alias.
9644         * pthread_attr_getdetachstate.c: Likewise.
9645         * pthread_attr_getinheritsched.c: Likewise.
9646         * pthread_attr_getschedparam.c: Likewise.
9647         * pthread_attr_getschedpolicy.c: Likewise.
9648         * pthread_attr_getscope.c: Likewise.
9649         * pthread_attr_setdetachstate.c: Likewise.
9650         * pthread_attr_setinheritsched.c: Likewise.
9651         * pthread_attr_setschedparam.c: Likewise.
9652         * pthread_attr_setschedpolicy.c: Likewise.
9653         * pthread_attr_setscope.c: Likewise.
9654         * pthread_cond_broadcast.c: Likewise.
9655         * pthread_cond_destroy.c: Likewise.
9656         * pthread_cond_init.c: Likewise.
9657         * pthread_cond_signal.c: Likewise.
9658         * pthread_cond_wait.c: Likewise.
9659         * pthread_condattr_destroy.c: Likewise.
9660         * pthread_condattr_init.c: Likewise.
9661         * pthread_equal.c: Likewise.
9662         * pthread_exit.c: Likewise.
9663         * pthread_getschedparam.c: Likewise.
9664         * pthread_self.c: Likewise.
9665         * pthread_setcancelstate.c: Likewise.
9666         * pthread_setschedparam.c: Likewise.
9667         * pthread_mutex_destroy.c: Likewise.
9668         * pthread_mutex_init.c: Likewise.
9669         * pthreadP.h: Add prototypes for the aliases.
9671         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9672         multiple_threads member in correct TCB to 1.
9674         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9675         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9676         member of thread decriptor, otherwise return unconditionally 1.
9678 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9680         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9681         regular Linux version.  Remove file.
9682         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9683         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9684         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9685         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9686         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9687         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9688         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9689         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9690         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9691         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9692         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9693         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9694         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9695         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9696         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9697         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9698         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9699         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9700         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9701         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9702         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9703         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9704         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9705         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9706         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9707         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9708         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9709         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9710         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9711         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9713 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9715         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9716         * sysdeps/unix/sysv/linux/open.c: Removed.
9717         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9718         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9719         * sysdeps/unix/sysv/linux/msync.c: Removed.
9720         * sysdeps/unix/sysv/linux/read.c: Removed.
9721         * sysdeps/unix/sysv/linux/close.c: Removed.
9722         * sysdeps/unix/sysv/linux/creat.c: Removed.
9723         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9724         * sysdeps/unix/sysv/linux/pause.c: Removed.
9725         * sysdeps/unix/sysv/linux/select.c: Removed.
9726         * sysdeps/unix/sysv/linux/write.c: Removed.
9728 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9730         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9731         element in TCB to see whether locking is needed.
9733         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9734         MULTIPLE_THREADS_OFFSET value is correct.
9736         * sysdeps/unix/sysv/linux/close.c: New file.
9737         * sysdeps/unix/sysv/linux/connect.S: New file.
9738         * sysdeps/unix/sysv/linux/creat.c: New file.
9739         * sysdeps/unix/sysv/linux/fsync.c: New file.
9740         * sysdeps/unix/sysv/linux/llseek.c: New file.
9741         * sysdeps/unix/sysv/linux/lseek.c: New file.
9742         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9743         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9744         * sysdeps/unix/sysv/linux/msync.c: New file.
9745         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9746         * sysdeps/unix/sysv/linux/open.c: New file.
9747         * sysdeps/unix/sysv/linux/open64.c: New file.
9748         * sysdeps/unix/sysv/linux/pause.c: New file.
9749         * sysdeps/unix/sysv/linux/poll.c: New file.
9750         * sysdeps/unix/sysv/linux/pread.c: New file.
9751         * sysdeps/unix/sysv/linux/pread64.c: New file.
9752         * sysdeps/unix/sysv/linux/pselect.c: New file.
9753         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9754         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9755         * sysdeps/unix/sysv/linux/readv.c: New file.
9756         * sysdeps/unix/sysv/linux/recv.S: New file.
9757         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9758         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9759         * sysdeps/unix/sysv/linux/select.c: New file.
9760         * sysdeps/unix/sysv/linux/send.S: New file.
9761         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9762         * sysdeps/unix/sysv/linux/sendto.S: New file.
9763         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9764         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9765         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9766         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9767         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9768         * sysdeps/unix/sysv/linux/system.c: New file.
9769         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9770         * sysdeps/unix/sysv/linux/wait.c: New file.
9771         * sysdeps/unix/sysv/linux/waitid.c: New file.
9772         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9773         * sysdeps/unix/sysv/linux/writev.c: New file.
9774         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9776         * pt-readv.c: Fix comment.
9778 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9780         * tst-cleanup1.c: Include stdlib.h.
9782         * tst-cancel5.c: New test.
9783         * Makefile (tests): Add tst-cancel5.
9784         (tst-cancel5): Link against libc.so libpthread.so in that order.
9786 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9788         * forward.c (test_loaded): Prevent recursive calls.
9790         * Makefile (routines): Add libc-cancellation.
9791         * libc-cancellation.c: New file.
9792         * descr.h (struct pthread): Add multiple_threads field.
9793         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9794         new thread descriptor to 1.
9795         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9796         Initialize multiple_thread field after successful thread creation.
9797         * cancellation.c (__do_cancel): Move to pthreadP.h.
9798         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9799         (__pthread_disable_asynccancel): Add internal_function attribute.
9800         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9801         * pthread_setcancelstate.c: Likewise.
9802         * pthread_setcanceltype.c: Likewise.
9803         * pthread_exit.c: Likewise.
9804         * pthreadP.h (CANCELLATION_P): Likewise.
9805         (__do_cancel): Define as static inline.
9806         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9807         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9808         declarations.
9809         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9810         fields.  Define MULTIPLE_THREADS_OFFSET.
9811         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9812         declaration.
9813         * sysdeps/unix/sysv/linux/accept.S: New file.
9814         * sysdeps/unix/sysv/linux/read.c: New file.
9815         * sysdeps/unix/sysv/linux/write.c: New file.
9816         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9817         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9818         initialization of __libc_locking_needed.
9819         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9820         __libc_locking_needed, use multiple_threads field in TCB.
9821         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9823 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9825         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9826         version.
9827         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9829         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9830         access to __libc_locking_needed for PIC.
9832 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9834         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9835         declare for libc.so.
9836         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9837         expression.
9838         (__libc_lock_lock): Put into statement expression.
9839         (__libc_lock_unlock): Remove trailing semicolon.
9840         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9842 2002-12-12  Roland McGrath  <roland@redhat.com>
9844         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9845         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9847 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9849         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9850         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9851         Initialize __libc_locking_needed.
9852         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9853         instead of __register_pthread_fork_handler.
9854         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9855         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9856         fork-gen with libc_pthread_init.
9857         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9858         of __register_pthread_fork_handler.
9859         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9860         of __register_pthread_fork_handler.
9861         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9862         __libc_locking_needed to determine whether lock prefix can be avoided.
9863         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9865 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9867         * Makefile (tests): Add tst-cleanup1.
9868         * tst-cleanup1.c: New file.
9869         * cancellation.c (__cleanup_thread): Removed.
9870         (__do_cancel): Remove call to __cleanup_thread.
9871         * pthreadP.h: Remove __cleanup_thread prorotype.
9873         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9874         Remember function and argument even if cancellation handler
9875         function is not available.
9876         (__libc_cleanup_region_end): Execute registered function directly if
9877         pthread functions are not available.
9878         (__libc_cleanup_end): Likewise.
9880         * init.c (__pthread_initialize_minimal): Fix initialization in
9881         static lib by preventing gcc from being too clever.
9883 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9885         * init.c (__pthread_initialize_minimal): Remove unneccesary
9886         sigaddset call.
9888         * Makefile (tests): We can run tst-locale2 now.
9890 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9892         * Versions: Remove duplicated sigwait entry.
9894 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9896         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9897         inside libpthread.
9899         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9901         * pthreadP.h: Declare __pthread_enable_asynccancel and
9902         __pthread_disable_asynccancel.
9903         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9904         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9905         * cancellation.c (__pthread_enable_asynccancel): New function.
9906         (__pthread_disable_asynccancel): New function.
9907         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9908         * pt-close.c: Likewise.
9909         * pt-connect.c: Likewise.
9910         * pt-creat.c: Likewise.
9911         * pt-fcntl.c: Likewise.
9912         * pt-fsync.c: Likewise.
9913         * pt-lseek.c: Likewise.
9914         * pt-lseek64.c: Likewise.
9915         * pt-msgrcv.c: Likewise.
9916         * pt-msgsnd.c: Likewise.
9917         * pt-msync.c: Likewise.
9918         * pt-nanosleep.c: Likewise.
9919         * pt-open.c: Likewise.
9920         * pt-open64.c: Likewise.
9921         * pt-pause.c: Likewise.
9922         * pt-poll.c: Likewise.
9923         * pt-pread.c: Likewise.
9924         * pt-pread64.c: Likewise.
9925         * pt-pselect.c: Likewise.
9926         * pt-pwrite.c: Likewise.
9927         * pt-pwrite64.c: Likewise.
9928         * pt-read.c: Likewise.
9929         * pt-readv.c: Likewise.
9930         * pt-recv.c: Likewise.
9931         * pt-recvfrom.c: Likewise.
9932         * pt-recvmsg.c: Likewise.
9933         * pt-select.c: Likewise.
9934         * pt-send.c: Likewise.
9935         * pt-sendmsg.c: Likewise.
9936         * pt-sendto.c: Likewise.
9937         * pt-sigpause.c: Likewise.
9938         * pt-sigsuspend.c: Likewise.
9939         * pt-sigtimedwait.c: Likewise.
9940         * pt-sigwait.c: Likewise.
9941         * pt-sigwaitinfo.c: Likewise.
9942         * pt-system.c: Likewise.
9943         * pt-tcdrain.c: Likewise.
9944         * pt-wait.c: Likewise.
9945         * pt-waitid.c: Likewise.
9946         * pt-waitpid.c: Likewise.
9947         * pt-write.c: Likewise.
9948         * pt-writev.c: Likewise.
9949         * pthread_join.c: Likewise.
9950         * pthread_timedjoin.c: Likewise.
9952         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9953         (__xpg_sigpause): New function.
9954         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9956 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9958         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9960         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9961         _GI_pthread_cleanup_pop to pthreadP.h.
9963         * ftrylockfile.c: Use _IO_lock_trylock instead of
9964         pthread_mutex_trylock.
9966         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9967         (CANCEL_RESET): Likewise.
9968         (__pthread_setcanceltype_): Declare.
9969         (__pthread_mutex_lock_internal): Declare.
9970         (__pthread_mutex_unlock_internal): Declare.
9971         (__pthread_once_internal): Declare.
9972         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9973         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9975         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9976         and pthread_mutex_unlock.
9977         * pthread_cond_wait.c: Likewise.
9978         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9979         * pthread_mutex_unlock.c: Likewise.
9981         * pthread_setcanceltype.c: Add additional alias
9982         __pthread_setcanceltype.
9984         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9985         * sem_open.c (sem_open): Likewise.
9986         Use __libc_open, __libc_write, and __libc_close instead of
9987         open, write, and close respectively.
9989         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9990         Rewrite as statement expression since it must return a value.
9992         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9993         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9994         __pthread_kill.
9996         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9997         alias __pthread_once_internal.
9999         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10001 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10003         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10004         * tst-stdio1.c: New file.
10005         * tst-stdio2.c: New file.
10007         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10009         * Makefile (tests): Comment out tst-locale2 for now.
10010         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10012         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10013         -D_IO_MTSAFE_IO.
10014         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10015         Use _IO_lock_init instead of explicit assignment.
10017         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10018         Define __libc_lock_* and __libc_lock_recursive macros with
10019         lowlevellock macros, not pthread mutexes.
10021         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10022         of pthread_mutex_lock.
10023         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10024         instead of pthread_mutex_unlock.
10026 2002-12-06  Roland McGrath  <roland@redhat.com>
10028         * allocatestack.c (__stack_user): Use uninitialized defn.
10029         * init.c (__pthread_initialize_minimal): Initialize it here.
10031 2002-12-05  Roland McGrath  <roland@redhat.com>
10033         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10034         string.
10035         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10037         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10038         missing & here too.
10040 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10042         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10043         lowlevellock.
10044         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10045         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10046         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10047         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10048         for __libc_lock_* macros.
10049         * Makefile (routines): Add libc-lowlevellock.
10051 2002-10-09  Roland McGrath  <roland@redhat.com>
10053         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10054         Under [__PIC__], call the function via the pointer fetched for
10055         comparison rather than a call by name that uses the PLT.
10056         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10057         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10058         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10059         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10060         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10062 2002-12-04  Roland McGrath  <roland@redhat.com>
10064         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10066         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10067         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10069         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10071 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10073         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10074         a completely opaque, non-integer type.
10075         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10077 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10079         * sysdeps/i386/tls.h: Include stdlib.h.
10080         * sysdeps/x86_64/tls.h: Likewise.
10082 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10084         * Makefile (tests): Add tst-locale2.
10085         (tests-static): Likewise.
10086         * tst-locale2.c: New file.
10088         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10089         volatile and add memory clobbers to lock operations.
10091 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10093         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10094         * sysdeps/i386/i486/bits/atomic.h: New file.
10095         * sysdeps/i386/i586/bits/atomic.h: New file.
10096         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10097         include i486 version.
10098         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10099         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10100         Patch by Marijn Ros <marijn@mad.scientist.com>.
10102         * allocatestack.c (get_cached_stack): Don't crash if we first
10103         found a stack with a larger size then needed.
10104         Reported by Hui Huang <hui.huang@sun.com>.
10106         * Makefile (tests): Add tst-sysconf.
10107         * tst-sysconf.c: New file.
10109         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10110         PTHREAD_THREADS_MAX.
10112 2002-12-02  Roland McGrath  <roland@redhat.com>
10114         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10115         Declare using hidden_proto instead of attribute_hidden, so there are
10116         non-.hidden static symbols for gdb to find.
10117         (__pthread_keys): Likewise.
10118         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10119         * allocatestack.c (__stack_user): Likewise.
10120         * pthread_create.c (__pthread_keys): Likewise.
10121         (__nptl_threads_events, __nptl_last_event): Make these static instead
10122         of hidden.
10123         * pthread_key_create.c (__pthread_pthread_keys_max,
10124         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10126 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10128         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10129         statically.
10130         * tst-locale1.c: New file.
10132         * pthread_cond_timedwait.c: Include <stdlib.h>.
10134         * Makefile (tests): Add tst-fork2 and tst-fork3.
10135         * tst-fork2.c: New file.
10136         * tst-fork3.c: New file.
10138 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10140         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10142         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10143         require it to 200112L.
10145         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10146         instruction only if HAVE_CMOV is defined.
10147         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10149         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10151         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10153         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10155         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10157 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10159         * sysdeps/x86_64/bits/atomic.h: New file.
10161         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10162         16-bit operations.
10164         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10165         possible since gettid cannot fail.
10167         * sysdeps/x86_64/pthreaddef.h: New file.
10169         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10171         * sysdeps/x86_64/pthread_spin_init.c: New file.
10172         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10173         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10174         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10176         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10177         Add missing lock prefix.  Minute optimization.
10179         * tst-spin2.c (main): Also check successful trylock call.
10181         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10182         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10184         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10185         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10187         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10188         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10189         value in case of an error.  Add support for INTERNAL_SYSCALL.
10191         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10192         value in case of an error.
10194         * sysdeps/x86_64/tls.h: New file.
10196 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10198         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10199         takes the array member name and the index as parameters.
10200         (THREAD_SETMEM_NC): Likewise.
10201         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10202         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10203         interfaces.
10205         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10206         to decide which code to use.
10207         (THREAD_SETMEM_NC): Likewise.
10209         * allocatestack.c (queue_stack): Don't remove stack from list here.
10210         Do it in the caller.  Correct condition to prematurely terminate
10211         loop to free stacks.
10212         (__deallocate_stack): Remove stack from list here.
10214 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10216         * Makefile (tests): Add tst-stack1.
10217         * tst-stack1.c: New file.
10219         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10220         provided stack.
10222         * pthread_attr_getstack.c: Return bottom of the thread area.
10224 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10226         * Makefile (libpthread-routines): Add pt-allocrtsig and
10227         pthread_kill_other_threads.
10228         * pt-allocrtsig.c: New file.
10229         * pthread_kill_other_threads.c: New file.
10230         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10231         all three functions.
10232         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10233         allocrtsig.
10234         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10235         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10236         and __libc_allocate_rtsig_private.
10237         * Versions (libpthread): Export pthread_kill_other_threads_np,
10238         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10240 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10242         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10243         the end of the stack.  Adjust computations.
10244         When mprotect call fails dequeue stack and free it.
10245         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10246         attribute.
10247         * pthread_getattr_np.c: Likewise.
10249         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10250         surprises.
10252 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10254         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10255         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10257 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10259         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10260         * pthread_setspecific.c: Likewise.
10262 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10264         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10265         definitions.  Get them from the official place.
10266         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10268         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10269         Use new CLONE_ flags in clone() calls.
10271         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10272         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10274         * Versions: Add pthread_* functions for libc.
10275         * forward.c: New file.
10277         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10278         errno-loc.
10279         * herrno.c: New file.
10280         * res.c: New file.
10282         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10283         sem_trywait, and sem_timedwait.  Add herrno and res.
10284         * sem_init.c: Don't initialize lock and waiters members.
10285         * sem_open.c: Likewise.
10286         * sem_post.c: Removed.
10287         * sem_wait.c: Removed.
10288         * sem_trywait.c: Removed.
10289         * sem_timedwait.c: Removed.
10290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10291         Includes full implementations of sem_post, sem_wait, sem_trywait,
10292         and sem_timedwait.
10293         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10294         for new implementation.
10295         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10296         and waiters fields.
10298         * tst-sem3.c: Improve error message.
10299         * tst-signal3.c: Likewise.
10301         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10302         to tell the kernel about the termination futex and to initialize tid
10303         member.  Don't initialize main_thread.
10304         * descr.h (struct pthread): Remove main_thread member.
10305         * cancelllation.c (__do_cancel): Remove code handling main thread.
10306         The main thread is not special anymore.
10308         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10309         size of the stacks to stack_cache_actsize.
10311         * pt-readv.c: Add missing "defined".
10312         * pt-sigwait.c: Likewise.
10313         * pt-writev.c: Likewise.
10315 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10317         * Versions: Export __connect from libpthread.
10318         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10320         * Makefile (libpthread-routines): Add pt-raise.
10321         * sysdeps/unix/sysv/linux/raise.c: New file.
10322         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10323         * sysdeps/generic/pt-raise.c: New file.
10325         * pthread_cond_init.c: Initialize all data elements of the condvar
10326         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10328         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10329         * pthread_create.c: Likewise.
10331         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10332         * tst-key1.c: New file.
10333         * tst-key2.c: New file.
10334         * tst-key3.c: New file.
10336         * Versions: Export pthread_detach for version GLIBC_2.0.
10337         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10339 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10341         * pthread_key_create.c: Terminate search after an unused key was found.
10342         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10344         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10345         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10347 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10349         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10350         dynamic lookup for errno in PIC.
10352         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10353         release the stack lock as soon as possible.
10354         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10355         the static TLS block.
10356         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10358         * cancellation.c: Renamed from cancelation.c.
10359         * Makefile: Adjust accordingly.
10360         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10361         * cleanup_defer.c: Use CANCELLATION_P.
10362         * pthread_testcancel.c: Likewise.
10363         * descr.h: Fix spelling in comments.
10364         * init.c: Likewise.
10365         * pthread_getattr_np.c: Likewise.
10366         * pthread_getschedparam.c: Likewise.
10367         * pthread_setschedparam.c: Likewise.
10368         * Versions: Likewise.
10370         * pt-pselect.c: New file.
10371         * Makefile (libpthread-routines): Add pt-pselect.
10372         * Versions: Add pselect.
10374         * tst-cancel4.c: New file.
10375         * Makefile (tests): Add tst-cancel4.
10377 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10379         * pthread_mutex_lock.c: Always record lock ownership.
10380         * pthread_mutex_timedlock.c: Likewise.
10381         * pthread_mutex_trylock.c: Likewise.
10383         * pt-readv.c: New file.
10384         * pt-writev.c: New file.
10385         * pt-creat.c: New file.
10386         * pt-msgrcv.c: New file.
10387         * pt-msgsnd.c: New file.
10388         * pt-poll.c: New file.
10389         * pt-select.c: New file.
10390         * pt-sigpause.c: New file.
10391         * pt-sigsuspend.c: New file.
10392         * pt-sigwait.c: New file.
10393         * pt-sigwaitinfo.c: New file.
10394         * pt-waitid.c: New file.
10395         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10396         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10397         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10398         * Versions: Add all the new functions.
10400         * tst-exit1.c: New file.
10401         * Makefile (tests): Add tst-exit1.
10403         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10405 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10407         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10409         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10410         call.  pthread_join is an official cancellation point.
10411         * pthread_timedjoin.c: Likewise.
10413         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10414         and the condvar's mutex are retrieved.
10415         * pthread_cond_timedwait.c: Likewise.
10416         Reported by dice@saros.East.Sun.COM.
10418 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10420         * pthreadP.h: Cut out all type definitions and move them...
10421         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10422         * pthreadP.h: Include <internaltypes.h>.
10424         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10425         performance tweaks.
10427         * sem_trywait.c: Shuffle #includes around to get right order.
10428         * sem_timedwait.c: Likewise.
10429         * sem_post.c: Likewise.
10430         * sem_wait.c: Likewise.
10432         * nptl 0.3 released.
10434         * Makefile (tests): Add tst-signal3.
10435         * tst-signal3.c: New file.
10437 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10439         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10440         the asms modify the sem object.
10441         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10443         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10444         the actual members.
10445         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10446         * semaphoreP.h: Include pthreadP.h.
10447         * sem_getvalue.c: Adjust to sem_t change.
10448         * sem_init.c: Likewise.
10449         * sem_open.c: Likewise.
10450         * sem_post.c: Likewise.
10451         * sem_timedwait.c: Likewise.
10452         * sem_trywait.c: Likewise.
10453         * sem_wait.c: Likewise.
10455 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10457         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10458         * tst-basic2.c: New file.
10459         * tst-exec1.c: New file.
10460         * tst-exec2.c: New file.
10461         * tst-exec3.c: New file.
10463         * tst-fork1.c: Remove extra */.
10465         * nptl 0.2 released.  The API for IA-32 is complete.