Remove invalid iconv aliases.
[glibc.git] / nptl / ChangeLog
blob30631dcd1631ec02dc3374c0b33afdedfd191fb0
1 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
4         small.
6 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
7             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
9         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
10         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
12 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
14         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
16 2010-05-01  Alan Modra  <amodra@gmail.com>
18         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
19         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
20         to save temps.  Correct cfi for possible later frame manipulation.
21         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
22         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
23         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
24         (DOCARGS_6, UNDOCARGS_6): Likewise.
25         (CENABLE, CDISABLE): Add nops for non-shared calls.
27 2010-07-06  Andreas Schwab  <schwab@redhat.com>
29         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
30         Fix type mismatch.
32 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
34         * tst-abstime.c (do_test): Some more cleanups
36 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
38         * tst-abstime.c: Correct testing and add test for sem_timedwait.
40 2010-07-01  Andreas Schwab  <schwab@redhat.com>
41             Ulrich Drepper  <drepper@redhat.com>
43         * Makefile (tests): Add tst-abstime.
44         * tst-abstime.c: New file.
45         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
46         (__lll_timedlock_wait): Check for timestamp before the Epoch.
47         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
48         (__lll_timedlock_wait): Likewise.
49         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
50         (__lll_robust_timedlock_wait): Likewise.
51         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
52         (__pthread_cond_timedwait): Likewise.
53         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
54         (pthread_rwlock_timedrdlock): Likewise.
55         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
56         (pthread_rwlock_timedwrlock): Likewise.
57         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
58         Likewise.
60 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
62         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
64 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
66         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
67         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
69 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
71         [BZ #11390]
72         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
73         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
74         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
75         pthread_setname.
76         * Makefile (libpthread-routines): Add pthread_getname and
77         pthread_setname.
78         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
80 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
82         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
83         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
84         * sysdeps/pthread/Makefile: Remove csu section and rt section's
85         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
87 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
89         * pthread_cond_timedwait.c: Add check for
90         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
91         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
92         INTERNAL_SYSCALL.
94 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
96         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
97         and the call fails wake eventually waiting setxid threads.  Don't free
98         stack here if we try starting a thread.
99         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
100         if the clone call failed.
102 2010-03-08  Andreas Schwab  <schwab@redhat.com>
104         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
105         * allocatestack.c (get_cached_stack): Set setxid_futex.
106         (allocate_stack): Likewise.
108 2010-03-05  Andreas Schwab  <schwab@redhat.com>
109             Ulrich Drepper  <drepper@redhat.com>
111         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
112         it is creating a thread or it is just being created.
113         * pthread_create.c (start_thread): Wake setxid thread if it is
114         waiting.
115         (__pthread_create_2_1): Initialize setxid_futex.
116         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
117         is waiting.
119 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
122         Fix unwind info.
123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
125 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
128         Fix pthread_cond_timedwait with requeue-PI.
129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
130         Fix pthread_cond_wait with requeue-PI.
132 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
134         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
135         and pthread_mutexattr_setrobust for GLIBC_2.12.
136         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
137         * pthread_mutexattr_getrobust.c: Define alias
138         pthread_mutexattr_getrobust.
139         * pthread_mutexattr_setrobust.c: Define alias
140         pthread_mutexattr_setrobust.
142 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
144         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
146 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
148         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
150 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
152         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
153         call __gmon_start__.
154         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
156 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
158         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
159         using memset.
161 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
163         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
164         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
166         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
169         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
170         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
172 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
174         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
175         Don't update nwaiters after invalid timeout is recognized.
177 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
179         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
180         __gmon_start__.
182 2009-11-27  Andreas Schwab  <schwab@redhat.com>
184         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
185         THREAD_SELF->cancelhandling after returning from futex call.
187 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
189         * tst-sem13.c: New file.
190         * Makefile (tests): Add tst-sem13.
192 2009-11-22  Roland McGrath  <roland@redhat.com>
194         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
195         instead of recapitulating its contents.
197 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
199         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
200         optimizations and cleanups.
202 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
205         Remove redundant code. Fix cfi offsets.
206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
207         Fix cfi offsets.
209 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
212         reduce size of unwind info.
214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
215         cfi directives.
216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
217         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
219 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
221         [BZ #4457]
222         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
223         LIBGCC_S_SO.
224         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
226 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
228         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
230         [BZ #3270]
231         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
232         steps to avoid races with creation and terminations.
233         * nptl-init.c (sighandler_setxid): Adjust.
234         Patch by Daniel Jacobowitz.
236 2009-09-07  Andreas Schwab  <schwab@redhat.com>
238         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
240 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
241             Joseph Myers  <joseph@codesourcery.com>
243         [BZ #7094]
244         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
245         Initialize the sigev_notify field for newly created timer to make sure
246         the timer gets deleted from the active timer's list upon timer_delete.
248 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
250         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
251         Correct a logic error.
253 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
255         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
256         of the field in local variables.
257         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
258         variable and don't unconditionally clear it.
260 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
262         * pthread_create.c (start_thread): Hint to the kernel that memory for
263         the stack can be reused.  We do not mark all the memory.  The part
264         still in use and some reserve are kept.
266 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
268         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
270 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
272         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
273         directives.
275 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
277         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
278         directives.
279         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
281 2009-08-10  Andreas Schwab  <schwab@redhat.com>
283         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
284         (__pthread_cond_signal): Don't clobber register used for syscall
285         number.
287 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
289         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
290         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
292         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
293         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
294         register.
296 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
298         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
299         enabled by the special *_asynccancel functions.
300         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
303         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
305 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
307         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
308         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
309         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
310         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
311         since we can assume the special __*_{en,dis}able_asynccancel
312         functions.
313         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
314         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
315         and PTHREAD_CANCELED.
317 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
319         * descr.h: Better definition of *_BITMASK macros for cancellation.
321 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
323         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
325         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
326         dynamic linker might have to save.
327         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
328         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
329         printing.
331         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
333 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
335         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
336         New function.
337         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
338         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
340         requeue_pi for robust mutexes.
341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
343         Don't only skip __pthread_mutex_cond_lock.  Call instead
344         __pthread_mutex_cond_lock_adjust.
345         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
347         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
348         optimization of PI mutex handling.
350 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
352         [BZ #10418]
353         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
354         instead of of _acq variants of cmpxchg.
356 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
358         * sysdeps/x86_64/configure.in: New file.
360         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
361         path when not using absolute timeout futex.
363 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
365         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
366         optimizations of last changes.
367         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
369 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
371         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
372         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
373         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
374         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
376         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
377         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
378         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
381         (__pthread_cond_timedwait): Make more robust.
383 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
385         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
386         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
387         directly use absolute timeout.
389         * tst-sem5.c (do_test): Add test for premature timeout.
390         * Makefile: Linu tst-sem5 with librt.
392         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
393         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
394         directly use absolute timeout.
395         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
396         (pthread_rwlock_timedrdlock): Likewise.
398         * tst-cond11.c (run_test): Add test to check that the timeout is
399         long enough.
401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
402         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
403         directly use absolute timeout.
405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
406         (__pthread_cond_wait): Convert to using exception handler instead of
407         registered unwind buffer.
408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
409         (__pthread_cond_timedwait): Likewise.
411 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
413         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
414         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
415         use absolute timeout.
417         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
418         handling of uncontested semaphore.
420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
421         (__condvar_cleanup): Rewrite to use cfi directives instead of
422         hand-coded unwind tables.
423         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
424         Likewise.
425         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
426         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
427         Likewise.
429 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
431         * Makefile (libpthread-routines): Add pthread_sigqueue.
432         * Versions: Add pthread_sigqueue for GLIBC_2.11.
433         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
434         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
436 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
438         [BZ #10262]
439         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
440         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
441         cannot be assumed.
442         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
444 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
446         * libc-cancellation.c: Move __libc_cleanup_routine to...
447         * libc-cleanup.c: ...here.  New file.
448         * Makefile (routines): Add libc-cleanup.
450         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
451         test.
452         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
453         * sysdeps/pthread/librt-cancellation.c: Likewise.
455         [BZ #9924]
456         * nptl-init.c: Renamed from init.c.
457         * Makefile: Change all occurences of init.c to nptl-init.c.
459 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
461         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
462         to test when deciding on the delay.
463         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
464         * pthread_cancel.c: Close race between deciding on sending a signal
465         and setting the CANCELING_BIT bit.
467         * cancellation.c (__pthread_disable_asynccancel): Don't return if
468         thread is canceled.
469         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
471 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
473         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
474         is available.
475         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
476         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
477         * sysdeps/i386/tls.h: Likewise.
478         (tcbhead_t): Add __private_tm member.
480 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
482         * sem_open.c (sem_open): Rewrite initialization of initsem to
483         avoid warnings.
485         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
486         Avoid warning by using may_alias attribute on ptrhack.
488 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
490         [BZ #10090]
491         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
492         Check policy and priority for validity.
493         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
495 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
497         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
498         (__pthread_cond_timedwait): Change to use cfi directives instead of
499         hand-coded unwind sections.
501 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
503         * init.c (nptl_freeres): Compile only for SHARED.
505 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
507         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
508         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
509         FUTEX_BITSET_MATCH_ANY.
511 2009-02-27  Roland McGrath  <roland@redhat.com>
513         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
514         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
516 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
518         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
519         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
520         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
521         200112L to 200809L.
523 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
525         * sysdeps/pthread/pthread.h: The robust mutex functions are in
526         POSIX 2008.
528 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
530         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
531         Unify name of include protector macro.
533 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
535         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
536         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
538 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
540         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
541         pointer variables.
543         * allocatestack.c (__free_stacks): Renamed from free_stacks.
544         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
545         * init.c (nptl_freeres): New function.
546         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
547         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
548         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
549         variable.
550         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
551         load DSO.  Assign last.
552         (__unwind_freeres): New function.
554         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
555         for better debugging.  No need to use stack_list_add here.
557 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
559         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
560         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
561         instead of computing relative timeout.
562         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
563         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
565 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
567         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
569 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
571         * sysdeps/pthread/list.h (list_add): Initialize new element first.
572         (list_add_tail): Removed.
574 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
576         * (in_flight_stack): New variable.
577         (stack_list_del): New function.  Use instead of list_del.
578         (stack_list_add): New function.  Use instead of list_add when adding to
579         stack_cache and stack_used lists.
580         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
581         when the fork call interrupted another thread.
583 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
585         * init.c (__pthread_initialize_minimal_internal): Optimize test
586         FUTEX_CLOCK_REALTIME a bit.
588 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
590         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
591         only passing five parameters to FUTEX_WAIT_BITSET call.
593         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
594         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
595         instead of computing relative timeout.
597 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
599         * init.c (__pthread_initialize_minimal_internal): Check for
600         FUTEX_CLOCK_REALTIME flag.
601         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
602         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
603         relative timeout.
605         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
606         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
607         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
608         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
609         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
610         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
612 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
614         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
615         loop body instead of ; to avoid gcc warnings.
616         (pthread_cleanup_pop_restore_np): Likewise.
617         Patch by Caolán McNamara <caolanm@redhat.com>.
619 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
621         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
622         fast path here, for robust/PI/PP mutexes call
623         __pthread_mutex_lock_full.  Don't use switch, instead use a series
624         of ifs according to their probability.
625         (__pthread_mutex_lock_full): New function.
626         * pthread_mutex_unlock.c: Include assert.h.
627         (__pthread_mutex_unlock_usercnt): Handle only the
628         fast path here, for robust/PI/PP mutexes call
629         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
630         of ifs according to their probability.
631         (__pthread_mutex_unlock_full): New function.
632         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
633         (__pthread_mutex_lock_full): Define.
635 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
637         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
638         implementation.  Add necessary padding and.
639         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
640         words.
642 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
644         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
645         and FUTEX_WAKE_BITSET.
647 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
649         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
650         and FUTEX_WAKE_BITSET.
651         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
652         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
653         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
654         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
656 2008-11-25  Roland McGrath  <roland@redhat.com>
658         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
659         Subdirectories moved to ports repository as
660         sysdeps/.../nptl subdirectories.
662 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
664         [BZ #7008]
665         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
666         of old value.
667         * pthread_cond_init.c (__pthread_cond_init): Fix
668         cond->__data.__nwaiters initialization.
669         * Makefile (tests): Add tst-cond23.
670         * tst-cond23.c: New test.
672 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
674         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
675         arguments.
676         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
677         arguments.
679 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
681         [BZ #6955]
682         * pthread_mutex_lock.c: Add support for private PI mutexes.
683         * pthread_mutex_timedlock.c: Likewise.
684         * pthread_mutex_trylock.c: Likewise.
685         * pthread_mutex_unlock.c: Likewise.
686         Patch mostly by Ben Jackson <ben@ben.com>.
688 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
690         [BZ #6843]
691         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
692         Increase stack size for helper thread.
694 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
696         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
697         assembly with a clobber list for access registers a0 and a1.
699 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
701         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
702         to force runp->refcntr to be read from memory.
704 2008-09-08  Richard Guenther  <rguenther@suse.de>
706         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
707         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
708         lll_timedlock, lll_robust_timedlock, lll_unlock,
709         lll_robust_unlock): Promote private to int.
711 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
713         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
714         ARCH_RETRY_MMAP definitions.
715         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
716         Define MAP_STACK when not defined.
717         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
718         handling of ARCH_RETRY_MMAP.
720 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
722         * tst-align2.c (f): Print message that f is reached.
724 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
726         [BZ #6740]
727         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
728         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
730 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
732         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
733         SOCK_CLOEXEC if possible.
735 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
737         * Makefile (tests): Add tst-rwlock2a.
738         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
739         * tst-rwlock2a.c: New file.
741 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
743         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
745 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
747         * sysdeps/pthread/pthread.h: Fix typo in comment.
749 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
751         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
752         of CPU set to the kernel.
754 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
756         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
757         cfi directives.
758         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
759         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
760         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
761         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
762         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
763         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
765 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
767         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
768         cfi directives.
769         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
770         Likewise.
771         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
772         Likewise.
773         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
774         Likewise.
776 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
778         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
780 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
782         David S. Miller  <davem@davemloft.net>
784         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
786 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
788         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
789         __pshared correctly.
790         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
791         Likewise.
792         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
793         Likewise.
794         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
795         Likewise.
796         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
797         Likewise.
798         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
800 2008-04-14  David S. Miller  <davem@davemloft.net>
802         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
803         (__old_sem_wait): Fix argument to lll_futex_wait().
805 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
807         * pthread_create.c: Require pthread_mutex_trylock and
808         pthread_key_delete for libgcc.
810 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
812         [BZ #6020]
813         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
814         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
815         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
817 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
819         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
820         <linux/limits.h> has defined it.
821         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
822         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
823         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
824         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
826 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
828         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
829         of ASSEMBLER.
830         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
831         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
833 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
835         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
836         HAVE_DL_DISCOVER_OSVERSION.
837         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
838         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
840 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
842         [BZ #5778]
843         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
844         _POSIX_CHOWN_RESTRICTED value to zero.
846 2008-01-31  Roland McGrath  <roland@redhat.com>
848         * Makefile (omit-deps): Variable removed.
850 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
852         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
853         unnecessary addr32 prefix.
855 2008-01-29  Roland McGrath  <roland@redhat.com>
857         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
859 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
861         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
863 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
865         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
866         a scratch register.
867         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
868         (__lll_lock_wait_private): Fix typo.
869         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
870         (pthread_barrier_wait): Likewise.  Adjust XADD use.
871         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
872         Adjust XADD use.
873         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
874         (pthread_rwlock_timedrdlock): Return correct return value.
875         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
876         (pthread_rwlock_timedwrlock): Likewise.
878 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
880         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
881         thread returns the program exits with an error code.
883 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
885         * pthread-errnos.sym: Add EOVERFLOW.
886         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
887         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
888         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
889         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
891 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
893         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
894         parameter.  Passed it as permission to mmap.
895         * allocatestack.c (allocate_stack): Pass prot as second parameter
896         to ARCH_RETRY_MMAP.
898 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
900         * tst-basic7.c: Allocate memory for the stack.
902         [BZ #5465]
903         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
904         (__pthread_cond_timedwait): Don't use VDSO.
905         Patch by Michal Januszewski.
907 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
909         [BZ #5455]
910         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
911         Allow label before pthread_cleanup_pop.
912         (pthread_cleanup_pop_restore_np): Likewise.
914 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
916         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
917         Store 2 before returning ETIMEDOUT.
919 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
921         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
922         Store 2 before returning ETIMEDOUT.
923         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
924         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
925         (__lll_lock_wait_private): Optimize.
926         (__lll_lock_wait): Likewise.
928 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
930         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
931         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
932         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
934 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
936         [BZ #5240]
937         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
938         If we time out, try one last time to lock the futex to avoid
939         losing a wakeup signal.
940         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
941         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
943         [BZ #5245]
944         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
945         if necessary.
947 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
949         [BZ #5245]
950         * allocatestack.c (allocate_stack): Change ENOMEM error in case
951         mmap failed to EAGAIN.
952         * Makefile (tests): Add tst-basic7.
953         * tst-basic7.c: New file.
955 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
957         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
958         Use __linkin_atfork.
960 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
962         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
963         missing line continuations.
964         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
965         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
967 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
969         [BZ #5220]
970         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
971         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
972         (struct timer): Add next element.
973         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
974         enqueue timer structure into __active_timer_sigev_thread list.
975         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
976         remove timer struct from __active_timer_sigev_thread.
977         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
978         Before using timer structure make sure it is still on the
979         __active_timer_sigev_thread list.  Keep lock until done.
980         Define __active_timer_sigev_thread and
981         __active_timer_sigev_thread_lock.
983 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
985         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
986         Redefine thread_atfork for use of ATFORK_MEM.
987         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
988         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
989         function.
990         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
991         Use atomic operation when removing first element of list.
993 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
995         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
996         routine instead of an alias to __new_sem_post.
998 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
1000         * init.c (__pthread_initialize_minimal): Initialize word to appease
1001         valgrind.
1003 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
1005         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1006         libc.so just clear NAME.
1007         (__libc_rwlock_fini): Nop inside of libc.so.
1008         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1009         all zeros.
1011 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
1013         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1014         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1015         unlocking failed.
1016         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1018 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
1020         [BZ #4938]
1021         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1022         reclaimed stack if necessary.
1023         * Makefile (tests): Add tst-tsd6.
1024         * tst-tsd6.c: New file.
1026 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1028         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1029         Add private argument.
1031 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
1033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1034         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1036 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
1038         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1039         (__lll_robust_timedlock): Pass private as last argument to
1040         __lll_robust_timedlock_wait.
1041         (__lll_unlock): Fix a pasto.
1043 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1045         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1046         sparc_old_sem): New structs.
1047         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1048         (__sem_wait_cleanup): New function.
1049         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
1050         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1051         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1052         lll_futex_wait.
1053         (__old_sem_wait): New function.
1054         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1055         nptl/sysdeps/unix/sysv/linux/sparc version.
1056         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1057         Likewise.
1058         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1059         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1060         (__new_sem_trywait): Use sparc_old_sem structure.
1061         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1062         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
1063         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1064         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1065         lll_futex_timed_wait.
1066         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1067         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
1068         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1069         lll_futex_wake.
1070         (__old_sem_post): New function.
1071         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1072         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1073         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1074         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1075         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1076         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1078 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1080         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1081         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1082         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1083         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1084         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1085         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1086         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1087         Use FUTEX_WAKE_OP.
1088         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1089         kernel-features.h and tcb-offsets.h.
1090         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1091         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1092         process private.
1093         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1094         tcb-offsets.h.
1095         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1096         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1097         process private.
1098         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1099         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1100         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1101         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1102         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1103         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1106 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
1108         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1109         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1110         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1111         lll_futex_timed_wait.
1113         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1114         __lll_robust_unlock): Rewrite as macros instead of inline functions.
1115         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1116         __lll_robust_unlock, __lll_wait_tid): Likewise.
1118 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1120         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1121         Fix a pasto.
1122         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1123         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1124         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1125         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1126         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1127         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1128         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1130         kernel-features.h.
1131         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1132         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1133         process private.  Switch DW_CFA_advance_loc1 and some
1134         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1135         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1136         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1137         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1138         process private.  Switch DW_CFA_advance_loc{1,2} and some
1139         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1140         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1141         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1142         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1143         Likewise.
1144         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1146         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1147         Likewise.
1148         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1149         (__pthread_cond_broadcast): Compare %r8 instead of
1150         dep_mutex-cond_*(%rdi) with $-1.
1151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1152         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1153         of oring.
1155 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
1157         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1159 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1161         * allocatestack.c: Include kernel-features.h.
1162         * pthread_create.c: Likewise.
1163         * pthread_mutex_init.c: Likewise.
1164         * init.c: Likewise.
1165         * pthread_cond_timedwait.c: Likewise.
1166         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1167         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1168         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1170         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1171         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1173         Likewise.
1174         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1175         Likewise.
1176         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1177         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1178         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1179         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1181 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1183         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1184         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1185         byte elements.  One of them is the new __shared element.
1186         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1187         adjust names of other padding elements.
1188         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1189         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1190         byte elements.  One of them is the new __shared element.
1191         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1192         adjust names of other padding elements.
1193         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1194         Renamed __pad1 element to __shared, adjust names of other padding
1195         elements.
1196         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1197         (pthread_rwlock_t): Likewise.
1198         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1199         typo.
1201 2007-08-09  Anton Blanchard  <anton@samba.org>
1203         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1205 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1208         <kernel-features.h>.
1209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1211 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1213         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1214         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1215         dealing with robust mutexes.
1216         * pthread_mutex_timedlock.c: Likewise.
1217         * pthread_mutex_trylock.c: Likewise.
1218         * pthread_mutex_unlock.c: Likewise.
1219         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1221 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1223         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1224         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1225         (PTHREAD_MUTEX_PSHARED): Define.
1226         * pthread_mutex_init.c (__pthread_mutex_init): Set
1227         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1228         mutexes.
1229         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1230         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1231         as second argument to lll_lock.
1232         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1233         instead of its __data.__lock field.
1234         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1235         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1236         to lll_robust_lock.
1237         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1238         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1239         instead of mutex->__data.__kind directly, pass
1240         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1241         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1242         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1243         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1244         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1245         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1246         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1247         of mutex->__data.__kind directly.
1248         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1249         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1250         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1251         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1252         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1253         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1254         and lll_futex_wake.
1255         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1256         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1257         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1258         directly.
1259         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1260         Take mutex as argument instead of its __data.__lock field, pass
1261         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1262         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1263         __data.__lock field.
1264         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1265         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1266         to lll_robust_cond_lock.
1267         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1268         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1269         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1270         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1271         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1272         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1273         lll_futex_wait.
1274         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1275         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1276         lll_futex_wake.
1277         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1278         pshared variable, pass it to lll_lock, lll_unlock,
1279         lll_futex_timedwait and lll_futex_wake.
1280         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1281         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1282         and lll_futex_wake.
1283         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1284         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1285         macro.
1286         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1287         lll_futex_wake_unlock): Likewise.
1288         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1289         Likewise.
1290         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1291         lll_futex_wake_unlock): Likewise.
1292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1293         Likewise.
1294         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1295         lll_futex_wake_unlock): Likewise.
1296         (lll_futex_wake): Fix a typo.
1297         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1298         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1299         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1300         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1301         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1302         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1303         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1304         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1306         (__pthread_cond_timedwait): Likewise.
1307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1308         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1310 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1312         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1313         Don't use CGOTSETUP and CGOTRESTORE macros.
1314         (CGOTSETUP, CGOTRESTORE): Remove.
1315         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1316         @local symbol.
1318 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1320         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1321         definitions for private futexes.
1322         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1323         kernel-features.h and lowlevellock.h.  Use private futexes if
1324         they are available.
1325         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1326         (__lll_mutex_lock_wait): Rename to
1327         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1328         (__lll_mutex_timedlock_wait): Rename to ...
1329         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1330         Don't compile in for libc.so.
1331         (__lll_mutex_unlock_wake): Rename to ...
1332         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1333         (__lll_timedwait_tid): Use __NR_gettimeofday.
1334         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1335         the header from assembler.  Renamed all lll_mutex_* resp.
1336         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1337         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1338         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1339         Define.
1340         (__lll_lock_wait_private): Add prototype.
1341         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1342         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1343         __lll_unlock_wake): Likewise.
1344         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1345         if private is constant LLL_PRIVATE.
1346         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1347         lll_timedlock, lll_robust_timedlock): Add private argument.
1348         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1349         if private is constant LLL_PRIVATE.
1350         (lll_robust_unlock, lll_robust_dead): Add private argument.
1351         (lll_lock_t): Remove.
1352         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1353         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1354         lll_cond_wake, lll_cond_broadcast): Remove.
1355         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1356         kernel-features.h and lowlevellock.h.
1357         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1358         (LOAD_FUTEX_WAIT): Define.
1359         (__lll_robust_mutex_lock_wait): Rename to ...
1360         (__lll_robust_lock_wait): ... this.  Add private argument.
1361         Use LOAD_FUTEX_WAIT macro.
1362         (__lll_robust_mutex_timedlock_wait): Rename to ...
1363         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1364         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1365         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1366         lowlevellock.h.
1367         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1368         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1369         __lll_mutex_{lock,unlock}_*.
1370         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1371         lowlevellock.h and pthread-errnos.h.
1372         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1373         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1374         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1375         __lll_mutex_{lock,unlock}_*.
1376         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1377         lowlevellock.h and pthread-errnos.h.
1378         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1379         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1380         __lll_mutex_{lock,unlock}_*.
1381         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1382         lowlevellock.h.
1383         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1384         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1385         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1386         (__condvar_tw_cleanup): Likewise.
1387         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1388         lowlevellock.h.
1389         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1390         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1391         __lll_mutex_{lock,unlock}_*.
1392         ( __condvar_w_cleanup): Likewise.
1393         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1394         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1395         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1396         lowlevellock.h.
1397         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1398         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1399         __lll_mutex_{lock,unlock}_*.
1400         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1401         lowlevellock.h.
1402         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1403         FUTEX_PRIVATE_FLAG): Remove.
1404         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1405         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1406         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1407         lowlevellock.h.
1408         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1409         FUTEX_PRIVATE_FLAG): Remove.
1410         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1411         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1412         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1413         lowlevellock.h.
1414         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1415         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1416         __lll_mutex_{lock,unlock}_*.
1417         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1418         lowlevellock.h.
1419         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1420         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1421         __lll_mutex_{lock,unlock}_*.
1422         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1423         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1424         (__new_sem_post): Use standard initial exec code sequences.
1425         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1426         lowlevellock.h.
1427         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1428         FUTEX_PRIVATE_FLAG): Remove.
1429         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1430         exec code sequences.
1431         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1432         (__new_sem_trywait): Use standard initial exec code sequences.
1433         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1434         (__new_sem_wait): Use standard initial exec code sequences.
1436 2007-07-31  Anton Blanchard  <anton@samba.org>
1438         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1439         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1440         atomic_full_barrier.
1442 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1444         * allocatestack.c (stack_cache_lock): Change type to int.
1445         (get_cached_stack, allocate_stack, __deallocate_stack,
1446         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1447         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1448         as second argument to lll_lock and lll_unlock macros on
1449         stack_cache_lock.
1450         * pthread_create.c (__find_in_stack_list): Likewise.
1451         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1452         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1453         as second argument.
1454         * descr.h (struct pthread): Change lock and setxid_futex field
1455         type to int.
1456         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1457         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1458         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1459         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1460         Likewise.
1461         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1462         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1463         * pthreadP.h (__attr_list_lock): Change type to int.
1464         * pthread_attr_init.c (__attr_list_lock): Likewise.
1465         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1466         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1467         lll_{,un}lock.
1468         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1469         also for lll_futex_{wake,wait}.
1470         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1471         a pointer to const.
1472         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1473         LLL_SHARED as second argument to lll_{,un}lock.
1474         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1475         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1476         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1477         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1478         Likewise.
1479         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1480         as second argument to lll_{,un}lock macros on pd->lock.
1481         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1482         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1483         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1484         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1485         Likewise.
1486         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1487         Likewise.
1488         * pthread_once.c (once_lock): Change type to int.
1489         (__pthread_once): Pass LLL_PRIVATE as second argument to
1490         lll_{,un}lock macros on once_lock.
1491         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1492         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1493         rwlock->__data.__shared as second argument to them and similarly
1494         for lll_futex_w*.
1495         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1496         Likewise.
1497         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1498         Likewise.
1499         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1500         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1501         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1502         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1503         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1504         to lll_{,un}lock macros on __sem_mappings_lock.
1505         * sem_open.c (check_add_mapping): Likewise.
1506         (__sem_mappings_lock): Change type to int.
1507         * semaphoreP.h (__sem_mappings_lock): Likewise.
1508         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1509         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1510         instead of lll_*mutex_*, pass LLL_SHARED as last
1511         argument.
1512         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1513         pass LLL_SHARED as last argument.
1514         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1515         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1516         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1517         pass LLL_SHARED as last argument.
1518         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1519         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1520         LLL_SHARED as last argument.
1521         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1522         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1523         Similarly.
1524         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1525         __libc_lock_lock_recursive, __libc_lock_unlock,
1526         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1527         argument to lll_{,un}lock.
1528         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1529         _IO_lock_unlock): Likewise.
1530         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1531         compound literal.
1532         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1533         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1534         __fork_lock.
1535         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1536         free_mem): Likewise.
1537         (__fork_lock): Change type to int.
1538         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1539         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1540         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1541         lll_futex_wake.
1542         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1543         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1544         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1545         New function.
1546         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1547         pass it through to lll_futex_*wait, only compile in when
1548         IS_IN_libpthread.
1549         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1550         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1551         argument and pass it through to lll_futex_*wait.
1552         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1553         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1554         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1555         inline functions to __lll_* resp. __lll_robust_*.
1556         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1557         (lll_mutex_dead): Add private argument.
1558         (__lll_lock_wait_private): New prototype.
1559         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1560         __lll_robust_lock_timedwait): Add private argument to prototypes.
1561         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1562         call __lll_lock_wait_private, otherwise pass private to
1563         __lll_lock_wait.
1564         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1565         __lll_robust_timedlock): Add private argument, pass it to
1566         __lll_*wait functions.
1567         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1568         call __lll_unlock_wake_private, otherwise pass private to
1569         __lll_unlock_wake.
1570         (__lll_robust_unlock): Add private argument, pass it to
1571         __lll_robust_unlock_wake.
1572         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1573         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1574         argument, pass it through to __lll_* inline function.
1575         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1576         (lll_lock_t): Remove.
1577         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1578         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1579         lll_cond_wake, lll_cond_broadcast): Remove.
1580         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1581         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1582         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1583         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1584         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1585         the header from assembler.  Renamed all lll_mutex_* resp.
1586         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1587         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1588         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1589         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1590         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1591         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1592         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1593         Remove prototype.
1594         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1595         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1596         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1597         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1598         MULTIPLE_THREADS_OFFSET as another asm operand.
1599         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1600         MULTIPLE_THREADS_OFFSET as last asm operand, call
1601         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1602         otherwise pass private as another argument to __lll_lock_wait.
1603         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1604         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1605         private as another argument to __lll_*lock_wait call.
1606         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1607         MULTIPLE_THREADS_OFFSET as another asm operand, call
1608         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1609         otherwise pass private as another argument to __lll_unlock_wake.
1610         (lll_robust_unlock): Add private argument, pass private as another
1611         argument to __lll_unlock_wake.
1612         (lll_robust_dead): Add private argument, use __lll_private_flag
1613         macro.
1614         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1615         LLL_MUTEX_LOCK_INITIALIZER.
1616         (lll_lock_t): Remove.
1617         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1618         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1619         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1620         lll_cond_wake, lll_cond_broadcast): Remove.
1621         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1622         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1623         2007-05-2{3,9} changes.
1624         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1625         kernel-features.h and lowlevellock.h.
1626         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1627         (LOAD_FUTEX_WAIT): Rewritten.
1628         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1629         define.
1630         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1631         (__lll_mutex_lock_wait): Rename to ...
1632         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1633         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1634         (__lll_mutex_timedlock_wait): Rename to ...
1635         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1636         contains private argument.  Don't compile in for libc.so.
1637         (__lll_mutex_unlock_wake): Rename to ...
1638         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1639         Don't compile in for libc.so.
1640         (__lll_timedwait_tid): Use __NR_gettimeofday.
1641         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1642         kernel-features.h and lowlevellock.h.
1643         (LOAD_FUTEX_WAIT): Define.
1644         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1645         define.
1646         (__lll_robust_mutex_lock_wait): Rename to ...
1647         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1648         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1649         macro.
1650         (__lll_robust_mutex_timedlock_wait): Rename to ...
1651         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1652         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1653         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1654         lowlevellock.h.
1655         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1656         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1657         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1658         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1659         to __lll_lock_wait in %edx.
1660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1661         Include lowlevellock.h and pthread-errnos.h.
1662         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1663         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1664         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1665         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1666         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1667         __lll_unlock_wake.
1668         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1669         Include lowlevellock.h and pthread-errnos.h.
1670         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1671         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1672         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1673         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1674         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1675         __lll_unlock_wake.
1676         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1677         Include lowlevellock.h.
1678         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1679         Don't define.
1680         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1681         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1682         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1683         __lll_unlock_wake.  Use __NR_gettimeofday.
1684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1685         Include lowlevellock.h.
1686         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1687         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1688         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1689         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1690         and __lll_unlock_wake.
1691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1692         Include lowlevellock.h.
1693         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1694         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1695         MUTEX(%ebx) address in %edx rather than %ecx to
1696         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1697         and __lll_unlock_wake.  Move return value from %ecx to %edx
1698         register.
1699         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1700         Include lowlevellock.h.
1701         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1702         Don't define.
1703         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1704         MUTEX(%ebp) address in %edx rather than %ecx to
1705         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1706         and __lll_unlock_wake.  Move return value from %ecx to %edx
1707         register.  Use __NR_gettimeofday.
1708         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1709         Include lowlevellock.h.
1710         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1711         Don't define.
1712         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1713         MUTEX(%ebp) address in %edx rather than %ecx to
1714         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1715         and __lll_unlock_wake.  Move return value from %ecx to %edx
1716         register.  Use __NR_gettimeofday.
1717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1718         Include lowlevellock.h.
1719         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1720         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1721         MUTEX(%edi) address in %edx rather than %ecx to
1722         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1723         and __lll_unlock_wake.
1724         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1725         Include lowlevellock.h.
1726         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1727         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1728         MUTEX(%ebx) address in %edx rather than %ecx to
1729         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1730         and __lll_unlock_wake.  Move return value from %ecx to %edx
1731         register.
1732         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1733         lowlevellock.h.
1734         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1735         define.
1736         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1737         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1738         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1739         lowlevellock.h.
1740         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1741         (sem_timedwait): Use __NR_gettimeofday.
1742         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1743         lowlevellock.h.
1744         (LOCK): Don't define.
1745         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1746         lowlevellock.h.
1747         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1748         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1749         are waiters.
1750         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1751         2007-05-2{3,9} changes.
1752         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1753         kernel-features.h and lowlevellock.h.
1754         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1755         (LOAD_FUTEX_WAIT): Rewritten.
1756         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1757         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1758         (__lll_mutex_lock_wait): Rename to ...
1759         (__lll_lock_wait): ... this.  %esi is now private argument.
1760         Don't compile in for libc.so.
1761         (__lll_mutex_timedlock_wait): Rename to ...
1762         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1763         Don't compile in for libc.so.
1764         (__lll_mutex_unlock_wake): Rename to ...
1765         (__lll_unlock_wake): ... this.  %esi contains private argument.
1766         Don't compile in for libc.so.
1767         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1768         kernel-features.h and lowlevellock.h.
1769         (LOAD_FUTEX_WAIT): Define.
1770         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1771         (__lll_robust_mutex_lock_wait): Rename to ...
1772         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1773         Use LOAD_FUTEX_WAIT macro.
1774         (__lll_robust_mutex_timedlock_wait): Rename to ...
1775         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1776         private, use LOAD_FUTEX_WAIT macro.
1777         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1778         lowlevellock.h.
1779         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1780         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1781         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1782         __lll_lock_wait and __lll_unlock_wake.
1783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1784         Include lowlevellock.h and pthread-errnos.h.
1785         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1786         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1787         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1788         pass LLL_SHARED in %esi to both __lll_lock_wait and
1789         __lll_unlock_wake.
1790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1791         Include lowlevellock.h and pthread-errnos.h.
1792         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1793         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1794         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1795         pass LLL_SHARED in %esi to both __lll_lock_wait and
1796         __lll_unlock_wake.
1797         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1798         Include lowlevellock.h.
1799         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1800         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1801         pass LLL_SHARED in %esi to both __lll_lock_wait and
1802         __lll_unlock_wake.
1803         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1804         Include lowlevellock.h.
1805         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1806         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1807         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1808         and __lll_unlock_wake.
1809         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1810         Include lowlevellock.h.
1811         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1812         Don't define.
1813         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1814         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1815         and __lll_unlock_wake.
1816         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1817         Include lowlevellock.h.
1818         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1819         Don't define.
1820         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1821         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1822         and __lll_unlock_wake.
1823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1824         Include lowlevellock.h.
1825         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1826         Don't define.
1827         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1828         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1829         and __lll_unlock_wake.
1830         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1831         Include lowlevellock.h.
1832         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1833         Don't define.
1834         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1835         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1836         and __lll_unlock_wake.
1837         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1838         Include lowlevellock.h.
1839         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1840         Don't define.
1841         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1842         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1843         and __lll_unlock_wake.
1844         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1845         lowlevellock.h.
1846         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1847         define.
1848         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1849         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1850         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1851         lowlevellock.h.
1852         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1853         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1854         lowlevellock.h.
1855         (LOCK): Don't define.
1856         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1857         lowlevellock.h.
1858         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1859         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1860         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1861         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1862         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1863         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1864         (__lll_lock_wait_private): New function.
1865         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1866         it to lll_futex_*wait.  Don't compile in for libc.so.
1867         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1868         Remove.
1869         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1870         (struct sparc_pthread_barrier): Remove.
1871         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1872         struct sparc_pthread_barrier.  Pass
1873         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1874         and lll_futex_wait macros.
1875         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1876         Remove.
1877         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1878         Include sparc pthread_barrier_wait.c instead of generic one.
1880 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1882         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1884         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1885         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1886         %ecx.
1887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1888         (pthread_rwlock_timedwrlock): Likewise.
1889         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1890         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1892 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1894         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1896 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1898         * tst-locale2.c (useless): Add return statement.
1900 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1902         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1903         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1904         * pthread_create.c (start_thread): Likewise.
1905         * init.c (sighandler_setxid): Likewise.
1906         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1907         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1908         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1909         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1910         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1911         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1912         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1913         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1914         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1915         Likewise.
1916         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1917         Likewise.
1918         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1919         Likewise.
1920         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1921         __rtld_notify): Likewise.
1922         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1923         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1924         __pthread_once): Likewise.
1925         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1926         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1927         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1928         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1929         (lll_futex_wait): Add private argument, define as wrapper around
1930         lll_futex_timed_wait.
1931         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1932         use __lll_private_flag macro.
1933         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1934         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1935         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1936         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1937         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1938         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1939         (lll_futex_wait): Add private argument, define as wrapper around
1940         lll_futex_timed_wait.
1941         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1942         use __lll_private_flag macro.
1943         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1944         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1945         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1946         Define.
1947         (lll_futex_timed_wait, lll_futex_wake): Use it.
1948         (lll_private_futex_wait, lll_private_futex_timed_wait,
1949         lll_private_futex_wake): Removed.
1950         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1951         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1952         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1953         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1954         (lll_futex_wait): Add private argument, define as wrapper around
1955         lll_futex_timed_wait.
1956         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1957         use __lll_private_flag macro.
1958         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1959         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1960         to lll_futex_*.
1961         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1962         (lll_private_futex_wait, lll_private_futex_timed_wait,
1963         lll_private_futex_wake): Removed.
1964         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1965         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1966         (lll_private_futex_wait, lll_private_futex_timed_wait,
1967         lll_private_futex_wake): Removed.
1968         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1969         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1970         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1971         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1972         (lll_futex_wait): Add private argument, define as wrapper around
1973         lll_futex_timed_wait.
1974         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1975         use __lll_private_flag macro.
1976         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1977         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1978         to lll_futex_*.
1979         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1980         Define.
1981         (lll_futex_timed_wait, lll_futex_wake): Use it.
1982         (lll_private_futex_wait, lll_private_futex_timed_wait,
1983         lll_private_futex_wake): Removed.
1985 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1987         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1988         of the structure for sparc32.
1990 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1992         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1994 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1996         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1997         code used when private futexes are assumed.
1998         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1999         Likewise.
2001 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
2003         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2004         (__lll_private_flag): Define.
2005         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2006         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2007         __lll_private_flag.
2008         (lll_private_futex_wait, lll_private_futex_timedwait,
2009         lll_private_futex_wake): Define as wrapper around non-_private
2010         macros.
2011         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2012         (__lll_private_flag): Define.
2013         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2014         (lll_private_futex_wait, lll_private_futex_timedwait,
2015         lll_private_futex_wake): Define as wrapper around non-_private
2016         macros.
2018 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
2020         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2021         parameter to lll_futex_wait call.
2022         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2024         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2025         Replace lll_futex_wait with lll_private_futex_wait.
2026         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2027         Add LLL_SHARED parameter to lll_futex_wake().
2029         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2030         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2031         lll_private_futex_wake.
2032         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2033         bit from private parm before syscall.
2034         (lll_futex_timed_wait): Likewise.
2035         (lll_futex_wake): Likewise.
2036         (lll_futex_wake_unlock): Likewise.
2037         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2038         (lll_robust_mutex_unlock): Likewise.
2039         (lll_mutex_unlock_force): Likewise.
2040         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2042 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2044         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2045         compilation when unconditionally using private futexes.
2046         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2047         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2048         Likewise.
2049         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2052 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2054         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2055         Define.
2057 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2059         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2060         kernel-features.h.
2062 2007-05-16  Roland McGrath  <roland@redhat.com>
2064         * init.c (__nptl_initial_report_events): New variable.
2065         (__pthread_initialize_minimal_internal): Initialize pd->report_events
2066         to that.
2068 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
2070         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2071         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2073 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2075         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2076         implementation.
2078 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
2080         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2081         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2082         * pthread_mutex_timedlock.c: Likewise.
2083         * pthread_mutex_trylock.c: Likewise.
2084         * pthread_mutex_unlock.c: Likewise.
2086 2007-06-17  Andreas Schwab  <schwab@suse.de>
2088         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2089         sections.
2091 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
2093         * allocatestack.c (allocate_stack): Make code compile if
2094         __ASSUME_PRIVATE_FUTEX is set.
2096 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2098         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2099         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2100         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2101         (__pthread_rwlock_wrlock): Likewise.
2102         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2103         (pthread_rwlock_timedrdlock): Likewise.
2104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2105         (pthread_rwlock_timedwrlock): Likewise.
2106         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2107         (__pthread_rwlock_unlock): Likewise.
2109 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2111         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2112         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2113         Split __flags into __flags, __shared, __pad1 and __pad2.
2114         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2115         futexes if they are available.
2116         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2117         in libc-lowlevellock.S allow using private futexes.
2118         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2119         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
2120         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
2121         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
2122         lll_private_futex_timed_wait and lll_private_futex_wake.
2123         (lll_robust_mutex_unlock): Fix typo.
2124         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2125         field in futex command setup.
2126         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2127         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2128         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2129         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2130         if they are available.  Remove clear_once_control.
2131         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2132         futexes if they are available.
2133         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2134         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2135         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2136         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2137         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2138         Wake only when there are waiters.
2139         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2140         support.  Indicate that there are waiters.  Remove unnecessary
2141         extra cancellation test.
2142         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
2143         left-over duplication of __sem_wait_cleanup.
2145 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
2147         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2148         parameter to lll_futex_wait, lll_futex_timed_wait, and
2149         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
2150         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2151         lll_private_futex_wake.
2152         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2153         * allocatestack.c: Adjust use of lll_futex_* macros.
2154         * init.c: Likewise.
2155         * lowlevellock.h: Likewise.
2156         * pthread_barrier_wait.c: Likewise.
2157         * pthread_cond_broadcast.c: Likewise.
2158         * pthread_cond_destroy.c: Likewise.
2159         * pthread_cond_signal.c: Likewise.
2160         * pthread_cond_timedwait.c: Likewise.
2161         * pthread_cond_wait.c: Likewise.
2162         * pthread_create.c: Likewise.
2163         * pthread_mutex_lock.c: Likewise.
2164         * pthread_mutex_setprioceiling.c: Likewise.
2165         * pthread_mutex_timedlock.c: Likewise.
2166         * pthread_mutex_unlock.c: Likewise.
2167         * pthread_rwlock_timedrdlock.c: Likewise.
2168         * pthread_rwlock_timedwrlock.c: Likewise.
2169         * pthread_rwlock_unlock.c: Likewise.
2170         * sysdeps/alpha/tls.h: Likewise.
2171         * sysdeps/i386/tls.h: Likewise.
2172         * sysdeps/ia64/tls.h: Likewise.
2173         * sysdeps/powerpc/tls.h: Likewise.
2174         * sysdeps/pthread/aio_misc.h: Likewise.
2175         * sysdeps/pthread/gai_misc.h: Likewise.
2176         * sysdeps/s390/tls.h: Likewise.
2177         * sysdeps/sh/tls.h: Likewise.
2178         * sysdeps/sparc/tls.h: Likewise.
2179         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2180         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2181         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2182         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2183         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2184         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2185         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2186         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2187         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2188         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2189         Likewise.
2190         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2191         * sysdeps/x86_64/tls.h: Likewise.
2193 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2195         * pthread_getattr_np.c: No need to install a cancellation handler,
2196         this is no cancellation point.
2197         * pthread_getschedparam.c: Likewise.
2198         * pthread_setschedparam.c: Likewise.
2199         * pthread_setschedprio.c: Likewise.
2200         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2201         lll_unlock_wake_cb.
2202         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2203         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2204         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2205         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2206         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2207         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2208         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2209         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2210         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2211         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2212         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2213         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2215         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2216         whether there are more than one thread makes no sense here since
2217         we only call the slow path if the locks are taken.
2218         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2220         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2221         COND_NWAITERS_SHIFT.
2222         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2223         COND_CLOCK_BITS.
2224         * pthread_cond_init.c: Likewise.
2225         * pthread_cond_timedwait.c: Likewise.
2226         * pthread_cond_wait.c: Likewise.
2227         * pthread_condattr_getclock.c: Likewise.
2228         * pthread_condattr_setclock.c: Likewise.
2229         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2230         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2231         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2235 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2237         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2238         unistd.h.
2240         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2241         insn suffix.
2242         (THREAD_GSCOPE_GET_FLAG): Remove.
2243         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2244         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2245         changes.
2246         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2247         (THREAD_GSCOPE_GET_FLAG): Remove.
2248         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2249         instead of THREAD_GSCOPE_GET_FLAG.
2250         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2251         it.
2252         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2253         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2254         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2255         THREAD_GSCOPE_WAIT): Define.
2256         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2257         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2258         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2259         THREAD_GSCOPE_WAIT): Define.
2260         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2261         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2262         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2263         THREAD_GSCOPE_WAIT): Define.
2264         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2265         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2266         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2267         THREAD_GSCOPE_WAIT): Define.
2269 2007-05-24  Richard Henderson  <rth@redhat.com>
2271         * descr.h (struct pthread): Add header.gscope_flag.
2272         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2273         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2274         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2275         THREAD_GSCOPE_WAIT): Define.
2277 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2279         * init.c: Make it compile with older kernel headers.
2281         * tst-initializers1.c: Show through exit code which test failed.
2283         * pthread_rwlock_init.c: Also initialize __shared field.
2284         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2285         element in rwlock structure into four byte elements.  One of them is
2286         the new __shared element.
2287         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2288         Likewise.
2289         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2290         __shared, adjust names of other padding elements.
2291         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2292         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2293         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2294         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2295         FUTEX_PRIVATE_FLAG.
2296         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2297         futex to use private operations if possible.
2298         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2299         Likewise.
2300         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2301         Likewise.
2302         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2303         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2304         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2305         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2306         Likewise.
2307         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2308         Likewise.
2309         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2312 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2314         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2315         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2316         * pthread_rwlock_timedrdlock.c: Likewise.
2317         * pthread_rwlock_tryrdlock.c: Likewise.
2319         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2320         optimization.
2322         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2323         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2324         duplication of __sem_wait_cleanup.
2326         * allocatestack.c: Revert last change.
2327         * init.c: Likewise.
2328         * sysdeps/i386/tls.h: Likewise.
2329         * sysdeps/x86_64/tls.h: Likewise.
2330         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2331         header structure.
2332         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2334         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2335         Add private field.
2336         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2337         * pthread_barrier_init.c: Set private flag if pshared and private
2338         futexes are supported.
2339         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2340         private field in futex command setup.
2341         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2343 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2345         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2346         support.
2347         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2348         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2349         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2350         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2351         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2353         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2354         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2355         fields in the structure.
2356         (__old_sem_init): New function.
2357         * sem_open.c: Initialize all fields of the structure.
2358         * sem_getvalue.c: Adjust for renamed element.
2359         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2360         (gen-as-const-headers): Add structsem.sym.
2361         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2362         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2363         struct new_sem.  Add struct old_sem.
2364         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2365         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2366         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2367         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2368         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2369         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2370         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2371         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2372         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2373         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2374         * tst-sem10.c: New file.
2375         * tst-sem11.c: New file.
2376         * tst-sem12.c: New file.
2377         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2378         of struct sem.
2380 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2381             Jakub Jelinek  <jakub@redhat.com>
2383         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2384         Move __pthread_enable_asynccancel right before futex syscall.
2385         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2386         Likewise.
2388 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2390         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2391         THREAD_COPY_PRIVATE_FUTEX): Define.
2392         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2393         THREAD_COPY_PRIVATE_FUTEX): Define.
2394         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2395         * init.c (__pthread_initialize_minimal_internal): Use
2396         THREAD_SET_PRIVATE_FUTEX.
2398         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2399         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2400         THREAD_GSCOPE_FLAG_WAIT): Define.
2401         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2402         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2403         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2404         PTR_DEMANGLE.
2405         (THREAD_GSCOPE_GET_FLAG): Define.
2406         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2407         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2408         instead of ->header.gscope_flag directly.
2410 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2412         * init.c (__pthread_initialize_minimal_internal): Check whether
2413         private futexes are available.
2414         * allocatestack.c (allocate_stack): Copy private_futex field from
2415         current thread into the new stack.
2416         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2417         futexes if they are available.
2418         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2419         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2420         in libc-lowlevellock.S allow using private futexes.
2421         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2422         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2423         FUTEX_PRIVATE_FLAG.
2424         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2425         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2426         if they are available.
2427         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2428         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2429         * sysdeps/i386/tcb-offsets.sym: Likewise.
2430         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2431         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2433 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2435         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2436         Remove ptr_wait_lookup_done again.
2437         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2438         (__pthread_initialize_minimal_internal): Initialize
2439         _dl_wait_lookup_done pointer in _rtld_global directly.
2440         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2441         Remove code to code _dl_wait_lookup_done.
2442         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2443         encrypted for now.
2445 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2447         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2448         pthread_mutex_init failed with ENOTSUP.
2450 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2452         * allocatestack.c (__wait_lookup_done): New function.
2453         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2454         Add ptr_wait_lookup_done.
2455         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2456         * pthreadP.h: Declare __wait_lookup_done.
2457         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2458         Define macros to implement reference handling of global scope.
2459         * sysdeps/x86_64/tls.h: Likewise.
2460         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2461         Initialize GL(dl_wait_lookup_done).
2463 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2465         [BZ #4512]
2466         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2467         is detected.
2468         * pthread_mutex_timedlock.c: Likewise.
2469         * pthread_mutex_trylock.c: Likewise.
2470         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2472         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2473         * tst-robust9.c: New file.
2474         * tst-robustpi9.c: New file.
2476         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2477         unnecessary extra cancellation test.
2479 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2481         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2482         extra cancellation test.
2483         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2485 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2487         * descr.h (struct pthread): Rearrange members to fill hole in
2488         64-bit layout.
2490         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2491         (__pthread_setaffinity_new): If syscall was successful and
2492         RESET_VGETCPU_CACHE is defined, use it before returning.
2493         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2495 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2497         [BZ #4455]
2498         * tst-align2.c: Include stackinfo.h.
2499         * tst-getpid1.c: Likewise.
2501 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2503         [BZ #4455]
2504         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2505         * tst-getpid1.c (do_test): Likewise.
2507         [BZ #4456]
2508         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2509         (allocate_stack): Likewise.
2511 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2513         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2514         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2515         (__lll_robust_timedlock_wait): Likewise.
2516         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2518 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2520         [BZ #4465]
2521         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2522         * tst-cancel4.c (tf_fdatasync): New test.
2524 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2526         [BZ #4392]
2527         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2528         check mutexes like normal mutexes.
2530         [BZ #4306]
2531         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2532         Initialize the whole sigevent structure to appease valgrind.
2534 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2536         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2537         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2539 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2541         * tst-locale1.c: Avoid warnings.
2542         * tst-locale2.c: Likewise.
2544 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2546         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2547         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2549 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2551         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2552         __extern_always_inline where appropriate.
2553         * sysdeps/pthread/pthread.h: Likewise.
2555 2007-03-13  Richard Henderson  <rth@redhat.com>
2557         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2558         separate cfi regions for the two subsections.
2560 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2562         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2563         new thread, don't just decrement it.
2564         Patch by Suzuki K P <suzuki@in.ibm.com>.
2566 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2568         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2569         PTHFCT_CALL definition.
2571 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2573         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2574         available, don't use it.
2576 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2578         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2579         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2580         call into the kernel to delay.
2582 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2584         * tst-initializers1.c: We want to test the initializers as seen
2585         outside of libc, so undefined _LIBC.
2587         * pthread_join.c (cleanup): Avoid warning.
2589 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2591         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2592         (__lll_timedwait_tid): Add unwind info.
2594         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2595         function table, mangle the pointers.
2596         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2597         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2598         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2599         demangle pointers before use.
2600         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2601         demangle pointer.
2602         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2603         * sysdeps/pthread/setxid.h: Likewise.
2605 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2607         * tst-rwlock7.c: Show some more information in case of correct
2608         behavior.
2610 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2612         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2613         (lll_futex_timed_wait): Undo part of last change, don't negate
2614         return value.
2616 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2618         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2619         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2621 2006-12-28  David S. Miller  <davem@davemloft.net>
2623         * shlib-versions: Fix sparc64 linux target specification.
2625 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2627         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2628         Adjust include path for pthread_barrier_wait.c move.
2630 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2632         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2633         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2635 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2637         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2638         6 argument cancellable syscalls.
2639         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2640         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2641         6 argument cancellable syscalls.
2642         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2644 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2646         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2647         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2649 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2651         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2652         __sync_lock_release instead of __sync_lock_release_si.
2654 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2656         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2657         Define.
2658         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2659         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2660         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2661         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2662         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2663         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2664         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2665         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2666         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2667         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2668         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2670 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2672         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2673         * pthread_barrier_wait.c: ...here.
2674         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2675         * pthread_cond_broadcast.c: ...here.
2676         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2677         * pthread_cond_signal.c: ...here.
2678         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2679         * pthread_cond_timedwait.c: ...here.
2680         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2681         * pthread_cond_wait.c: ...here.
2682         * sysdeps/pthread/pthread_once.c: Move to...
2683         * pthread_once.c: ...here.
2684         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2685         * pthread_rwlock_rdlock.c: ...here.
2686         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2687         * pthread_rwlock_timedrdlock.c: ...here.
2688         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2689         * pthread_rwlock_timedwrlock.c: ...here.
2690         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2691         * pthread_rwlock_unlock.c: ...here.
2692         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2693         * pthread_rwlock_wrlock.c: ...here.
2694         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2695         * pthread_spin_destroy.c: ...here.
2696         * sysdeps/pthread/pthread_spin_init.c: Move to...
2697         * pthread_spin_init.c: ...here.
2698         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2699         * pthread_spin_unlock.c: ...here.
2700         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2701         * pthread_getcpuclockid.c: ...here.
2703         * init.c: USE_TLS support is now always enabled.
2704         * tst-tls5.h: Likewise.
2705         * sysdeps/alpha/tls.h: Likewise.
2706         * sysdeps/i386/tls.h: Likewise.
2707         * sysdeps/ia64/tls.h: Likewise.
2708         * sysdeps/powerpc/tls.h: Likewise.
2709         * sysdeps/s390/tls.h: Likewise.
2710         * sysdeps/sh/tls.h: Likewise.
2711         * sysdeps/sparc/tls.h: Likewise.
2712         * sysdeps/x86_64/tls.h: Likewise.
2714 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2716         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2717         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2718         failed.
2720         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2721         Define to THREAD_SELF->header.multiple_threads.
2722         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2723         Likewise.
2724         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2725         Likewise.
2726         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2727         (SINGLE_THREAD_P): Likewise.
2728         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2729         (SINGLE_THREAD_P): Likewise.
2730         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2731         (SINGLE_THREAD_P): Likewise.
2732         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2733         (SINGLE_THREAD_P): Likewise.
2734         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2735         Likewise.
2736         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2737         (SINGLE_THREAD_P): Likewise.
2738         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2739         (SINGLE_THREAD_P): Likewise.
2740         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2741         Likewise.
2743 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2745         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2746         by default rather than 2_3_3.
2748 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2750         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2751         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2752         atomic_* instead of catomic_* macros.
2754 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2756         [BZ #3285]
2757         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2758         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2759         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2760         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2761         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2762         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2763         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2764         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2765         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2766         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2767         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2768         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2769         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2771 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2773         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2774         cancelable syscalls with six parameters.
2776         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2777         operations instead of atomic_*.
2779 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2781         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2783 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2785         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2786         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2787         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2788         New file.
2789         * pthread_attr_setstack.c: Allow overwriting the version number of the
2790         new symbol.
2791         * pthread_attr_setstacksize.c: Likewise.
2792         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2793         it.
2794         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2795         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2797 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2799         [BZ #3251]
2800         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2801         Patch by Petr Baudis.
2803 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2805         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2807         * tst-cancel2.c (tf): Loop as long as something was written.
2809 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2811         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2812         mutexes wake all mutexes.
2813         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2814         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2815         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2817 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2819         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2820         to guarantee the thread is always canceled.
2822 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2824         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2825         Include stdlib.h.
2826         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2827         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2828         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2832 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2834         [BZ #3123]
2835         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2836         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2837         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2839         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2840         * Makefile (tests): Add tst-cond22.
2841         * tst-cond22.c: New file.
2843 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2845         [BZ #3124]
2846         * descr.h (struct pthread): Add parent_cancelhandling.
2847         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2848         cancelhandling value to child.
2849         * pthread_create.c (start_thread): If parent thread was canceled
2850         reset the SIGCANCEL mask.
2851         * Makefile (tests): Add tst-cancel25.
2852         * tst-cancel25.c: New file.
2854 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2855             Ulrich Drepper  <drepper@redhat.com>
2857         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2858         counterp if it is already zero.
2859         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2861 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2862             Roland McGrath  <roland@redhat.com>
2864         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2865         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2866         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2867         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2868         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2869         lll_robust_mutex_timedlock, lll_mutex_unlock,
2870         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2871         Add _L_*_ symbols around the subsection.
2872         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2873         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2875 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2876             Roland McGrath  <roland@redhat.com>
2878         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2879         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2880         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2881         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2882         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2883         lll_robust_mutex_timedlock, lll_mutex_unlock,
2884         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2885         Add _L_*_ symbols around the subsection.
2886         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2887         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2889 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2891         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2892         change because it can disturb too much existing code.  If real hard
2893         reader preference is needed we'll introduce another type.
2894         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2895         (pthread_rwlock_timedwrlock): Likewise.
2896         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2897         Likewise.
2899 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2901         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2902         reader preference.
2903         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2904         (pthread_rwlock_timedwrlock): Likewise.
2905         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2906         Likewise.
2908 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2910         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2911         Only define ifdef SHARED.
2913 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2915         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2916         (free_stacks): ...here.
2917         (__free_stack_cache): New function.
2918         * pthreadP.h: Declare __free_stack_cache.
2919         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2920         ptr_freeres.
2921         * init.c (pthread_functions): Initialize ptr_freeres.
2922         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2923         New freeres function.
2925 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2927         [BZ #3018]
2928         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2930 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2932         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2933         _XOPEN_REALTIME_THREADS.
2935 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2937         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2938         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2939         HAVE_CLOCK_GETTIME_VSYSCALL.
2940         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2942 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2944         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2945         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2946         * descr.h (struct priority_protection_data): New type.
2947         (struct pthread): Add tpp field.
2948         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2949         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2950         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2951         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2952         TPP mutexes.
2953         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2954         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2955         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2956         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2957         * tpp.c: New file.
2958         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2959         boosted by TPP.
2960         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2961         * pthread_mutexattr_getprioceiling.c
2962         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2963         in the SCHED_FIFO priority range.
2964         * pthread_mutexattr_setprioceiling.c
2965         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2966         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2967         if mutex is not TPP.  Ceiling is now in __data.__lock.
2968         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2969         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2970         is now in __data.__lock.  Add locking.
2971         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2972         * Makefile (libpthread-routines): Add tpp.
2973         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2974         * tst-tpp.h: New file.
2975         * tst-mutexpp1.c: New file.
2976         * tst-mutexpp6.c: New file.
2977         * tst-mutexpp10.c: New file.
2978         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2979         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2981 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2983         [BZ #2843]
2984         * pthread_join.c (pthread_join): Account for self being canceled
2985         when checking for deadlocks.
2986         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2987         (tf1): Don't print anything after pthread_join returns, this would be
2988         another cancellation point.
2989         (tf2): Likewise.
2990         * tst-join6.c: New file.
2991         * Makefile (tests): Add tst-join6.
2993 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2995         [BZ #2892]
2996         * pthread_setspecific.c (__pthread_setspecific): Check
2997         out-of-range index before checking for unused key.
2999         * sysdeps/pthread/gai_misc.h: New file.
3001 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
3003         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
3004         file.  Don't use sysctl.
3005         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
3006         overwrite the file if this is likely not true.
3008 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
3010         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3011         * Makefile (tests): Add tst-getpid3.
3012         * tst-getpid3.c: New file.
3014 2006-07-30  Roland McGrath  <roland@redhat.com>
3016         * Makefile (libpthread-routines): Add ptw-sigsuspend.
3018         * sysdeps/unix/sysv/linux/i386/not-cancel.h
3019         (pause_not_cancel): New macro.
3020         (nanosleep_not_cancel): New macro.
3021         (sigsuspend_not_cancel): New macro.
3022         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3023         nanosleep_not_cancel macro from <not-cancel.h>.
3024         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3025         macro from <not-cancel.h>.
3027 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
3028             Jakub Jelinek  <jakub@redhat.com>
3030         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3031         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
3032         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3033         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3034         * pthread_mutex_init.c: Add support for priority inheritance mutex.
3035         * pthread_mutex_lock.c: Likewise.
3036         * pthread_mutex_timedlock.c: Likewise.
3037         * pthread_mutex_trylock.c: Likewise.
3038         * pthread_mutex_unlock.c: Likewise.
3039         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3040         all mutexes.
3041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3042         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3043         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3044         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3045         pthread-pi-defines.sym.
3046         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3047         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3048         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3049         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3050         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3051         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3052         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3053         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3054         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3055         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3056         _POSIX_THREAD_PRIO_INHERIT to 200112L.
3057         * tst-mutex1.c: Adjust to allow use in PI mutex test.
3058         * tst-mutex2.c: Likewise.
3059         * tst-mutex3.c: Likewise.
3060         * tst-mutex4.c: Likewise.
3061         * tst-mutex5.c: Likewise.
3062         * tst-mutex6.c: Likewise.
3063         * tst-mutex7.c: Likewise.
3064         * tst-mutex7a.c: Likewise.
3065         * tst-mutex8.c: Likewise.
3066         * tst-mutex9.c: Likewise.
3067         * tst-robust1.c: Likewise.
3068         * tst-robust7.c: Likewise.
3069         * tst-robust8.c: Likewise.
3070         * tst-mutexpi1.c: New file.
3071         * tst-mutexpi2.c: New file.
3072         * tst-mutexpi3.c: New file.
3073         * tst-mutexpi4.c: New file.
3074         * tst-mutexpi5.c: New file.
3075         * tst-mutexpi6.c: New file.
3076         * tst-mutexpi7.c: New file.
3077         * tst-mutexpi7a.c: New file.
3078         * tst-mutexpi8.c: New file.
3079         * tst-mutexpi9.c: New file.
3080         * tst-robust1.c: New file.
3081         * tst-robust2.c: New file.
3082         * tst-robust3.c: New file.
3083         * tst-robust4.c: New file.
3084         * tst-robust5.c: New file.
3085         * tst-robust6.c: New file.
3086         * tst-robust7.c: New file.
3087         * tst-robust8.c: New file.
3088         * Makefile (tests): Add the new tests.
3090         * pthread_create.c (start_thread): Add some casts to avoid warnings.
3091         * pthread_mutex_destroy.c: Remove unneeded label.
3093 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
3095         * pthread_mutex_init.c (__pthread_mutex_init): Move some
3096         computations to compile time.
3098 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3100         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3102 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
3104         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3106 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
3108         * pthread_key_create.c (__pthread_key_create): Do away with
3109         __pthread_keys_lock.
3111         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3112         (__kernel_cpumask_size): Mark as hidden.
3113         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3115         * sem_open.c (__sem_mappings_lock): Mark as hidden.
3116         * semaphoreP.h (__sem_mappings_lock): Likewise.
3118 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
3120         * pthread_atfork.c: Mark __dso_handle as hidden.
3122 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
3124         [BZ #2644]
3125         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3126         the reload problem.  Change the one path in pthread_cancel_init
3127         which causes the problem.  Force gcc to reload.  Simplify callers.
3128         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3129         (_Unwind_GetBSP): Undo last patch.
3131 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
3133         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3134         function pointer is reloaded after pthread_cancel_init calls.
3136         [BZ #2644]
3137         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3138         pointers are reloaded after pthread_cancel_init calls.
3140 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
3142         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3143         __always_inline.
3145 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
3147         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3148         Allocate new object which is passed to timer_sigev_thread so that
3149         the timer can be deleted before the new thread is scheduled.
3151 2006-04-26  Roland McGrath  <roland@redhat.com>
3153         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3155 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
3157         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3158         suffix for conditional jumps.
3159         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3160         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3161         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3162         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3163         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3164         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3166         * init.c (sigcancel_handler): Compare with correct PID even if the
3167         thread is in the middle of a fork call.
3168         (sighandler_setxid): Likewise.
3169         Reported by Suzuki K P <suzuki@in.ibm.com> .
3171 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
3173         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3175 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
3177         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3178         fails [Coverity CID 105].
3180 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3182         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3184 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3186         [BZ #2505]
3187         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3188         Define __lll_rel_instr using lwsync.
3190 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3192         * allocatestack.c (allocate_stack): Always initialize robust_head.
3193         * descr.h: Define struct robust_list_head.
3194         (struct pthread): Use robust_list_head in robust mutex list definition.
3195         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3196         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3197         (__pthread_initialize_minimal_internal): Register robust_list with
3198         the kernel.
3199         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3200         Declare __set_robust_list_avail.
3201         * pthread_create.c (start_thread): Register robust_list of new thread.
3202         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3203         waiters.
3204         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3205         number of users, it's unreliable.
3206         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3207         set_robust_list syscall is available.
3208         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3209         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3210         Set robust_head.list_op_pending before trying to lock a robust mutex.
3211         * pthread_mutex_timedlock.c: Likewise.
3212         * pthread_mutex_trylock.c: Likewise.
3213         * pthread_mutex_unlock.c: Likewise for unlocking.
3214         * Makefile (tests): Add tst-robust8.
3215         * tst-robust8.c: New file.
3217 2006-03-08  Andreas Schwab  <schwab@suse.de>
3219         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3220         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3222 2006-03-05  Roland McGrath  <roland@redhat.com>
3224         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3225         and $config_os doesn't match *linux*.
3227 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3229         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3230         Use __syscall_error.
3231         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3232         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3233         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3234         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3235         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3236         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3238 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3240         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3242 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3244         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3245         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3246         mutex.
3247         (__lll_robust_timedlock_wait): Likewise.
3248         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3249         (__lll_robust_lock_wait): Likewise.
3250         (__lll_robust_timedlock_wait): Likewise.
3251         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3252         (__lll_robust_lock_wait): Likewise.
3253         (__lll_robust_timedlock_wait): Likewise.
3255 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3257         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3258         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3259         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3260         lll_robust_mutex_unlock): Define.
3261         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3263 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3265         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3266         instead of <clone.S>.
3268 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3270         * Makefile (libpthread-routines): Add
3271         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3272         and pthread_mutex_[sg]etprioceiling.
3273         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3274         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3275         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3276         pthread_mutex_setprioceiling.
3277         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3278         PTHREAD_PRIO_PROTECT): New enum values.
3279         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3280         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3281         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3282         prototypes.
3283         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3284         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3285         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3286         Define.
3287         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3288         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3289         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3290         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3291         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3292         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3293         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3294         protocol mutexes.
3295         * pthread_mutex_getprioceiling.c: New file.
3296         * pthread_mutex_setprioceiling.c: New file.
3297         * pthread_mutexattr_getprioceiling.c: New file.
3298         * pthread_mutexattr_setprioceiling.c: New file.
3299         * pthread_mutexattr_getprotocol.c: New file.
3300         * pthread_mutexattr_setprotocol.c: New file.
3302 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3304         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3306 2006-02-27  Roland McGrath  <roland@redhat.com>
3308         * sysdeps/pthread/Subdirs: List nptl here too.
3309         * configure (libc_add_on_canonical): New variable.
3311         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3313         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3314         self to get main source tree's file.
3315         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3316         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3317         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3318         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3319         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3320         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3321         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3322         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3323         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3324         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3325         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3326         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3327         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3329         * Makefile: Use $(sysdirs) in vpath directive.
3331         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3332         (CPPFLAGS-timer_routines.c): Likewise.
3334         * Makeconfig (includes): Variable removed.
3336 2006-02-26  Roland McGrath  <roland@redhat.com>
3338         * sysdeps/generic/pt-raise.c: Moved to ...
3339         * pt-raise.c: ... here.
3340         * sysdeps/generic/lowlevellock.h: Moved to ...
3341         * lowlevellock.h: ... here.
3343 2006-02-23  Roland McGrath  <roland@redhat.com>
3345         * descr.h (struct pthread): Add final member `end_padding'.
3346         (PTHREAD_STRUCT_END_PADDING): Use it.
3348 2006-02-20  Roland McGrath  <roland@redhat.com>
3350         * sysdeps/mips: Directory removed, saved in ports repository.
3351         * sysdeps/unix/sysv/linux/mips: Likewise.
3353 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3355         * tst-robust1.c: Add second mutex to check that the mutex list is
3356         handled correctly.
3358 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3360         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3361         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3362         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3363         lll_robust_mutex_unlock): New macros.
3364         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3365         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3366         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3367         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3368         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3370 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3372         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3373         definitions.
3374         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3376 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3378         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3379         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3380         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3381         (lll_robust_mutex_unlock): Likewise.
3383 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3385         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3386         Set robust_list.__next rather than robust_list.
3387         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3388         (__pthread_list_t): New typedef.
3389         (pthread_mutex_t): Replace __next and __prev fields with __list.
3390         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3391         (__pthread_list_t): New typedef.
3392         (pthread_mutex_t): Replace __next and __prev fields with __list.
3393         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3394         (__pthread_list_t, __pthread_slist_t): New typedefs.
3395         (pthread_mutex_t): Replace __next and __prev fields with __list.
3396         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3397         (__pthread_list_t, __pthread_slist_t): New typedefs.
3398         (pthread_mutex_t): Replace __next and __prev fields with __list.
3399         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3400         (__pthread_list_t, __pthread_slist_t): New typedefs.
3401         (pthread_mutex_t): Replace __next and __prev fields with __list.
3402         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3403         (__pthread_slist_t): New typedef.
3404         (pthread_mutex_t): Replace __next field with __list.
3406 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3408         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3409         PTHREAD_MUTEX_OWNERDEAD.
3410         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3411         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3412         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3413         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3414         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3415         to PTHREAD_MUTEX_INCONSISTENT.
3416         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3417         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3418         * pthread_mutex_trylock.c: Likewise.
3419         * pthread_mutex_timedlock.c: Likewise.
3420         * pthread_mutex_unlock.c: Likewise.
3421         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3422         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3423         lowlevelrobustlock.sym.
3424         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3425         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3426         definitions.
3427         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3428         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3429         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3430         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3431         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3433 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3435         * allocatestack.c (allocate_stack): Initialize robust_list.
3436         * init.c (__pthread_initialize_minimal_internal): Likewise.
3437         * descr.h (struct xid_command): Pretty printing.
3438         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3439         robust_list.  Adjust macros.
3440         * pthread_create.c (start_thread): Adjust robust_list handling.
3441         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3442         but the owner for all robust mutex types.
3443         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3444         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3445         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3446         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3448         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3449         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3451 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3453         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3454         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3456 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3458         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3459         Return status.
3460         (lll_futex_timed_wait): Define.
3462 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3464         * tst-cancel4.c: Test ppoll.
3466 2006-01-18  Andreas Jaeger  <aj@suse.de>
3468         [BZ #2167]
3469         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3470         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3471         by Jim Gifford <patches@jg555.com>.
3473 2006-01-13  Richard Henderson  <rth@redhat.com>
3475         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3477 2006-01-10  Roland McGrath  <roland@redhat.com>
3479         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3480         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3481         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3482         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3483         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3484         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3485         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3486         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3487         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3488         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3490 2006-01-09  Roland McGrath  <roland@redhat.com>
3492         * tst-initializers1-c89.c: New file.
3493         * tst-initializers1-c99.c: New file.
3494         * tst-initializers1-gnu89.c: New file.
3495         * tst-initializers1-gnu99.c: New file.
3496         * Makefile (tests): Add them.
3497         (CFLAGS-tst-initializers1-c89.c): New variable.
3498         (CFLAGS-tst-initializers1-c99.c): New variable.
3499         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3500         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3502         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3503         Use __extension__ on anonymous union definition.
3504         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3505         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3506         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3507         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3508         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3510 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3512         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3513         Don't give the union a name because it changes the mangled name.
3514         Instead name the struct for __data.
3515         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3516         Likewise.
3517         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3518         Likewise.
3520 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3522         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3523         stack bias to mc_ftp field.
3525 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3527         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3528         being too clever and reloading the futex value where it shouldn't.
3530 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3532         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3533         correct type.
3535 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3537         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3538         Add cfi directives.
3540 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3542         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3543         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3544         rename in tcbhead_t.
3546         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3547         Don't give the union a name because it changes the mangled name.
3548         Instead name the struct for __data.
3549         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3550         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3551         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3552         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3553         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3554         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3556 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3558         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3559         Return status.
3560         (lll_futex_timed_wait): Define.
3561         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3562         * sysdeps/pthread/aio_misc.h: New file.
3564 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3566         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3568 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3570         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3571         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3572         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3574 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3576         * tst-cancel24.cc: Use C headers instead of C++ headers.
3578 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3580         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3581         sparc-linux configured glibc.
3582         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3583         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3584         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3585         atomic_compare_and_exchange_val_24_acq instead of
3586         atomic_compare_and_exchange_val_acq.
3587         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3588         instead of atomic_exchange_rel.
3589         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3590         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3591         file.
3592         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3593         file.
3594         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3595         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3596         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3597         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3598         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3599         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3600         New file.
3601         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3602         New file.
3603         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3604         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3605         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3606         file.
3607         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3608         file.
3609         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3611 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3613         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3614         mutex initializers.
3616 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3618         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3619         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3620         THREAD_COPY_POINTER_GUARD): Define.
3621         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3622         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3624 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3626         * version.c: Update copyright year.
3628 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3630         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3631         .eh_frame section, use cfi_* directives.
3632         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3634 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3636         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3637         now.
3639 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3641         * sysdeps/pthread/sigaction.c: Removed.
3642         * sigaction.c: New file.
3643         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3645 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3647         * Makefile (tests): Add tst-signal7.
3648         * tst-signal7.c: New file.
3650 2005-12-27  Roland McGrath  <roland@redhat.com>
3652         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3653         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3654         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3655         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3656         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3657         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3658         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3659         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3660         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3661         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3662         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3664 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3666         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3667         and __prev field to pthread_mutex_t.
3668         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3669         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3670         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3671         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3672         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3673         to pthread_mutex_t.
3675 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3677         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3678         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3679         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3680         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3681         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3682         and PTHREAD_MUTEXATTR_FLAG_BITS.
3683         * descr.h (struct pthread): Add robust_list field and define
3684         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3685         * pthread_mutexattr_getrobust.c: New file.
3686         * pthread_mutexattr_setrobust.c: New file.
3687         * pthread_mutex_consistent.c: New file.
3688         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3689         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3690         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3691         Adjust pthread_mutex_t initializers.
3692         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3693         field to pthread_mutex_t.
3694         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3695         and __prev field to pthread_mutex_t.
3696         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3697         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3698         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3699         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3700         * pthread_mutexattr_gettype.c: Likewise.
3701         * pthread_mutexattr_setpshared.c: Likewise.
3702         * pthread_mutexattr_settype.c: Likewise.
3703         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3704         Initialize mutex kind according to robust flag.
3705         * pthread_mutex_lock.c: Implement local robust mutex.
3706         * pthread_mutex_timedlock.c: Likewise.
3707         * pthread_mutex_trylock.c: Likewise.
3708         * pthread_mutex_unlock.c: Likewise.
3709         * pthread_create.c (start_thread): Mark robust mutexes which remained
3710         locked as dead.
3711         * tst-robust1.c: New file.
3712         * tst-robust2.c: New file.
3713         * tst-robust3.c: New file.
3714         * tst-robust4.c: New file.
3715         * tst-robust5.c: New file.
3716         * tst-robust6.c: New file.
3717         * tst-robust7.c: New file.
3718         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3719         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3720         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3721         tst-robust5, tst-robust6, and tst-robust7.
3723         * tst-typesizes.c: New file.
3724         * Makefile (tests): Add tst-typesizes.
3726         * tst-once3.c: More debug output.
3728 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3730         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3731         missing after last change.
3733         * version.c: Update copyright year.
3735 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3737         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3738         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3739         * pthread_mutex_trylock.c: Likewise.
3740         * pthread_mutex_timedlock.c: Likewise.
3741         * pthread_mutex_unlock.c: Likewise.
3743 2005-12-22  Roland McGrath  <roland@redhat.com>
3745         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3746         so that #include_next's search location is not reset to the -I..
3747         directory where <nptl/...> can be found.
3749 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3751         [BZ #1913]
3752         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3753         Fix unwind info.  Remove useless branch prediction prefix.
3754         * tst-cancel24.cc: New file.
3755         * Makefile: Add rules to build and run tst-cancel24.
3757 2005-12-21  Roland McGrath  <roland@redhat.com>
3759         * libc-cancellation.c: Use <> rather than "" #includes.
3760         * pt-cleanup.c: Likewise.
3761         * pthread_create.c: Likewise.
3762         * pthread_join.c: Likewise.
3763         * pthread_timedjoin.c: Likewise.
3764         * pthread_tryjoin.c: Likewise.
3765         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3766         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3767         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3768         * unwind.c: Likewise.
3770 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3772         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3773         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3774         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3775         THREAD_COPY_POINTER_GUARD): Define.
3777 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3779         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3780         rather than one.
3781         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3782         THREAD_COPY_POINTER_GUARD): Define.
3783         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3784         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3785         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3786         THREAD_COPY_POINTER_GUARD): Define.
3787         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3788         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3789         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3790         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3791         Use PTR_DEMANGLE for B0 if defined.
3793 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3795         * pthread_create.c (__pthread_create_2_1): Use
3796         THREAD_COPY_POINTER_GUARD if available.
3797         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3798         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3799         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3800         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3801         * sysdeps/x86_64/tls.h: Likewise.
3803 2005-12-15  Roland McGrath  <roland@redhat.com>
3805         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3807 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3809         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3810         sysdeps/generic.
3811         * errno-loc.c: New file.
3813 2005-12-12  Roland McGrath  <roland@redhat.com>
3815         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3816         adjustments before choosing stack size.  Update minimum stack size
3817         calculation to match allocate_stack change.
3819 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3821         * allocatestack.c (allocate_stack): Don't demand that there is an
3822         additional full page available on the stack beside guard, TLS, the
3823         minimum stack.
3825 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3827         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3828         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3830         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3831         compiling 32-bit code we must define __cleanup_fct_attribute.
3833 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3835         [BZ #1920]
3836         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3837         __attribute__ instead of __attribute.
3838         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3839         (__cleanup_fct_attribute): Likewise.
3841 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3843         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3844         a write barrier before writing libgcc_s_getcfa.
3846 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3848         * sysdeps/unix/sysv/linux/configure: Removed.
3850 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3852         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3853         optional init_array/fini_array support.
3855 2005-10-24  Roland McGrath  <roland@redhat.com>
3857         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3858         versioned_symbol use.
3860 2005-10-16  Roland McGrath  <roland@redhat.com>
3862         * init.c (__pthread_initialize_minimal_internal): Even when using a
3863         compile-time default stack size, apply the minimum that allocate_stack
3864         will require, and round up to page size.
3866 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3868         * Makefile ($(test-modules)): Remove static pattern rule.
3870 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3871             Ulrich Drepper  <drepper@redhat.com>
3873         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3874         alignment in callback function.
3875         * Makefile: Add rules to build and run tst-align3.
3876         * tst-align3.c: New file.
3878 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3880         * allocatestack.c (setxid_signal_thread): Add
3881         INTERNAL_SYSCALL_DECL (err).
3883 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3885         * allocatestack.c (setxid_signal_thread): Need to use
3886         atomic_compare_and_exchange_bool_acq.
3888 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3889             Jakub Jelinek  <jakub@redhat.com>
3891         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3892         CANCEL_RESTMASK.
3893         (struct pthread): Move specific_used field to avoid padding.
3894         Add setxid_futex field.
3895         * init.c (sighandler_setxid): Reset setxid flag and release the
3896         setxid futex.
3897         * allocatestack.c (setxid_signal_thread): New function.  Broken
3898         out of the bodies of the two loops in __nptl_setxid.  For undetached
3899         threads check whether they are exiting and if yes, don't send a signal.
3900         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3901         * pthread_create.c (start_thread): For undetached threads, check
3902         whether setxid bit is set.  If yes, wait until signal has been
3903         processed.
3905         * allocatestack.c (STACK_VARIABLES): Initialize them.
3906         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3908 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3910         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3911         waiters, awake all waiters on the associated mutex.
3913 2005-09-22  Roland McGrath  <roland@redhat.com>
3915         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3916         ../sysdeps/x86_64/hp-timing.h).
3918 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3920         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3921         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3922         (lll_futex_wake_unlock): Define.
3923         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3924         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3925         (lll_futex_wake_unlock): Define.
3926         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3927         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3928         (lll_futex_wake_unlock): Define.
3929         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3930         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3931         (lll_futex_wake_unlock): Define.
3932         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3933         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3934         (lll_futex_wake_unlock): Define.
3935         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3936         lll_futex_wake_unlock.
3937         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3938         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3939         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3941         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3942         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3944 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3946         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3947         Fix typo in register name.
3949 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3951         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3952         Use __sigfillset.  Document that sigfillset does the right thing wrt
3953         to SIGSETXID.
3955 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3957         [BZ #1102]
3958         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3959         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3960         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3961         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3962         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3963         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3964         in the structure.
3965         * Makefile (tests): Add tst-initializers1.
3966         (CFLAGS-tst-initializers1.c): Set.
3967         * tst-initializers1.c: New test.
3969 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3971         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3972         Make sure __flags are located at offset 48 from the start of the
3973         structure.
3975 2005-07-02  Roland McGrath  <roland@redhat.com>
3977         * Makeconfig: Comment fix.
3979 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3981         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3982         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3983         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3984         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3985         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3986         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3987         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3988         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3989         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3990         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3992 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3994         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3995         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3996         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3997         fields.
3998         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3999         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4000         field.  Put in sysinfo field unconditionally.
4001         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4002         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4003         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4004         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4005         fields.
4006         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4007         * pthread_create.c (__pthread_create_2_1): Use
4008         THREAD_COPY_STACK_GUARD macro.
4009         * Makefile: Add rules to build and run tst-stackguard1{,-static}
4010         tests.
4011         * tst-stackguard1.c: New file.
4012         * tst-stackguard1-static.c: New file.
4014 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
4016         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4017         Invoke CGOTSETUP and CGOTRESTORE.
4018         (CGOTSETUP, CGOTRESTORE): Define.
4020 2005-05-29  Richard Henderson  <rth@redhat.com>
4022         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4023         (tf_write, tf_writev): Use it.
4024         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
4025         the system minimum.
4027 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
4029         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4030         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4031         __librt_*_asynccancel@local.
4033 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
4035         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4036         all occurrences of JUMPTARGET.  Instead append @local to labels.
4038 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
4040         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4041         size/alignment of struct pthread rather than tcbhead_t.
4042         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4043         Likewise.
4044         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4045         Likewise.
4046         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4047         Likewise.
4049 2005-05-19  Richard Henderson  <rth@redhat.com>
4051         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4052         __sync_val_compare_and_swap, not explicit _si variant.
4053         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4055 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
4057         [BZ #915]
4058         * sysdeps/pthread/pthread.h: Avoid empty initializers.
4060 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
4062         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4063         .eh_frame section, use cfi_* directives.
4065 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
4067         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4068         of "" includes.
4070 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
4072         [BZ #1075]
4073         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4074         aio_write blocks.
4076 2005-04-27  Roland McGrath  <roland@redhat.com>
4078         * Makefile (tests): Remove tst-clock2.
4080         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4081         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4082         translating to the kernel clockid_t for our own process/thread clock.
4084         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4086 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
4088         * old_pthread_cond_init.c: Include <errno.h>.
4089         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4090         process shared or uses clock other than CLOCK_REALTIME.
4091         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4093 2005-04-13  David S. Miller  <davem@davemloft.net>
4095         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4096         * sysdeps/sparc/sparc64/clone.S: New file.
4098 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4100         [BZ #1102]
4101         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4102         __inline instead of inline.
4103         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4105 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
4107         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4108         functionally equivalent, but shorter instructions.
4109         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4110         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4111         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4112         Likewise.
4113         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4114         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4115         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4116         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4117         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4118         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4119         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4120         Likewise.
4121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4122         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4124         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4125         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4127 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
4129         * sysdeps/mips/Makefile: New file.
4130         * sysdeps/mips/nptl-sysdep.S: New file.
4131         * sysdeps/mips/tcb-offsets.sym: New file.
4132         * sysdeps/mips/pthread_spin_lock.S: New file.
4133         * sysdeps/mips/pthread_spin_trylock.S: New file.
4134         * sysdeps/mips/pthreaddef.h: New file.
4135         * sysdeps/mips/tls.h: New file.
4136         * sysdeps/mips/jmpbuf-unwind.h: New file.
4137         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4138         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4139         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4140         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4141         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4142         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4143         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4144         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4145         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4146         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4148 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
4150         [BZ #1112]
4151         * pthread_create.c (__pthread_create_2_1): Rename syscall error
4152         variable to scerr.
4154 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
4156         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4158 2005-02-25  Roland McGrath  <roland@redhat.com>
4160         * alloca_cutoff.c: Correct license text.
4161         * tst-unload.c: Likewise.
4162         * sysdeps/pthread/allocalim.h: Likewise.
4163         * sysdeps/pthread/pt-initfini.c: Likewise.
4164         * sysdeps/pthread/bits/libc-lock.h: Likewise.
4165         * sysdeps/pthread/bits/sigthread.h: Likewise.
4166         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4167         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4169 2005-02-16  Roland McGrath  <roland@redhat.com>
4171         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4172         Use unsigned int * for ptr_nthreads.
4174 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
4176         [BZ #721]
4177         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4178         gcc4.
4180 2005-02-07  Richard Henderson  <rth@redhat.com>
4182         [BZ #787]
4183         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4184         argument.
4186 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4188         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4189         order of arguments in invocation of atomic_add_zero.
4191 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4193         [BZ #737]
4194         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4195         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4196         at least gotntpoff relocation and addition.
4197         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4198         Likewise.
4199         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4200         Likewise.
4201         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4202         Likewise.
4204 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4206         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4207         entry for static tls deallocation fix.
4208         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4209         also contains information whether the memory pointed to is static
4210         TLS or not.
4211         * sysdeps/i386/tls.h: Likewise.
4212         * sysdeps/ia64/tls.h: Likewise.
4213         * sysdeps/powerpc/tls.h: Likewise.
4214         * sysdeps/s390/tls.h: Likewise.
4215         * sysdeps/sh/tls.h: Likewise.
4216         * sysdeps/sparc/tls.h: Likewise.
4217         * sysdeps/x86_64/tls.h: Likewise.
4219 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4221         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4223 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4225         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4226         %esp.
4227         * Makefile (tests): Add tst-align2.
4228         * tst-align2.c: New test.
4229         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4230         -mpreferred-stack-boundary=4.
4232 2004-12-18  Roland McGrath  <roland@redhat.com>
4234         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4235         New file removed withdrawn for the moment.
4237 2004-12-17  Richard Henderson  <rth@redhat.com>
4239         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4240         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4242 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4244         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4245         Increased PTHREAD_STACK_MIN.
4247         * tst-context1.c (stacks): Use bigger stack size.
4249 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4251         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4252         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4254 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4256         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4257         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4258         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4260 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4262         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4264 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4266         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4267         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4269         * tst-getpid1.c: If child crashes, report this first.  Print which
4270         signal.
4272 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4274         * init.c (__pthread_initialize_minimal_internal): Also unblock
4275         SIGSETXID.
4277 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4279         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4280         _POSIX_THREAD_CPUTIME): Define to 0.
4281         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4282         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4283         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4284         __timer_signal_thread_tclk): Remove.
4285         (init_module): Remove their initialization.
4286         (thread_cleanup): Remove their cleanup assertions.
4287         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4288         __timer_signal_thread_tclk): Remove.
4289         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4290         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4291         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4293 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4295         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4296         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4298         * Makefile (tests): Add tst-getpid2.
4299         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4300         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4301         * tst-getpid2.c: New test.
4303 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4305         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4307 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4309         * Makefile (tests): Add tst-getpid1.
4310         * tst-getpid1.c: New file.
4311         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4312         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4314 2004-12-02  Roland McGrath  <roland@redhat.com>
4316         * Makefile (libpthread-nonshared): Variable removed.
4317         ($(objpfx)libpthread_nonshared.a): Target removed.
4318         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4319         These are now handled by generic magic from
4320         libpthread-static-only-routines being set.
4322 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4324         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4325         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4326         _POSIX_THREAD_PRIO_PROTECT): Define.
4327         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4328         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4329         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4331 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4333         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4334         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4335         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4336         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4337         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4338         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4339         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4341 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4343         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4345         * Makefile (libpthread-routines): Add pthread_setschedprio.
4346         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4347         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4348         * pthread_setschedprio.c: New file.
4350 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4352         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4353         * pthread_cancel.c (pthread_create): Likewise.
4355         * Makefile (libpthread-routines): Add vars.
4356         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4357         * init.c (__default_stacksize, __is_smp): Remove.
4358         * vars.c: New file.
4359         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4360         and define a wrapper macro.
4361         (PTHREAD_STATIC_FN_REQUIRE): Define.
4362         * allocatestack.c (__find_thread_by_id): Undefine.
4363         * pthread_create (__pthread_keys): Remove.
4364         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4365         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4366         PTHREAD_STATIC_FN_REQUIRE.
4368 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4370         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4371         parameter to REGISTER macro.
4373 2004-11-17  Roland McGrath  <roland@redhat.com>
4375         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4376         Make sure SIGCANCEL is blocked as well.
4378 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4380         * sysdeps/pthread/setxid.h: New file.
4381         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4382         (struct xid_command): Add forward decl.
4383         (struct pthread_functions): Change return type of __nptl_setxid hook
4384         to int.
4385         * pthreadP.h (__nptl_setxid): Change return type to int.
4386         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4387         calling thread, return its return value and set errno on failure.
4388         * descr.h (struct xid_command): Change id type to long array.
4390         * Makefile: Add rules to build and test tst-setuid1 and
4391         tst-setuid1-static.
4392         * tst-setuid1.c: New test.
4393         * tst-setuid1-static.c: New test.
4395 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4397         * Makefile (tests): Add tst-exit3.
4398         * tst-exit3.c: New test.
4400 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4402         * Makefile (tests): Add tst-exit2.
4403         * tst-exit2.c: New file.
4405 2004-11-09  Roland McGrath  <roland@redhat.com>
4407         [BZ #530]
4408         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4409         here, before calling clone.
4410         * pthread_create.c (start_thread): Don't do it here.
4412 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4414         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4416 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4418         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4419         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4420         assembler warning.
4422 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4424         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4425         if sched_priority is not between minprio and maxprio.
4427 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4429         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4430         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4432         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4433         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4435 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4437         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4438         not-cancelable I/O functions.
4440 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4442         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4443         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4444         make sure 2 is stored in the futex and we looked at the old value.
4445         Fix a few other problems to return the correct value.
4447 2004-10-14  Richard Henderson  <rth@redhat.com>
4449         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4450         make gcc4 happy.
4452 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4454         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4455         of pthread-functions.h and pthreaddef.h.
4456         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4459         Change __data.__nwaiters from int to unsigned int.
4461         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4462         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4464         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4465         before return type.
4467         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4468         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4470 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4472         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4473         test fails, remove message queue.
4474         (tf_msgsnd): Likewise.
4476 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4478         * tst-clock1.c: Change #ifdef to #if defined.
4479         * tst-clock2.c: Likewise.
4480         * tst-cond11.c: Likewise.
4482         * sysdeps/pthread/timer_create.c (timer_create): Use
4483         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4484         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4485         THREAD_CPUTIME.
4487 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4489         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4490         _POSIX_THREAD_CPUTIME): Define to 0.
4492 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4494         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4495         and _POSIX_THREAD_CPUTIME to zero.
4496         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4497         * tst-barrier2.c: Fix testing for POSIX feature.
4498         * tst-clock1.c: Likewise.
4499         * tst-clock2.c: Likewise.
4500         * tst-cond11.c: Likewise.
4501         * tst-cond4.c: Likewise.
4502         * tst-cond6.c: Likewise.
4503         * tst-flock2.c: Likewise.
4504         * tst-mutex4.c: Likewise.
4505         * tst-mutex9.c: Likewise.
4506         * tst-rwlock12.c: Likewise.
4507         * tst-rwlock4.c: Likewise.
4508         * tst-signal1.c: Likewise.
4509         * tst-spin2.c: Likewise.
4510         * sysdeps/pthread/posix-timer.h: Likewise.
4511         * sysdeps/pthread/timer_create.c: Likewise.
4512         * sysdeps/pthread/timer_routines.c: Likewise.
4514 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4516         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4517         (__lll_mutex_timedlock_wait): Address futex correctly.
4519         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4520         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4521         make sure 2 is stored in the futex and we looked at the old value.
4522         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4523         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4524         which might very well made the code not working at all before.
4525         [BZ #417]
4527 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4529         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4530         allow SIGSETXID to be sent.
4531         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4532         for SIGSETXID to be defined.
4533         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4534         SIGSETXID cannot be blocked.
4536         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4537         Add __extension__ to long long types.
4538         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4539         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4540         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4541         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4542         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4543         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4544         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4546 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4548         * descr.h (struct pthread): Add stopped_start field.
4549         * sysdeps/pthread/createthread.c (create_thread): Set
4550         start_stopped flag in descriptor for new thread appropriately.
4551         * pthread_create.c (start_thread): Only take lock to be stopped on
4552         startup if stopped_start flag says so.
4554 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4556         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4557         is created detached and if yes, do not try to free the stack in case
4558         the thread creation failed.
4559         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4560         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4561         case there has been no error.  [BZ #405]
4563         * pthread_create.c (start_thread): Don't wait for scheduler data
4564         etc to be set at the beginning of the function.  The cancellation
4565         infrastructure must have been set up.  And enable async
4566         cancellation before potentially going to sleep.  [BZ #401]
4568 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4570         * Versions: Remove exports for pthread_set*id_np functions.
4571         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4572         for now.
4573         * Makefile: Don't build pthread_set*id code for now.
4575 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4577         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4578         internal use.
4579         * allocatestack.c (__nptl_setxid): New function.
4580         * descr.h (struct xid_command): Define type.
4581         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4582         (sighandler_setxid): New function.
4583         (__pthread_initialize_minimal): Register sighandler_setxid for
4584         SIGCANCEL.
4585         * pt-allocrtsig.c: Update comment.
4586         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4587         Declare __nptl_setxid.
4588         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4589         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4590         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4591         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4592         and pthread_setresuid_np.
4593         * pthread_setgid_np.c: New file.
4594         * pthread_setuid_np.c: New file.
4595         * pthread_setegid_np.c: New file.
4596         * pthread_seteuid_np.c: New file.
4597         * pthread_setregid_np.c: New file.
4598         * pthread_setreuid_np.c: New file.
4599         * pthread_setresgid_np.c: New file.
4600         * pthread_setresuid_np.c: New file.
4601         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4602         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4603         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4604         and pthread_setresuid_np.
4605         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4606         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4607         pthread_setregid, and pthread_setresgid.
4609 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4611         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4612         ENOMEM when out of memory.
4614 2004-09-10  Roland McGrath  <roland@redhat.com>
4616         [BZ #379]
4617         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4618         code, since we don't try to use the broken CLONE_STOPPED any more.
4619         * pthread_create.c (start_thread): Likewise.
4621 2004-09-15  Richard Henderson  <rth@redhat.com>
4623         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4625 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4627         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4628         (__libc_unwind_longjmp): Delete macro and declare as function.
4629         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4630         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4631         nptl directory.
4632         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4633         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4634         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4636 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4638         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4639         for __USE_XOPEN2K.
4640         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4641         types also for __USE_XOPEN2K.
4642         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4643         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4644         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4645         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4646         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4647         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4648         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4649         [BZ #320]
4651 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4653         * sysdeps/pthread/pthread.h
4654         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4655         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4656         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4657         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4658         [BZ #375]
4660 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4662         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4663         PSEUDO to be used with . prefix.
4665         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4666         Use atomic_increment instead of atomic_exchange_and_add.
4667         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4668         Likewise.
4669         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4670         Likewise.
4671         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4672         Likewise.
4674         * allocatestack.c (allocate_stack): Use atomic_increment_val
4675         instead of atomic_exchange_and_add.
4676         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4677         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4678         Likewise.
4679         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4680         Likewise.
4682         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4683         the initialization function might throw.
4685 2005-09-05  Richard Henderson  <rth@redhat.com>
4687         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4688         Move definition inside libpthread, libc, librt check.  Provide
4689         definition for rtld.
4691 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4693         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4694         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4695         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4696         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4697         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4698         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4699         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4700         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4701         * unwind.c: Use it.
4703         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4704         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4706         Likewise.
4707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4708         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4709         this is the last waiter, signal pthread_cond_destroy caller and
4710         avoid using the pthread_cond_t structure after unlock.
4711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4712         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4713         Read clock type from the least significant bits of __nwaiters instead
4714         of __clock.
4715         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4716         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4718 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4720         [BZ #342]
4721         * Makefile (tests): Add tst-cond20 and tst-cond21.
4722         * tst-cond20.c: New test.
4723         * tst-cond21.c: New test.
4724         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4725         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4726         it unsigned int.
4727         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4728         Likewise.
4729         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4730         (pthread_cond_t): Likewise.
4731         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4732         Likewise.
4733         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4734         Likewise.
4735         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4736         Likewise.
4737         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4738         (cond_nwaiters): New.
4739         (clock_bits): New.
4740         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4741         if there are waiters not signalled yet.
4742         Wait until all already signalled waiters wake up.
4743         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4744         __nwaiters.  If pthread_cond_destroy has been called and this is the
4745         last waiter, signal pthread_cond_destroy caller and avoid using
4746         the pthread_cond_t structure after unlock.
4747         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4748         decrement it when leaving.  If pthread_cond_destroy has been called
4749         and this is the last waiter, signal pthread_cond_destroy caller.
4750         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4751         Likewise.  Read clock type from the least significant bits of
4752         __nwaiters instead of __clock.
4753         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4754         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4755         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4756         clock type just from the last COND_CLOCK_BITS bits of value.
4757         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4758         instead of __clock, just from second bit of condattr's value.
4760 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4762         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4763         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4764         != 64.
4765         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4767 2004-08-15  Roland McGrath  <roland@frob.com>
4769         * pthread_atfork.c: Update copyright terms including special exception
4770         for these trivial files, which are statically linked into executables
4771         that use dynamic linking for the significant library code.
4773 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4775         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4776         pthread_rwlock_rdlock.
4777         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4778         Decrease __nr_readers_queued after reacquiring lock.
4779         * sysdeps/pthread/pthread_rwlock_timedrdlock
4780         (pthread_rwlock_timedrdlock): Likewise.
4781         Reported by Bob Cook <bobcook47@hotmail.com>.
4783 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4785         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4786         before pthread_barrier_wait.
4788 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4791         Remove unnecessary exception handling data.
4793 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4795         [BZ #284]
4796         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4797         instead of clockid_t.
4799 2004-07-21  Roland McGrath  <roland@redhat.com>
4801         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4803 2004-07-19  Roland McGrath  <roland@redhat.com>
4805         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4807 2004-07-02  Roland McGrath  <roland@redhat.com>
4809         * configure: Don't exit.
4811 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4813         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4814         (__pthread_cond_timedwait): Check for invalid nanosecond in
4815         timeout value.
4817 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4819         * Makefile: Add rules to build and run tst-fini1.
4820         * tst-fini1.c: New file.
4821         * tst-fini1mod.c: New file.
4823 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4825         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4826         if no cancellation support is needed.
4827         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4828         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4829         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4830         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4831         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4832         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4833         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4834         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4835         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4837         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4838         only if not already defined.
4840 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4842         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4843         constraint "m" instead of "0" for futex.
4845         * shlib-versions: Add powerpc64-.*-linux.*.
4847 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4849         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4850         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4851         for valid tv_nsec.
4852         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4853         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4854         bits.
4856 2004-06-29  Roland McGrath  <roland@redhat.com>
4858         * Banner: NPTL no longer has its own version number.
4859         * Makefile (nptl-version): Variable removed.
4860         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4861         using $(version), the glibc version number.
4863 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4865         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4866         Fix branch offset for a PLT entry.
4867         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4868         Likewise.
4869         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4870         Likewise.
4871         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4872         Likewise.
4873         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4874         Likewise.
4876 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4878         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4879         unconditionally.
4881 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4883         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4884         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4885         instead of tv_sec.
4886         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4887         (pthread_rwlock_timedrdlock): Likewise.
4889 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4891         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4892         Set __r7 to val, not mutex.
4894 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4896         * Makefile: Add rules to build tst-rwlock14.
4897         * tst-rwlock14.c: New file.
4899 2004-06-24  Boris Hu  <boris.hu@intel.com>
4901         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4902         check.
4903         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4905 2004-06-19  Andreas Jaeger  <aj@suse.de>
4907         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4908         assembler in last patch.
4910 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4912         * sysdeps/pthread/pthread_cond_timedwait.c
4913         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4914         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4915         (__pthread_cond_timedwait): Check for invalid nanosecond in
4916         timeout value.
4917         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4918         * tst-cond19.c: New file.
4919         * Makefile: Add rules to build and run tst-cond19.
4921 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4923         * tst-context1.c (GUARD_PATTERN): Defined.
4924         (tst_context_t): Define struct containing ucontext_t & guard words.
4925         (ctx): Declare as an array of tst_context_t.
4926         (fct): Verify uc_link & guard words are still valid.
4927         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4929 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4931         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4932         Add __data.__futex field, reshuffle __data.__clock.
4933         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4934         (__pthread_cond_signal): Increment __futex at the same time as
4935         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4936         address of low 32-bits of __wakeup_seq to futex syscall.
4937         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4938         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4939         releasing internal lock to FUTEX_WAIT.
4940         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4941         (__pthread_cond_timedwait): Likewise.
4942         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4943         (FUTEX_CMP_REQUEUE): Define.
4944         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4945         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4946         Pass __futex value from before the unlock and __futex address instead
4947         of address of low 32-bits of __wakeup_seq to futex syscall.
4948         Fallback to FUTEX_WAKE all on any errors.
4950 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4952         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4953         comment typo.
4954         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4955         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4956         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4957         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4958         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4960 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4962         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4963         Add memory clobber to inline assembly.
4964         (__lll_mutex_trylock): Likewise.
4965         (__lll_mutex_cond_trylock): Likewise.
4967 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4969         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4970         Pass val argument as 6th system call argument in %r7.
4972 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4974         * Makefile (tests): Add tst-cond16.
4975         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4976         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4977         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4978         Add __data.__futex field, reshuffle __data.__clock.
4979         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4980         (__pthread_cond_signal): Increment __futex at the same time as
4981         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4982         address of low 32-bits of __wakeup_seq to futex syscall.
4983         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4984         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4985         releasing internal lock to FUTEX_WAIT.
4986         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4987         (__pthread_cond_timedwait): Likewise.
4988         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4989         (FUTEX_CMP_REQUEUE): Define.
4990         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4991         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4992         Pass __futex value from before the unlock and __futex address instead
4993         of address of low 32-bits of __wakeup_seq to futex syscall.
4994         Fallback to FUTEX_WAKE all on any errors.
4995         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4996         Define.
4997         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4998         internally.  Return non-zero if error, zero if success.
4999         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5000         Add __data.__futex field, reshuffle __data.__clock.
5001         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5002         Define.
5003         (lll_futex_requeue): Add val argument, return 1 unconditionally
5004         for the time being.
5005         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5006         Add __data.__futex field, reshuffle __data.__clock.
5007         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5008         Define.
5009         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5010         internally.  Return non-zero if error, zero if success.
5011         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5012         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5013         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5014         Define.
5015         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5016         internally.  Return non-zero if error, zero if success.
5017         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5018         Add __data.__futex field, reshuffle __data.__clock.
5019         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5020         Define.
5021         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5022         internally.  Return non-zero if error, zero if success.
5023         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5024         Add __data.__futex field, reshuffle __data.__clock.
5025         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5026         Add __data.__futex field, reshuffle __data.__clock.
5027         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5028         Increment __futex at the same time as __wakeup_seq or __total_seq.
5029         Pass address of __futex instead of address of low 32-bits of
5030         __wakeup_seq to futex syscall.
5031         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5032         Pass __futex value from before releasing internal lock
5033         to FUTEX_WAIT.
5034         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5035         Likewise.  Avoid unnecessary shadowing of variables.
5036         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5037         Set __futex to 2 * __total_seq.  Pass __futex value from before the
5038         unlock and __futex address instead of address of low 32-bits of
5039         __wakeup_seq to futex_requeue macro, adjust for new return value
5040         meaning.
5041         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5042         (__pthread_cond_signal): Increment __futex at the same time as
5043         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5044         address of low 32-bits of __wakeup_seq to futex syscall.
5045         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5046         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5047         releasing internal lock to FUTEX_WAIT.
5048         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5049         (__pthread_cond_timedwait): Likewise.
5050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5051         (FUTEX_CMP_REQUEUE): Define.
5052         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5053         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5054         Pass __futex value from before the unlock and __futex address instead
5055         of address of low 32-bits of __wakeup_seq to futex syscall.
5056         Fallback to FUTEX_WAKE all on any errors.
5058 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5060         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5061         Add nop to align the end of critical section.
5062         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5064 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5066         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5067         Add __broadcast_seq field.
5068         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5069         all waiters as woken with woken_seq and bump broadcast counter.
5070         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5071         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
5072         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5073         Comment typo fixes.  Avoid returning -ETIMEDOUT.
5075 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
5077         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5078         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5079         Reported by Kaz Kojima.
5081 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
5083         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5085 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5087         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5088         __broadcast_seq with bc_seq after acquiring internal lock instead of
5089         before it.
5091 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
5093         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5094         compilation.
5095         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5096         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5097         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5098         (pthread_cond_t): Add __data.__broadcast_seq field.
5099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5100         (FRAME_SIZE): Define.
5101         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
5102         Comment typo fixes.
5103         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5104         Define.
5105         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
5106         typo fixes.
5107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5108         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
5109         fixes.
5111 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
5113         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5114         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5115         Add __broadcast_seq field.
5116         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5117         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5118         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5119         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5120         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5122         all waiters as woken with woken_seq and bump broadcast counter.
5123         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5125         __broadcast_seq field.
5126         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5127         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5128         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5129         * pthread_cond_init.c: Initialize __broadcast_seq field.
5130         * Makefile (tests): Add tst-cond17 and tst-cond18.
5131         Add .NOTPARALLEL goal.
5132         * tst-cond16.c: New file.  From Jakub.
5133         * tst-cond17.c: New file.  From Jakub.
5134         * tst-cond18.c: New file.  From Jakub.
5136 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
5138         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5139         unwind info.
5141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5142         Parametrize frame size.  Correct some unwind info.
5143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5145 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5147         * tst-stack3.c: Note testing functionality beyond POSIX.
5149 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5151         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5152         Change conditional from ifdef to if.
5154 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
5156         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5157         SYSDEP_CANCEL_ERROR): Define.
5158         (PSEUDO): Use it.
5160 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
5162         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5164 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
5166         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5168 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5170         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5171         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5172         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5173         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5175 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
5177         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5178         thread has all signals blocked.
5180 2004-04-18  Andreas Jaeger  <aj@suse.de>
5182         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5183         (SEM_VALUE_MAX): Add missing brace.
5185 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5187         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5188         in rt subdir.
5189         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5190         * sysdeps/pthread/tst-mqueue8x.c: New test.
5191         * tst-cancel4.c: Update comment about message queues.
5193         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5194         return it_value { 0, 0 }.
5195         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5196         like SIGEV_SIGNAL.
5197         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5198         assertion for SIGEV_NONE.
5199         (thread_attr_compare): Compare all attributes, not just a partial
5200         subset.
5202 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5204         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5206 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5208         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5209         Just use a plain number.
5210         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5211         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5212         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5213         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5214         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5215         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5216         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5218 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5220         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5221         frame info.
5222         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5224 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5226         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5227         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5228         of calling sigwaitinfo.
5230 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5232         * allocatestack.c (allocate_stack): Set reported_guardsize
5233         unconditionally.
5234         * pthread_getattr_np.c (pthread_getattr_np): Use
5235         reported_guardsize instead of guardsize.
5236         * descr.h (struct pthread): Add reported_guardsize field.
5238 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5240         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5242 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5244         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5246 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5248         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5249         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5250         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5251         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5252         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5253         Define.
5254         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5255         (_POSIX_MESSAGE_PASSING): Define.
5256         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5257         (_POSIX_MESSAGE_PASSING): Define.
5258         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5259         (_POSIX_MESSAGE_PASSING): Define.
5261 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5263         * tst-context1.c (fct): Check whether correct stack is used.
5265 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5267         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5268         matching constraints for asm mem parameters.
5270         * tst-clock2.c (tf): Don't define unless needed.
5272 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5274         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5275         $(gnulib).
5277 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5279         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5280         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5281         * pthreadP.h: Declare __nptl_deallocate_tsd.
5282         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5283         Adjust caller.
5285         * Makefile (tests): Add tst-tsd5.
5286         * tst-tsd5.c: New file.
5288 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5290         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5291         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5292         is SHLIB_COMPAT check.
5293         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5294         (__pthread_attr_getaffinity_old): Likewise.
5295         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5296         (__pthread_getaffinity_old): Likewise.
5297         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5298         (__pthread_setaffinity_old): Likewise.
5300 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5302         * allocatestack.c (_make_stacks_executable): Call
5303         _dl_make_stack_executable first.
5305 2004-03-24  Roland McGrath  <roland@redhat.com>
5307         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5308         constraint instead of "0".
5310 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5312         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5313         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5315         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5316         code to avoid warning.
5318 2004-03-24  Andreas Jaeger  <aj@suse.de>
5320         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5321         (__pthread_attr_setaffinity_old): Remove const.
5323 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5325         * sysdeps/unix/sysv/linux/smp.h: New file.
5326         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5327         * init.c: Define __is_smp.
5328         (__pthread_initialize_minimal_internal): Call is_smp_system to
5329         initialize __is_smp.
5330         * pthreadP.h: Declare __is_smp.
5331         Define MAX_ADAPTIVE_COUNT is necessary.
5332         * pthread_mutex_init.c: Add comment regarding __spins field.
5333         * pthread_mutex_lock.c: Implement adaptive mutex type.
5334         * pthread_mutex_timedlock.c: Likewise.
5335         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5336         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5337         Add __spins field.
5338         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5339         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5340         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5341         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5342         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5343         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5344         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5345         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5346         lll_mutex_cond_trylock.
5347         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5348         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5349         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5350         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5351         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5352         Define BUSY_WAIT_NOP.
5353         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5354         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5356         * tst-mutex5.c: Add support for testing adaptive mutexes.
5357         * tst-mutex7.c: Likewise.
5358         * tst-mutex5a.c: New file.
5359         * tst-mutex7a.c: New file.
5360         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5362         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5363         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5364         vgettimeofday call might destroy the content.
5366         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5367         @pause in the loop.
5369         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5370         No need to restrict type of ret.  Make it int.  Add comment.
5372         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5373         Remove unnecessary setne instruction.
5375 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5377         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5378         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5379         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5380         If realloc fails, break out of the loop.
5382 2004-03-20  Andreas Jaeger  <aj@suse.de>
5384         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5385         (__pthread_setaffinity_old): Fix interface.
5386         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5387         (__pthread_getaffinity_old): Likewise.
5389         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5390         (__pthread_setaffinity_new): Remove duplicate declaration.
5392 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5394         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5395         the return value to a safe register.
5396         (CDISABLE): Set the function argument correctly.
5398 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5400         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5401         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5402         Rewrite so that only one locked memory operation per round is needed.
5403         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5404         (pthread_barrier_wait): After wakeup, release lock only when the
5405         last thread stopped using the barrier object.
5406         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5407         (__pthread_cond_wait): Don't store mutex address if the current
5408         value is ~0l.  Add correct cleanup support and unwind info.
5409         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5410         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5411         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5412         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5413         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5414         Add correct cleanup support and unwind info.
5415         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5416         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5417         information for syscall wrappers.
5419 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5421         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5422         cpusetsize field, remove next.
5423         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5424         parameter for size of the CPU set.
5425         (pthread_setaffinity_np): Likewise.
5426         (pthread_attr_getaffinity_np): Likewise.
5427         (pthread_attr_setaffinity_np): Likewise.
5428         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5429         interface change, keep compatibility code.
5430         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5431         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5432         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5433         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5434         __pthread_getaffinity_np.
5435         * Versions: Add version for changed interfaces.
5436         * tst-attr3.c: Adjust test for interface change.
5437         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5438         increasing buffer sizes.
5439         * pthread_attr_destroy.c: Remove unused list handling.
5440         * pthread_attr_init.c: Likewise.
5442 2004-03-17  Roland McGrath  <roland@redhat.com>
5444         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5445         first argument to clock_getres so we ever enable kernel timers.
5447 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5449         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5451 2004-03-12  Richard Henderson  <rth@redhat.com>
5453         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5454         oldvalue from CENABLE to CDISABLE.
5456 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5458         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5459         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5460         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5461         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5463 2004-03-11  Richard Henderson  <rth@redhat.com>
5465         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5466         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5467         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5469 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5471         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5472         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5473         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5475 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5477         * forward.c (__pthread_cond_broadcast_2_0,
5478         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5479         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5480         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5482 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5484         * sysdeps/sh/tcb-offsets.sym: Add PID.
5485         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5486         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5488 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5490         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5491         include <sysdep-cancel.h>, vfork is no cancellation point.
5492         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5493         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5494         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5496 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5498         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5499         libc_hidden_def.
5500         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5501         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5502         Likewise.
5503         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5504         Likewise.
5505         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5506         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5507         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5508         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5509         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5511         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5512         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5513         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5514         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5515         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5516         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5518         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5519         a local register for saving old PID.  Negate PID in parent upon exit.
5521         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5522         tcb-offsets.h.
5523         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5524         before syscall, set to the old value in the parent afterwards.
5525         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5526         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5527         tcb-offsets.h.
5528         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5529         before syscall, set to the old value in the parent afterwards.
5530         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5531         * sysdeps/s390/tcb-offsets.sym: Add PID.
5533         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5534         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5535         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5536         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5537         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5538         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5540 2004-03-10  Andreas Schwab  <schwab@suse.de>
5542         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5543         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5544         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5546 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5548         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5549         * tst-cancel21.c (do_one_test): Likewise.
5550         Reported by Gordon Jin <gordon.jin@intel.com>.
5552 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5554         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5555         if non-zero and set to INT_MIN if zero.
5556         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5557         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5558         (SAVE_PID, RESTORE_PID): Define.
5559         (__vfork): Use it.
5560         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5561         Use relative path to avoid including NPTL i386/vfork.S.
5562         (SAVE_PID, RESTORE_PID): Define.
5563         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5564         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5565         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5566         tst-vfork2x.
5567         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5568         * tst-vfork1.c: New test.
5569         * tst-vfork2.c: New test.
5570         * tst-vfork1x.c: New test.
5571         * tst-vfork2x.c: New test.
5573 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5575         * sysdeps/i386/tcb-offsets.sym: Add PID.
5576         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5577         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5578         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5580 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5582         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5584 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5586         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5587         _rtld_global_ro.
5589 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5591         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5592         _rtld_global_ro.
5594         * tst-once4.c: Remove unnecessary macro definition.
5596         * tst-mutex7.c (do_test): Limit thread stack size.
5597         * tst-once2.c (do_test): Likewise.
5598         * tst-tls3.c (do_test): Likewise.
5599         * tst-tls1.c (do_test): Likewise.
5600         * tst-signal3.c (do_test): Likewise.
5601         * tst-kill6.c (do_test): Likewise.
5602         * tst-key4.c (do_test): Likewise.
5603         * tst-join4.c (do_test): Likewise.
5604         * tst-fork1.c (do_test): Likewise.
5605         * tst-context1.c (do_test): Likewise.
5606         * tst-cond2.c (do_test): Likewise.
5607         * tst-cond10.c (do_test): Likewise.
5608         * tst-clock2.c (do_test): Likewise.
5609         * tst-cancel10.c (do_test): Likewise.
5610         * tst-basic2.c (do_test): Likewise.
5611         * tst-barrier4.c (do_test): Likewise.
5613 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5615         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5617 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5619         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5620         (__pthread_cond_timedwait): Optimize wakeup test.
5621         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5622         (__pthread_cond_wait): Likewise.
5623         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5624         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5625         Likewise.
5627 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5629         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5630         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5631         the atomic instruction needed.
5632         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5633         (__lll_mutex_lock_wait): Likewise.
5635 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5637         * Makefile (tests): Add tst-cond14 and tst-cond15.
5638         * tst-cond14.c: New file.
5639         * tst-cond15.c: New file.
5641 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5643         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5644         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5645         needs to be implemented differently to be useful.
5647 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5649         * pthread_attr_setschedparam.c: Don't test priority against limits
5650         here.  Set ATTR_FLAG_SCHED_SET flag.
5651         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5652         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5653         from parent thread to child.  If attribute is used and scheduling
5654         parameters are not inherited, copy parameters from attribute or
5655         compute them.  Check priority value.
5656         * pthread_getschedparam.c: If the parameters aren't known yet get
5657         them from the kernel.
5658         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5659         ATTR_FLAG_POLICY_SET flag for thread.
5660         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5661         and ATTR_FLAG_POLICY_SET.
5663         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5665         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5666         fail if stack address hasn't been set.  Just return 0.
5668 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5670         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5671         libpthread for the files in this list.
5672         (CFLAGS-tst-unload): Removed.
5673         * tst-unload.c (do_test): Don't use complete path for
5674         LIBPHREAD_SO.
5676         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5677         tst-_res1mod2.
5679 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5681         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5682         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5683         operation per round is needed.
5684         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5685         (__lll_mutex_lock_wait): Likewise.
5687 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5689         * tst-cancel9.c (cleanup): Don't print to stderr.
5691 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5693         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5695 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5697         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5698         (__syscall_error_handler2): Call CDISABLE.
5699         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5700         (__syscall_error_handler2): Call CDISABLE.
5702         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5703         Release lock before the loop, don't reacquire it.
5705         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5707 2004-02-19  Andreas Schwab  <schwab@suse.de>
5709         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5710         Fix last change.
5712 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5714         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5715         (pthread_barrier_wait): After wakeup, release lock only when the
5716         last thread stopped using the barrier object.
5717         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5718         (pthread_barrier_wait): Likewise.
5719         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5720         Likewise.
5721         * Makefile (tests): Add tst-barrier4.
5722         * tst-barrier4.c: New file.
5724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5725         (__pthread_cond_timedwait): Perform timeout test while holding
5726         internal lock to prevent wakeup race.
5727         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5728         * sysdeps/pthread/pthread_cond_timedwait.c
5729         (__pthread_cond_timedwait): Likewise.
5730         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5731         (__pthread_cond_timedwait): Likewise.
5733 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5735         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5736         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5737         * Makefile (tests): Add tst-rwlock13.
5738         * tst-rwlock13.c: New test.
5740 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5743         (__condvar_tw_cleanup): Little optimization.
5744         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5746 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5748         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5749         libpthread as "lib" parameter to SHLIB_COMPAT.
5750         (__novmx_siglongjmp): Fix typo in function name.
5751         (__novmx_longjmp): Fix typo in function name.
5753 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5755         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5756         __builtin_expect.
5758         * sysdeps/generic/pt-longjmp.c: Moved to...
5759         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5761 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5763         * Makefile (libpthread-routines): Add pt-cleanup.
5764         * pt-longjmp.c: Removed.
5765         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5766         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5767         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5768         Version longjmp, siglongjmp for GLIBC_2.3.4.
5769         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5771 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5773         * sysdeps/pthread/pthread_cond_timedwait.c
5774         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5775         Reuse code.  Add __builtin_expects.
5777         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5778         (__pthread_cond_timedwait): Get internal lock in case timeout has
5779         passed before the futex syscall.
5780         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5782 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5784         * allocatestack.c: Pretty printing.
5786         * sysdeps/pthread/createthread.c (create_thread): Don't add
5787         CLONE_DETACHED bit if it is not necessary.
5789 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5791         * pthread_getattr_np.c: Include ldsodefs.h.
5793 2004-01-16  Richard Henderson  <rth@redhat.com>
5795         * allocatestack.c: Don't declare __libc_stack_end.
5796         * init.c (__pthread_initialize_minimal_internal): Likewise.
5797         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5799 2004-01-15  Richard Henderson  <rth@redhat.com>
5801         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5802         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5803         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5804         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5805         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5806         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5807         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5808         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5810 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5812         * init.c (pthread_functions): Make array const.
5814 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5816         * allocatestack.c (__make_stacks_executable): Change interface.
5817         Check parameters.  Pass parameter on to libc counterpart.
5818         * pthreadP.h: Change declaration.
5820 2004-01-13  Richard Henderson  <rth@redhat.com>
5822         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5823         prototype form.
5824         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5825         Likewise.
5827         * sysdeps/alpha/Makefile: New file.
5828         * sysdeps/alpha/tcb-offsets.sym: New file.
5829         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5830         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5832         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5833         on powerpc version.
5835 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5837         * Makefile (tests): Add tst-backtrace1.
5838         * tst-backtrace1.c: New test.
5840 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5842         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5843         register as second parameter to the REGISTER macro.
5844         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5845         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5846         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5847         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5848         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5849         of thread register as second parameter to REGISTER macro in 64 case.
5851 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5853         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5854         (CFLAGS-getpid.o): Defined.
5855         (CFLAGS-getpid.os): Defined.
5857 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5859         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5860         returned for main thread does not overlap with any other VMA.
5861         Patch by Jakub Jelinek.
5863 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5865         * tst-raise1.c: Include stdio.h.
5867 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5869         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5870         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5871         If pid is 0, set it to selftid.
5872         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5873         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5874         != 0, return self->tid without doing a syscall.
5875         * descr.h (struct pthread): Move pid field after tid.
5877         * Makefile (tests): Add tst-raise1.
5878         * tst-raise1.c: New file.
5880 2003-12-23  Roland McGrath  <roland@redhat.com>
5882         * tst-oddstacklimit.c: New file.
5883         * Makefile (tests): Add it.
5884         (tst-oddstacklimit-ENV): New variable.
5886         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5887         value up to page size for __default_stacksize.
5889 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5891         * Makefile (tests): Add tst-eintr5.
5892         * tst-eintr5.c: New file.
5894         * eintr.c (eintr_source): Prevent sending signal to self.
5896         * tst-eintr2.c (tf1): Improve error message.
5898 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5900         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5901         * sysdeps/unix/sysv/linux/getpid.c: New file.
5902         * pthread_cancel.c: Add comment explaining use of PID field.
5903         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5904         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5905         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5906         temporarily to signal the field must not be relied on and updated
5907         by getpid().
5908         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5909         temporarily negative.
5910         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5912 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5914         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5915         (eintr_source): If ARG != NULL, use pthread_kill.
5916         * tst-eintr1.c: Adjust for this change.
5917         * tst-eintr2.c: Likewise.
5918         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5919         * tst-eintr3.c: New file.
5920         * tst-eintr4.c: New file.
5922 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5924         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5925         if CANCELSTATE_BITMASK is set.
5926         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5927         Likewise.
5929         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5930         (tests-reverse): Add tst-cancel23.
5931         * tst-cancel22.c: New test.
5932         * tst-cancel23.c: New test.
5934 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5936         * tst-eintr1.c: Better error messages.
5938         * Makefile (tests): Add tst-eintr2.
5939         * tst-eintr2.c: New file.
5941 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5943         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5944         (CFLAGS-tst-cancelx21.c): Set.
5945         * tst-cancel21.c: New test.
5946         * tst-cancelx21.c: New test.
5948         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5949         comparison operand.
5950         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5951         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5952         * pt-longjmp.c: Include jmpbuf-unwind.h.
5953         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5954         _JMPBUF_UNWINDS.  Adjust compared pointers.
5955         * init.c (__pthread_initialize_minimal_internal): Initialize
5956         pd->stackblock_size.
5957         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5958         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5959         * sysdeps/i386/jmpbuf-unwind.h: New file.
5960         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5961         * sysdeps/s390/jmpbuf-unwind.h: New file.
5962         * sysdeps/sh/jmpbuf-unwind.h: New file.
5963         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5964         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5965         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5966         (_JMPBUF_CFA_UNWINDS): Remove.
5967         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5969 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5971         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5972         (CFLAGS-tst-cancelx20.c): Set.
5973         * tst-cancel20.c: New test.
5974         * tst-cancelx20.c: New test.
5976 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5978         * init.c (__pthread_initialize_minimal_internal): Don't treat
5979         architectures with separate register stack special here when
5980         computing default stack size.
5982 2003-12-17  Roland McGrath  <roland@redhat.com>
5984         * Makefile (tst-cancelx7-ARGS): New variable.
5985         Reportd by Greg Schafer <gschafer@zip.com.au>.
5987 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5989         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5990         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5991         (tst-stack3-ENV): Set.
5992         ($(objpfx)tst-stack3-mem): New.
5993         * tst-stack3.c: New test.
5995 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5997         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5998         Add unwind directives.  Drop unused .regstk directive.
5999         (_fini_EPILOG_BEGINS): Add unwind directives.
6001 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
6003         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6004         Assume parameter is a pointer.
6005         (lll_futex_wake): Likewise.
6006         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6007         Likewise.
6008         (lll_futex_wake): Likewise.
6009         Reported by Boris Hu.
6010         * sysdeps/unix/sysv/linux/unregister-atfork.c
6011         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6013         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6015 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
6017         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6018         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6019         __rtld_lock_initialize for ld.so lock.
6020         Patch in part by Adam Li <adam.li@intel.com>.
6022 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
6024         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6025         in $(gnulib).  Also, remove stale comment.
6027 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
6029         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6030         advantage of new syscall stub and optimize accordingly.
6032         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6033         from SYS_futex, to match expectations of
6034         sysdep.h:DO_INLINE_SYSCALL.
6035         (lll_futex_clobbers): Remove.
6036         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6037         (lll_futex_wake): Likewise.
6038         (lll_futex_requeue): Likewise.
6039         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6040         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6041         Jelinek).
6042         (__lll_mutex_lock): Likewise.
6043         (__lll_mutex_cond_lock): Likewise.
6044         (__lll_mutex_timed_lock): Likewise.
6045         (__lll_mutex_unlock): Likewise.
6046         (__lll_mutex_unlock_force): Likewise.
6048         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6049         comes before the include of <sysdep.h>.
6050         (THREAD_SELF_SYSINFO): New macro.
6051         (THREAD_SYSINFO): Likewise.
6052         (INIT_SYSINFO): New macro.
6053         (TLS_INIT_TP): Call INIT_SYSINFO.
6055         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6057         * sysdeps/pthread/createthread.c (create_thread): Use
6058         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6059         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6060         THREAD_SELF_SYSINFO instead of open code.
6061         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6062         (THREAD_SYSINFO): Likewise.
6064         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6066         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6068 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
6070         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6071         instead of .init.  Patch by David Mosberger.
6073 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
6075         * sysdeps/pthread/configure.in: Remove broken declaration in C
6076         cleanup handling check.
6078 2003-11-30  Andreas Jaeger  <aj@suse.de>
6080         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6081         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6082         Likewise.
6084 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
6086         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6087         * pthread_attr_destroy.c: Include shlib-compat.h.
6088         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6089         is set in iattr->flags.
6090         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6092 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
6094         * Makefile (distribute): Add tst-cleanup4aux.c.
6096         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
6097         include.
6099 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
6101         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6102         pthread_cond_signal.
6104         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6105         store mutex address if the current value is ~0l.
6106         * sysdeps/pthread/pthread_cond_timedwait.c
6107         (__pthread_cond_timedwait): Likewise.
6108         * sysdeps/pthread/pthread_cond_broadcast.c
6109         (__pthread_cond_broadcast): Don't use requeue for pshared
6110         condvars.
6112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6113         (__pthread_cond_wait): Don't store mutex address if the current
6114         value is ~0l.
6115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6116         (__pthread_cond_timedwait): Likewise.
6117         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6118         (__pthread_cond_broadcast): Don't use requeue for pshared
6119         condvars.
6121         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6122         element with ~0l for pshared condvars, with NULL otherwise.
6124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6125         (__pthread_cond_wait): Don't store mutex address if the current
6126         value is ~0l.
6127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6128         (__pthread_cond_timedwait): Likewise.
6129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6130         (__pthread_cond_broadcast): Don't use requeue for pshared
6131         condvars.
6133         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6134         * tst-cond12.c: New file.
6135         * tst-cond13.c: New file.
6137 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
6139         * sysdeps/pthread/configure.in: Make missing forced unwind support
6140         fatal.
6142 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
6144         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6146 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
6148         * Makefile: Add magic to clean up correctly.
6150 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
6152         * unwind.c (FRAME_LEFT): Define.
6153         (unwind_stop): Handle old style cleanups here.
6154         (__pthread_unwind): Handle old style cleanups only if
6155         !HAVE_FORCED_UNWIND.
6156         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6157         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6158         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6159         ($(objpfx)tst-cleanupx4): Likewise.
6160         * tst-cleanup4.c: New test.
6161         * tst-cleanup4aux.c: New.
6162         * tst-cleanupx4.c: New test.
6164 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
6166         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6167         lll_mutex_*lock macros to skip atomic operations on some archs.
6169 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
6171         * sysdeps/pthread/tst-timer.c (main): Initialize
6172         sigev2.sigev_value as well.
6174 2003-10-15  Roland McGrath  <roland@redhat.com>
6176         * sysdeps/pthread/configure.in: Barf if visibility attribute support
6177         is missing.
6178         * sysdeps/pthread/configure: Regenerated.
6180 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6182         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6183         locking macros.  No distinction between normal and mutex locking
6184         anymore.
6185         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6186         Merge bits from lowlevelmutex.S we still need.
6187         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6188         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6189         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6190         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6191         new mutex implementation.
6192         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6193         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6194         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6195         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6196         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6197         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6199         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6201         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6202         symbol for entry point to avoid cancellation.
6204 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6206         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6207         changes.
6208         (SAVE_OLDTYPE_0): Fix a typo.
6210 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6212         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6213         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6215 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6217         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6218         correct offset.
6220 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6222         * Makefile (tests): Add tst-cancel19.
6223         * tst-cancel19.c: New test.
6225 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6227         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6228         restoring of the old cancellation type.
6230 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6232         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6234 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6236         * sysdeps/pthread/malloc-machine.h: New file
6238 2003-09-24  Roland McGrath  <roland@redhat.com>
6240         * allocatestack.c (__make_stacks_executable): Don't ignore return
6241         value from _dl_make_stack_executable.
6243 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6245         * allocatestack.c (__make_stacks_executable): Also change
6246         permission of the currently unused stacks.
6248         * allocatestack.c (change_stack_perm): Split out from
6249         __make_stacks_executable.
6250         (allocate_stack): If the required permission changed between the time
6251         we started preparing the stack and queueing it, change the permission.
6252         (__make_stacks_executable): Call change_stack_perm.
6254         * Makefile: Build tst-execstack-mod locally.
6255         * tst-execstack-mod.c: New file.
6257 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6259         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6261 2003-09-23  Roland McGrath  <roland@redhat.com>
6263         * tst-execstack.c: New file.
6264         * Makefile (tests): Add it.
6265         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6266         (LDFLAGS-tst-execstack): New variable.
6268         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6269         whether to use PROT_EXEC for stack mmap.
6270         (__make_stacks_executable): New function.
6271         * pthreadP.h: Declare it.
6272         * init.c (__pthread_initialize_minimal_internal): Set
6273         GL(dl_make_stack_executable_hook) to that.
6275 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6277         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6278         recommendation from AMD re avoidance of lock prefix.
6280 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6282         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6283         lll_futex_timed_wait instead of lll_futex_wait.
6284         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6285         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6286         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6287         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6288         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6289         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6290         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6291         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6292         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6293         Completely revamp the locking macros.  No distinction between
6294         normal and mutex locking anymore.
6295         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6296         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6297         __lll_lock_timedwait): Fix prototypes.
6298         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6299         __lll_lock_timedwait): Likewise.
6300         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6301         macros, add __builtin_expect.
6302         (lll_mutex_timedlock): Likewise.  Fix return value.
6303         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6304         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6305         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6306         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6307         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6308         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6309         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6310         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6312 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6314         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6315         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6316         operation if possible.
6318         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6319         like jumping over the lock prefix.
6321 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6323         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6324         locking macros.  No distinction between normal and mutex locking
6325         anymore.
6326         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6327         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6328         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6329         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6330         locking.  Merge bits from lowlevelmutex.S we still need.
6331         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6332         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6333         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6334         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6335         * Makefile (routines): Remove libc-lowlevelmutex.
6336         (libpthread-rountines): Remove lowlevelmutex.
6337         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6338         for new mutex implementation.
6339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6340         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6342         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6344         Likewise.
6345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6346         Likewise.
6347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6348         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6349         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6350         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6353         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6354         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6355         Likewise.
6356         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6357         Likewise.
6358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6359         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6360         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6361         Don't use requeue.
6362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6363         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6365 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6367         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6368         in parameters of asm with output parameters.
6370         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6371         type of DECR parameter to int.
6372         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6374 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6376         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6377         guardsize for each thread.
6379 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6381         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6382         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6383         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6385         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6386         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6387         NULL.
6388         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6389         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6390         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6391         (pthread_getaffinity_np): Add hidden_def.
6393         * Makefile (tests): Add tst-attr3.
6394         * tst-attr3.c: New test.
6396         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6398 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6400         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6401         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6403 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6405         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6406         * tst-align.c: Include tst-stack-align.h.
6407         (tf, do_test): Use TEST_STACK_ALIGN macro.
6409 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6411         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6412         variable.
6414 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6416         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6417         stack-related values for the initial thread.
6419 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6421         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6423 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6425         * pthread_mutex_lock.c: Minor code rearrangements.
6427 2003-09-05  Roland McGrath  <roland@redhat.com>
6429         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6430         Instead, include ../nptl_db/db_info.c to do its magic.
6431         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6432         (__pthread_pthread_key_2ndlevel_size): Likewise.
6433         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6434         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6435         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6436         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6437         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6438         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6439         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6440         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6441         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6442         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6443         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6444         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6445         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6446         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6447         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6448         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6449         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6451 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6453         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6454         of pthread_t to be compatible with LT.
6455         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6456         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6457         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6458         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6459         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6460         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6461         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6463 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6465         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6467 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6469         * unwind-forcedunwind.c: Move to...
6470         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6471         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6472         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6473         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6474         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6475         * unwind.c: Include jmpbuf-unwind.h.
6476         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6478 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6480         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6481         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6482         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6483         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6484         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6485         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6486         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6487         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6488         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6489         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6490         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6491         function.
6492         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6493         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6494         * Makefile (tests): Add tst-stack2.
6495         * tst-stack2.c: New test.
6496         * tst-stack1.c: Include limits.h and sys/param.h.
6497         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6499         * pthread_condattr_setpshared.c: Include errno.h.
6500         (pthread_condattr_setpshared): Return EINVAL if pshared
6501         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6503         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6504         defined symbol for entry point to avoid cancellation.
6505         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6506         Likewise.
6507         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6508         Likewise.
6509         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6510         Likewise.
6511         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6512         Likewise.
6513         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6514         Likewise.
6515         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6516         __close_nocancel, __read_nocancel, __write_nocancel,
6517         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6518         libpthread.so or librt.so, define to corresponding function
6519         without _nocancel suffix.
6520         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6521         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6522         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6524         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6526 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6528         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6529         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6531         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6532         in subsections has a symbol associated with it.
6534         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6535         defined symbol for entry point to avoid cancellation.
6536         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6538 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6540         * Makefile (tests): Add tst-tls5.
6541         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6542         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6543         ($(objpfx)tst-tls5): New.
6544         ($(objpfx)tst-tls6.out): Likewise.
6545         (tests): Depend on $(objpfx)tst-tls6.out.
6546         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6547         (do_test): Check pthread_self () return value alignment.
6548         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6549         (tf): Check pthread_self () return value alignment.
6550         * tst-tls5.c: New test.
6551         * tst-tls5.h: New.
6552         * tst-tls5mod.c: New.
6553         * tst-tls5moda.c: New.
6554         * tst-tls5modb.c: New.
6555         * tst-tls5modc.c: New.
6556         * tst-tls5modd.c: New.
6557         * tst-tls5mode.c: New.
6558         * tst-tls5modf.c: New.
6559         * tst-tls6.sh: New test.
6561         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6562         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6563         * init.c (pthread_functions): Initialize them.
6564         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6565         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6566         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6567         pthread_cond_timedwait@@GLIBC_2.3.2.
6569 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6571         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6572         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6573         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6574         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6575         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6576         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6578         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6580         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6581         _POSIX_THREAD_PRIORITY_SCHEDULING.
6582         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6584 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6586         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6587         nested function, use static inline function from libio.h.
6588         Code by Richard Henderson.
6590         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6591         weak.
6593 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6595         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6596         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6597         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6598         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6599         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6600         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6601         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6602         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6603         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6604         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6605         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6606         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6607         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6608         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6609         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6610         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6611         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6612         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6613         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6614         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6615         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6616         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6617         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6618         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6619         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6620         * sysdeps/sparc/tls.h: New file.
6621         * sysdeps/sparc/tcb-offsets.sym: New file.
6622         * sysdeps/sparc/Makefile: New file.
6623         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6624         * init.c [__sparc__] (__NR_set_tid_address): Define.
6626 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6628         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6629         _IO_release_lock): Define.
6631 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6633         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6634         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6636 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6638         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6639         (__pthread_cleanup_class): Add missing return types of member
6640         functions.
6642 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6644         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6645         (lll_mutex_unlock_force): Add memory barrier between store and futex
6646         syscall.
6648 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6650         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6651         tempmsg in first loop.
6653 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6655         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6656         _POSIX_THREAD_PRIORITY_SCHEDULING.
6657         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6659 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6661         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6662         (__rtld_lock_default_lock_recursive,
6663         __rtld_lock_default_unlock_recursive): Define.
6664         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6665         __rtld_lock_unlock_recursive): Define using
6666         GL(_dl_rtld_*lock_recursive).
6667         * init.c (__pthread_initialize_minimal_internal): Initialize
6668         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6669         Lock GL(_dl_load_lock) the same number of times as
6670         GL(_dl_load_lock) using non-mt implementation was nested.
6672         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6673         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6675 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6677         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6678         PIPE_BUF.
6680 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6682         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6684 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6686         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6687         to first syscall error check.  Move syscall error check for tkill
6688         into __ASSUME_CLONE_STOPPED #ifdef.
6690 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6692         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6693         is not defined, do explicit synchronization.
6694         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6695         is not defined also unlock pd->lock for non-debugging case in case
6696         it is necessary.
6697         * pthread_create.c (start_thread): Always get and release pd->lock
6698         if __ASSUME_CLONE_STOPPED is not defined.
6699         (start_thread_debug): Removed.  Adjust users.
6700         * allocatestack.c (allocate_stack): Always initialize lock if
6701         __ASSUME_CLONE_STOPPED is not defined.
6702         * Makefile (tests): Add tst-sched1.
6703         * tst-sched1.c: New file.
6705         * sysdeps/pthread/createthread.c (do_clone): Only use
6706         sched_setschduler and pass correct parameters.
6708 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6710         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6711         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6712         PTHREAD_STACK_MIN in comments.
6714 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6716         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6717         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6718         argument.
6719         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6720         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6721         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6722         (__pthread_cleanup_upto): Fix prototype.
6723         (_longjmp_unwind): Adjust caller.
6724         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6725         Change second argument to const struct pointer.
6726         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6727         * tst-sem9.c (main): Likewise.
6728         * unwind.c: Include string.h for strlen prototype.
6730 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6733         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6734         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6735         Define HAVE_CMOV.
6736         Patch by Nicholas Miell <nmiell@attbi.com>.
6738 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6740         * init.c (__pthread_initialize_minimal_internal): Initialize
6741         GL(dl_init_static_tls).
6742         * pthreadP.h (__pthread_init_static_tls): New prototype.
6743         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6744         New functions.
6745         * Makefile (tests): Add tst-tls4.
6746         (modules-names): Add tst-tls4moda and tst-tls4modb.
6747         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6748         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6749         tst-tls4modb.so.
6750         * tst-tls4.c: New file.
6751         * tst-tls4moda.c: New file.
6752         * tst-tls4modb.c: New file.
6754 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6756         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6757         before __timer_dealloc.
6758         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6759         Don't call list_unlink.
6761 2003-07-29  Roland McGrath  <roland@redhat.com>
6763         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6765 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6767         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6768         Don't reuse struct aiocb A if it failed.
6769         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6770         not just one byte, as that does not block.
6772 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6774         * sysdeps/pthread/unwind-resume.c: New file.
6775         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6776         unwind-resume in csu subdir.
6777         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6778         exceptions.
6779         (librt-sysdep_routines, librt-shared-only-routines): Add
6780         rt-unwind-resume.
6781         * sysdeps/pthread/rt-unwind-resume.c: New file.
6782         * unwind-forcedunwind.c: New file.
6783         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6784         (libpthread-shared-only-routines): Likewise.
6785         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6786         * pthreadP.h (pthread_cancel_init): New prototype.
6787         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6789         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6790         attr argument const struct pthread_attr *.
6792         * res.c (__res_state): Return __resp.
6793         * descr.h: Include resolv.h.
6794         (struct pthread): Add res field.
6795         * pthread_create.c: Include resolv.h.
6796         (start_thread): Initialize __resp.
6797         * Makefile (tests): Add tst-_res1.
6798         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6799         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6800         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6801         libpthread.
6802         * tst-_res1.c: New file.
6803         * tst-_res1mod1.c: New file.
6804         * tst-_res1mod2.c: New file.
6806 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6808         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6810         * Makefile: Define various *-no-z-defs variables for test DSOs
6811         which has undefined symbols.
6813 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6815         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6816         Retry if the stwcx fails to store once_control.
6818 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6820         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6821         pthread_attr_setaffinity.
6822         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6823         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6824         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6825         * pthread_attr_destroy.c: Free cpuset element if allocated.
6826         * pthread_create.c: Pass iattr as additional parameter to
6827         create_thread.
6828         * sysdeps/pthread/createthread.c: If attribute is provided and
6829         a new thread is created with affinity set or scheduling parameters,
6830         start thread with CLONE_STOPPED.
6831         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6832         pthread_attr_setaffinity.
6833         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6834         cpuset element.
6836 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6838         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6840 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6842         * sysdeps/pthread/configure.in: Require CFI directives also for
6843         ppc and s390.
6845 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6847         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6848         Add cfi directives.
6850 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6852         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6853         CLEANUP_JMP_BUF.
6854         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6855         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6856         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6857         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6858         not self pointer in __writer.  Compare with TID to determine
6859         deadlocks.
6860         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6861         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6862         Likewise.
6863         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6864         Likewise.
6865         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6866         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6867         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6868         macros also when compiling librt.
6870 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6872         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6873         -fasynchronous-unwind-tables.
6874         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6875         (PSEUDO): Add cfi directives.
6876         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6877         Likewise.
6878         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6879         Likewise.
6881 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6883         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6884         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6885         * unwind.c (__pthread_unwind_next): Add hidden_def.
6886         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6887         Likewise.
6888         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6889         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6890         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6891         Likewise.
6892         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6893         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6894         Likewise.
6895         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6896         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6897         __pthread_unregister_cancel and __pthread_unwind_next.
6899 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6901         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6902         different symbol for the cancellation syscall wrapper and
6903         non-cancellation syscall wrapper.
6904         (PSEUDO_END): Define.
6906 2003-07-05  Richard Henderson  <rth@redhat.com>
6908         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6909         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6910         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6911         return actual return value from the syscall, not 0.
6913 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6915         * descr.h (struct pthread): Add pid field.
6916         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6917         (__reclaim_stacks): Likewise.
6918         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6919         also check for PID of the signal source.
6920         (__pthread_initialize_minimal_internal): Also initialize pid field
6921         of initial thread's descriptor.
6922         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6923         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6924         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6925         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6926         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6928 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6930         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6931         Fix use of parameter.
6932         (__libc_cleanup_pop): Likewise.
6934 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6936         * init.c (sigcancel_handler): Change parameters to match handler
6937         for SA_SIGACTION.  Check signal number and code to recognize
6938         invalid invocations.
6940 2003-07-03  Roland McGrath  <roland@redhat.com>
6942         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6943         Apply sizeof (struct pthread) bias to r13 value.
6945 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6947         * sysdeps/pthread/configure.in: Require CFI directives.
6949         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6950         definition.
6951         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6952         libpthread compilation.
6953         * unwind.c (__pthread_unwind): Add hidden_def.
6954         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6956 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6958         * libc-cancellation.c (__libc_cleanup_routine): Define.
6959         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6960         (__pthread_cleanup_pop): Define.
6962 2003-07-01  Richard Henderson  <rth@redhat.com>
6964         * sysdeps/alpha/elf/pt-initfini.c: New file.
6965         * sysdeps/alpha/pthread_spin_lock.S: New file.
6966         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6967         * sysdeps/alpha/pthreaddef.h: New file.
6968         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6969         * sysdeps/alpha/tls.h: New file.
6970         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6971         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6972         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6973         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6974         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6975         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6976         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6977         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6978         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6979         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6981 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6984         cleanup support and unwind info.
6986 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6988         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6989         Use correct cleanup handler registration.  Add unwind info.
6990         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6991         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6992         * tst-once3.c: Add cleanup handler and check it is called.
6993         * tst-once4.c: Likewise.
6994         * tst-oncex3.c: New file.
6995         * tst-oncex4.c: New file.
6996         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6998 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
7000         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7002 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
7004         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7005         (tf_msgsnd): Likewise.
7007         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7008         premature returns a bit more.
7010 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
7012         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7013         definition to the front.
7015         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7016         the cleanup functions to make the names unique.  Fix dwarf opcode
7017         un unwind table.
7018         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7019         functions to make the names unique.  Fix CFA offset for two blocks.
7021 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
7023         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7024         missing closing braces.
7025         Patch by Christophe Saout <christophe@saout.de>.
7027 2003-06-24  Roland McGrath  <roland@redhat.com>
7029         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7031 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
7033         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7034         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7036         * pthreadP.h: Declare __find_thread_by_id.
7037         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7038         * pthread_clock_gettime.c: Allow using other thread's clock.
7039         * pthread_clock_settime.c: Likewise.
7040         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7041         * Makefile: Add rules to build and run tst-clock2.
7042         * tst-clock2.c: New file.
7044 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
7046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7047         to use exception-based cleanup handler.
7048         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7050         * tst-cond8.c (ch): Announce that we are done.
7052         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7054         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7055         Also test aio_suspend with timeout value.
7057 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
7059         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7060         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7061         attribute_hidden.
7063         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7064         (__pthread_mutex_lock_internal): Likewise.
7065         (__pthread_mutex_unlock_internal): Likewise.
7066         (__pthread_mutex_unlock_usercnt): Declare.
7067         * pthread_mutex_destroy.c: Always fail if used in any way.
7068         * pthread_mutex_init.c: Update comment.
7069         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7070         * pthread_mutex_timedlock.c: Adjust __nusers.
7071         * pthread_mutex_trylock.c: Adjust __nusers.
7072         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7073         and public interfaces are wrapper with pass additional parameter.
7074         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7075         parameter zero.
7076         * tst-mutex8.c: New file.
7077         * Makefile (tests): Add tst-mutex8.
7078         * sysdeps/pthread/pthread_cond_timedwait.c: Call
7079         __pthread_mutex_unlock_usercnt.
7080         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7082         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7083         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7085         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7086         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7087         Add __nusers.
7088         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7089         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7090         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7091         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7092         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7094         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7095         * pthread_mutex_timedlock.c: Likewise.
7096         * pthread_mutex_trylock.c: Adjust __nusers.
7097         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7098         * tst-mutex9.c: New file.
7099         * Makefile (tests): Add tst-mutex9.
7100         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7101         * sysdeps/ia64/tls.h: Likewise.
7102         * sysdeps/powerpc/tls.h: Likewise.
7103         * sysdeps/s390/tls.h: Likewise.
7104         * sysdeps/sh/tls.h: Likewise.
7105         * sysdeps/x86_64/tls.h: Likewise.
7106         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7107         Change type of __owner.
7108         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7109         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7110         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7111         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7112         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7114 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
7116         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7117         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7119         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7120         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
7121         instead of nr to lll_futex_wake.  Only set errno and return -1
7122         if err < 0.
7124         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7125         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7126         return actual return value from the syscall, not 0.
7128 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
7130         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7131         find a random value.
7132         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
7133         errno==EIDRM.
7135         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7136         compat_timer_settime.
7137         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7138         compat_timer_gettime.
7139         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7140         compat_timer_getoverrun.
7141         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7142         compat_timer_delete.
7144         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7145         error-checking mutex detect busy mutexes.
7147 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7149         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7150         Add ax to clobber list.
7151         (lll_mutex_cond_lock): Likewise.
7152         (lll_mutex_unlock): Likewise.
7153         (lll_lock): Likewise.
7154         (lll_unlock): Likewise.
7156         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7157         * tst-cancel18.c: New file.
7158         * tst-cancelx18.c: New file.
7160         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7161         and tcdrain.
7163         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7164         * tst-cancel17.c: New file.
7165         * tst-cancelx17.c: New file.
7167         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7168         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7169         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7171         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7173 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
7175         * sysdeps/pthread/createthread.c (create_thread): Set
7176         header.multiple_threads unconditionally.
7177         * allocatestack.c (allocate_stack): Likewise.
7178         * descr.h (struct pthread): Add header.multiple_threads
7179         unconditionally.
7180         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7181         Define for librt.  #error if neither libpthread, libc nor librt.
7182         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7183         Likewise.
7184         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7185         CDISABLE): Likewise.
7186         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7187         CDISABLE): Likewise.
7188         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7189         CDISABLE): Likewise.
7190         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7191         CDISABLE): Likewise.  Access header.multiple_threads outside of
7192         libc and libpthread.
7193         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7194         Likewise.
7195         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7196         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7198 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7200         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7201         Also test early cancellation before the thread reaches the cancellation
7202         point.
7204         * Makefile: Compile forward.c with exceptions.
7206         * sysdeps/unix/sysv/linux/sleep.c: New file.
7208 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7210         * Makefile: Add CFLAGS definition to compile function wrappers
7211         duplicated from libc with exceptions.
7212         * tst-cancel4.c: Also check cancellation handlers.
7214         * Makefile: Add rules to build and run tst-cancel16 and
7215         tst-cancelx16.  Add missing CFLAGS definitions.
7216         * tst-cancel16.c: New file.
7217         * tst-cancelx16.c: New file.
7219 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7221         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7222         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7223         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7224         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7226         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7227         (LIBC_CANCEL_RESET): Likewise.
7228         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7229         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7230         librt-cancellation.
7231         (CFLAGS-libcrt-cancellation.c): Define.
7232         * sysdeps/pthread/librt-cancellation.c: New file.
7233         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7234         macros also when compiling librt.
7235         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7236         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7237         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7238         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7239         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7240         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7241         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7243         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7244         compat_timer_create.
7246 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7248         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7250         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7251         __register_atfork.
7252         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7253         Add libc_hidden_def.
7255 2003-06-13  Roland McGrath  <roland@redhat.com>
7257         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7258         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7260 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7262         * allocatestack.c (queue_stack): Always inline.
7263         * ptreadhP.h (__do_cancel): Likewise.
7265 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7267         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7268         a typo.
7270 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7273         (__pthread_cond_signal): Remove incorrect second addition for
7274         cond_lock!=0.
7276 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7279         (__pthread_cond_signal): Use correct futex pointer in
7280         __lll_mutex_lock_wait call.
7282         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7283         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7285 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7287         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7288         cancelable.
7289         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7290         Likewise.
7292         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7293         hand-written CFI generation code.  Since ENTRY/END also initiated
7294         CFI frames this caused two CFI sets to be generated.
7296 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7298         * cleanup_routine.c: New file.
7299         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7300         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7301         cleanup handling.
7302         * Makefile (libpthread-routines): Add cleanup_routine.
7303         Add more CFLAGS variables to compile with exceptions.  Add comments
7304         why which file needs unwind tables.
7305         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7306         tests.
7307         * tst-cancelx1.c: New file.
7308         * tst-cancelx2.c: New file.
7309         * tst-cancelx3.c: New file.
7310         * tst-cancelx4.c: New file.
7311         * tst-cancelx5.c: New file.
7312         * tst-cancelx6.c: New file.
7313         * tst-cancelx7.c: New file.
7314         * tst-cancelx8.c: New file.
7315         * tst-cancelx9.c: New file.
7316         * tst-cancelx10.c: New file.
7317         * tst-cancelx11.c: New file.
7318         * tst-cancelx12.c: New file.
7319         * tst-cancelx13.c: New file.
7320         * tst-cancelx14.c: New file.
7321         * tst-cancelx15.c: New file.
7322         * tst-cleanupx0.c: New file.
7323         * tst-cleanupx0.expect: New file.
7324         * tst-cleanupx1.c: New file.
7325         * tst-cleanupx2.c: New file.
7326         * tst-cleanupx3.c: New file.
7328         * tst-cleanup0.c: Make standard compliant.
7329         * tst-cleanup1.c: Likewise.
7331         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7332         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7333         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7334         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7335         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7336         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7337         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7338         CLEANUP_JMP_BUF.
7339         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7340         * tst-cancel12.c: New file.
7341         * tst-cancel13.c: New file.
7342         * tst-cancel14.c: New file.
7343         * tst-cancel15.c: New file.
7344         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7345         and tst-cancel15.
7347         * tst-cancel1.c: Add some comments.
7349         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7350         timeout correctly.
7352 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7354         * Makefile (CFLAGS-pthread_cancel.c): Define.
7356 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7358         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7359         Change type of __writer element to int.
7360         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7361         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7362         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7363         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7364         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7365         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7366         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7367         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7368         Compare with TID to determine deadlocks.
7369         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7370         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7371         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7372         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7373         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7374         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7375         Likewise.
7376         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7377         Likewise.
7378         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7380         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7381         Likewise.
7382         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7383         Likewise.
7384         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7385         * Makefile (tests): Add tst-rwlock12.
7386         * tst-rwlock12.c: New file.
7388 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7390         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7391         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7392         Remove bogus hidden_proto.
7393         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7394         Likewise.
7395         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7396         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7397         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7398         ___lll_mutex_timedlock): Likewise.
7400 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7403         (__pthread_cond_signal): Add some code to eventually handle
7404         cond_lock!=0.
7406 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7408         * Makefile (tests): Add tst-exec4.
7409         (tst-exec4-ARGS): Define.
7410         * tst-exec4.c: New file.
7412 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7414         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7415         Also fail if tv_nsec < 0.
7416         (__lll_timedwait_tid): Likewise.
7417         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7418         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7419         Likewise.
7420         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7421         Likewise.
7422         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7423         Likewise.
7424         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7425         Likewise.
7426         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7427         Likewise.
7428         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7429         Likewise.
7431         * Makefile (tests): Add tst-sem8 and tst-sem9.
7432         * tst-sem8.c: New file.
7433         * tst-sem9.c: New file.
7434         * sem_open.c: Fix creation of in_use record if the file exists but
7435         no internal record.
7437         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7438         definitions.
7440         * sysdeps/pthread/timer_create.c (timer_create): In case
7441         evp==NULL, assign timer ID to sival_ptr.
7443         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7444         struct pthread_unwind_buf *.
7445         (struct pthread): Likewise for cleanup_jmp_buf element.
7447         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7448         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7449         * unwind.c (__pthread_unwind_next): Likewise.
7451 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7453         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7454         (lll_futex_timed_wait): Use int for futex value parameter.
7455         (lll_futex_wake): Likewise.
7456         (lll_futex_requeue): Likewise.
7458         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7459         Replace one memory operation with one register operation.
7461         * tst-join4.c (do_test): Fix error message.
7463         * tst-rwlock6.c (do_test): Use correct format specifier.
7465         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7466         (__lll_mutex_lock_wait): Replace one memory operation with one
7467         register operation.
7468         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7469         (__lll_mutex_lock_wait): Likewise.
7471         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7472         (__lll_mutex_cond_lock): Add one to value parameter of
7473         __lll_lock_wait to reflect reality in the futex syscall.
7474         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7475         (lll_mutex_cond_lock): Likewise.
7477 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7479         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7480         New function.
7481         (lll_mutex_cond_lock): Define.
7483 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7485         * Makefile (tests): Add tst-signal6.
7486         * tst-signal6.c: New file.
7488         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7489         (__lll_mutex_unlock_force): New function
7490         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7492         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7493         (__lll_mutex_unlock_force): New function.
7494         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7496         * tst-rwlock7.c (do_test): Use correct format specifier.
7498         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7499         Find break parameter in correct asm argument.
7501 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7503         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7504         Remove out4.
7505         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7506         error occured.
7507         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7508         Add __mutex.
7509         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7510         lll_futex_requeue, lll_mutex_unlock_force): Define.
7512 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7514         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7515         (pthread_cond_t): Add __mutex.
7516         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7517         lll_futex_requeue, lll_mutex_unlock_force): Define.
7519 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7521         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7522         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7523         Add __mutex field.
7524         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7525         Define.
7526         (lll_futex_wait, lll_futex_wake): Define.
7527         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7528         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7529         FUTEX_REQUEUE instead of FUTEX_WAIT.
7530         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7531         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7532         mutex which was used in condvar structure.  Call
7533         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7534         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7536         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7537         include tcb-offsets.h.  Read wakeup value in locked region.
7538         Use the value of gbr register as THREAD_ID.
7539         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7540         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7541         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7543         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7544         macros.
7546 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7548         * sysdeps/pthread/pthread_cond_broadcast.c
7549         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7551 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7553         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7554         typo in register name.
7555         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7556         correctly.  Actually use requeue.  Little optimization.
7557         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7558         mutex address early.  Handle cancellation state as 32-bit value.
7559         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7560         Remove unnecessary label.
7562 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7564         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7565         instead of FUTEX_WAIT.
7566         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7568         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7570         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7571         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7572         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7573         of __pthread_mutex_lock_internal.
7574         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7575         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7576         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7577         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7579         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7580         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7581         Add pthread_mutex_cond_lock.
7582         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7583         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7584         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7585         lll_mutex_cond_lock.
7586         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7587         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7588         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7589         Add __mutex field.
7590         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7591         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7593         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7594         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7596         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7597         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7598         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7599         macro don't define aliases.
7601         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7602         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7603         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7604         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7606         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7607         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7609         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7611 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7613         * sem_open.c: Fix one endless loop.  Implement correct semantics
7614         wrt opening the same semaphore more then once.
7615         * sem_close.c: Adjust for sem_open change.
7616         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7617         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7618         * Makefile (tests): Add tst-sem7.
7619         * tst-sem7.c: New file.
7621 2003-05-16  Roland McGrath  <roland@redhat.com>
7623         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7624         uninitialized variable braino.
7626 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7628         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7629         test for syscall availability.
7631         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7632         __no_posix_timers to -1 if the syscalls don't exist.
7634         * pthread_join.c (pthread_join): Set tid field of the joined
7635         thread to -1.  This isn't necessary but helps to recognize some
7636         error conditions with almost no cost.
7638         * allocatestack.c (FREE_P): Also negative values indicate an
7639         unused stack.
7641         * unwind.c: Include <unistd.h>.
7643 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7645         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7647 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7649         * Makefile (crti-objs, crtn-objs): New variables.
7650         (omit-deps, extra-objs): Add crtn.
7651         ($(objpfx)libpthread.so): Depend on both crti and crtn
7652         and links to them in multidir.
7653         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7655 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7657         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7658         (lll_mutex_unlock): Use atomic_exchange_rel.
7660 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7662         * cond-perf.c (cons): Add missing locking around setting of alldone.
7664 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7666         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7667         related macros.
7668         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7670 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7672         * tst-sem6.c: New file.
7673         * Makefile (tests): Add tst-sem6.
7675         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7676         Use atomic_exchange_rel instead of atomic_exchange.
7677         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7678         Likewise.
7680         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7681         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7682         vsyscall is possible.
7684         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7685         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7686         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7687         pthread_setaffinity_np.
7688         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7689         and pthread_setaffinity_np.
7690         * Makefile (libpthread-routines): Add pthread_getaffinity and
7691         pthread_setaffinity.
7693         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7694         use it in case mmap to allocate the stack fails.
7695         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7696         ARCH_MAP_FLAGS here.
7697         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7698         ARCH_RETRY_MMAP.
7700 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7702         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7703         handler implementation.  It is now lockless in fork().
7704         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7705         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7706         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7707         declare the __fork_*_lists.
7708         (struct fork_handler): Include pointers to all three functions.
7709         Add next, refcntr and need_signal elements.
7710         (__fork_handlers): New declaration.
7711         (__register_atfork_malloc): Remove declaration.
7712         (HAVE_register_atfork_malloc): Remove definition.
7713         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7714         __pthread_child_handler variable.
7715         (__libc_pthread_init): Use __register_atfork instead of explicitly
7716         adding to the list.
7717         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7718         and lll_futex_wake.
7719         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7721         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7722         function must never be reached.
7724         * cond-perf.c: New file.
7726 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7728         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7730 2003-05-04  Roland McGrath  <roland@redhat.com>
7732         * Makefile ($(objpfx)../libc.so): New target.
7734 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7736         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7737         (pthread_condattr_t): Size is only an int, don't use long for
7738         alignment.
7739         (pthread_mutexattr_t): Likewise.
7740         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7741         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7742         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7744 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7746         * sysdeps/i386/tls.h: Define THREAD_ID.
7747         * sysdeps/ia64/tls.h: Likewise.
7748         * sysdeps/powerpc/tls.h: Likewise.
7749         * sysdeps/s390/tls.h: Likewise.
7750         * sysdeps/sh/tls.h: Likewise.
7751         * sysdeps/x86_64/tls.h: Likewise.
7752         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7753         record ownership.
7754         * pthread_mutex_timedlock.c: Likewise.
7755         * pthread_mutex_trylock.c: Likewise.
7756         * pthread_mutex_unlock.c: Likewise.
7757         * pthread_rwlock_trywrlock.c: Likewise.
7758         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7759         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7760         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7761         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7763         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7764         flag.
7766 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7768         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7769         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7770         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7771         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7772         Make __align long long instead of long.
7773         (pthread_rwlock_t): Formatting.
7774         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7775         (pthread_rwlock_t): Formatting.
7776         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7777         (pthread_cond_t): Make __align long long instead of long.
7778         (pthread_rwlock_t): Move __flags field to the same position as in
7779         linuxthreads.
7781 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7783         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7784         * tst-rwlock7.c (do_test): Likewise.
7786 2003-04-26  Roland McGrath  <roland@redhat.com>
7788         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7790 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7792         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7793         sizeof (struct pthread).
7794         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7795         1 struct pthread.
7796         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7797         to 0.
7798         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7799         struct pthread.
7800         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7801         to 32-bit bytes.
7802         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7803         tcbp.
7804         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7805         unneccessarily.
7806         (NO_TLS_OFFSET): Define.
7807         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7808         add TLS_TCB_SIZE unnecessarily.
7810 2003-04-22  Roland McGrath  <roland@redhat.com>
7812         * Makeconfig (shared-thread-library): Reverse link order to work
7813         around linker bug.
7815 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7817         * semaphore.h: Fix typo in comment.
7819 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7821         * sysdeps/pthread/sigfillset.c: New file.
7823         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7824         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7825         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7826         * sysdeps/pthread/sigaction.c: Likewise.
7827         * sysdeps/pthread/sigprocmask.c: New file.
7828         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7829         __SIGRTMIN+1.
7830         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7831         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7832         in this case.
7834 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7836         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7837         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7839         * sysdeps/unix/sysv/linux/unregister-atfork.c
7840         (__unregister_atfork): Don't free memory not allocated dynamically.
7842         * semaphore.h: Remove __THROW marker from cancellation points.
7843         * nptl/sysdeps/pthread/pthread.h: Likewise.
7845 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7847         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7848         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7849         __THROW.
7851 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7853         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7855 2003-04-15  Roland McGrath  <roland@redhat.com>
7857         * forward.c (__pthread_unwind): Tweak to avoid warning.
7859 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7861         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7863 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7865         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7866         overflow CFA advance instructions.
7867         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7869 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7871         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7872         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7873         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7874         defined.
7876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7877         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7878         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7879         DW_CFA_advance_loc for .Laddl-.Lsubl.
7881 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7883         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7884         position-independent unwind data for static libraries.
7885         Add missing unwind info.  Add comments.
7887         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7892 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7894         * Makefile: Make sure all cancellation points are compiled with
7895         exception and asynchronous unwind tables.
7897         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7898         which mishandles loading of global object addresses in PIC.
7899         (THREAD_SETMEM_NC): Likewise.
7901 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7903         * pthread.h: Define new data structure for cleanup buffer.  Declare
7904         new cleanup handler interfaces.
7905         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7906         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7907         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7908         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7909         it.  Declare old cleanup handler installation functions.
7910         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7911         handling.
7912         * cleanup_defer.c: Likewise.
7913         * cleanup_compat.c: New file.  Old cleanup code.
7914         * cleanup_def_compat.c: New file.  Old cleanup code.
7915         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7916         if own thread descriptor.
7917         * unwind.c: New file.
7918         * forward.c: Add __pthread_unwind.
7919         * init.c (pthread_functions): Add __pthread_unwind.
7920         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7921         Add ptr___pthread_unwind.
7922         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7923         and unwind function.
7924         * Makefile (libpthread-routines): Add cleanup_compat,
7925         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7926         table generation if necessary.
7927         * version.c: Record whether unwind support is compiled in.
7928         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7929         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7930         handler interfaces.
7931         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7932         complication to generate unwind information for syscall wrappers.
7933         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7934         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7935         __cleanup_fct_attribute.
7937         * Makefile: Add rules to build and run tst-cleanup0.
7938         * tst-cleanup0.c: New file.
7939         * tst-cleanup0.expect: New file.
7941         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7942         caller.  Optimize to avoid often unecessary local variable.
7944 2003-04-11  Roland McGrath  <roland@redhat.com>
7946         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7947         sets variable `multidir'; include that.
7948         (generated): Add it.
7949         ($(objpfx)$(multidir)/crti.o): New target.
7950         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7952 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7954         * tst-attr2.c (do_test): Add cast to avoid warning.
7955         * tst-mutex4.c (do_test): Likewise.
7957 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7959         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7960         in child.
7962 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7964         * Makefile (tests): Add tst-detach1.
7965         * tst-detach1.c: New file.
7967 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7969         * sysdeps/pthread/pthread.h: Remove duplicate
7970         pthread_cleanup_{push,pop} definitions.
7972         * tst-barrier2.c: Eliminate warnings.
7973         * tst-cancel4.c: Likewise.
7974         * tst-cond4.c: Likewise.
7975         * tst-cond6.c: Likewise.
7976         * tst-detach1.c: Likewise.
7977         * tst-rwlock4.c: Likewise.
7978         * tst-rwlock6.c: Likewise.
7979         * tst-rwlock7.c: Likewise.
7980         * tst-sem3.c: Likewise.
7981         * tst-spin2.c: Likewise.
7982         * tst-umask1.c: Likewise.
7984 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7986         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7988 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7990         * descr.h (struct pthread): Move cancelhandling member to the front.
7992 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7994         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7995         malloc_parent, and malloc_child statically.
7996         (__register_atfork_malloc): New function.
7997         (free_mem): Don't free any of the malloc_* variables on the list.
7998         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7999         Define HAVE_register_atfork_malloc.
8001 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
8003         * sysdeps/pthread/createthread.c (create_thread): Add some more
8004         comments explaining when to set multiple_threads and when not.
8006         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8007         THREAD_ATOMIC_BIT_SET if not already defined.
8008         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8009         THREAD_ATOMIC_BIT_SET:
8010         * sysdeps/x86_64/tls.h: Likewise.
8011         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8012         THREAD_ATOMIC_CMPXCHG_VAL.
8013         (_pthread_cleanup_pop_restore): Likewise.
8014         * cancellation.c (__pthread_enable_asynccancel): Likewise.
8015         (__pthread_enable_asynccancel_2): Likewise.
8016         (__pthread_disable_asynccancel): Likewise.
8017         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8018         (__libc_disable_asynccancel): Likewise.
8019         * init.c (sigcancel_handler): Likewise.
8020         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8021         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8023 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
8025         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8026         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8027         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8028         * Makefile (tests): Add tst-cancel11.
8029         * tst-cancel11.c: New file.
8031 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
8033         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8034         round, not the first.  Use specific_used flag instead of local
8035         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
8036         (__free_tcb): Don't call deallocate_tsd here.
8037         (start_thread): Call deallocate_tsd here.
8038         * pthread_setspecific.c: Set specific_used flag really only when
8039         needed.
8040         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8041         * tst-tsd3.c: New file.
8042         * tst-tsd4.c: New file.
8044 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8046         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8047         Use atomic_exchange_and_add instead of __lll_add.
8048         (__lll_mutex_timedlock): Likewise.
8049         Patch by Ian Wienand.
8051 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
8053         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8054         (SINGLE_THREAD_P): Fix typo.
8055         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8057 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8059         * Makefile (tests): Add tst-align.
8060         * tst-align.c: New file.
8061         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8063         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8064         function correctly.
8066         * tst-tsd2.c: Add casts to avoid warnings.
8068 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
8070         * descr.h (struct pthread): Move most often used elements to the front.
8072 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
8074         * Makefile (libpthread-routines): Add pthread_atfork.
8075         (libpthread-static-only-routines): Add pthread_atfork.
8077 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8079         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8080         of TLS_DTV_AT_TP.
8081         (INSTALL_DTV): Add parens.
8082         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8083         Use passed descr instead of THREAD_SELF.
8084         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8085         (__lll_mutex_timedlock_wait): Correct expected value after
8086         spurious wakeup.
8087         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8088         Release lock before waking up the waiters.
8089         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8090         criteria.  Reorderstruct passed to cleanup handler.  Fix
8091         handling of cancellation and failung pthread_mutex_unlock call.
8092         Use __pthread_enable_asynccancel_2 instead of
8093         __pthread_enable_asynccancel.
8094         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8095         Return result of lock re-get if it fails.
8096         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8097         for __pthread_cleanup_push.
8098         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8099         completely broken rwlock implementation.
8100         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8101         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8102         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8103         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8105         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
8106         versioned_symbol macro.
8107         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8108         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8110 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
8112         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8113         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
8114         and __helper_tid.
8115         (struct timer): Remove th and bar field.
8116         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8117         debugging code.  Create only one helper thread.
8118         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8119         helper thread.
8120         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8121         Renamed.  Define statically.  Use thread info from siginfo.
8122         (__helper_once): New variable.
8123         (__helper_tid): New variable.
8124         (__reset_helper_control): New function.
8125         (__start_helper_thread): New function.
8127         * pthread_create.c (start_thread): Don't use setjmp inside
8128         __builtin_expect to work around gcc bug.
8130         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8131         timer_delete syscall fails, but not with ENOSYS, set
8132         __no_posix_timers.
8134         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8135         (timer_settime): Fix typo.
8136         * sysdeps/unix/sysv/linux/timer_getoverr.c
8137         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8139 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
8141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8142         offset of cleanupbuf.__prev.
8144 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
8146         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8147         of included file.
8149 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
8151         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8152         NULL provide default definition to syscall.
8154 2003-03-25  Roland McGrath  <roland@redhat.com>
8156         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8157         (timer_id2ptr): Fix typo.
8159 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
8161         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8162         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8163         * sysdeps/ia64/pthreaddef.h: Likewise.
8164         * sysdeps/powerpc/pthreaddef.h: Likewise.
8165         * sysdeps/s390/pthreaddef.h: Likewise.
8166         * sysdeps/sh/pthreaddef.h: Likewise.
8167         * sysdeps/x86_64/pthreaddef.h: Likewise.
8168         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8169         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8170         being changed.
8171         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8172         SIGTIMER is not unblocked.
8173         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8174         RT signal taken.
8175         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8176         be send.
8177         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8178         pass pointer through as ID.
8179         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8180         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8181         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8182         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8183         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8184         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8185         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8186         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8187         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8188         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8189         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8190         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8191         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8192         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8193         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8194         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8195         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8196         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8197         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8198         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8199         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8200         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8201         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8202         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8203         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8204         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8205         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8206         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8207         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8208         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8209         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8210         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8211         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8213         * pthreadP.h: Remove FRAME_LEFT definition.
8214         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8215         already left frame.  Programs which have this problem are not POSIX
8216         compliant.
8217         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8219 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8221         * sysdeps/pthread/tst-timer.c: Check return values of the
8222         functions we test.
8224 2003-03-23  Roland McGrath  <roland@redhat.com>
8226         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8227         * tst-tls3mod.c: Likewise.
8228         * tst-tls1.c: Likewise.
8229         * tst-tls2.c: Likewise.
8231         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8232         undefined behavior.
8234         * tst-join5.c (tf1, tf2): Add a cast.
8236         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8238         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8239         Don't test anything.
8240         * tst-cond4.c: Likewise.
8241         * tst-cond6.c: Likewise.
8242         * tst-flock2.c: Likewise.
8243         * tst-mutex4.c: Likewise.
8244         * tst-rwlock4.c: Likewise.
8245         * tst-signal1.c: Likewise.
8246         * tst-spin2.c: Likewise.
8247         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8249         * tst-mutex4.c: Use test-skeleton.c.
8250         * tst-spin2.c: Likewise.
8251         * tst-sysconf.c: Likewise.
8252         * tst-barrier2.c: Likewise.
8253         * tst-cond4.c: Likewise.
8254         * tst-cond6.c: Likewise.
8255         * tst-rwlock4.c: Likewise.
8256         * tst-unload.c: Likewise.
8257         * tst-flock2.c (do_test): Use return instead of exit.
8259 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8261         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8263 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8265         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8266         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8267         instead of __lll_compare_and_swap.
8268         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8269         Likewise.
8270         Removed definition if __lll_compare_and_swap.
8272         * cancellation.c: Adjust for new form of compare&exchange macros.
8273         * cleanup_defer.c: Likewise.
8274         * init.c: Likewise.
8275         * libc-cancellation.c: Likewise.
8276         * old_pthread_cond_broadcast.c: Likewise.
8277         * old_pthread_cond_signal.c: Likewise.
8278         * old_pthread_cond_timedwait.c: Likewise.
8279         * old_pthread_cond_wait.c: Likewise.
8280         * pthread_cancel.c: Likewise.
8281         * pthread_create.c: Likewise.
8282         * pthread_detach.c: Likewise.
8283         * pthread_join.c: Likewise.
8284         * pthread_key_delete.c: Likewise.
8285         * pthread_setcancelstate.c: Likewise.
8286         * pthread_setcanceltype.c: Likewise.
8287         * pthread_timedjoin.c: Likewise.
8288         * pthread_tryjoin.c: Likewise.
8289         * sysdeps/pthread/createthread.c: Likewise.
8291 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8293         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8294         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8295         definitions.  Replace uses with calls to atomic_* functions.
8296         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8297         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8298         __lll_test_and_set calls with atomic_exchange_and_add and
8299         atomic_exchange calls respectively.
8300         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8301         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8302         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8303         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8304         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8305         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8306         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8308         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8309         returns the old value.
8311 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8313         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8314         int for variable OLDVAL and correct inline assembler contraint.
8315         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8316         type int for variable OLD.
8318         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8319         only for s390-32.
8320         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8321         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8322         instead of multiple_threads field in the TCB.
8324 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8326         * sysdeps/i386/i686/bits/atomic.h: Removed.
8327         * sysdeps/i386/i586/bits/atomic.h: Removed.
8328         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8329         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8330         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8331         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8332         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8333         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8334         * atomic.h: Removed.  Moved to glibc.
8336         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8337         support for clock selection.
8339         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8340         signalling waiters.
8342 2003-03-18  Roland McGrath  <roland@redhat.com>
8344         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8345         Add __lll_rel_instr first.  Add memory clobber.
8346         (lll_mutex_unlock): Use __lll_test_and_set.
8347         From Paul Mackerras <paulus@samba.org>.
8349         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8350         unconditionally.
8351         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8352         (SINGLE_THREAD_P):  Add `header.' prefix.
8353         From Paul Mackerras <paulus@samba.org>.
8355         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8356         pthread_timedjoin_np to ...
8357         (libpthread: GLIBC_2.3.3): ... here.
8358         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8360         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8361         Avoid shadowing VAL variable.
8363         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8364         New macro.
8366 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8368         * Makefile (tests): Add tst-cond11.
8369         * tst-cond11.c: New file.
8371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8372         struct passed to cleanup handler to eliminate one more
8373         instruction.
8374         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8376         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8377         (pthrad_cond_t): Replace __unused field with __clock.
8379         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8380         waken all waiters in cleanup handler.
8381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8384         * pthread_condattr_getclock.c: New file.
8385         * pthread_condattr_setclock.c: New file.
8386         * sysdeps/pthread/pthread.h: Declare these new functions.
8387         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8388         * Makefile (libpthread-routines): Add the new functions.
8389         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8390         Renamed field to value.  Document use of the bits.
8391         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8392         change.
8393         * pthread_condattr_setpshared.c: Likewise.
8394         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8395         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8396         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8397         Add __clock field.
8398         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8399         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8400         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8401         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8403         Implement clock selection.
8404         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8405         * pthread-errnos.sym: Add ENOSYS.
8406         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8407         _POSIX_CLOCK_SELECTION.
8408         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8410         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8411         invalid .size directive.
8413 2003-03-17  Roland McGrath  <roland@redhat.com>
8415         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8416         Formatting tweaks.
8418 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8420         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8421         Use __lll_add instead of spelling it out.  Use protected symbol names.
8422         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8423         Use __lll_add.
8424         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8425         Renamed from lll_compare_and_swap.  Use new name where necessary.
8426         (__lll_add): Defined.
8427         (__lll_dec_if_positive): Defined.
8428         (__lll_test_and_set): Defined.
8429         * sysdeps/ia64/pthread_spin_init.c: Removed.
8430         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8431         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8432         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8433         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8434         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8435         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8436         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8437         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8438         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8439         __sync_lock_release_si.
8440         Patch by Jakub Jelinek.
8442         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8443         Fix timeout handling.
8444         (__lll_timedwait_tid): Likewise.
8445         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8446         Patch by Jakub Jelinek.
8448         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8450 2003-03-17  Roland McGrath  <roland@redhat.com>
8452         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8453         * sysdeps/pthread/pthread_spin_init.c: New file.
8454         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8455         * sysdeps/powerpc/Makefile: New file.
8456         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8457         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8458         * sysdeps/powerpc/pthreaddef.h: New file.
8459         * sysdeps/powerpc/tcb-offsets.sym: New file.
8460         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8461         * sysdeps/powerpc/tls.h: New file.
8462         * sysdeps/powerpc/bits/atomic.h: New file.
8463         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8464         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8465         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8467         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8468         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8469         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8470         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8471         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8472         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8473         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8474         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8475         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8476         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8477         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8478         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8479         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8480         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8481         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8483         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8484         not gettimeofday.
8485         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8486         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8487         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8488         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8489         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8491 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8493         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8494         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8497         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8499 2003-03-16  Roland McGrath  <roland@redhat.com>
8501         * tst-fork4.c: Include <string.h>.
8502         * tst-signal2.c: Likewise.
8503         * tst-mutex5.c (do_test): exit -> return.
8504         * tst-mutex2.c: Include <stdlib.h>.
8506 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8508         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8509         (__lll_mutex_timedlock_wait): Correct expected value after
8510         spurious wakeup.  Otherwise we would never wait again.
8512         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8513         zone versus inline asm stupidity.  Use correct instructions.
8515         * tst-rwlock6.c: Add some more status output.
8517 2003-03-15  Roland McGrath  <roland@redhat.com>
8519         * sysdeps/pthread/configure.in: New file.
8520         * sysdeps/pthread/configure: New file (generated).
8522 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8524         * allocatestack.c (allocate_stack): Store the exact stack size of
8525         user allocated stacks.
8527 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8529         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8530         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8531         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8532         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8533         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8534         Use `header.' prefix.
8535         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8537 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8539         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8540         __builtin_frame_address, use stack pointer.
8542         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8543         instead of __builtin_frame_pointer.
8545 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8547         * tst-basic1.c (do_test): Add cast to avoid warning.
8548         * tst-basic2.c (do_test): Likewise.
8550         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8551         amount of stack correction.
8553         * tst-fork4.c: Use test-skeleton.c.
8555 2003-03-14  Roland McGrath  <roland@redhat.com>
8557         * init.c: Fix typo "#eli" for "#else".
8559 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8561         * allocatestack.c (__stack_user): Use hidden_data_def.
8562         * pthread_create.c (__pthread_keys): Likewise.
8564         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8566 2003-03-14  Roland McGrath  <roland@redhat.com>
8568         * tst-fork4.c: New file.
8569         * Makefile (tests): Add it.
8571         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8572         we always define the padding space.
8573         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8574         stopped supporting its own extensions fully.
8575         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8576         struct also called `header', so `header.multiple_threads' is the field
8577         name to use on all machines.
8578         * allocatestack.c (allocate_stack): Use `header.' prefix.
8579         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8580         * pthread_create.c (__pthread_create_2_1): Likewise.
8581         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8582         (THREAD_SELF): Likewise.
8583         * sysdeps/x86_64/tls.h: Likewise.
8584         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8585         (SINGLE_THREAD_P): Likewise.
8586         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8587         (SINGLE_THREAD_P): Likewise.
8588         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8589         (SINGLE_THREAD_P): Likewise.
8591         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8592         value directly.
8594 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8596         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8597         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8599         * pthread_create.c (start_thread): setjmp is expected to return 0.
8601         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8602         (THREAD_GETMEM_NC): Likewise.
8604 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8606         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8607         and the size of the stack which must be allocated is a multiple,
8608         allocate one more page.
8609         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8610         MULTI_PAGE_ALIASING.
8612 2003-03-13  Roland McGrath  <roland@redhat.com>
8614         * pthread_create.c (start_thread): Set EXITING_BIT after the
8615         event-reporting (and destructors), not before.
8617 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8619         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8620         lll_futex_wake): Declare register variables as long int instead of
8621         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8622         Make syscall arguments clobbered by the syscall.
8623         (lll_futex_wait): Define using lll_futex_timed_wait.
8625         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8626         to void *.
8628         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8629         PPID if [! NDEBUG].
8631         * allocatestack.c (nptl_ncreated): Only declare if
8632         COLORING_INCREMENT != 0.
8634         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8635         (__libc_enable_asynccancel_2): Remove prototype.
8637         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8638         ctid to match kernel.
8640 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8642         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8643         libc_multiple_threads.
8644         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8645         __libc_multiple_threads to...
8646         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8648         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8649         versioning.
8650         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8651         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8653         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8654         (__pthread_once_internal): Define.
8656         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8657         macros instead of .symver directly.
8658         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8659         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8661         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8662         * sysdeps/x86_64/tcb-offsets.sym: New file.
8663         * sysdeps/x86_64/Makefile: New file.
8665         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8666         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8667         to access own pthread_t in TCB.
8668         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8669         Likewise.
8670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8671         Likewise.
8672         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8674 2003-03-12  Roland McGrath  <roland@redhat.com>
8676         * pthread-errnos.sym: New file.
8677         * Makefile (gen-as-const-headers): New variable, list that file.
8678         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8679         header <pthread-errnos.h> instead of defining errno values here.
8680         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8681         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8682         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8683         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8684         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8685         Likewise.
8686         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8687         Likewise.
8688         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8689         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8690         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8691         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8692         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8693         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8694         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8695         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8696         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8697         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8698         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8699         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8700         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8701         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8702         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8703         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8704         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8705         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8706         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8707         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8708         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8709         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8710         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8711         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8712         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8713         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8714         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8716         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8717         CLONE_CHILD_SETTID worked.
8719 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8721         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8722         file.
8723         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8724         file.
8726         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8727         (pthread_cond_t): Add padding.
8729         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8730         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8731         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8733         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8734         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8735         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8736         (__pthread_rwlock_timedrdlock): Likewise.
8737         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8738         (__pthread_rwlock_wrlock): Likewise.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8740         (__pthread_rwlock_rdlock): Likewise.
8742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8744         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8745         result of lock re-get if it fails.
8747 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8749         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8750         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8751         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8752         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8753         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8754         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8755         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8756         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8757         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8758         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8760         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8761         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8763         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8764         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8765         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8766         (create_thread): Likewise.
8767         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8768         * init.c (__pthread_initialize_minimal_internal): Initialize
8769         __libc_multiple_threads_ptr if necessary.
8770         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8771         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8772         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8773         __libc_multiple_threads.
8774         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8775         necessary.
8777         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8778         (THREAD_SETMEM_NC): Likewise.
8780         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8781         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8782         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8783         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8785         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8786         Eliminate one entire instruction.
8788         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8789         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8791         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8792         instead of __pthread_enable_asynccancel.
8793         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8794         (__pthread_cond_wait): Likewise.
8795         * sysdeps/pthread/pthread_cond_timedwait.c
8796         (__pthread_cond_timedwait): Likewise.
8797         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8799         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8800         (__condvar_cleanup): Wake up all waiters in case we got signaled
8801         after being woken up but before disabling asynchronous
8802         cancellation.
8803         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8804         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8805         (__condvar_cleanup): Likewise.
8807         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8808         Make it an error if architecture has no #if case.  Add x86-64.
8810         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8811         pt-initfini.s generation.
8813         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8814         (TLS_INIT_TP): Fix typo.
8816 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8818         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8819         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8821         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8822         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8823         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8824         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8825         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8826         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8827         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8828         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8830 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8832         * sysdeps/pthread/pthread_cond_timedwait.c
8833         (__pthread_cond_timedwait): Return the result of the final
8834         locking.  If it succeeds, the regular function return value.
8836         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8837         Return result of the final locking.
8838         * version.c (__nptl_main): Work around problems with the strange
8839         INTERNAL_SYSCALL macro on ppc32.
8840         * init.c (__pthread_initialize_minimal_internal): Unblock
8841         SIGCANCEL in case the parent blocked it.
8842         Reported by Paul Mackerras <paulus@samba.org>.
8844         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8845         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8848 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8850         * sysdeps/pthread/pthread_cond_timedwait.c
8851         (__pthread_cond_timedwait): Unlock and fail if
8852         __pthread_mutex_unlock_internal failed.
8854         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8855         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8856         Use ARCH_CLONE.
8857         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8858         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8859         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8860         ALLOCATE_STACK): New macros.
8861         (TLS_TPADJ): New macro.
8862         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8863         (allocate_stack): Handle TLS_DTV_AT_TP and
8864         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8865         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8866         Don't set PD->self.
8867         * init.c [__ia64__] (__NR_set_tid_address): Define.
8869         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8870         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8871         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8872         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8873         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8874         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8875         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8876         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8877         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8878         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8879         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8880         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8881         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8882         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8883         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8884         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8885         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8886         * sysdeps/ia64/bits/atomic.h: New file.
8887         * sysdeps/ia64/Makefile: New file.
8888         * sysdeps/ia64/pthread_spin_init.c: New file.
8889         * sysdeps/ia64/pthread_spin_lock.c: New file.
8890         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8891         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8892         * sysdeps/ia64/pthreaddef.h: New file.
8893         * sysdeps/ia64/tcb-offsets.sym: New file.
8894         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8895         * sysdeps/ia64/tls.h: New file.
8897         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8898         to syscall instead of no arguments.
8900 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8902         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8903         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8904         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8905         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8907         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8908         unused code.
8910         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8912         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8913         lowlevelbarrier.sym.
8914         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8915         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8916         Include lowlevelbarrier.h and don't define offsets locally.
8917         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8919         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8920         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8921         (__lll_mutex_timedlock_wait): Likewise.
8922         (lll_mutex_lock): Adjust asm for that.
8923         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8924         (lll_lock): Adjust asm for operand order change.
8925         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8926         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8928         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8929         Reverse order of parameters.
8930         (__lll_timedwait_tid): Remove regparms attribute.
8931         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8932         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8934         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8935         (__lll_timedwait_tid): Remove one unnecessary instruction.
8937         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8938         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8939         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8940         lowlevelmutex.S.
8942         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8943         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8944         for NOT_IN_libc.
8945         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8946         lowlevellock.S.
8948         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8949         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8950         for libc.so.
8951         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8952         define LOCK here (if UP is not defined).  The actual code is in
8953         lowlevelmutex.S.
8955         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8956         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8957         __lll_timedwait_tid for libc.so.
8958         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8959         define LOCK here (if UP is not defined).  The actual code is in
8960         lowlevellock.S.
8962         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8963         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8964         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8965         instead of lowlevelsem.h.
8966         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8967         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8968         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8970         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8971         lowlevelrwlock.sym.
8972         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8973         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8974         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8977         register loading.
8978         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8979         last changed.  D'oh.
8981         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8983         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8984         of __libc_locking_needed.
8985         (lll_trylock): Initialize %eax to zero.
8987         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8988         pthread_cond_t definition.
8990 2003-03-10  Roland McGrath  <roland@redhat.com>
8992         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8993         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8994         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8995         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8996         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8998         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8999         Instead of setting PD->multiple_threads, set globals
9000         __pthread_multiple_threads and __libc_multiple_threads.
9001         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9002         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9003         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9005         * descr.h (struct pthread): Conditionalize first member on
9006         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
9007         containing an anonymous tcbhead_t.  Move `list' member out.
9008         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9009         * allocatestack.c: Remove use of `header.data.' prefix.
9010         * pthread_create.c: Likewise.
9011         * init.c (__pthread_initialize_minimal_internal): Likewise.
9012         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9013         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9014         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9015         * sysdeps/x86_64/tls.h: Likewise.
9016         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9017         (SINGLE_THREAD_P): Likewise.
9018         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9019         (SINGLE_THREAD_P): Likewise.
9020         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9021         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9023 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
9025         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9027         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9028         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9030         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9031         leftovers from the ia32 code.
9033         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9034         memory load.
9035         (clear_once_control): Don't load %esi.
9037         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9038         handling.
9040         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9042         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9043         * sysdeps/unix/sysv/linux/createthread.c: ...here.
9045         * Makefile (tests): Add tst-cond10.
9046         * tst-cond10.c: New file.
9048 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
9050         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9051         * tst-signal3.c (do_test): Likewise.
9052         * tst-sem5.c (do_test): Likewise.
9053         * tst-kill6.c (do_test): Likewise.
9054         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
9056         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9057         of inc/dec.
9058         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9059         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9060         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9061         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9062         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9063         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9064         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9065         Likewise.
9066         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9067         Likewise.
9068         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9069         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9073         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9074         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9075         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9077         * allocatestack.c (allocate_stack): If mprotect() fails free the
9078         TLS memory.
9080 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
9082         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9084         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9085         lll_wake_tid.  This was used only to work around kernel limits in
9086         the early days.
9087         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9088         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9089         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9090         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9092         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9093         (__pthread_initialize_minimal_internal): Change initialization of
9094         __static_tls_align_m1 appropriately.
9095         * pthreadP.h (__static_tls_align_m1): Renamed from
9096         __static_tls_align.
9097         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9098         instead of __static_tls_align-1.
9100 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
9102         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9104         * pthread_create.c: Define __pthread_keys using nocommon
9105         attribute, not by placing it explicitly in bss.
9106         Remove DEFINE_DEALLOC definition.  Not needed anymore.
9108         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9109         Use it in mmap call to allocate stacks.
9111         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9113         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9114         result of the thread function.
9116 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
9118         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
9119         version is just fine.
9121         * sysdeps/unix/sysv/linux/libc_pthread_init.c
9122         (__pthread_child_handler): Renamed from pthread_child_handler,
9123         exported, and marked hidden.  Change all users.
9124         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9125         free __pthread_child_handler from child list.
9127 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9129         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9131         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9132         Fix handling of cancellation and failing pthread_mutex_unlock call.
9133         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9134         (__pthread_cond_wait): Likewise.
9136         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9137         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9138         lll_futex_timed_wait call.
9139         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9140         (pthread_rwlock_timedwrlock): Likewise.
9142         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9143         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9144         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9146         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9147         check of lll_futex_wake return value.
9149 2003-03-03  Roland McGrath  <roland@redhat.com>
9151         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9153         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9154         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9155         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9157 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
9159         * sysdeps/pthread/timer_create.c (timer_create): Return correct
9160         error for CPU clocks.
9162         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9163         _POSIX_MONOTONIC_CLOCK.
9164         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9166         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9167         recent kernels.
9169 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9171         * descr.h (struct pthread): Move cleanup field to the front.
9173 2003-03-01  Roland McGrath  <roland@redhat.com>
9175         * sem_open.c (sem_open): Braino fix.
9177 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9179         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9181         __pthread_cleanup_pop functionality.
9182         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9184         * descr.h (struct pthread): Move tid field to the front now that
9185         it is often used.
9187         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9188         (__lll_mutex_timedlock_wait): Remove.
9189         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9190         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9191         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9192         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9193         (lll_unlock_wake_cb): Don't save and restore %esi.
9194         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9195         %esi.
9196         (__lll_timedwait_tid): Add alignment.
9197         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9198         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9199         %esi.
9200         (__lll_timedwait_tid): Removed.
9201         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9202         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9203         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9204         (pthread_barrier_wait): Don't save, load, and restore %esi for
9205         last thread.
9206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9207         (__pthread_cond_signal): Don't save, load, and restore %esi.
9208         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9209         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9210         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9211         Don't save, load, and restore %esi.
9213 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9215         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9216         Release lock before waking up the waiters.
9218         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9220         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9221         (reader_thread): Likewise.
9223         * sysdeps/pthread/pthread_rwlock_unlock.c
9224         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9225         to wake up readers if there are none.
9227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9228         Release internal lock before wake threads.
9230 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9232         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9233         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9234         predefined.
9235         * tst-rwlock9.c: Likewise.
9236         * tst-rwlock10.c: New file.
9237         * tst-rwlock11.c: New file.
9239         * Makefile (tests): Add tst-dlsym1.
9240         * tst-dlsym1.c: New file.
9242         * init.c (__pthread_initialize_minimal_internal): Set
9243         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9244         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9246 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9248         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9250         * tst-cond2.c: Fix sychronization with child.
9252         * tst-rwlock8.c (reader_thread): Remove unused variable.
9254         * Makefile: Add rules to build and run tst-tls3.
9255         * tst-tls3.c: New file.
9256         * tst-tls3mod.c: New file.
9258         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9259         * tst-rwlock8.c: New file.
9260         * tst-rwlock9.c: New file.
9261         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9262         complete broken rwlock implementation.
9263         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9264         Likewise.
9265         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9266         Likewise.
9267         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9269         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9270         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9271         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9272         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9273         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9275 2003-02-23  Roland McGrath  <roland@redhat.com>
9277         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9279 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9281         * Makefile (tests): Add tst-context1.
9282         * tst-context1.c: New file.
9284         * Makefile (tests): Add tst-tls1 and tst-tls2.
9285         * tst-tls1.c: New file.
9286         * tst-tls2.c: New file.
9288         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9289         for failed cmpxchg.
9291         * pthread_create.c (start_thread): Set EXITING_BIT early.
9293         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9294         (THREAD_GETMEM_NC): Likewise.
9296 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9298         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9299         off 3 more bytes by using offset-less instructions when possible.
9301         * Makefile: Add dependency for $(objpfx)version.d.
9303         * eintr.c (eintr_source): Add unnecessary return but the compiler
9304         insists.
9306         * tst-kill3.c: Include <unistd.h>.
9308 2003-02-21  Roland McGrath  <roland@redhat.com>
9310         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9312 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9314         * Makefile (tests): Add tst-eintr1.
9315         (distribute): Add eintr.c.
9316         * tst-eintr1.c: New file.
9317         * eintr.c: New file.
9319         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9321         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9322         Disallow sending SIGCANCEL.
9324         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9325         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9326         * tst-kill1.c: New file.
9327         * tst-kill2.c: New file.
9328         * tst-kill3.c: New file.
9329         * tst-kill5.c: New file.
9330         * tst-kill6.c: New file.
9331         * tst-basic7.c: Renamed to...
9332         * tst-kill4.c: ...this.
9334 2003-02-21  Roland McGrath  <roland@redhat.com>
9336         * Makefile (install-lib-ldscripts): New variable.
9338 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9340         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9341         * pthread_cancel.c: Use INVALID_TD_P.
9342         * pthread_detach.c: Likewise.
9343         * pthread_getschedparam.c: Likewise.
9344         * pthread_setschedparam.c: Likewise.
9345         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9346         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9347         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9348         * pthread_timedjoin.c: Likewise.
9350         * tst-basic7.c: Include <signal.h>.
9352         * pthread_join.c (pthread_join): Limited checking for invalid
9353         descriptors.
9354         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9356 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9358         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9359         beginning of the loop.  Clear the entire first block of TSD.
9360         * Makefile (tests): Add tst-key4.
9361         * tst-key4.c: New file.
9363 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9365         * Makefile (tests): Add tst-basic7.
9366         * tst-basic7.c: New file.
9368         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9369         Add some more __builtin_expect.
9371         * pthreadP.h: Define dummy version of DEBUGGING_P.
9373 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9375         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9376         _POSIX_THREAD_PRIORITY_SCHEDULING.
9377         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9378         _XOPEN_REALTIME_THREADS.
9379         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9381         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9382         kernel returns EINVAL for PID <= 0, work around it.
9384         * Makefile (tests): Add tst-signal5.
9385         * tst-signal5.c: New file.
9387         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9388         and LOGIN_NAME_MAX.
9390         * tst-cancel1.c (tf): Block all signals.
9392         * Makefile (tests): Add tst-basic6.
9393         * tst-basic6.c: New file.
9395         * tst-basic1.c: Add test for process ID.
9397         * Makefile (tests): Add tst-cancel10.
9398         * tst-cancel10.c: New file.
9400         * Makefile (tests): Add tst-signal4.
9401         * tst-signal4.c: New file.
9403         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9404         __sigismember instead of sigismember.  Add __builtin_expect.
9406 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9408         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9409         pthread_setcancelstate, and pthread_rwlock_setpshared.
9411         * tst-cancel7.c (do_test): Make sure the pid file exists before
9412         canceling the thread.
9414         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9415         pthread_rwlock_timedrdlock tests.
9416         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9417         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9418         Check for invalid tv_nsec field.
9419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9420         Likewise.
9422         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9423         recursive mutex of overflow.
9425         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9427         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9428         going into an endless loop.
9429         * Makefile (tests): Add tst-cancel9.
9430         * tst-cancel9.c: New file.
9432         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9434 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9436         * tst-mutex5.c (do_test): Add more timedlock tests.
9438         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9439         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9441         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9442         use INLINE_SYSCALL.  Error number is returned, not -1.
9444         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9445         and __deallocate_stack with internal_function.
9446         * pthread_create.c: Adjust definitions appropriately.
9447         * allocatestack.c: Likewise.
9449         * pthread_join.c: Add one more __builtin_expect.
9450         * pthread_timedjoin.c: Likewise.
9452         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9453         not data of sequence number does not match.
9454         Add one __builtin_expect.
9456         * Makefile (tests): Add tst-clock1.
9457         * tst-clock1.c: New file.
9459         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9460         negative arguments.
9461         * Makefile (tests): Add tst-basic5.
9462         * tst-basic5.c: New file.
9464 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9466         * Makefile (tests): Add tst-basic4.
9467         * tst-basic4.c: New file.
9469         * pthreadP.h: Add declaraction for __nptl_nthreads.
9470         * pthread_create.c: Define __nptl_nthreads
9471         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9472         after thread is done.  If then zero, call exit(0).
9473         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9474         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9475         * init.c (pthread_functions): Initialize ptr_nthreads.
9476         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9477         (__reclaim_stacks): Decrement __nptl_nthreads.
9478         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9479         Define.
9480         * Makefile (tests): Add tst-basic3.
9481         * tst-basic3.c: New file.
9483         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9484         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9485         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9486         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9487         if asynchronous canceling is enabled.
9488         * pthread_join.c (pthread_join): When recognizing circular joins,
9489         take into account the other thread might be already canceled.
9490         * Makefile (tests): Add tst-join5.
9491         * tst-join5.c: New file.
9493         * Makefile (tests): Add tst-join4.
9494         * tst-join4.c: New file.
9496 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9498         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9500 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9502         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9503         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9504         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9505         warning.
9506         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9507         to avoid warning.
9508         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9509         error if lll_futex_wake failed.
9511 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9513         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9514         handling of cancellation and failung pthread_mutex_unlock call.
9515         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9516         * Makefile (tests): Add tst-cond8 and tst-cond9.
9517         * tst-cond8.c: New file.
9518         * tst-cond9.c: New file.
9520         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9522         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9523         non-standard initializers with __USE_GNU.
9525         * Makefile (tests): Add tst-cleanup3.
9526         * tst-cleanup3.c: New file.
9528 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9530         * Makefile (tests): Add tst-attr1 and tst-attr2.
9531         * tst-attr1.c: New file.
9532         * tst-attr2.c: New file.
9534         * Makefile: Add rules to build and run tst-atfork2 test.
9535         * tst-atfork2.c: New file.
9536         * tst-atfork2mod.c: New file.
9538         * sysdeps/unix/sysv/linux/unregister-atfork.c
9539         (__unregister_atfork): Free the memory allocated for the handlers
9540         after removing them from the lists.
9542         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9543         cleanup function.
9545         * tst-atfork1.c (do_test): Wait for the child we forked.
9546         Report error in child.
9548         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9550         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9552 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9554         * Makefile (tests): Add tst-cancel8.
9555         * tst-cancel8.c: New file.
9557         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9558         clearing of control variable.
9559         * Makefile (tests): Add tst-once3 and tst-once4.
9560         * tst-once3.c: New file.
9561         * tst-once4.c: New file.
9563 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9565         * sysdeps/sh/Makefile: New file.
9566         * sysdeps/sh/bits/atomic.h: New file.
9567         * sysdeps/sh/pthread_spin_init.c: New file.
9568         * sysdeps/sh/pthread_spin_lock.c: New file.
9569         * sysdeps/sh/pthread_spin_trylock.S: New file.
9570         * sysdeps/sh/pthread_spin_unlock.S: New file.
9571         * sysdeps/sh/pthreaddef.h: New file.
9572         * sysdeps/sh/tcb-offsets.sym: New file.
9573         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9574         * sysdeps/sh/tls.h: New file.
9575         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9576         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9577         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9578         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9579         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9580         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9581         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9582         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9583         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9584         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9585         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9586         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9587         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9588         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9589         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9590         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9591         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9592         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9593         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9594         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9595         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9596         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9597         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9598         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9599         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9600         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9601         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9602         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9603         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9604         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9606 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9608         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9609         according to POSIX.
9611         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9613 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9615         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9616         (TLS_GET_FS): New #define.
9617         (TLS_SET_FS): New #define.
9618         Correct value of __NR_set_thread_area.
9620         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9622 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9624         * Makefile (tests): Add tst-popen1.
9625         * tst-popen1.c: New file.
9627         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9628         but inactive generalization.
9629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9631         Minor optimization, remove one instruction.
9632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9634 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9636         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9638 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9640         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9641         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9642         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9643         * sysdeps/pthread/pthread_cond_signal.c: New file.
9644         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9645         * sysdeps/pthread/pthread_cond_wait.c: New file.
9646         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9647         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9648         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9649         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9650         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9651         * sysdeps/s390/Makefile: New file.
9652         * sysdeps/s390/bits/atomic.h: New file.
9653         * sysdeps/s390/pthread_spin_init.c: New file.
9654         * sysdeps/s390/pthread_spin_lock.c: New file.
9655         * sysdeps/s390/pthread_spin_trylock.c: New file.
9656         * sysdeps/s390/pthread_spin_unlock.c: New file.
9657         * sysdeps/s390/pthreaddef.h: New file.
9658         * sysdeps/s390/tcb-offsets.sym: New file.
9659         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9660         * sysdeps/s390/tls.h: New file.
9661         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9662         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9663         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9664         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9665         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9666         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9667         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9668         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9669         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9670         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9671         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9672         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9673         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9674         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9675         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9676         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9677         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9678         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9679         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9680         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9681         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9682         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9683         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9685 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9687         * atomic.h: Add a couple more default implementations.
9688         (atomic_compare_and_exchange_acq): Use
9689         __arch_compare_and_exchange_32_acq in return value definition.  It
9690         always exists.
9691         (atomic_bit_set): Renamed from atomic_set_bit.
9692         Add missing atomic_ prefixes.
9694         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9695         thread library is available, use correct value to mark initialized
9696         once variable.
9698 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9700         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9701         __sysconf to determine pagesize.
9703         * pthread_create.c: Include <atomic.h>.
9704         * allocatestack.c (allocate_stack): Implement coloring of the
9705         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9706         size minus one.  Adjust users.
9707         * sysdeps/i386/i686/Makefile: New file.
9709 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9711         * allocatestack.c: Improve comment throughout the file.
9713         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9714         (__lll_lock_wait): Add branch prediction.
9715         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9716         (__lll_lock_wait): Likewise.
9717         (lll_unlock_wake_cb): Removed.
9719 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9721         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9722         _POSIX_THREAD_PRIORITY_SCHEDULING.
9724 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9726         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9727         Fix return type of ptr___pthread_getspecific.
9729 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9731         * Makefile (tests): Add tst-umask1.
9732         (tst-umask1-ARGS): Define.
9733         * tst-umask1.c: New file.
9735 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9737         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9738         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9739         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9740         pthread_rwlock_unlock.
9741         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9742         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9743         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9744         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9745         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9746         New file.
9747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9748         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9749         New file.
9750         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9751         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9752         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9753         New file.
9754         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9755         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9756         New file.
9757         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9758         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9759         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9760         New file.
9761         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9762         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9763         New file.
9764         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9766         * Makefile (libpthread-routines): Remove lowlevelcond and
9767         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9768         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9769         and pthread_cond_broadcast.
9770         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9771         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9772         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9773         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9774         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9775         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9776         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9777         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9778         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9779         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9780         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9782         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9784         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9785         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9786         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9787         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9788         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9789         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9790         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9791         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9792         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9793         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9794         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9795         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9796         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9797         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9798         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9799         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9800         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9802         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9803         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9804         of the code is moved to ...
9805         * sysdeps/pthread/createthread.c: ...here.  New file.
9807 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9809         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9810         (__new_sem_post): Clear %eax before returning.
9811         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9813         * Makefile (tests): Add tst-cleanup2.
9814         * tst-cleanup2.c: New file.
9816         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9817         Interpret first parameter correctly.
9819 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9821         * Makefile (headers): Add bits/semaphore.h.
9823 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9825         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9826         if not SHARED.
9828 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9830         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9831         must be used and mapping failed.
9832         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9834         * Makefile (CFLAGS-pthread_self.os): Define this, not
9835         CFLAGS-pthread_self.c.
9837 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9839         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9840         lll_unlock_wake_cb.
9842         * Makefile (libpthread-routines): Add version.  Add rules to build
9843         version.os and banner.h.
9844         * version.c: New file.
9846 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9848         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9849         the alias unconditional.
9850         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9852 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9854         * Makefile (CFLAGS-pthread_self.c): New definition.
9856 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9858         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9859         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9860         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9861         * init.c (__pthread_initialize_minimal_internal): Likewise.
9863 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9865         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9867         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9868         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9869         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9870         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9871         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9872         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9874 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9876         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9877         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9878         * tst-cancel-wrappers.sh: Remove all exceptions.
9880 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9882         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9883         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9885         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9886         Use __libc_pthread_functions array if SHARED.
9888         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9889         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9891         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9892         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9893         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9894         __libc_ptf_call instead of __libc_maybe_call.
9895         (PTF): New #define.
9896         (__libc_cleanup_region_start): Wrap function name with PTF call.
9897         (__libc_cleanup_region_end): Likewise.
9898         (__libc_cleanup_end): Likewise.
9900         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9901         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9902         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9903         * pthreadP.h: Add prototypes.
9905         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9906         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9907         __pthread_rwlock_unlock aliases.
9908         * pthreadP.h: Add prototypes for new aliases.
9910         * pthreadP.h (struct pthead_functions): Moved to...
9911         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9912         * init.c (pthread_functions): Add initializers for new elements.
9914         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9915         __pthread_cleanup_pop_restore aliases.
9916         * pthreadP.h: Add prototypes.
9918         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9919         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9920         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9921         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9922         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9923         * pthreadP.h: Adjust prototypes and callers.
9925 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9927         * Makefile (tests): Add tst-cancel7.
9928         (tst-cancel7-ARGS): New variable.
9929         * tst-cancel7.c: New file.
9931         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9932         around gcc defficiencies.
9933         * old_pthread_cond_signal.c: Likewise.
9934         * old_pthread_cond_timedwait.c: Likewise.
9935         * old_pthread_cond_wait.c: Likewise.
9937         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9939 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9941         * Makefile (tests): Add tst-cond7.
9942         * tst-cond7.c: New file.
9944         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9945         (condvar_cleanup): Get condvar address from the right place.
9947         * atomic.h: Correct definitions of atomic_full_barrier,
9948         atomic_read_barrier, atomic_write_barrier.
9950         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9951         race-free.
9952         * old_pthread_cond_signal.c: Likewise.
9953         * old_pthread_cond_timedwait.c: Likewise.
9954         * old_pthread_cond_wait.c: Likewise.
9956 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9958         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9960 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9962         * pthreadP.h (pthread_cond_2_0_t): New type.
9963         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9964         Use new type for the 2.0 condvar function prototypes.
9965         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9966         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9967         parameter.
9968         * old_pthread_cond_destroy.c: Likewise.
9969         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9970         * old_pthread_cond_signal.c: Likewise.
9971         * old_pthread_cond_timedwait.c: Likewise.
9972         * old_pthread_cond_wait.c: Likewise.
9974         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9975         (__pthread_cond_wait): Don't save cancellation mode and seq value
9976         in same location.
9978         * herrno.c (__h_errno_location): Don't define as weak.
9980 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9982         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9983         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9984         and pthread_cond_wait.
9985         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9986         Renamed to...
9987         (__pthread_cond_broadcast_2_0): ... this.
9988         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9989         Renamed to...
9990         (__pthread_cond_destroy_2_0): ... this.
9991         * old_pthread_cond_init.c (__old_pthread_cond_init):
9992         Renamed to...
9993         (__pthread_cond_init_2_0): ... this.
9994         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9995         Renamed to...
9996         (__pthread_cond_signal_2_0): ... this.
9997         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9998         Renamed to...
9999         (__pthread_cond_wait_2_0): ... this.
10000         * pthread_cond_destroy.c: Include shlib-compat.h.
10001         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10002         * pthread_cond_init.c: Include shlib-compat.h.
10003         (pthread_cond_init): Change strong_alias into versioned_symbol.
10004         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10005         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10006         fields.
10007         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10008         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10009         __pthread_cond_wait_2_0): New prototypes.
10010         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10011         __old_pthread_cond_init, __old_pthread_cond_signal,
10012         __old_pthread_cond_wait): Removed.
10013         * init.c: Include shlib-compat.h.
10014         (pthread_functions): Guard ptr___pthread_attr_init_2_0
10015         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10016         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10017         ptr___pthread_cond_*_2_0 fields.
10018         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10019         pthread_cond_*@GLIBC_2.0 compatibility symbols.
10021         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10022         LIBC_SIGACTION was not yet defined.
10023         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10024         [!defined LIBC_SIGACTION] (__sigaction): New function and
10025         libc_hidden_weak.
10026         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10027         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10029 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10031         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10033 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
10035         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10036         New, larger type definition.
10037         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10038         implementation.
10039         * Versions [libpthread]: Add definitions for new pthread_cond_*
10040         interfaces for version GLIBC_2.3.2.
10041         * pthread_cond_init.c: Update initialization for new type definition.
10042         * Makefile (libpthread-routines): Remove pthread_cond_wait,
10043         pthread_cond_timedwait, pthread_cond_signal, and
10044         pthread_cond_broadcast.  Add old_pthread_cond_init,
10045         old_pthread_cond_destroy, old_pthread_cond_wait,
10046         old_pthread_cond_timedwait, old_pthread_cond_signal, and
10047         old_pthread_cond_broadcast.
10048         * old_pthread_cond_broadcast.c: New file.
10049         * old_pthread_cond_destroy.c: New file.
10050         * old_pthread_cond_init.c: New file.
10051         * old_pthread_cond_signal.c: New file.
10052         * old_pthread_cond_timedwait.c: New file.
10053         * old_pthread_cond_wait.c: New file.
10054         * pthreadP.h: Add prototypes for the compatibility interfaces.
10056         * pthread_cond_destroy.c: Don't include <errno.h>.
10058 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
10060         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10061         unnecessary zero offset when addressing MUTEX.
10063 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10065         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10066         __register_atfork.
10067         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10068         for __register_atfork.
10070 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10072         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10073         instead of ASSEMBLER test macro.
10075         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10076         __libc_current_sigrtmax): Add libc_hidden_def.
10078         * sysdeps/pthread/list.h: Remove assert.h include.
10080 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10082         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10083         __pthread_initialize_minimal_internal not
10084         __pthread_initialize_minimal.
10086 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
10088         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10089         __pthread_initialize_minimal as hidden.
10091         * init.c (__pthread_initialize_minimal_internal): Don't mark as
10092         constructor.
10094 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10096         * Makefile ($(inst_libdir)/libpthread.so): Depend on
10097         $(common-objpfx)format.lds, include that into the output script.
10098         Fix comment.
10099         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10101 2002-12-28  Andreas Jaeger  <aj@suse.de>
10103         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10104         nsec resolution changes.
10105         (xstat64_conv): Likewise.
10106         (xstat32_conv): Likewise.
10107         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10108         struct kernel_stat.
10109         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10110         structs stat and stat64.
10111         * time/time.h (__timespec_defined): Define for __USE_MISC.
10112         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10114 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
10116         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
10117         argument.
10118         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10119         (pthread_exit): Use strong_alias to avoid warnings.
10120         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10121         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10122         ptr___pthread_attr_init_2_*.
10123         * init.c (pthread_functions): Adjust.
10125 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
10127         * forward.c: Make all functions available by default again.  It
10128         caused too much trouble.
10130         * pt-siglongjmp.c: Removed.
10132 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
10134         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10135         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10136         * sysdeps/i386/Makefile: New file.
10137         * sysdeps/i386/tcb-offsets.sym: New file.
10138         * sysdeps/pthread/tcb-offsets.h: New file.
10139         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10140         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10142         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10143         __register_atfork...
10144         (GLIBC_2.3.2): ...here.
10146 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10148         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10149         pthread_attr_setstackaddr with __attribute_deprecated__.
10151 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10153         * pt-system.c (system): Remove cancellation handling.
10154         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10155         cancellation routines.
10157 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10159         * descr.h: Include <dl-sysdep.h>.
10160         (struct pthread): Move header.data.list to the back of the struct.
10161         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10162         (MULTIPLE_THREADS_OFFSET): Adjust offset.
10163         (SYSINFO_OFFSEET): Likewise.
10165 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10167         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10168         Define.
10169         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10170         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10171         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10172         (USE_DL_SYSINFO): Undef.
10174 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
10176         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10177         $(common-objpfx)libc.so.
10178         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10179         it is bigger than pipe buffer size even on arches with bigger
10180         page size.
10181         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10183 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10185         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10186         correct errno access for case that USE___THREAD is not defined.
10188 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10190         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10191         Patch by Marijn Ros <marijn@mad.scientist.com>.
10193 2002-12-22  Roland McGrath  <roland@redhat.com>
10195         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10197 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10199         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10201 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10203         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10204         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10205         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10207         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10208         of int $0x80.
10209         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10210         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10211         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10212         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10213         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10214         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10215         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10216         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10218         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10219         sysenter.
10220         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10222         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10224         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10225         in new TCB.
10226         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10227         that sysinfo is properly initialized.
10228         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10229         to 1 only for ld.so.
10231         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10232         RTLD_CORRECT_DYNAMIC_WEAK.
10234 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10236         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10237         Use return 0 as 6th argument to FORWARD4.
10238         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10240 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10242         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10243         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10244         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10245         (INIT_SYSINFO): New #define.
10246         (TLS_TP_INIT): Use INIT_SYSINFO.
10247         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10248         At test to make sure SYSINFO_OFFSET value is correct.
10249         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10251 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10253         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10254         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10255         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10256         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10257         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10258         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10259         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10261 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10263         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10264         macro instead of using int $0x80 directly.
10266         * sysdeps/pthread/bits/stdio-lock.h: New file.
10267         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10268         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10269         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10270         * Makefile (routines): Add libc-lowlevelmutex.
10272         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10273         __i686.get_pc_thunk.dx.
10275 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10277         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10278         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10279         ($(objpfx)tst-cancel-wrappers.out): New rule.
10280         * tst-cancel-wrappers.sh: New test.
10281         * tst-locale1.c: Include signal.h.
10282         (uselocale): Test static linking of __libc_current_sigrt*.
10284 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10286         * Makefile (tests): Add tst-cancel6.
10287         * tst-cancel6.c: New file
10289 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10291         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10292         Define meaningfully for assembler as well.
10293         * pthreadP.h (struct pthread_functions): Remove
10294         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10295         and ptr_pthread_attr_init_2_1 fields.
10296         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10297         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10298         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10299         (FORWARD3): Define using FORWARD4.
10300         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10301         versions.
10302         * pt-system.c: Remove duplicate stdlib.h include.
10304 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10306         * sem_init.c: Define sem_init@GLIBC_2.0.
10307         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10308         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10310         * flockfile.c: Moved to...
10311         * sysdeps/pthread/flockfile.c: ...here.  New file.
10312         * funlockfile.c: Moved to...
10313         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10314         * ftrylockfile.c: Moved to...
10315         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10317 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10319         * libc-cancellation.c: Guard both function with
10320         #if !defined NOT_IN_libc.
10321         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10322         automatically provided pthread wrappers.
10323         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10324         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10325         nor in libpthread.
10326         * pt-open.c: Removed.
10327         * pt-fcntl.c: Removed.
10328         * pt-fsync.c: Removed.
10329         * pt-lseek.c: Removed.
10330         * pt-msgrcv.c: Removed.
10331         * pt-msgsnd.c: Removed.
10332         * pt-msync.c: Removed.
10333         * pt-nanosleep.c: Removed.
10334         * pt-open64.c: Removed.
10335         * pt-pause.c: Removed.
10336         * pt-pread.c: Removed.
10337         * pt-pread64.c: Removed.
10338         * pt-pwrite.c: Removed.
10339         * pt-pwrite64.c: Removed.
10340         * pt-read.c: Removed.
10341         * pt-recv.c: Removed.
10342         * pt-recvfrom.c: Removed.
10343         * pt-recvmsg.c: Removed.
10344         * pt-send.c: Removed.
10345         * pt-sendto.c: Removed.
10346         * pt-sigtimedwait.c: Removed.
10347         * pt-sigwait.c: Removed.
10348         * pt-wait.c: Removed.
10349         * pt-waitpid.c: Removed.
10350         * pt-write.c: Removed.
10351         * pt-accept.c: Removed.
10352         * pt-close.c: Removed.
10353         * pt-connect.c: Removed.
10354         * pt-lseek64.c: Removed.
10355         * pt-sendmsg.c: Removed.
10356         * pt-tcdrain.c: Removed.
10358 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10360         * init.c (__pthread_initialize_minimal_internal): Renamed from
10361         __pthread_initialize_minimal.  Make old name an alias.  This
10362         converts a normal relocation into a relative relocation.
10364         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10366         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10367         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10368         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10369         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10370         pt-sigwaitinfo, pt-waitid, and pt-writev.
10371         * pt-creat.c: Removed.
10372         * pt-poll.c: Removed.
10373         * pt-pselect.c: Removed.
10374         * pt-readv.c: Removed.
10375         * pt-select.c: Removed.
10376         * pt-sigpause.c: Removed.
10377         * pt-sigsuspend.c: Removed.
10378         * pt-sigwaitinfo.c: Removed.
10379         * pt-waitid.c: Removed.
10380         * pt-writev.c: Removed.
10382         * init.c (pthread_functions): New variable.
10383         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10384         (or NULL) to __libc_pthread_init.
10385         * forward.c: Rewrite to use __libc:pthread_functions array to get
10386         function addresses.
10387         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10388         prototype.
10389         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10390         Take new parameter.  Copy content of variable pointed to by it
10391         to __libc_pthread_init.
10393         * pthreadP.h (struct pthread_functions): New type.
10394         (__libc_pthread_init): Declare.
10396         * pthread_attr_destroy.c: Add namespace protected alias.
10397         * pthread_attr_getdetachstate.c: Likewise.
10398         * pthread_attr_getinheritsched.c: Likewise.
10399         * pthread_attr_getschedparam.c: Likewise.
10400         * pthread_attr_getschedpolicy.c: Likewise.
10401         * pthread_attr_getscope.c: Likewise.
10402         * pthread_attr_setdetachstate.c: Likewise.
10403         * pthread_attr_setinheritsched.c: Likewise.
10404         * pthread_attr_setschedparam.c: Likewise.
10405         * pthread_attr_setschedpolicy.c: Likewise.
10406         * pthread_attr_setscope.c: Likewise.
10407         * pthread_cond_broadcast.c: Likewise.
10408         * pthread_cond_destroy.c: Likewise.
10409         * pthread_cond_init.c: Likewise.
10410         * pthread_cond_signal.c: Likewise.
10411         * pthread_cond_wait.c: Likewise.
10412         * pthread_condattr_destroy.c: Likewise.
10413         * pthread_condattr_init.c: Likewise.
10414         * pthread_equal.c: Likewise.
10415         * pthread_exit.c: Likewise.
10416         * pthread_getschedparam.c: Likewise.
10417         * pthread_self.c: Likewise.
10418         * pthread_setcancelstate.c: Likewise.
10419         * pthread_setschedparam.c: Likewise.
10420         * pthread_mutex_destroy.c: Likewise.
10421         * pthread_mutex_init.c: Likewise.
10422         * pthreadP.h: Add prototypes for the aliases.
10424         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10425         multiple_threads member in correct TCB to 1.
10427         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10428         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10429         member of thread decriptor, otherwise return unconditionally 1.
10431 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10433         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10434         regular Linux version.  Remove file.
10435         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10436         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10437         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10438         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10439         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10440         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10441         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10442         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10443         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10444         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10445         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10446         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10447         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10448         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10449         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10450         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10451         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10452         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10453         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10454         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10455         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10456         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10457         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10458         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10459         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10460         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10461         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10462         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10463         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10464         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10466 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10468         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10469         * sysdeps/unix/sysv/linux/open.c: Removed.
10470         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10471         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10472         * sysdeps/unix/sysv/linux/msync.c: Removed.
10473         * sysdeps/unix/sysv/linux/read.c: Removed.
10474         * sysdeps/unix/sysv/linux/close.c: Removed.
10475         * sysdeps/unix/sysv/linux/creat.c: Removed.
10476         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10477         * sysdeps/unix/sysv/linux/pause.c: Removed.
10478         * sysdeps/unix/sysv/linux/select.c: Removed.
10479         * sysdeps/unix/sysv/linux/write.c: Removed.
10481 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10483         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10484         element in TCB to see whether locking is needed.
10486         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10487         MULTIPLE_THREADS_OFFSET value is correct.
10489         * sysdeps/unix/sysv/linux/close.c: New file.
10490         * sysdeps/unix/sysv/linux/connect.S: New file.
10491         * sysdeps/unix/sysv/linux/creat.c: New file.
10492         * sysdeps/unix/sysv/linux/fsync.c: New file.
10493         * sysdeps/unix/sysv/linux/llseek.c: New file.
10494         * sysdeps/unix/sysv/linux/lseek.c: New file.
10495         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10496         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10497         * sysdeps/unix/sysv/linux/msync.c: New file.
10498         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10499         * sysdeps/unix/sysv/linux/open.c: New file.
10500         * sysdeps/unix/sysv/linux/open64.c: New file.
10501         * sysdeps/unix/sysv/linux/pause.c: New file.
10502         * sysdeps/unix/sysv/linux/poll.c: New file.
10503         * sysdeps/unix/sysv/linux/pread.c: New file.
10504         * sysdeps/unix/sysv/linux/pread64.c: New file.
10505         * sysdeps/unix/sysv/linux/pselect.c: New file.
10506         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10507         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10508         * sysdeps/unix/sysv/linux/readv.c: New file.
10509         * sysdeps/unix/sysv/linux/recv.S: New file.
10510         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10511         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10512         * sysdeps/unix/sysv/linux/select.c: New file.
10513         * sysdeps/unix/sysv/linux/send.S: New file.
10514         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10515         * sysdeps/unix/sysv/linux/sendto.S: New file.
10516         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10517         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10518         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10519         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10520         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10521         * sysdeps/unix/sysv/linux/system.c: New file.
10522         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10523         * sysdeps/unix/sysv/linux/wait.c: New file.
10524         * sysdeps/unix/sysv/linux/waitid.c: New file.
10525         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10526         * sysdeps/unix/sysv/linux/writev.c: New file.
10527         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10529         * pt-readv.c: Fix comment.
10531 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10533         * tst-cleanup1.c: Include stdlib.h.
10535         * tst-cancel5.c: New test.
10536         * Makefile (tests): Add tst-cancel5.
10537         (tst-cancel5): Link against libc.so libpthread.so in that order.
10539 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10541         * forward.c (test_loaded): Prevent recursive calls.
10543         * Makefile (routines): Add libc-cancellation.
10544         * libc-cancellation.c: New file.
10545         * descr.h (struct pthread): Add multiple_threads field.
10546         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10547         new thread descriptor to 1.
10548         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10549         Initialize multiple_thread field after successful thread creation.
10550         * cancellation.c (__do_cancel): Move to pthreadP.h.
10551         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10552         (__pthread_disable_asynccancel): Add internal_function attribute.
10553         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10554         * pthread_setcancelstate.c: Likewise.
10555         * pthread_setcanceltype.c: Likewise.
10556         * pthread_exit.c: Likewise.
10557         * pthreadP.h (CANCELLATION_P): Likewise.
10558         (__do_cancel): Define as static inline.
10559         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10560         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10561         declarations.
10562         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10563         fields.  Define MULTIPLE_THREADS_OFFSET.
10564         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10565         declaration.
10566         * sysdeps/unix/sysv/linux/accept.S: New file.
10567         * sysdeps/unix/sysv/linux/read.c: New file.
10568         * sysdeps/unix/sysv/linux/write.c: New file.
10569         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10570         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10571         initialization of __libc_locking_needed.
10572         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10573         __libc_locking_needed, use multiple_threads field in TCB.
10574         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10576 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10578         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10579         version.
10580         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10582         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10583         access to __libc_locking_needed for PIC.
10585 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10587         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10588         declare for libc.so.
10589         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10590         expression.
10591         (__libc_lock_lock): Put into statement expression.
10592         (__libc_lock_unlock): Remove trailing semicolon.
10593         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10595 2002-12-12  Roland McGrath  <roland@redhat.com>
10597         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10598         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10600 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10602         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10603         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10604         Initialize __libc_locking_needed.
10605         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10606         instead of __register_pthread_fork_handler.
10607         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10608         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10609         fork-gen with libc_pthread_init.
10610         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10611         of __register_pthread_fork_handler.
10612         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10613         of __register_pthread_fork_handler.
10614         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10615         __libc_locking_needed to determine whether lock prefix can be avoided.
10616         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10618 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10620         * Makefile (tests): Add tst-cleanup1.
10621         * tst-cleanup1.c: New file.
10622         * cancellation.c (__cleanup_thread): Removed.
10623         (__do_cancel): Remove call to __cleanup_thread.
10624         * pthreadP.h: Remove __cleanup_thread prorotype.
10626         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10627         Remember function and argument even if cancellation handler
10628         function is not available.
10629         (__libc_cleanup_region_end): Execute registered function directly if
10630         pthread functions are not available.
10631         (__libc_cleanup_end): Likewise.
10633         * init.c (__pthread_initialize_minimal): Fix initialization in
10634         static lib by preventing gcc from being too clever.
10636 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10638         * init.c (__pthread_initialize_minimal): Remove unneccesary
10639         sigaddset call.
10641         * Makefile (tests): We can run tst-locale2 now.
10643 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10645         * Versions: Remove duplicated sigwait entry.
10647 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10649         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10650         inside libpthread.
10652         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10654         * pthreadP.h: Declare __pthread_enable_asynccancel and
10655         __pthread_disable_asynccancel.
10656         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10657         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10658         * cancellation.c (__pthread_enable_asynccancel): New function.
10659         (__pthread_disable_asynccancel): New function.
10660         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10661         * pt-close.c: Likewise.
10662         * pt-connect.c: Likewise.
10663         * pt-creat.c: Likewise.
10664         * pt-fcntl.c: Likewise.
10665         * pt-fsync.c: Likewise.
10666         * pt-lseek.c: Likewise.
10667         * pt-lseek64.c: Likewise.
10668         * pt-msgrcv.c: Likewise.
10669         * pt-msgsnd.c: Likewise.
10670         * pt-msync.c: Likewise.
10671         * pt-nanosleep.c: Likewise.
10672         * pt-open.c: Likewise.
10673         * pt-open64.c: Likewise.
10674         * pt-pause.c: Likewise.
10675         * pt-poll.c: Likewise.
10676         * pt-pread.c: Likewise.
10677         * pt-pread64.c: Likewise.
10678         * pt-pselect.c: Likewise.
10679         * pt-pwrite.c: Likewise.
10680         * pt-pwrite64.c: Likewise.
10681         * pt-read.c: Likewise.
10682         * pt-readv.c: Likewise.
10683         * pt-recv.c: Likewise.
10684         * pt-recvfrom.c: Likewise.
10685         * pt-recvmsg.c: Likewise.
10686         * pt-select.c: Likewise.
10687         * pt-send.c: Likewise.
10688         * pt-sendmsg.c: Likewise.
10689         * pt-sendto.c: Likewise.
10690         * pt-sigpause.c: Likewise.
10691         * pt-sigsuspend.c: Likewise.
10692         * pt-sigtimedwait.c: Likewise.
10693         * pt-sigwait.c: Likewise.
10694         * pt-sigwaitinfo.c: Likewise.
10695         * pt-system.c: Likewise.
10696         * pt-tcdrain.c: Likewise.
10697         * pt-wait.c: Likewise.
10698         * pt-waitid.c: Likewise.
10699         * pt-waitpid.c: Likewise.
10700         * pt-write.c: Likewise.
10701         * pt-writev.c: Likewise.
10702         * pthread_join.c: Likewise.
10703         * pthread_timedjoin.c: Likewise.
10705         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10706         (__xpg_sigpause): New function.
10707         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10709 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10711         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10713         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10714         _GI_pthread_cleanup_pop to pthreadP.h.
10716         * ftrylockfile.c: Use _IO_lock_trylock instead of
10717         pthread_mutex_trylock.
10719         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10720         (CANCEL_RESET): Likewise.
10721         (__pthread_setcanceltype_): Declare.
10722         (__pthread_mutex_lock_internal): Declare.
10723         (__pthread_mutex_unlock_internal): Declare.
10724         (__pthread_once_internal): Declare.
10725         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10726         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10728         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10729         and pthread_mutex_unlock.
10730         * pthread_cond_wait.c: Likewise.
10731         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10732         * pthread_mutex_unlock.c: Likewise.
10734         * pthread_setcanceltype.c: Add additional alias
10735         __pthread_setcanceltype.
10737         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10738         * sem_open.c (sem_open): Likewise.
10739         Use __libc_open, __libc_write, and __libc_close instead of
10740         open, write, and close respectively.
10742         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10743         Rewrite as statement expression since it must return a value.
10745         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10746         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10747         __pthread_kill.
10749         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10750         alias __pthread_once_internal.
10752         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10754 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10756         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10757         * tst-stdio1.c: New file.
10758         * tst-stdio2.c: New file.
10760         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10762         * Makefile (tests): Comment out tst-locale2 for now.
10763         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10765         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10766         -D_IO_MTSAFE_IO.
10767         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10768         Use _IO_lock_init instead of explicit assignment.
10770         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10771         Define __libc_lock_* and __libc_lock_recursive macros with
10772         lowlevellock macros, not pthread mutexes.
10774         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10775         of pthread_mutex_lock.
10776         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10777         instead of pthread_mutex_unlock.
10779 2002-12-06  Roland McGrath  <roland@redhat.com>
10781         * allocatestack.c (__stack_user): Use uninitialized defn.
10782         * init.c (__pthread_initialize_minimal): Initialize it here.
10784 2002-12-05  Roland McGrath  <roland@redhat.com>
10786         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10787         string.
10788         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10790         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10791         missing & here too.
10793 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10795         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10796         lowlevellock.
10797         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10798         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10799         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10800         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10801         for __libc_lock_* macros.
10802         * Makefile (routines): Add libc-lowlevellock.
10804 2002-10-09  Roland McGrath  <roland@redhat.com>
10806         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10807         Under [__PIC__], call the function via the pointer fetched for
10808         comparison rather than a call by name that uses the PLT.
10809         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10810         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10811         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10812         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10813         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10815 2002-12-04  Roland McGrath  <roland@redhat.com>
10817         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10819         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10820         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10822         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10824 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10826         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10827         a completely opaque, non-integer type.
10828         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10830 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10832         * sysdeps/i386/tls.h: Include stdlib.h.
10833         * sysdeps/x86_64/tls.h: Likewise.
10835 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10837         * Makefile (tests): Add tst-locale2.
10838         (tests-static): Likewise.
10839         * tst-locale2.c: New file.
10841         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10842         volatile and add memory clobbers to lock operations.
10844 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10846         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10847         * sysdeps/i386/i486/bits/atomic.h: New file.
10848         * sysdeps/i386/i586/bits/atomic.h: New file.
10849         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10850         include i486 version.
10851         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10852         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10853         Patch by Marijn Ros <marijn@mad.scientist.com>.
10855         * allocatestack.c (get_cached_stack): Don't crash if we first
10856         found a stack with a larger size then needed.
10857         Reported by Hui Huang <hui.huang@sun.com>.
10859         * Makefile (tests): Add tst-sysconf.
10860         * tst-sysconf.c: New file.
10862         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10863         PTHREAD_THREADS_MAX.
10865 2002-12-02  Roland McGrath  <roland@redhat.com>
10867         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10868         Declare using hidden_proto instead of attribute_hidden, so there are
10869         non-.hidden static symbols for gdb to find.
10870         (__pthread_keys): Likewise.
10871         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10872         * allocatestack.c (__stack_user): Likewise.
10873         * pthread_create.c (__pthread_keys): Likewise.
10874         (__nptl_threads_events, __nptl_last_event): Make these static instead
10875         of hidden.
10876         * pthread_key_create.c (__pthread_pthread_keys_max,
10877         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10879 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10881         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10882         statically.
10883         * tst-locale1.c: New file.
10885         * pthread_cond_timedwait.c: Include <stdlib.h>.
10887         * Makefile (tests): Add tst-fork2 and tst-fork3.
10888         * tst-fork2.c: New file.
10889         * tst-fork3.c: New file.
10891 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10893         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10895         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10896         require it to 200112L.
10898         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10899         instruction only if HAVE_CMOV is defined.
10900         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10902         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10904         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10906         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10908         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10910 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10912         * sysdeps/x86_64/bits/atomic.h: New file.
10914         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10915         16-bit operations.
10917         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10918         possible since gettid cannot fail.
10920         * sysdeps/x86_64/pthreaddef.h: New file.
10922         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10924         * sysdeps/x86_64/pthread_spin_init.c: New file.
10925         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10926         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10927         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10929         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10930         Add missing lock prefix.  Minute optimization.
10932         * tst-spin2.c (main): Also check successful trylock call.
10934         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10935         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10937         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10938         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10940         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10941         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10942         value in case of an error.  Add support for INTERNAL_SYSCALL.
10944         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10945         value in case of an error.
10947         * sysdeps/x86_64/tls.h: New file.
10949 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10951         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10952         takes the array member name and the index as parameters.
10953         (THREAD_SETMEM_NC): Likewise.
10954         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10955         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10956         interfaces.
10958         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10959         to decide which code to use.
10960         (THREAD_SETMEM_NC): Likewise.
10962         * allocatestack.c (queue_stack): Don't remove stack from list here.
10963         Do it in the caller.  Correct condition to prematurely terminate
10964         loop to free stacks.
10965         (__deallocate_stack): Remove stack from list here.
10967 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10969         * Makefile (tests): Add tst-stack1.
10970         * tst-stack1.c: New file.
10972         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10973         provided stack.
10975         * pthread_attr_getstack.c: Return bottom of the thread area.
10977 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10979         * Makefile (libpthread-routines): Add pt-allocrtsig and
10980         pthread_kill_other_threads.
10981         * pt-allocrtsig.c: New file.
10982         * pthread_kill_other_threads.c: New file.
10983         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10984         all three functions.
10985         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10986         allocrtsig.
10987         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10988         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10989         and __libc_allocate_rtsig_private.
10990         * Versions (libpthread): Export pthread_kill_other_threads_np,
10991         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10993 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10995         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10996         the end of the stack.  Adjust computations.
10997         When mprotect call fails dequeue stack and free it.
10998         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10999         attribute.
11000         * pthread_getattr_np.c: Likewise.
11002         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11003         surprises.
11005 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
11007         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11008         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11010 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
11012         * pthread_getspecific.c: Optimize access to first 2nd-level array.
11013         * pthread_setspecific.c: Likewise.
11015 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
11017         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11018         definitions.  Get them from the official place.
11019         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11021         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11022         Use new CLONE_ flags in clone() calls.
11024         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11025         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11027         * Versions: Add pthread_* functions for libc.
11028         * forward.c: New file.
11030         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11031         errno-loc.
11032         * herrno.c: New file.
11033         * res.c: New file.
11035         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11036         sem_trywait, and sem_timedwait.  Add herrno and res.
11037         * sem_init.c: Don't initialize lock and waiters members.
11038         * sem_open.c: Likewise.
11039         * sem_post.c: Removed.
11040         * sem_wait.c: Removed.
11041         * sem_trywait.c: Removed.
11042         * sem_timedwait.c: Removed.
11043         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11044         Includes full implementations of sem_post, sem_wait, sem_trywait,
11045         and sem_timedwait.
11046         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11047         for new implementation.
11048         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11049         and waiters fields.
11051         * tst-sem3.c: Improve error message.
11052         * tst-signal3.c: Likewise.
11054         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11055         to tell the kernel about the termination futex and to initialize tid
11056         member.  Don't initialize main_thread.
11057         * descr.h (struct pthread): Remove main_thread member.
11058         * cancelllation.c (__do_cancel): Remove code handling main thread.
11059         The main thread is not special anymore.
11061         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
11062         size of the stacks to stack_cache_actsize.
11064         * pt-readv.c: Add missing "defined".
11065         * pt-sigwait.c: Likewise.
11066         * pt-writev.c: Likewise.
11068 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
11070         * Versions: Export __connect from libpthread.
11071         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11073         * Makefile (libpthread-routines): Add pt-raise.
11074         * sysdeps/unix/sysv/linux/raise.c: New file.
11075         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11076         * sysdeps/generic/pt-raise.c: New file.
11078         * pthread_cond_init.c: Initialize all data elements of the condvar
11079         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11081         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11082         * pthread_create.c: Likewise.
11084         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11085         * tst-key1.c: New file.
11086         * tst-key2.c: New file.
11087         * tst-key3.c: New file.
11089         * Versions: Export pthread_detach for version GLIBC_2.0.
11090         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11092 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
11094         * pthread_key_create.c: Terminate search after an unused key was found.
11095         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11097         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11098         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11100 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
11102         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11103         dynamic lookup for errno in PIC.
11105         * allocatestack.c (get_cached_stack): Rearrange code slightly to
11106         release the stack lock as soon as possible.
11107         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11108         the static TLS block.
11109         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11111         * cancellation.c: Renamed from cancelation.c.
11112         * Makefile: Adjust accordingly.
11113         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11114         * cleanup_defer.c: Use CANCELLATION_P.
11115         * pthread_testcancel.c: Likewise.
11116         * descr.h: Fix spelling in comments.
11117         * init.c: Likewise.
11118         * pthread_getattr_np.c: Likewise.
11119         * pthread_getschedparam.c: Likewise.
11120         * pthread_setschedparam.c: Likewise.
11121         * Versions: Likewise.
11123         * pt-pselect.c: New file.
11124         * Makefile (libpthread-routines): Add pt-pselect.
11125         * Versions: Add pselect.
11127         * tst-cancel4.c: New file.
11128         * Makefile (tests): Add tst-cancel4.
11130 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
11132         * pthread_mutex_lock.c: Always record lock ownership.
11133         * pthread_mutex_timedlock.c: Likewise.
11134         * pthread_mutex_trylock.c: Likewise.
11136         * pt-readv.c: New file.
11137         * pt-writev.c: New file.
11138         * pt-creat.c: New file.
11139         * pt-msgrcv.c: New file.
11140         * pt-msgsnd.c: New file.
11141         * pt-poll.c: New file.
11142         * pt-select.c: New file.
11143         * pt-sigpause.c: New file.
11144         * pt-sigsuspend.c: New file.
11145         * pt-sigwait.c: New file.
11146         * pt-sigwaitinfo.c: New file.
11147         * pt-waitid.c: New file.
11148         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11149         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11150         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11151         * Versions: Add all the new functions.
11153         * tst-exit1.c: New file.
11154         * Makefile (tests): Add tst-exit1.
11156         * sem_timedwait.c: Minor optimization for more optimal fastpath.
11158 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
11160         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11162         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11163         call.  pthread_join is an official cancellation point.
11164         * pthread_timedjoin.c: Likewise.
11166         * pthread_cond_wait.c: Revert order in which internal lock are dropped
11167         and the condvar's mutex are retrieved.
11168         * pthread_cond_timedwait.c: Likewise.
11169         Reported by dice@saros.East.Sun.COM.
11171 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
11173         * pthreadP.h: Cut out all type definitions and move them...
11174         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
11175         * pthreadP.h: Include <internaltypes.h>.
11177         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11178         performance tweaks.
11180         * sem_trywait.c: Shuffle #includes around to get right order.
11181         * sem_timedwait.c: Likewise.
11182         * sem_post.c: Likewise.
11183         * sem_wait.c: Likewise.
11185         * nptl 0.3 released.
11187         * Makefile (tests): Add tst-signal3.
11188         * tst-signal3.c: New file.
11190 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11192         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11193         the asms modify the sem object.
11194         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11196         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11197         the actual members.
11198         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11199         * semaphoreP.h: Include pthreadP.h.
11200         * sem_getvalue.c: Adjust to sem_t change.
11201         * sem_init.c: Likewise.
11202         * sem_open.c: Likewise.
11203         * sem_post.c: Likewise.
11204         * sem_timedwait.c: Likewise.
11205         * sem_trywait.c: Likewise.
11206         * sem_wait.c: Likewise.
11208 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11210         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11211         * tst-basic2.c: New file.
11212         * tst-exec1.c: New file.
11213         * tst-exec2.c: New file.
11214         * tst-exec3.c: New file.
11216         * tst-fork1.c: Remove extra */.
11218         * nptl 0.2 released.  The API for IA-32 is complete.