Remove posix/glob directory (standalone glob build support).
[glibc.git] / nptl / ChangeLog
blob0b7c5e7e78242fd4a081636458781df4ad07f1d4
1 2012-01-11  Marek Polacek  <polacek@redhat.com>
3         * forward.c (FORWARD_NORETURN): Define macro.
4         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
5         (__pthread_exit): Likewise.
7 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
9         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
11         * pthreadP.h: Add noreturn to __pthread_exit.
12         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
14 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
16         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
17         Call pthread_attr_setstacksize() with result of
18         __pthread_get_minstack() to account for application TLS usage.
20 2012-01-08  Marek Polacek  <polacek@redhat.com>
22         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
24 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
26         [BZ #13553]
27         * pthreadP.h: Use const instead of __const.
28         * semaphore.h: Likewise.
29         * sysdeps/pthread/bits/libc-lock.h: Likewise.
30         * sysdeps/pthread/bits/sigthread.h: Likewise.
31         * sysdeps/pthread/pthread.h: Likewise.
33         * Makefile: Remove elf=yes test, only ELF is supported.
35         * shlib-versions: Remove entries for ports architectures.
37         In case anyone cares, the IA-64 architecture could move to ports.
38         * sysdeps/ia64/*: Removed.
39         * sysdeps/unix/sysv/linux/ia64/*: Removed.
41 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
43         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
44         __pthread_get_minstack.
45         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
47         [BZ #13088]
48         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
49         through __pthread_get_minstack.
50         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
51         directly from _rtld_global_ro.
52         (__pthread_get_minstack): New function.
53         * pthreadP.h: Declare __pthread_get_minstack.
54         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
56 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
58         [BZ #13515]
59         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
60         Correct reading name from file.
62 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
64         * allocatestack.c (allocate_stack): Return errno on failure.
66 2011-12-14  Jeff Law  <law@redhat.com>
68         [BZ #5245]
69         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
71 2011-11-28  Andreas Schwab  <schwab@redhat.com>
73         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
74         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
75         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
77 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
79         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
80         /proc/self/maps.
82 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
84         [BZ #13358]
85         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
86         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
87         path for kernels with FUTEX_CLOCK_REALTIME.
88         Debugged by H.J. Lu <hjl.tools@gmail.com>.
90 2011-10-27  Andreas Schwab  <schwab@redhat.com>
92         [BZ #13344]
93         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
94         for memory synchronization functions.
95         * semaphore.h: Likewise.
97 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
99         * tst-cancel7.c: Avoid warning.
100         * tst-mutex6.c: Likewise.
101         * tst-mutex9.c: Likewise.
102         * tst-mutexpi6.c: Likewise.
104 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
106         * sysdeps/i386/tls.h: Remove #include <list.h>.
108 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
110         * pthread_create.c (start_thread): Call __ctype_init.
112 2011-09-15  Andreas Schwab  <schwab@redhat.com>
114         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
115         defined.
116         (list_add): Add atomic_write_barrier.
117         * descr.h: Define __need_list_t before including <list.h>.
118         * nptl-init.c: Include <list.h>
119         * allocatestack.c: Likewise.
121 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
123         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
124         * sysdeps/ia64/tls.h: Likewise.
125         * sysdeps/powerpc/tls.h: Likewise.
126         * sysdeps/s390/tls.h: Likewise.
127         * sysdeps/sh/tls.h: Likewise.
128         * sysdeps/sparc/tls.h: Likewise.
129         * sysdeps/x86_64/tls.h: Likewise.
131 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
133         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
135         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
136         !USE___THREAD.
137         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
138         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
139         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
140         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
141         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
142         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
143         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
144         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
145         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
146         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
147         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
148         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
150         * tst-tls1.c: Support for __thread is now mandatory.
151         * tst-tls2.c: Likewise.
152         * tst-tls3.c: Likewise.
153         * tst-tls3mod.c: Likewise.
154         * tst-tls4.c: Likewise.
155         * tst-tls4moda.c: Likewise.
156         * tst-tls4modb.c: Likewise.
157         * tst-tls5.h: Likewise.
159 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
161         [BZ #12403]
162         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
163         (pthread_rwlock_timedwrlock): Use correct macro in test.
164         Patch by H.J. Lu <hongjiu.lu@intel.com>.
166 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
168         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
169         use gettimeofday vsyscall, just call gettimeofday.
170         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
171         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
172         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
173         Likewise.
174         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
175         Likewise.
176         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
177         Simplify __vdso_clock_gettime use.
179 2011-09-05  David S. Miller  <davem@davemloft.net>
181         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
182         New function.
183         (sem_timedwait): Call it to force an exception region around
184         the async cancel enable and the futex operation.
185         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
186         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
187         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
188         (__new_sem_wait): Call it to force an exception region around
189         the async cancel enable and the futex operation.
190         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
191         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
193 2011-08-31  Andreas Schwab  <schwab@redhat.com>
195         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
196         thread is woken up.
198 2011-08-20  David S. Miller  <davem@davemloft.net>
200         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
202 2011-08-14  Roland McGrath  <roland@hack.frob.com>
204         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
205         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
207 2011-08-08  Andreas Schwab  <schwab@redhat.com>
209         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
210         stack.
211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
212         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
214 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
216         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
217         barrier.
218         (__gcc_personality_v0): Likewise.
219         (_Unwind_ForcedUnwind): Likewise.
220         (_Unwind_GetCFA): Likewise.
222 2011-07-14  Roland McGrath  <roland@hack.frob.com>
224         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
225         UINTMAX_C.
227 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
229         * nptl-init.c (__nptl_set_robust): New function.
230         (pthread_functions): Add reference.
231         * npthreadP.h: Declare __nptl_set_robust.
232         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
233         ptr_set_robust member.
234         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
235         child if threads are used.
237 2011-06-14  Andreas Jaeger  <aj@suse.de>
239         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
241 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
243         [BZ #386]
244         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
246 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
248         [BZ #12650]
249         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
250         clearing memory.
251         Patch partly by Robert Rex <robert.rex@exasol.com>.
253 2011-01-19  Roland McGrath  <roland@redhat.com>
255         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
256         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
257         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
258         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
259         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
260         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
262 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
264         * Makefile (test-extras): Add tst-cleanup4aux.
266 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
268         [BZ #10563]
269         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
270         (__SETXID_2): Likewise.
271         (__SETXID_3): Likewise.
273 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
275         [BZ #10484]
276         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
277         * alloca_cutoff.c: Add libc_hidden_def.
279 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
281         [BZ #12113]
282         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
283         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
284         of "struct pthread".
286 2010-09-21  Andreas Schwab  <schwab@redhat.com>
288         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
289         [!__EXCEPTIONS]: Mangle local variable not_first_call.
290         (pthread_cleanup_push_defer_np): Likewise.
292 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
294         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
295         small.
297 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
298             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
300         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
301         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
303 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
305         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
307 2010-05-01  Alan Modra  <amodra@gmail.com>
309         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
310         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
311         to save temps.  Correct cfi for possible later frame manipulation.
312         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
313         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
314         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
315         (DOCARGS_6, UNDOCARGS_6): Likewise.
316         (CENABLE, CDISABLE): Add nops for non-shared calls.
318 2010-07-06  Andreas Schwab  <schwab@redhat.com>
320         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
321         Fix type mismatch.
323 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
325         * tst-abstime.c (do_test): Some more cleanups
327 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
329         * tst-abstime.c: Correct testing and add test for sem_timedwait.
331 2010-07-01  Andreas Schwab  <schwab@redhat.com>
332             Ulrich Drepper  <drepper@redhat.com>
334         * Makefile (tests): Add tst-abstime.
335         * tst-abstime.c: New file.
336         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
337         (__lll_timedlock_wait): Check for timestamp before the Epoch.
338         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
339         (__lll_timedlock_wait): Likewise.
340         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
341         (__lll_robust_timedlock_wait): Likewise.
342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
343         (__pthread_cond_timedwait): Likewise.
344         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
345         (pthread_rwlock_timedrdlock): Likewise.
346         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
347         (pthread_rwlock_timedwrlock): Likewise.
348         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
349         Likewise.
351 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
353         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
355 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
357         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
358         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
360 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
362         [BZ #11390]
363         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
364         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
365         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
366         pthread_setname.
367         * Makefile (libpthread-routines): Add pthread_getname and
368         pthread_setname.
369         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
371 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
373         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
374         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
375         * sysdeps/pthread/Makefile: Remove csu section and rt section's
376         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
378 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
380         * pthread_cond_timedwait.c: Add check for
381         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
382         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
383         INTERNAL_SYSCALL.
385 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
387         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
388         and the call fails wake eventually waiting setxid threads.  Don't free
389         stack here if we try starting a thread.
390         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
391         if the clone call failed.
393 2010-03-08  Andreas Schwab  <schwab@redhat.com>
395         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
396         * allocatestack.c (get_cached_stack): Set setxid_futex.
397         (allocate_stack): Likewise.
399 2010-03-05  Andreas Schwab  <schwab@redhat.com>
400             Ulrich Drepper  <drepper@redhat.com>
402         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
403         it is creating a thread or it is just being created.
404         * pthread_create.c (start_thread): Wake setxid thread if it is
405         waiting.
406         (__pthread_create_2_1): Initialize setxid_futex.
407         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
408         is waiting.
410 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
412         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
413         Fix unwind info.
414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
416 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
419         Fix pthread_cond_timedwait with requeue-PI.
420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
421         Fix pthread_cond_wait with requeue-PI.
423 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
425         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
426         and pthread_mutexattr_setrobust for GLIBC_2.12.
427         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
428         * pthread_mutexattr_getrobust.c: Define alias
429         pthread_mutexattr_getrobust.
430         * pthread_mutexattr_setrobust.c: Define alias
431         pthread_mutexattr_setrobust.
433 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
435         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
437 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
439         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
441 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
443         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
444         call __gmon_start__.
445         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
447 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
449         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
450         using memset.
452 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
454         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
455         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
457         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
458         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
460         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
461         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
463 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
465         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
466         Don't update nwaiters after invalid timeout is recognized.
468 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
470         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
471         __gmon_start__.
473 2009-11-27  Andreas Schwab  <schwab@redhat.com>
475         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
476         THREAD_SELF->cancelhandling after returning from futex call.
478 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
480         * tst-sem13.c: New file.
481         * Makefile (tests): Add tst-sem13.
483 2009-11-22  Roland McGrath  <roland@redhat.com>
485         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
486         instead of recapitulating its contents.
488 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
491         optimizations and cleanups.
493 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
496         Remove redundant code. Fix cfi offsets.
497         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
498         Fix cfi offsets.
500 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
502         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
503         reduce size of unwind info.
505         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
506         cfi directives.
507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
508         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
510 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
512         [BZ #4457]
513         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
514         LIBGCC_S_SO.
515         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
517 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
519         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
521         [BZ #3270]
522         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
523         steps to avoid races with creation and terminations.
524         * nptl-init.c (sighandler_setxid): Adjust.
525         Patch by Daniel Jacobowitz.
527 2009-09-07  Andreas Schwab  <schwab@redhat.com>
529         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
531 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
532             Joseph Myers  <joseph@codesourcery.com>
534         [BZ #7094]
535         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
536         Initialize the sigev_notify field for newly created timer to make sure
537         the timer gets deleted from the active timer's list upon timer_delete.
539 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
541         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
542         Correct a logic error.
544 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
546         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
547         of the field in local variables.
548         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
549         variable and don't unconditionally clear it.
551 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
553         * pthread_create.c (start_thread): Hint to the kernel that memory for
554         the stack can be reused.  We do not mark all the memory.  The part
555         still in use and some reserve are kept.
557 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
559         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
561 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
563         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
564         directives.
566 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
568         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
569         directives.
570         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
572 2009-08-10  Andreas Schwab  <schwab@redhat.com>
574         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
575         (__pthread_cond_signal): Don't clobber register used for syscall
576         number.
578 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
580         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
581         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
583         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
584         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
585         register.
587 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
589         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
590         enabled by the special *_asynccancel functions.
591         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
594         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
596 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
598         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
599         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
600         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
601         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
602         since we can assume the special __*_{en,dis}able_asynccancel
603         functions.
604         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
605         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
606         and PTHREAD_CANCELED.
608 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
610         * descr.h: Better definition of *_BITMASK macros for cancellation.
612 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
614         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
616         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
617         dynamic linker might have to save.
618         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
619         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
620         printing.
622         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
624 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
626         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
627         New function.
628         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
629         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
630         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
631         requeue_pi for robust mutexes.
632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
633         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
634         Don't only skip __pthread_mutex_cond_lock.  Call instead
635         __pthread_mutex_cond_lock_adjust.
636         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
638         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
639         optimization of PI mutex handling.
641 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
643         [BZ #10418]
644         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
645         instead of of _acq variants of cmpxchg.
647 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
649         * sysdeps/x86_64/configure.in: New file.
651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
652         path when not using absolute timeout futex.
654 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
656         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
657         optimizations of last changes.
658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
660 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
662         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
663         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
665         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
667         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
668         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
672         (__pthread_cond_timedwait): Make more robust.
674 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
676         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
677         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
678         directly use absolute timeout.
680         * tst-sem5.c (do_test): Add test for premature timeout.
681         * Makefile: Linu tst-sem5 with librt.
683         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
684         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
685         directly use absolute timeout.
686         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
687         (pthread_rwlock_timedrdlock): Likewise.
689         * tst-cond11.c (run_test): Add test to check that the timeout is
690         long enough.
692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
693         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
694         directly use absolute timeout.
696         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
697         (__pthread_cond_wait): Convert to using exception handler instead of
698         registered unwind buffer.
699         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
700         (__pthread_cond_timedwait): Likewise.
702 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
704         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
705         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
706         use absolute timeout.
708         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
709         handling of uncontested semaphore.
711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
712         (__condvar_cleanup): Rewrite to use cfi directives instead of
713         hand-coded unwind tables.
714         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
715         Likewise.
716         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
717         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
718         Likewise.
720 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
722         * Makefile (libpthread-routines): Add pthread_sigqueue.
723         * Versions: Add pthread_sigqueue for GLIBC_2.11.
724         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
725         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
727 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
729         [BZ #10262]
730         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
731         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
732         cannot be assumed.
733         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
735 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
737         * libc-cancellation.c: Move __libc_cleanup_routine to...
738         * libc-cleanup.c: ...here.  New file.
739         * Makefile (routines): Add libc-cleanup.
741         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
742         test.
743         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
744         * sysdeps/pthread/librt-cancellation.c: Likewise.
746         [BZ #9924]
747         * nptl-init.c: Renamed from init.c.
748         * Makefile: Change all occurences of init.c to nptl-init.c.
750 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
752         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
753         to test when deciding on the delay.
754         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
755         * pthread_cancel.c: Close race between deciding on sending a signal
756         and setting the CANCELING_BIT bit.
758         * cancellation.c (__pthread_disable_asynccancel): Don't return if
759         thread is canceled.
760         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
762 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
764         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
765         is available.
766         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
767         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
768         * sysdeps/i386/tls.h: Likewise.
769         (tcbhead_t): Add __private_tm member.
771 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
773         * sem_open.c (sem_open): Rewrite initialization of initsem to
774         avoid warnings.
776         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
777         Avoid warning by using may_alias attribute on ptrhack.
779 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
781         [BZ #10090]
782         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
783         Check policy and priority for validity.
784         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
786 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
788         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
789         (__pthread_cond_timedwait): Change to use cfi directives instead of
790         hand-coded unwind sections.
792 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
794         * init.c (nptl_freeres): Compile only for SHARED.
796 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
798         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
799         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
800         FUTEX_BITSET_MATCH_ANY.
802 2009-02-27  Roland McGrath  <roland@redhat.com>
804         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
805         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
807 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
809         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
810         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
811         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
812         200112L to 200809L.
814 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
816         * sysdeps/pthread/pthread.h: The robust mutex functions are in
817         POSIX 2008.
819 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
821         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
822         Unify name of include protector macro.
824 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
826         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
827         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
829 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
831         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
832         pointer variables.
834         * allocatestack.c (__free_stacks): Renamed from free_stacks.
835         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
836         * init.c (nptl_freeres): New function.
837         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
838         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
839         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
840         variable.
841         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
842         load DSO.  Assign last.
843         (__unwind_freeres): New function.
845         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
846         for better debugging.  No need to use stack_list_add here.
848 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
850         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
851         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
852         instead of computing relative timeout.
853         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
854         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
856 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
858         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
860 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
862         * sysdeps/pthread/list.h (list_add): Initialize new element first.
863         (list_add_tail): Removed.
865 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
867         * (in_flight_stack): New variable.
868         (stack_list_del): New function.  Use instead of list_del.
869         (stack_list_add): New function.  Use instead of list_add when adding to
870         stack_cache and stack_used lists.
871         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
872         when the fork call interrupted another thread.
874 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
876         * init.c (__pthread_initialize_minimal_internal): Optimize test
877         FUTEX_CLOCK_REALTIME a bit.
879 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
881         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
882         only passing five parameters to FUTEX_WAIT_BITSET call.
884         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
885         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
886         instead of computing relative timeout.
888 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
890         * init.c (__pthread_initialize_minimal_internal): Check for
891         FUTEX_CLOCK_REALTIME flag.
892         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
893         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
894         relative timeout.
896         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
897         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
898         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
899         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
900         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
901         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
903 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
905         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
906         loop body instead of ; to avoid gcc warnings.
907         (pthread_cleanup_pop_restore_np): Likewise.
908         Patch by Caolán McNamara <caolanm@redhat.com>.
910 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
912         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
913         fast path here, for robust/PI/PP mutexes call
914         __pthread_mutex_lock_full.  Don't use switch, instead use a series
915         of ifs according to their probability.
916         (__pthread_mutex_lock_full): New function.
917         * pthread_mutex_unlock.c: Include assert.h.
918         (__pthread_mutex_unlock_usercnt): Handle only the
919         fast path here, for robust/PI/PP mutexes call
920         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
921         of ifs according to their probability.
922         (__pthread_mutex_unlock_full): New function.
923         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
924         (__pthread_mutex_lock_full): Define.
926 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
928         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
929         implementation.  Add necessary padding and.
930         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
931         words.
933 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
935         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
936         and FUTEX_WAKE_BITSET.
938 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
940         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
941         and FUTEX_WAKE_BITSET.
942         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
943         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
944         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
945         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
947 2008-11-25  Roland McGrath  <roland@redhat.com>
949         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
950         Subdirectories moved to ports repository as
951         sysdeps/.../nptl subdirectories.
953 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
955         [BZ #7008]
956         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
957         of old value.
958         * pthread_cond_init.c (__pthread_cond_init): Fix
959         cond->__data.__nwaiters initialization.
960         * Makefile (tests): Add tst-cond23.
961         * tst-cond23.c: New test.
963 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
965         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
966         arguments.
967         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
968         arguments.
970 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
972         [BZ #6955]
973         * pthread_mutex_lock.c: Add support for private PI mutexes.
974         * pthread_mutex_timedlock.c: Likewise.
975         * pthread_mutex_trylock.c: Likewise.
976         * pthread_mutex_unlock.c: Likewise.
977         Patch mostly by Ben Jackson <ben@ben.com>.
979 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
981         [BZ #6843]
982         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
983         Increase stack size for helper thread.
985 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
987         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
988         assembly with a clobber list for access registers a0 and a1.
990 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
992         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
993         to force runp->refcntr to be read from memory.
995 2008-09-08  Richard Guenther  <rguenther@suse.de>
997         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
998         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
999         lll_timedlock, lll_robust_timedlock, lll_unlock,
1000         lll_robust_unlock): Promote private to int.
1002 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
1004         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
1005         ARCH_RETRY_MMAP definitions.
1006         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
1007         Define MAP_STACK when not defined.
1008         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
1009         handling of ARCH_RETRY_MMAP.
1011 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
1013         * tst-align2.c (f): Print message that f is reached.
1015 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
1017         [BZ #6740]
1018         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
1019         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
1021 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
1023         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
1024         SOCK_CLOEXEC if possible.
1026 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
1028         * Makefile (tests): Add tst-rwlock2a.
1029         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
1030         * tst-rwlock2a.c: New file.
1032 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
1034         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
1036 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
1038         * sysdeps/pthread/pthread.h: Fix typo in comment.
1040 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
1042         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
1043         of CPU set to the kernel.
1045 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
1047         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
1048         cfi directives.
1049         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1051         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1053         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1054         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1056 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
1058         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
1059         cfi directives.
1060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1061         Likewise.
1062         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1063         Likewise.
1064         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1065         Likewise.
1067 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
1069         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
1071 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
1073         David S. Miller  <davem@davemloft.net>
1075         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1077 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
1079         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
1080         __pshared correctly.
1081         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1082         Likewise.
1083         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1084         Likewise.
1085         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1086         Likewise.
1087         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1088         Likewise.
1089         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
1091 2008-04-14  David S. Miller  <davem@davemloft.net>
1093         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1094         (__old_sem_wait): Fix argument to lll_futex_wait().
1096 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
1098         * pthread_create.c: Require pthread_mutex_trylock and
1099         pthread_key_delete for libgcc.
1101 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
1103         [BZ #6020]
1104         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
1105         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
1106         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
1108 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
1110         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
1111         <linux/limits.h> has defined it.
1112         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1113         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1114         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1115         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1117 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
1119         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
1120         of ASSEMBLER.
1121         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1122         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
1124 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
1126         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
1127         HAVE_DL_DISCOVER_OSVERSION.
1128         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
1129         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
1131 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
1133         [BZ #5778]
1134         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
1135         _POSIX_CHOWN_RESTRICTED value to zero.
1137 2008-01-31  Roland McGrath  <roland@redhat.com>
1139         * Makefile (omit-deps): Variable removed.
1141 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
1143         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
1144         unnecessary addr32 prefix.
1146 2008-01-29  Roland McGrath  <roland@redhat.com>
1148         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
1150 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1152         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
1154 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1156         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
1157         a scratch register.
1158         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1159         (__lll_lock_wait_private): Fix typo.
1160         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1161         (pthread_barrier_wait): Likewise.  Adjust XADD use.
1162         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
1163         Adjust XADD use.
1164         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1165         (pthread_rwlock_timedrdlock): Return correct return value.
1166         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1167         (pthread_rwlock_timedwrlock): Likewise.
1169 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
1171         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
1172         thread returns the program exits with an error code.
1174 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
1176         * pthread-errnos.sym: Add EOVERFLOW.
1177         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
1178         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
1179         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1180         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1182 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
1184         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
1185         parameter.  Passed it as permission to mmap.
1186         * allocatestack.c (allocate_stack): Pass prot as second parameter
1187         to ARCH_RETRY_MMAP.
1189 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
1191         * tst-basic7.c: Allocate memory for the stack.
1193         [BZ #5465]
1194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
1195         (__pthread_cond_timedwait): Don't use VDSO.
1196         Patch by Michal Januszewski.
1198 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
1200         [BZ #5455]
1201         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
1202         Allow label before pthread_cleanup_pop.
1203         (pthread_cleanup_pop_restore_np): Likewise.
1205 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1207         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1208         Store 2 before returning ETIMEDOUT.
1210 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
1212         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1213         Store 2 before returning ETIMEDOUT.
1214         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
1215         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1216         (__lll_lock_wait_private): Optimize.
1217         (__lll_lock_wait): Likewise.
1219 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
1221         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
1222         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
1223         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
1225 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
1227         [BZ #5240]
1228         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
1229         If we time out, try one last time to lock the futex to avoid
1230         losing a wakeup signal.
1231         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1232         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1234         [BZ #5245]
1235         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
1236         if necessary.
1238 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
1240         [BZ #5245]
1241         * allocatestack.c (allocate_stack): Change ENOMEM error in case
1242         mmap failed to EAGAIN.
1243         * Makefile (tests): Add tst-basic7.
1244         * tst-basic7.c: New file.
1246 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
1248         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
1249         Use __linkin_atfork.
1251 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
1253         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1254         missing line continuations.
1255         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1256         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
1258 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
1260         [BZ #5220]
1261         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1262         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1263         (struct timer): Add next element.
1264         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1265         enqueue timer structure into __active_timer_sigev_thread list.
1266         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1267         remove timer struct from __active_timer_sigev_thread.
1268         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1269         Before using timer structure make sure it is still on the
1270         __active_timer_sigev_thread list.  Keep lock until done.
1271         Define __active_timer_sigev_thread and
1272         __active_timer_sigev_thread_lock.
1274 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
1276         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1277         Redefine thread_atfork for use of ATFORK_MEM.
1278         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1279         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1280         function.
1281         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1282         Use atomic operation when removing first element of list.
1284 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
1286         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1287         routine instead of an alias to __new_sem_post.
1289 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
1291         * init.c (__pthread_initialize_minimal): Initialize word to appease
1292         valgrind.
1294 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
1296         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1297         libc.so just clear NAME.
1298         (__libc_rwlock_fini): Nop inside of libc.so.
1299         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1300         all zeros.
1302 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
1304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1305         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1306         unlocking failed.
1307         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1309 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
1311         [BZ #4938]
1312         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1313         reclaimed stack if necessary.
1314         * Makefile (tests): Add tst-tsd6.
1315         * tst-tsd6.c: New file.
1317 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1319         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1320         Add private argument.
1322 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
1324         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1325         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1327 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
1329         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1330         (__lll_robust_timedlock): Pass private as last argument to
1331         __lll_robust_timedlock_wait.
1332         (__lll_unlock): Fix a pasto.
1334 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1336         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1337         sparc_old_sem): New structs.
1338         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1339         (__sem_wait_cleanup): New function.
1340         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
1341         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1342         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1343         lll_futex_wait.
1344         (__old_sem_wait): New function.
1345         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1346         nptl/sysdeps/unix/sysv/linux/sparc version.
1347         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1348         Likewise.
1349         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1350         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1351         (__new_sem_trywait): Use sparc_old_sem structure.
1352         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1353         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
1354         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1355         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1356         lll_futex_timed_wait.
1357         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1358         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
1359         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1360         lll_futex_wake.
1361         (__old_sem_post): New function.
1362         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1363         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1364         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1365         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1366         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1367         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1369 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1371         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1372         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1373         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1374         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1375         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1376         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1377         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1378         Use FUTEX_WAKE_OP.
1379         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1380         kernel-features.h and tcb-offsets.h.
1381         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1382         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1383         process private.
1384         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1385         tcb-offsets.h.
1386         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1387         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1388         process private.
1389         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1390         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1391         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1392         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1393         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1394         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1395         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1397 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
1399         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1400         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1401         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1402         lll_futex_timed_wait.
1404         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1405         __lll_robust_unlock): Rewrite as macros instead of inline functions.
1406         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1407         __lll_robust_unlock, __lll_wait_tid): Likewise.
1409 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1411         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1412         Fix a pasto.
1413         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1414         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1415         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1416         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1417         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1418         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1419         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1421         kernel-features.h.
1422         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1423         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1424         process private.  Switch DW_CFA_advance_loc1 and some
1425         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1426         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1427         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1428         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1429         process private.  Switch DW_CFA_advance_loc{1,2} and some
1430         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1432         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1433         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1434         Likewise.
1435         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1436         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1437         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1438         Likewise.
1439         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1440         (__pthread_cond_broadcast): Compare %r8 instead of
1441         dep_mutex-cond_*(%rdi) with $-1.
1442         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1443         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1444         of oring.
1446 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
1448         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1450 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1452         * allocatestack.c: Include kernel-features.h.
1453         * pthread_create.c: Likewise.
1454         * pthread_mutex_init.c: Likewise.
1455         * init.c: Likewise.
1456         * pthread_cond_timedwait.c: Likewise.
1457         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1458         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1460         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1461         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1462         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1463         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1464         Likewise.
1465         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1466         Likewise.
1467         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1468         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1469         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1470         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1472 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1474         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1475         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1476         byte elements.  One of them is the new __shared element.
1477         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1478         adjust names of other padding elements.
1479         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1480         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1481         byte elements.  One of them is the new __shared element.
1482         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1483         adjust names of other padding elements.
1484         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1485         Renamed __pad1 element to __shared, adjust names of other padding
1486         elements.
1487         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1488         (pthread_rwlock_t): Likewise.
1489         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1490         typo.
1492 2007-08-09  Anton Blanchard  <anton@samba.org>
1494         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1496 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1498         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1499         <kernel-features.h>.
1500         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1502 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1504         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1505         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1506         dealing with robust mutexes.
1507         * pthread_mutex_timedlock.c: Likewise.
1508         * pthread_mutex_trylock.c: Likewise.
1509         * pthread_mutex_unlock.c: Likewise.
1510         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1512 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1514         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1515         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1516         (PTHREAD_MUTEX_PSHARED): Define.
1517         * pthread_mutex_init.c (__pthread_mutex_init): Set
1518         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1519         mutexes.
1520         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1521         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1522         as second argument to lll_lock.
1523         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1524         instead of its __data.__lock field.
1525         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1526         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1527         to lll_robust_lock.
1528         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1529         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1530         instead of mutex->__data.__kind directly, pass
1531         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1532         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1533         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1534         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1535         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1536         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1537         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1538         of mutex->__data.__kind directly.
1539         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1540         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1541         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1542         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1543         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1544         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1545         and lll_futex_wake.
1546         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1547         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1548         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1549         directly.
1550         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1551         Take mutex as argument instead of its __data.__lock field, pass
1552         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1553         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1554         __data.__lock field.
1555         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1556         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1557         to lll_robust_cond_lock.
1558         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1559         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1560         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1561         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1562         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1563         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1564         lll_futex_wait.
1565         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1566         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1567         lll_futex_wake.
1568         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1569         pshared variable, pass it to lll_lock, lll_unlock,
1570         lll_futex_timedwait and lll_futex_wake.
1571         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1572         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1573         and lll_futex_wake.
1574         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1575         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1576         macro.
1577         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1578         lll_futex_wake_unlock): Likewise.
1579         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1580         Likewise.
1581         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1582         lll_futex_wake_unlock): Likewise.
1583         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1584         Likewise.
1585         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1586         lll_futex_wake_unlock): Likewise.
1587         (lll_futex_wake): Fix a typo.
1588         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1589         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1590         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1591         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1592         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1594         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1595         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1597         (__pthread_cond_timedwait): Likewise.
1598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1599         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1601 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1603         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1604         Don't use CGOTSETUP and CGOTRESTORE macros.
1605         (CGOTSETUP, CGOTRESTORE): Remove.
1606         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1607         @local symbol.
1609 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1611         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1612         definitions for private futexes.
1613         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1614         kernel-features.h and lowlevellock.h.  Use private futexes if
1615         they are available.
1616         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1617         (__lll_mutex_lock_wait): Rename to
1618         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1619         (__lll_mutex_timedlock_wait): Rename to ...
1620         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1621         Don't compile in for libc.so.
1622         (__lll_mutex_unlock_wake): Rename to ...
1623         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1624         (__lll_timedwait_tid): Use __NR_gettimeofday.
1625         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1626         the header from assembler.  Renamed all lll_mutex_* resp.
1627         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1628         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1629         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1630         Define.
1631         (__lll_lock_wait_private): Add prototype.
1632         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1633         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1634         __lll_unlock_wake): Likewise.
1635         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1636         if private is constant LLL_PRIVATE.
1637         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1638         lll_timedlock, lll_robust_timedlock): Add private argument.
1639         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1640         if private is constant LLL_PRIVATE.
1641         (lll_robust_unlock, lll_robust_dead): Add private argument.
1642         (lll_lock_t): Remove.
1643         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1644         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1645         lll_cond_wake, lll_cond_broadcast): Remove.
1646         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1647         kernel-features.h and lowlevellock.h.
1648         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1649         (LOAD_FUTEX_WAIT): Define.
1650         (__lll_robust_mutex_lock_wait): Rename to ...
1651         (__lll_robust_lock_wait): ... this.  Add private argument.
1652         Use LOAD_FUTEX_WAIT macro.
1653         (__lll_robust_mutex_timedlock_wait): Rename to ...
1654         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1655         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1656         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1657         lowlevellock.h.
1658         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1659         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1660         __lll_mutex_{lock,unlock}_*.
1661         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1662         lowlevellock.h and pthread-errnos.h.
1663         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1664         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1665         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1666         __lll_mutex_{lock,unlock}_*.
1667         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1668         lowlevellock.h and pthread-errnos.h.
1669         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1670         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1671         __lll_mutex_{lock,unlock}_*.
1672         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1673         lowlevellock.h.
1674         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1675         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1676         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1677         (__condvar_tw_cleanup): Likewise.
1678         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1679         lowlevellock.h.
1680         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1681         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1682         __lll_mutex_{lock,unlock}_*.
1683         ( __condvar_w_cleanup): Likewise.
1684         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1685         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1686         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1687         lowlevellock.h.
1688         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1689         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1690         __lll_mutex_{lock,unlock}_*.
1691         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1692         lowlevellock.h.
1693         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1694         FUTEX_PRIVATE_FLAG): Remove.
1695         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1696         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1697         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1698         lowlevellock.h.
1699         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1700         FUTEX_PRIVATE_FLAG): Remove.
1701         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1702         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1703         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1704         lowlevellock.h.
1705         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1706         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1707         __lll_mutex_{lock,unlock}_*.
1708         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1709         lowlevellock.h.
1710         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1711         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1712         __lll_mutex_{lock,unlock}_*.
1713         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1714         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1715         (__new_sem_post): Use standard initial exec code sequences.
1716         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1717         lowlevellock.h.
1718         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1719         FUTEX_PRIVATE_FLAG): Remove.
1720         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1721         exec code sequences.
1722         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1723         (__new_sem_trywait): Use standard initial exec code sequences.
1724         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1725         (__new_sem_wait): Use standard initial exec code sequences.
1727 2007-07-31  Anton Blanchard  <anton@samba.org>
1729         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1730         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1731         atomic_full_barrier.
1733 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1735         * allocatestack.c (stack_cache_lock): Change type to int.
1736         (get_cached_stack, allocate_stack, __deallocate_stack,
1737         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1738         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1739         as second argument to lll_lock and lll_unlock macros on
1740         stack_cache_lock.
1741         * pthread_create.c (__find_in_stack_list): Likewise.
1742         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1743         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1744         as second argument.
1745         * descr.h (struct pthread): Change lock and setxid_futex field
1746         type to int.
1747         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1748         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1749         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1750         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1751         Likewise.
1752         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1753         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1754         * pthreadP.h (__attr_list_lock): Change type to int.
1755         * pthread_attr_init.c (__attr_list_lock): Likewise.
1756         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1757         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1758         lll_{,un}lock.
1759         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1760         also for lll_futex_{wake,wait}.
1761         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1762         a pointer to const.
1763         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1764         LLL_SHARED as second argument to lll_{,un}lock.
1765         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1766         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1767         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1768         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1769         Likewise.
1770         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1771         as second argument to lll_{,un}lock macros on pd->lock.
1772         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1773         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1774         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1775         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1776         Likewise.
1777         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1778         Likewise.
1779         * pthread_once.c (once_lock): Change type to int.
1780         (__pthread_once): Pass LLL_PRIVATE as second argument to
1781         lll_{,un}lock macros on once_lock.
1782         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1783         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1784         rwlock->__data.__shared as second argument to them and similarly
1785         for lll_futex_w*.
1786         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1787         Likewise.
1788         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1789         Likewise.
1790         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1791         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1792         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1793         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1794         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1795         to lll_{,un}lock macros on __sem_mappings_lock.
1796         * sem_open.c (check_add_mapping): Likewise.
1797         (__sem_mappings_lock): Change type to int.
1798         * semaphoreP.h (__sem_mappings_lock): Likewise.
1799         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1800         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1801         instead of lll_*mutex_*, pass LLL_SHARED as last
1802         argument.
1803         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1804         pass LLL_SHARED as last argument.
1805         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1806         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1807         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1808         pass LLL_SHARED as last argument.
1809         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1810         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1811         LLL_SHARED as last argument.
1812         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1813         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1814         Similarly.
1815         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1816         __libc_lock_lock_recursive, __libc_lock_unlock,
1817         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1818         argument to lll_{,un}lock.
1819         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1820         _IO_lock_unlock): Likewise.
1821         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1822         compound literal.
1823         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1824         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1825         __fork_lock.
1826         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1827         free_mem): Likewise.
1828         (__fork_lock): Change type to int.
1829         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1830         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1831         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1832         lll_futex_wake.
1833         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1834         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1835         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1836         New function.
1837         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1838         pass it through to lll_futex_*wait, only compile in when
1839         IS_IN_libpthread.
1840         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1841         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1842         argument and pass it through to lll_futex_*wait.
1843         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1844         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1845         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1846         inline functions to __lll_* resp. __lll_robust_*.
1847         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1848         (lll_mutex_dead): Add private argument.
1849         (__lll_lock_wait_private): New prototype.
1850         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1851         __lll_robust_lock_timedwait): Add private argument to prototypes.
1852         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1853         call __lll_lock_wait_private, otherwise pass private to
1854         __lll_lock_wait.
1855         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1856         __lll_robust_timedlock): Add private argument, pass it to
1857         __lll_*wait functions.
1858         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1859         call __lll_unlock_wake_private, otherwise pass private to
1860         __lll_unlock_wake.
1861         (__lll_robust_unlock): Add private argument, pass it to
1862         __lll_robust_unlock_wake.
1863         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1864         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1865         argument, pass it through to __lll_* inline function.
1866         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1867         (lll_lock_t): Remove.
1868         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1869         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1870         lll_cond_wake, lll_cond_broadcast): Remove.
1871         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1872         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1873         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1874         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1875         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1876         the header from assembler.  Renamed all lll_mutex_* resp.
1877         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1878         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1879         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1880         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1881         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1882         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1883         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1884         Remove prototype.
1885         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1886         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1887         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1888         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1889         MULTIPLE_THREADS_OFFSET as another asm operand.
1890         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1891         MULTIPLE_THREADS_OFFSET as last asm operand, call
1892         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1893         otherwise pass private as another argument to __lll_lock_wait.
1894         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1895         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1896         private as another argument to __lll_*lock_wait call.
1897         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1898         MULTIPLE_THREADS_OFFSET as another asm operand, call
1899         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1900         otherwise pass private as another argument to __lll_unlock_wake.
1901         (lll_robust_unlock): Add private argument, pass private as another
1902         argument to __lll_unlock_wake.
1903         (lll_robust_dead): Add private argument, use __lll_private_flag
1904         macro.
1905         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1906         LLL_MUTEX_LOCK_INITIALIZER.
1907         (lll_lock_t): Remove.
1908         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1909         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1910         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1911         lll_cond_wake, lll_cond_broadcast): Remove.
1912         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1913         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1914         2007-05-2{3,9} changes.
1915         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1916         kernel-features.h and lowlevellock.h.
1917         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1918         (LOAD_FUTEX_WAIT): Rewritten.
1919         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1920         define.
1921         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1922         (__lll_mutex_lock_wait): Rename to ...
1923         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1924         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1925         (__lll_mutex_timedlock_wait): Rename to ...
1926         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1927         contains private argument.  Don't compile in for libc.so.
1928         (__lll_mutex_unlock_wake): Rename to ...
1929         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1930         Don't compile in for libc.so.
1931         (__lll_timedwait_tid): Use __NR_gettimeofday.
1932         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1933         kernel-features.h and lowlevellock.h.
1934         (LOAD_FUTEX_WAIT): Define.
1935         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1936         define.
1937         (__lll_robust_mutex_lock_wait): Rename to ...
1938         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1939         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1940         macro.
1941         (__lll_robust_mutex_timedlock_wait): Rename to ...
1942         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1943         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1944         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1945         lowlevellock.h.
1946         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1947         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1948         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1949         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1950         to __lll_lock_wait in %edx.
1951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1952         Include lowlevellock.h and pthread-errnos.h.
1953         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1954         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1955         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1956         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1957         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1958         __lll_unlock_wake.
1959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1960         Include lowlevellock.h and pthread-errnos.h.
1961         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1962         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1963         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1964         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1965         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1966         __lll_unlock_wake.
1967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1968         Include lowlevellock.h.
1969         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1970         Don't define.
1971         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1972         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1973         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1974         __lll_unlock_wake.  Use __NR_gettimeofday.
1975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1976         Include lowlevellock.h.
1977         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1978         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1979         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1980         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1981         and __lll_unlock_wake.
1982         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1983         Include lowlevellock.h.
1984         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1985         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1986         MUTEX(%ebx) address in %edx rather than %ecx to
1987         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1988         and __lll_unlock_wake.  Move return value from %ecx to %edx
1989         register.
1990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1991         Include lowlevellock.h.
1992         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1993         Don't define.
1994         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1995         MUTEX(%ebp) address in %edx rather than %ecx to
1996         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1997         and __lll_unlock_wake.  Move return value from %ecx to %edx
1998         register.  Use __NR_gettimeofday.
1999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2000         Include lowlevellock.h.
2001         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
2002         Don't define.
2003         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2004         MUTEX(%ebp) address in %edx rather than %ecx to
2005         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
2006         and __lll_unlock_wake.  Move return value from %ecx to %edx
2007         register.  Use __NR_gettimeofday.
2008         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2009         Include lowlevellock.h.
2010         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2011         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
2012         MUTEX(%edi) address in %edx rather than %ecx to
2013         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
2014         and __lll_unlock_wake.
2015         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2016         Include lowlevellock.h.
2017         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2018         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
2019         MUTEX(%ebx) address in %edx rather than %ecx to
2020         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
2021         and __lll_unlock_wake.  Move return value from %ecx to %edx
2022         register.
2023         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
2024         lowlevellock.h.
2025         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2026         define.
2027         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
2028         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2029         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
2030         lowlevellock.h.
2031         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
2032         (sem_timedwait): Use __NR_gettimeofday.
2033         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
2034         lowlevellock.h.
2035         (LOCK): Don't define.
2036         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
2037         lowlevellock.h.
2038         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2039         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
2040         are waiters.
2041         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
2042         2007-05-2{3,9} changes.
2043         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
2044         kernel-features.h and lowlevellock.h.
2045         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2046         (LOAD_FUTEX_WAIT): Rewritten.
2047         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2048         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2049         (__lll_mutex_lock_wait): Rename to ...
2050         (__lll_lock_wait): ... this.  %esi is now private argument.
2051         Don't compile in for libc.so.
2052         (__lll_mutex_timedlock_wait): Rename to ...
2053         (__lll_timedlock_wait): ... this.  %esi contains private argument.
2054         Don't compile in for libc.so.
2055         (__lll_mutex_unlock_wake): Rename to ...
2056         (__lll_unlock_wake): ... this.  %esi contains private argument.
2057         Don't compile in for libc.so.
2058         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
2059         kernel-features.h and lowlevellock.h.
2060         (LOAD_FUTEX_WAIT): Define.
2061         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
2062         (__lll_robust_mutex_lock_wait): Rename to ...
2063         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
2064         Use LOAD_FUTEX_WAIT macro.
2065         (__lll_robust_mutex_timedlock_wait): Rename to ...
2066         (__lll_robust_timedlock_wait): ... this. %esi argument contains
2067         private, use LOAD_FUTEX_WAIT macro.
2068         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
2069         lowlevellock.h.
2070         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2071         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
2072         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
2073         __lll_lock_wait and __lll_unlock_wake.
2074         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
2075         Include lowlevellock.h and pthread-errnos.h.
2076         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2077         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
2078         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
2079         pass LLL_SHARED in %esi to both __lll_lock_wait and
2080         __lll_unlock_wake.
2081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
2082         Include lowlevellock.h and pthread-errnos.h.
2083         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
2084         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
2085         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
2086         pass LLL_SHARED in %esi to both __lll_lock_wait and
2087         __lll_unlock_wake.
2088         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
2089         Include lowlevellock.h.
2090         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2091         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
2092         pass LLL_SHARED in %esi to both __lll_lock_wait and
2093         __lll_unlock_wake.
2094         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2095         Include lowlevellock.h.
2096         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
2097         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
2098         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
2099         and __lll_unlock_wake.
2100         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
2101         Include lowlevellock.h.
2102         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2103         Don't define.
2104         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
2105         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2106         and __lll_unlock_wake.
2107         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2108         Include lowlevellock.h.
2109         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2110         Don't define.
2111         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2112         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2113         and __lll_unlock_wake.
2114         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2115         Include lowlevellock.h.
2116         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2117         Don't define.
2118         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2119         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2120         and __lll_unlock_wake.
2121         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
2122         Include lowlevellock.h.
2123         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2124         Don't define.
2125         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
2126         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
2127         and __lll_unlock_wake.
2128         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
2129         Include lowlevellock.h.
2130         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
2131         Don't define.
2132         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
2133         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
2134         and __lll_unlock_wake.
2135         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
2136         lowlevellock.h.
2137         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
2138         define.
2139         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
2140         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
2141         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
2142         lowlevellock.h.
2143         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2144         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
2145         lowlevellock.h.
2146         (LOCK): Don't define.
2147         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
2148         lowlevellock.h.
2149         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
2150         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
2151         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
2152         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
2153         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
2154         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2155         (__lll_lock_wait_private): New function.
2156         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
2157         it to lll_futex_*wait.  Don't compile in for libc.so.
2158         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
2159         Remove.
2160         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
2161         (struct sparc_pthread_barrier): Remove.
2162         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
2163         struct sparc_pthread_barrier.  Pass
2164         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
2165         and lll_futex_wait macros.
2166         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2167         Remove.
2168         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2169         Include sparc pthread_barrier_wait.c instead of generic one.
2171 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
2173         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
2175         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
2176         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
2177         %ecx.
2178         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
2179         (pthread_rwlock_timedwrlock): Likewise.
2180         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
2181         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
2183 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2185         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
2187 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
2189         * tst-locale2.c (useless): Add return statement.
2191 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
2193         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
2194         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
2195         * pthread_create.c (start_thread): Likewise.
2196         * init.c (sighandler_setxid): Likewise.
2197         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2198         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2199         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2200         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2201         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2202         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2203         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2204         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
2205         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
2206         Likewise.
2207         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
2208         Likewise.
2209         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2210         Likewise.
2211         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
2212         __rtld_notify): Likewise.
2213         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
2214         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
2215         __pthread_once): Likewise.
2216         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
2217         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2218         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2219         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2220         (lll_futex_wait): Add private argument, define as wrapper around
2221         lll_futex_timed_wait.
2222         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2223         use __lll_private_flag macro.
2224         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2225         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2226         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
2227         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2228         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2229         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2230         (lll_futex_wait): Add private argument, define as wrapper around
2231         lll_futex_timed_wait.
2232         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2233         use __lll_private_flag macro.
2234         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
2235         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
2236         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2237         Define.
2238         (lll_futex_timed_wait, lll_futex_wake): Use it.
2239         (lll_private_futex_wait, lll_private_futex_timed_wait,
2240         lll_private_futex_wake): Removed.
2241         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
2242         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2243         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2244         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2245         (lll_futex_wait): Add private argument, define as wrapper around
2246         lll_futex_timed_wait.
2247         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2248         use __lll_private_flag macro.
2249         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2250         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2251         to lll_futex_*.
2252         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2253         (lll_private_futex_wait, lll_private_futex_timed_wait,
2254         lll_private_futex_wake): Removed.
2255         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2256         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2257         (lll_private_futex_wait, lll_private_futex_timed_wait,
2258         lll_private_futex_wake): Removed.
2259         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2260         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2261         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2262         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2263         (lll_futex_wait): Add private argument, define as wrapper around
2264         lll_futex_timed_wait.
2265         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2266         use __lll_private_flag macro.
2267         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2268         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2269         to lll_futex_*.
2270         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2271         Define.
2272         (lll_futex_timed_wait, lll_futex_wake): Use it.
2273         (lll_private_futex_wait, lll_private_futex_timed_wait,
2274         lll_private_futex_wake): Removed.
2276 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
2278         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2279         of the structure for sparc32.
2281 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
2283         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2285 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2287         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2288         code used when private futexes are assumed.
2289         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2290         Likewise.
2292 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
2294         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2295         (__lll_private_flag): Define.
2296         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2297         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2298         __lll_private_flag.
2299         (lll_private_futex_wait, lll_private_futex_timedwait,
2300         lll_private_futex_wake): Define as wrapper around non-_private
2301         macros.
2302         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2303         (__lll_private_flag): Define.
2304         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2305         (lll_private_futex_wait, lll_private_futex_timedwait,
2306         lll_private_futex_wake): Define as wrapper around non-_private
2307         macros.
2309 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
2311         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2312         parameter to lll_futex_wait call.
2313         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2315         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2316         Replace lll_futex_wait with lll_private_futex_wait.
2317         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2318         Add LLL_SHARED parameter to lll_futex_wake().
2320         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2321         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2322         lll_private_futex_wake.
2323         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2324         bit from private parm before syscall.
2325         (lll_futex_timed_wait): Likewise.
2326         (lll_futex_wake): Likewise.
2327         (lll_futex_wake_unlock): Likewise.
2328         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2329         (lll_robust_mutex_unlock): Likewise.
2330         (lll_mutex_unlock_force): Likewise.
2331         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2333 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2335         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2336         compilation when unconditionally using private futexes.
2337         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2338         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2339         Likewise.
2340         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2341         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2343 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2345         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2346         Define.
2348 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2350         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2351         kernel-features.h.
2353 2007-05-16  Roland McGrath  <roland@redhat.com>
2355         * init.c (__nptl_initial_report_events): New variable.
2356         (__pthread_initialize_minimal_internal): Initialize pd->report_events
2357         to that.
2359 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
2361         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2362         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2364 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2366         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2367         implementation.
2369 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
2371         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2372         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2373         * pthread_mutex_timedlock.c: Likewise.
2374         * pthread_mutex_trylock.c: Likewise.
2375         * pthread_mutex_unlock.c: Likewise.
2377 2007-06-17  Andreas Schwab  <schwab@suse.de>
2379         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2380         sections.
2382 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
2384         * allocatestack.c (allocate_stack): Make code compile if
2385         __ASSUME_PRIVATE_FUTEX is set.
2387 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2389         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2390         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2391         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2392         (__pthread_rwlock_wrlock): Likewise.
2393         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2394         (pthread_rwlock_timedrdlock): Likewise.
2395         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2396         (pthread_rwlock_timedwrlock): Likewise.
2397         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2398         (__pthread_rwlock_unlock): Likewise.
2400 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2402         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2403         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2404         Split __flags into __flags, __shared, __pad1 and __pad2.
2405         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2406         futexes if they are available.
2407         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2408         in libc-lowlevellock.S allow using private futexes.
2409         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2410         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
2411         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
2412         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
2413         lll_private_futex_timed_wait and lll_private_futex_wake.
2414         (lll_robust_mutex_unlock): Fix typo.
2415         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2416         field in futex command setup.
2417         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2418         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2419         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2420         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2421         if they are available.  Remove clear_once_control.
2422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2423         futexes if they are available.
2424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2425         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2426         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2427         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2428         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2429         Wake only when there are waiters.
2430         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2431         support.  Indicate that there are waiters.  Remove unnecessary
2432         extra cancellation test.
2433         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
2434         left-over duplication of __sem_wait_cleanup.
2436 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
2438         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2439         parameter to lll_futex_wait, lll_futex_timed_wait, and
2440         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
2441         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2442         lll_private_futex_wake.
2443         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2444         * allocatestack.c: Adjust use of lll_futex_* macros.
2445         * init.c: Likewise.
2446         * lowlevellock.h: Likewise.
2447         * pthread_barrier_wait.c: Likewise.
2448         * pthread_cond_broadcast.c: Likewise.
2449         * pthread_cond_destroy.c: Likewise.
2450         * pthread_cond_signal.c: Likewise.
2451         * pthread_cond_timedwait.c: Likewise.
2452         * pthread_cond_wait.c: Likewise.
2453         * pthread_create.c: Likewise.
2454         * pthread_mutex_lock.c: Likewise.
2455         * pthread_mutex_setprioceiling.c: Likewise.
2456         * pthread_mutex_timedlock.c: Likewise.
2457         * pthread_mutex_unlock.c: Likewise.
2458         * pthread_rwlock_timedrdlock.c: Likewise.
2459         * pthread_rwlock_timedwrlock.c: Likewise.
2460         * pthread_rwlock_unlock.c: Likewise.
2461         * sysdeps/alpha/tls.h: Likewise.
2462         * sysdeps/i386/tls.h: Likewise.
2463         * sysdeps/ia64/tls.h: Likewise.
2464         * sysdeps/powerpc/tls.h: Likewise.
2465         * sysdeps/pthread/aio_misc.h: Likewise.
2466         * sysdeps/pthread/gai_misc.h: Likewise.
2467         * sysdeps/s390/tls.h: Likewise.
2468         * sysdeps/sh/tls.h: Likewise.
2469         * sysdeps/sparc/tls.h: Likewise.
2470         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2471         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2472         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2473         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2474         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2475         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2476         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2477         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2478         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2479         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2480         Likewise.
2481         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2482         * sysdeps/x86_64/tls.h: Likewise.
2484 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2486         * pthread_getattr_np.c: No need to install a cancellation handler,
2487         this is no cancellation point.
2488         * pthread_getschedparam.c: Likewise.
2489         * pthread_setschedparam.c: Likewise.
2490         * pthread_setschedprio.c: Likewise.
2491         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2492         lll_unlock_wake_cb.
2493         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2494         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2495         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2496         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2497         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2498         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2499         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2500         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2501         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2502         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2503         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2504         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2506         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2507         whether there are more than one thread makes no sense here since
2508         we only call the slow path if the locks are taken.
2509         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2511         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2512         COND_NWAITERS_SHIFT.
2513         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2514         COND_CLOCK_BITS.
2515         * pthread_cond_init.c: Likewise.
2516         * pthread_cond_timedwait.c: Likewise.
2517         * pthread_cond_wait.c: Likewise.
2518         * pthread_condattr_getclock.c: Likewise.
2519         * pthread_condattr_setclock.c: Likewise.
2520         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2521         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2523         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2524         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2526 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2528         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2529         unistd.h.
2531         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2532         insn suffix.
2533         (THREAD_GSCOPE_GET_FLAG): Remove.
2534         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2535         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2536         changes.
2537         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2538         (THREAD_GSCOPE_GET_FLAG): Remove.
2539         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2540         instead of THREAD_GSCOPE_GET_FLAG.
2541         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2542         it.
2543         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2544         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2545         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2546         THREAD_GSCOPE_WAIT): Define.
2547         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2548         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2549         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2550         THREAD_GSCOPE_WAIT): Define.
2551         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2552         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2553         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2554         THREAD_GSCOPE_WAIT): Define.
2555         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2556         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2557         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2558         THREAD_GSCOPE_WAIT): Define.
2560 2007-05-24  Richard Henderson  <rth@redhat.com>
2562         * descr.h (struct pthread): Add header.gscope_flag.
2563         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2564         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2565         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2566         THREAD_GSCOPE_WAIT): Define.
2568 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2570         * init.c: Make it compile with older kernel headers.
2572         * tst-initializers1.c: Show through exit code which test failed.
2574         * pthread_rwlock_init.c: Also initialize __shared field.
2575         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2576         element in rwlock structure into four byte elements.  One of them is
2577         the new __shared element.
2578         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2579         Likewise.
2580         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2581         __shared, adjust names of other padding elements.
2582         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2583         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2584         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2585         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2586         FUTEX_PRIVATE_FLAG.
2587         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2588         futex to use private operations if possible.
2589         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2590         Likewise.
2591         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2592         Likewise.
2593         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2594         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2595         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2596         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2597         Likewise.
2598         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2599         Likewise.
2600         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2601         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2603 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2605         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2606         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2607         * pthread_rwlock_timedrdlock.c: Likewise.
2608         * pthread_rwlock_tryrdlock.c: Likewise.
2610         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2611         optimization.
2613         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2614         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2615         duplication of __sem_wait_cleanup.
2617         * allocatestack.c: Revert last change.
2618         * init.c: Likewise.
2619         * sysdeps/i386/tls.h: Likewise.
2620         * sysdeps/x86_64/tls.h: Likewise.
2621         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2622         header structure.
2623         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2625         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2626         Add private field.
2627         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2628         * pthread_barrier_init.c: Set private flag if pshared and private
2629         futexes are supported.
2630         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2631         private field in futex command setup.
2632         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2634 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2636         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2637         support.
2638         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2639         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2640         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2641         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2642         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2644         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2645         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2646         fields in the structure.
2647         (__old_sem_init): New function.
2648         * sem_open.c: Initialize all fields of the structure.
2649         * sem_getvalue.c: Adjust for renamed element.
2650         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2651         (gen-as-const-headers): Add structsem.sym.
2652         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2653         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2654         struct new_sem.  Add struct old_sem.
2655         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2656         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2657         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2658         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2659         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2660         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2661         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2662         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2663         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2664         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2665         * tst-sem10.c: New file.
2666         * tst-sem11.c: New file.
2667         * tst-sem12.c: New file.
2668         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2669         of struct sem.
2671 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2672             Jakub Jelinek  <jakub@redhat.com>
2674         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2675         Move __pthread_enable_asynccancel right before futex syscall.
2676         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2677         Likewise.
2679 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2681         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2682         THREAD_COPY_PRIVATE_FUTEX): Define.
2683         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2684         THREAD_COPY_PRIVATE_FUTEX): Define.
2685         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2686         * init.c (__pthread_initialize_minimal_internal): Use
2687         THREAD_SET_PRIVATE_FUTEX.
2689         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2690         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2691         THREAD_GSCOPE_FLAG_WAIT): Define.
2692         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2693         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2694         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2695         PTR_DEMANGLE.
2696         (THREAD_GSCOPE_GET_FLAG): Define.
2697         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2698         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2699         instead of ->header.gscope_flag directly.
2701 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2703         * init.c (__pthread_initialize_minimal_internal): Check whether
2704         private futexes are available.
2705         * allocatestack.c (allocate_stack): Copy private_futex field from
2706         current thread into the new stack.
2707         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2708         futexes if they are available.
2709         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2710         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2711         in libc-lowlevellock.S allow using private futexes.
2712         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2713         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2714         FUTEX_PRIVATE_FLAG.
2715         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2716         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2717         if they are available.
2718         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2719         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2720         * sysdeps/i386/tcb-offsets.sym: Likewise.
2721         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2722         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2724 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2726         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2727         Remove ptr_wait_lookup_done again.
2728         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2729         (__pthread_initialize_minimal_internal): Initialize
2730         _dl_wait_lookup_done pointer in _rtld_global directly.
2731         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2732         Remove code to code _dl_wait_lookup_done.
2733         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2734         encrypted for now.
2736 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2738         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2739         pthread_mutex_init failed with ENOTSUP.
2741 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2743         * allocatestack.c (__wait_lookup_done): New function.
2744         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2745         Add ptr_wait_lookup_done.
2746         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2747         * pthreadP.h: Declare __wait_lookup_done.
2748         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2749         Define macros to implement reference handling of global scope.
2750         * sysdeps/x86_64/tls.h: Likewise.
2751         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2752         Initialize GL(dl_wait_lookup_done).
2754 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2756         [BZ #4512]
2757         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2758         is detected.
2759         * pthread_mutex_timedlock.c: Likewise.
2760         * pthread_mutex_trylock.c: Likewise.
2761         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2763         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2764         * tst-robust9.c: New file.
2765         * tst-robustpi9.c: New file.
2767         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2768         unnecessary extra cancellation test.
2770 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2772         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2773         extra cancellation test.
2774         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2776 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2778         * descr.h (struct pthread): Rearrange members to fill hole in
2779         64-bit layout.
2781         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2782         (__pthread_setaffinity_new): If syscall was successful and
2783         RESET_VGETCPU_CACHE is defined, use it before returning.
2784         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2786 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2788         [BZ #4455]
2789         * tst-align2.c: Include stackinfo.h.
2790         * tst-getpid1.c: Likewise.
2792 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2794         [BZ #4455]
2795         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2796         * tst-getpid1.c (do_test): Likewise.
2798         [BZ #4456]
2799         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2800         (allocate_stack): Likewise.
2802 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2804         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2805         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2806         (__lll_robust_timedlock_wait): Likewise.
2807         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2809 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2811         [BZ #4465]
2812         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2813         * tst-cancel4.c (tf_fdatasync): New test.
2815 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2817         [BZ #4392]
2818         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2819         check mutexes like normal mutexes.
2821         [BZ #4306]
2822         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2823         Initialize the whole sigevent structure to appease valgrind.
2825 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2827         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2828         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2830 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2832         * tst-locale1.c: Avoid warnings.
2833         * tst-locale2.c: Likewise.
2835 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2837         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2838         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2840 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2842         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2843         __extern_always_inline where appropriate.
2844         * sysdeps/pthread/pthread.h: Likewise.
2846 2007-03-13  Richard Henderson  <rth@redhat.com>
2848         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2849         separate cfi regions for the two subsections.
2851 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2853         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2854         new thread, don't just decrement it.
2855         Patch by Suzuki K P <suzuki@in.ibm.com>.
2857 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2859         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2860         PTHFCT_CALL definition.
2862 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2864         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2865         available, don't use it.
2867 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2869         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2870         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2871         call into the kernel to delay.
2873 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2875         * tst-initializers1.c: We want to test the initializers as seen
2876         outside of libc, so undefined _LIBC.
2878         * pthread_join.c (cleanup): Avoid warning.
2880 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2882         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2883         (__lll_timedwait_tid): Add unwind info.
2885         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2886         function table, mangle the pointers.
2887         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2888         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2889         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2890         demangle pointers before use.
2891         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2892         demangle pointer.
2893         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2894         * sysdeps/pthread/setxid.h: Likewise.
2896 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2898         * tst-rwlock7.c: Show some more information in case of correct
2899         behavior.
2901 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2903         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2904         (lll_futex_timed_wait): Undo part of last change, don't negate
2905         return value.
2907 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2909         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2910         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2912 2006-12-28  David S. Miller  <davem@davemloft.net>
2914         * shlib-versions: Fix sparc64 linux target specification.
2916 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2918         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2919         Adjust include path for pthread_barrier_wait.c move.
2921 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2923         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2924         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2926 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2928         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2929         6 argument cancellable syscalls.
2930         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2931         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2932         6 argument cancellable syscalls.
2933         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2935 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2937         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2938         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2940 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2942         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2943         __sync_lock_release instead of __sync_lock_release_si.
2945 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2947         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2948         Define.
2949         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2950         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2951         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2952         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2953         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2954         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2955         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2956         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2957         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2958         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2959         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2961 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2963         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2964         * pthread_barrier_wait.c: ...here.
2965         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2966         * pthread_cond_broadcast.c: ...here.
2967         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2968         * pthread_cond_signal.c: ...here.
2969         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2970         * pthread_cond_timedwait.c: ...here.
2971         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2972         * pthread_cond_wait.c: ...here.
2973         * sysdeps/pthread/pthread_once.c: Move to...
2974         * pthread_once.c: ...here.
2975         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2976         * pthread_rwlock_rdlock.c: ...here.
2977         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2978         * pthread_rwlock_timedrdlock.c: ...here.
2979         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2980         * pthread_rwlock_timedwrlock.c: ...here.
2981         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2982         * pthread_rwlock_unlock.c: ...here.
2983         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2984         * pthread_rwlock_wrlock.c: ...here.
2985         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2986         * pthread_spin_destroy.c: ...here.
2987         * sysdeps/pthread/pthread_spin_init.c: Move to...
2988         * pthread_spin_init.c: ...here.
2989         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2990         * pthread_spin_unlock.c: ...here.
2991         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2992         * pthread_getcpuclockid.c: ...here.
2994         * init.c: USE_TLS support is now always enabled.
2995         * tst-tls5.h: Likewise.
2996         * sysdeps/alpha/tls.h: Likewise.
2997         * sysdeps/i386/tls.h: Likewise.
2998         * sysdeps/ia64/tls.h: Likewise.
2999         * sysdeps/powerpc/tls.h: Likewise.
3000         * sysdeps/s390/tls.h: Likewise.
3001         * sysdeps/sh/tls.h: Likewise.
3002         * sysdeps/sparc/tls.h: Likewise.
3003         * sysdeps/x86_64/tls.h: Likewise.
3005 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
3007         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3008         __rtld_mrlock_change): Update oldval if atomic compare and exchange
3009         failed.
3011         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3012         Define to THREAD_SELF->header.multiple_threads.
3013         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
3014         Likewise.
3015         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
3016         Likewise.
3017         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
3018         (SINGLE_THREAD_P): Likewise.
3019         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
3020         (SINGLE_THREAD_P): Likewise.
3021         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3022         (SINGLE_THREAD_P): Likewise.
3023         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
3024         (SINGLE_THREAD_P): Likewise.
3025         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
3026         Likewise.
3027         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3028         (SINGLE_THREAD_P): Likewise.
3029         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3030         (SINGLE_THREAD_P): Likewise.
3031         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
3032         Likewise.
3034 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
3036         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
3037         by default rather than 2_3_3.
3039 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
3041         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
3042         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
3043         atomic_* instead of catomic_* macros.
3045 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
3047         [BZ #3285]
3048         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
3049         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
3050         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3051         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3052         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3053         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
3054         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
3055         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3056         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
3057         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
3058         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
3059         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
3060         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
3062 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
3064         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
3065         cancelable syscalls with six parameters.
3067         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
3068         operations instead of atomic_*.
3070 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
3072         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
3074 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
3076         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
3077         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
3078         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
3079         New file.
3080         * pthread_attr_setstack.c: Allow overwriting the version number of the
3081         new symbol.
3082         * pthread_attr_setstacksize.c: Likewise.
3083         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
3084         it.
3085         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
3086         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
3088 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
3090         [BZ #3251]
3091         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
3092         Patch by Petr Baudis.
3094 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
3096         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
3098         * tst-cancel2.c (tf): Loop as long as something was written.
3100 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3102         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
3103         mutexes wake all mutexes.
3104         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
3105         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3106         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3108 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
3110         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
3111         to guarantee the thread is always canceled.
3113 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
3115         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
3116         Include stdlib.h.
3117         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
3118         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
3119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3123 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
3125         [BZ #3123]
3126         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
3127         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
3128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3130         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3131         * Makefile (tests): Add tst-cond22.
3132         * tst-cond22.c: New file.
3134 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
3136         [BZ #3124]
3137         * descr.h (struct pthread): Add parent_cancelhandling.
3138         * sysdeps/pthread/createthread.c (create_thread): Pass parent
3139         cancelhandling value to child.
3140         * pthread_create.c (start_thread): If parent thread was canceled
3141         reset the SIGCANCEL mask.
3142         * Makefile (tests): Add tst-cancel25.
3143         * tst-cancel25.c: New file.
3145 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
3146             Ulrich Drepper  <drepper@redhat.com>
3148         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
3149         counterp if it is already zero.
3150         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
3152 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
3153             Roland McGrath  <roland@redhat.com>
3155         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3156         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3157         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
3158         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3159         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3160         lll_robust_mutex_timedlock, lll_mutex_unlock,
3161         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3162         Add _L_*_ symbols around the subsection.
3163         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
3164         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
3166 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
3167             Roland McGrath  <roland@redhat.com>
3169         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3170         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
3171         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
3172         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
3173         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
3174         lll_robust_mutex_timedlock, lll_mutex_unlock,
3175         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
3176         Add _L_*_ symbols around the subsection.
3177         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
3178         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
3180 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
3182         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
3183         change because it can disturb too much existing code.  If real hard
3184         reader preference is needed we'll introduce another type.
3185         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3186         (pthread_rwlock_timedwrlock): Likewise.
3187         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3188         Likewise.
3190 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
3192         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
3193         reader preference.
3194         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
3195         (pthread_rwlock_timedwrlock): Likewise.
3196         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
3197         Likewise.
3199 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
3201         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
3202         Only define ifdef SHARED.
3204 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
3206         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
3207         (free_stacks): ...here.
3208         (__free_stack_cache): New function.
3209         * pthreadP.h: Declare __free_stack_cache.
3210         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
3211         ptr_freeres.
3212         * init.c (pthread_functions): Initialize ptr_freeres.
3213         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
3214         New freeres function.
3216 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
3218         [BZ #3018]
3219         * Makefile (extra-objs): Add modules to extra-test-objs instead.
3221 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
3223         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3224         _XOPEN_REALTIME_THREADS.
3226 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
3228         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
3229         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
3230         HAVE_CLOCK_GETTIME_VSYSCALL.
3231         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
3233 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
3235         * sysdeps/unix/sysv/linux/bits/posix_opt.h
3236         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
3237         * descr.h (struct priority_protection_data): New type.
3238         (struct pthread): Add tpp field.
3239         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
3240         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
3241         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
3242         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
3243         TPP mutexes.
3244         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
3245         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
3246         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
3247         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
3248         * tpp.c: New file.
3249         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
3250         boosted by TPP.
3251         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3252         * pthread_mutexattr_getprioceiling.c
3253         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3254         in the SCHED_FIFO priority range.
3255         * pthread_mutexattr_setprioceiling.c
3256         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3257         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3258         if mutex is not TPP.  Ceiling is now in __data.__lock.
3259         * pthread_mutex_setprioceiling.c: Include stdbool.h.
3260         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
3261         is now in __data.__lock.  Add locking.
3262         * pthread_create.c (__free_tcb): Free pd->tpp structure.
3263         * Makefile (libpthread-routines): Add tpp.
3264         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3265         * tst-tpp.h: New file.
3266         * tst-mutexpp1.c: New file.
3267         * tst-mutexpp6.c: New file.
3268         * tst-mutexpp10.c: New file.
3269         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3270         * tst-mutex6.c (TEST_FUNCTION): Likewise.
3272 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3274         [BZ #2843]
3275         * pthread_join.c (pthread_join): Account for self being canceled
3276         when checking for deadlocks.
3277         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
3278         (tf1): Don't print anything after pthread_join returns, this would be
3279         another cancellation point.
3280         (tf2): Likewise.
3281         * tst-join6.c: New file.
3282         * Makefile (tests): Add tst-join6.
3284 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
3286         [BZ #2892]
3287         * pthread_setspecific.c (__pthread_setspecific): Check
3288         out-of-range index before checking for unused key.
3290         * sysdeps/pthread/gai_misc.h: New file.
3292 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
3294         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
3295         file.  Don't use sysctl.
3296         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
3297         overwrite the file if this is likely not true.
3299 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
3301         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3302         * Makefile (tests): Add tst-getpid3.
3303         * tst-getpid3.c: New file.
3305 2006-07-30  Roland McGrath  <roland@redhat.com>
3307         * Makefile (libpthread-routines): Add ptw-sigsuspend.
3309         * sysdeps/unix/sysv/linux/i386/not-cancel.h
3310         (pause_not_cancel): New macro.
3311         (nanosleep_not_cancel): New macro.
3312         (sigsuspend_not_cancel): New macro.
3313         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3314         nanosleep_not_cancel macro from <not-cancel.h>.
3315         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3316         macro from <not-cancel.h>.
3318 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
3319             Jakub Jelinek  <jakub@redhat.com>
3321         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3322         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
3323         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3324         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3325         * pthread_mutex_init.c: Add support for priority inheritance mutex.
3326         * pthread_mutex_lock.c: Likewise.
3327         * pthread_mutex_timedlock.c: Likewise.
3328         * pthread_mutex_trylock.c: Likewise.
3329         * pthread_mutex_unlock.c: Likewise.
3330         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3331         all mutexes.
3332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3333         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3334         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3335         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3336         pthread-pi-defines.sym.
3337         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3338         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3339         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3340         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3341         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3342         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3343         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3344         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3345         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3346         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3347         _POSIX_THREAD_PRIO_INHERIT to 200112L.
3348         * tst-mutex1.c: Adjust to allow use in PI mutex test.
3349         * tst-mutex2.c: Likewise.
3350         * tst-mutex3.c: Likewise.
3351         * tst-mutex4.c: Likewise.
3352         * tst-mutex5.c: Likewise.
3353         * tst-mutex6.c: Likewise.
3354         * tst-mutex7.c: Likewise.
3355         * tst-mutex7a.c: Likewise.
3356         * tst-mutex8.c: Likewise.
3357         * tst-mutex9.c: Likewise.
3358         * tst-robust1.c: Likewise.
3359         * tst-robust7.c: Likewise.
3360         * tst-robust8.c: Likewise.
3361         * tst-mutexpi1.c: New file.
3362         * tst-mutexpi2.c: New file.
3363         * tst-mutexpi3.c: New file.
3364         * tst-mutexpi4.c: New file.
3365         * tst-mutexpi5.c: New file.
3366         * tst-mutexpi6.c: New file.
3367         * tst-mutexpi7.c: New file.
3368         * tst-mutexpi7a.c: New file.
3369         * tst-mutexpi8.c: New file.
3370         * tst-mutexpi9.c: New file.
3371         * tst-robust1.c: New file.
3372         * tst-robust2.c: New file.
3373         * tst-robust3.c: New file.
3374         * tst-robust4.c: New file.
3375         * tst-robust5.c: New file.
3376         * tst-robust6.c: New file.
3377         * tst-robust7.c: New file.
3378         * tst-robust8.c: New file.
3379         * Makefile (tests): Add the new tests.
3381         * pthread_create.c (start_thread): Add some casts to avoid warnings.
3382         * pthread_mutex_destroy.c: Remove unneeded label.
3384 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
3386         * pthread_mutex_init.c (__pthread_mutex_init): Move some
3387         computations to compile time.
3389 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3391         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3393 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
3395         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3397 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
3399         * pthread_key_create.c (__pthread_key_create): Do away with
3400         __pthread_keys_lock.
3402         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3403         (__kernel_cpumask_size): Mark as hidden.
3404         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3406         * sem_open.c (__sem_mappings_lock): Mark as hidden.
3407         * semaphoreP.h (__sem_mappings_lock): Likewise.
3409 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
3411         * pthread_atfork.c: Mark __dso_handle as hidden.
3413 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
3415         [BZ #2644]
3416         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3417         the reload problem.  Change the one path in pthread_cancel_init
3418         which causes the problem.  Force gcc to reload.  Simplify callers.
3419         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3420         (_Unwind_GetBSP): Undo last patch.
3422 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
3424         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3425         function pointer is reloaded after pthread_cancel_init calls.
3427         [BZ #2644]
3428         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3429         pointers are reloaded after pthread_cancel_init calls.
3431 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
3433         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3434         __always_inline.
3436 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
3438         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3439         Allocate new object which is passed to timer_sigev_thread so that
3440         the timer can be deleted before the new thread is scheduled.
3442 2006-04-26  Roland McGrath  <roland@redhat.com>
3444         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3446 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
3448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3449         suffix for conditional jumps.
3450         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3451         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3452         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3453         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3454         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3455         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3457         * init.c (sigcancel_handler): Compare with correct PID even if the
3458         thread is in the middle of a fork call.
3459         (sighandler_setxid): Likewise.
3460         Reported by Suzuki K P <suzuki@in.ibm.com> .
3462 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
3464         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3466 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
3468         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3469         fails [Coverity CID 105].
3471 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3473         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3475 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3477         [BZ #2505]
3478         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3479         Define __lll_rel_instr using lwsync.
3481 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3483         * allocatestack.c (allocate_stack): Always initialize robust_head.
3484         * descr.h: Define struct robust_list_head.
3485         (struct pthread): Use robust_list_head in robust mutex list definition.
3486         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3487         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3488         (__pthread_initialize_minimal_internal): Register robust_list with
3489         the kernel.
3490         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3491         Declare __set_robust_list_avail.
3492         * pthread_create.c (start_thread): Register robust_list of new thread.
3493         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3494         waiters.
3495         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3496         number of users, it's unreliable.
3497         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3498         set_robust_list syscall is available.
3499         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3500         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3501         Set robust_head.list_op_pending before trying to lock a robust mutex.
3502         * pthread_mutex_timedlock.c: Likewise.
3503         * pthread_mutex_trylock.c: Likewise.
3504         * pthread_mutex_unlock.c: Likewise for unlocking.
3505         * Makefile (tests): Add tst-robust8.
3506         * tst-robust8.c: New file.
3508 2006-03-08  Andreas Schwab  <schwab@suse.de>
3510         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3511         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3513 2006-03-05  Roland McGrath  <roland@redhat.com>
3515         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3516         and $config_os doesn't match *linux*.
3518 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3520         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3521         Use __syscall_error.
3522         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3523         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3524         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3525         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3526         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3527         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3529 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3531         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3533 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3535         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3536         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3537         mutex.
3538         (__lll_robust_timedlock_wait): Likewise.
3539         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3540         (__lll_robust_lock_wait): Likewise.
3541         (__lll_robust_timedlock_wait): Likewise.
3542         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3543         (__lll_robust_lock_wait): Likewise.
3544         (__lll_robust_timedlock_wait): Likewise.
3546 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3548         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3549         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3550         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3551         lll_robust_mutex_unlock): Define.
3552         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3554 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3556         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3557         instead of <clone.S>.
3559 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3561         * Makefile (libpthread-routines): Add
3562         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3563         and pthread_mutex_[sg]etprioceiling.
3564         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3565         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3566         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3567         pthread_mutex_setprioceiling.
3568         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3569         PTHREAD_PRIO_PROTECT): New enum values.
3570         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3571         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3572         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3573         prototypes.
3574         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3575         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3576         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3577         Define.
3578         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3579         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3580         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3581         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3582         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3583         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3584         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3585         protocol mutexes.
3586         * pthread_mutex_getprioceiling.c: New file.
3587         * pthread_mutex_setprioceiling.c: New file.
3588         * pthread_mutexattr_getprioceiling.c: New file.
3589         * pthread_mutexattr_setprioceiling.c: New file.
3590         * pthread_mutexattr_getprotocol.c: New file.
3591         * pthread_mutexattr_setprotocol.c: New file.
3593 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3595         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3597 2006-02-27  Roland McGrath  <roland@redhat.com>
3599         * sysdeps/pthread/Subdirs: List nptl here too.
3600         * configure (libc_add_on_canonical): New variable.
3602         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3604         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3605         self to get main source tree's file.
3606         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3607         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3608         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3609         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3610         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3611         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3612         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3613         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3614         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3615         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3616         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3617         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3618         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3620         * Makefile: Use $(sysdirs) in vpath directive.
3622         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3623         (CPPFLAGS-timer_routines.c): Likewise.
3625         * Makeconfig (includes): Variable removed.
3627 2006-02-26  Roland McGrath  <roland@redhat.com>
3629         * sysdeps/generic/pt-raise.c: Moved to ...
3630         * pt-raise.c: ... here.
3631         * sysdeps/generic/lowlevellock.h: Moved to ...
3632         * lowlevellock.h: ... here.
3634 2006-02-23  Roland McGrath  <roland@redhat.com>
3636         * descr.h (struct pthread): Add final member `end_padding'.
3637         (PTHREAD_STRUCT_END_PADDING): Use it.
3639 2006-02-20  Roland McGrath  <roland@redhat.com>
3641         * sysdeps/mips: Directory removed, saved in ports repository.
3642         * sysdeps/unix/sysv/linux/mips: Likewise.
3644 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3646         * tst-robust1.c: Add second mutex to check that the mutex list is
3647         handled correctly.
3649 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3651         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3652         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3653         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3654         lll_robust_mutex_unlock): New macros.
3655         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3656         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3657         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3658         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3659         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3661 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3663         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3664         definitions.
3665         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3667 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3669         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3670         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3671         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3672         (lll_robust_mutex_unlock): Likewise.
3674 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3676         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3677         Set robust_list.__next rather than robust_list.
3678         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3679         (__pthread_list_t): New typedef.
3680         (pthread_mutex_t): Replace __next and __prev fields with __list.
3681         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3682         (__pthread_list_t): New typedef.
3683         (pthread_mutex_t): Replace __next and __prev fields with __list.
3684         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3685         (__pthread_list_t, __pthread_slist_t): New typedefs.
3686         (pthread_mutex_t): Replace __next and __prev fields with __list.
3687         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3688         (__pthread_list_t, __pthread_slist_t): New typedefs.
3689         (pthread_mutex_t): Replace __next and __prev fields with __list.
3690         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3691         (__pthread_list_t, __pthread_slist_t): New typedefs.
3692         (pthread_mutex_t): Replace __next and __prev fields with __list.
3693         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3694         (__pthread_slist_t): New typedef.
3695         (pthread_mutex_t): Replace __next field with __list.
3697 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3699         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3700         PTHREAD_MUTEX_OWNERDEAD.
3701         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3702         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3703         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3704         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3705         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3706         to PTHREAD_MUTEX_INCONSISTENT.
3707         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3708         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3709         * pthread_mutex_trylock.c: Likewise.
3710         * pthread_mutex_timedlock.c: Likewise.
3711         * pthread_mutex_unlock.c: Likewise.
3712         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3713         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3714         lowlevelrobustlock.sym.
3715         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3716         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3717         definitions.
3718         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3719         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3720         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3721         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3722         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3724 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3726         * allocatestack.c (allocate_stack): Initialize robust_list.
3727         * init.c (__pthread_initialize_minimal_internal): Likewise.
3728         * descr.h (struct xid_command): Pretty printing.
3729         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3730         robust_list.  Adjust macros.
3731         * pthread_create.c (start_thread): Adjust robust_list handling.
3732         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3733         but the owner for all robust mutex types.
3734         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3735         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3736         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3737         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3739         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3740         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3742 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3744         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3745         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3747 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3749         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3750         Return status.
3751         (lll_futex_timed_wait): Define.
3753 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3755         * tst-cancel4.c: Test ppoll.
3757 2006-01-18  Andreas Jaeger  <aj@suse.de>
3759         [BZ #2167]
3760         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3761         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3762         by Jim Gifford <patches@jg555.com>.
3764 2006-01-13  Richard Henderson  <rth@redhat.com>
3766         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3768 2006-01-10  Roland McGrath  <roland@redhat.com>
3770         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3771         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3772         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3773         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3774         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3775         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3776         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3777         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3778         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3779         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3781 2006-01-09  Roland McGrath  <roland@redhat.com>
3783         * tst-initializers1-c89.c: New file.
3784         * tst-initializers1-c99.c: New file.
3785         * tst-initializers1-gnu89.c: New file.
3786         * tst-initializers1-gnu99.c: New file.
3787         * Makefile (tests): Add them.
3788         (CFLAGS-tst-initializers1-c89.c): New variable.
3789         (CFLAGS-tst-initializers1-c99.c): New variable.
3790         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3791         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3793         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3794         Use __extension__ on anonymous union definition.
3795         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3796         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3797         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3798         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3799         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3801 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3803         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3804         Don't give the union a name because it changes the mangled name.
3805         Instead name the struct for __data.
3806         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3807         Likewise.
3808         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3809         Likewise.
3811 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3813         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3814         stack bias to mc_ftp field.
3816 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3818         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3819         being too clever and reloading the futex value where it shouldn't.
3821 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3823         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3824         correct type.
3826 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3828         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3829         Add cfi directives.
3831 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3833         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3834         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3835         rename in tcbhead_t.
3837         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3838         Don't give the union a name because it changes the mangled name.
3839         Instead name the struct for __data.
3840         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3841         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3842         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3843         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3844         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3845         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3847 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3849         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3850         Return status.
3851         (lll_futex_timed_wait): Define.
3852         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3853         * sysdeps/pthread/aio_misc.h: New file.
3855 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3857         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3859 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3861         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3862         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3863         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3865 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3867         * tst-cancel24.cc: Use C headers instead of C++ headers.
3869 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3871         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3872         sparc-linux configured glibc.
3873         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3874         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3875         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3876         atomic_compare_and_exchange_val_24_acq instead of
3877         atomic_compare_and_exchange_val_acq.
3878         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3879         instead of atomic_exchange_rel.
3880         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3881         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3882         file.
3883         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3884         file.
3885         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3886         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3887         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3888         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3889         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3890         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3891         New file.
3892         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3893         New file.
3894         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3895         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3896         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3897         file.
3898         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3899         file.
3900         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3902 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3904         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3905         mutex initializers.
3907 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3909         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3910         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3911         THREAD_COPY_POINTER_GUARD): Define.
3912         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3913         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3915 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3917         * version.c: Update copyright year.
3919 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3921         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3922         .eh_frame section, use cfi_* directives.
3923         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3925 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3927         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3928         now.
3930 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3932         * sysdeps/pthread/sigaction.c: Removed.
3933         * sigaction.c: New file.
3934         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3936 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3938         * Makefile (tests): Add tst-signal7.
3939         * tst-signal7.c: New file.
3941 2005-12-27  Roland McGrath  <roland@redhat.com>
3943         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3944         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3945         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3946         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3947         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3948         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3949         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3950         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3951         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3952         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3953         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3955 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3957         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3958         and __prev field to pthread_mutex_t.
3959         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3960         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3961         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3962         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3963         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3964         to pthread_mutex_t.
3966 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3968         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3969         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3970         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3971         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3972         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3973         and PTHREAD_MUTEXATTR_FLAG_BITS.
3974         * descr.h (struct pthread): Add robust_list field and define
3975         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3976         * pthread_mutexattr_getrobust.c: New file.
3977         * pthread_mutexattr_setrobust.c: New file.
3978         * pthread_mutex_consistent.c: New file.
3979         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3980         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3981         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3982         Adjust pthread_mutex_t initializers.
3983         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3984         field to pthread_mutex_t.
3985         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3986         and __prev field to pthread_mutex_t.
3987         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3988         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3989         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3990         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3991         * pthread_mutexattr_gettype.c: Likewise.
3992         * pthread_mutexattr_setpshared.c: Likewise.
3993         * pthread_mutexattr_settype.c: Likewise.
3994         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3995         Initialize mutex kind according to robust flag.
3996         * pthread_mutex_lock.c: Implement local robust mutex.
3997         * pthread_mutex_timedlock.c: Likewise.
3998         * pthread_mutex_trylock.c: Likewise.
3999         * pthread_mutex_unlock.c: Likewise.
4000         * pthread_create.c (start_thread): Mark robust mutexes which remained
4001         locked as dead.
4002         * tst-robust1.c: New file.
4003         * tst-robust2.c: New file.
4004         * tst-robust3.c: New file.
4005         * tst-robust4.c: New file.
4006         * tst-robust5.c: New file.
4007         * tst-robust6.c: New file.
4008         * tst-robust7.c: New file.
4009         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
4010         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
4011         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
4012         tst-robust5, tst-robust6, and tst-robust7.
4014         * tst-typesizes.c: New file.
4015         * Makefile (tests): Add tst-typesizes.
4017         * tst-once3.c: More debug output.
4019 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
4021         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
4022         missing after last change.
4024         * version.c: Update copyright year.
4026 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
4028         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
4029         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
4030         * pthread_mutex_trylock.c: Likewise.
4031         * pthread_mutex_timedlock.c: Likewise.
4032         * pthread_mutex_unlock.c: Likewise.
4034 2005-12-22  Roland McGrath  <roland@redhat.com>
4036         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
4037         so that #include_next's search location is not reset to the -I..
4038         directory where <nptl/...> can be found.
4040 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
4042         [BZ #1913]
4043         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4044         Fix unwind info.  Remove useless branch prediction prefix.
4045         * tst-cancel24.cc: New file.
4046         * Makefile: Add rules to build and run tst-cancel24.
4048 2005-12-21  Roland McGrath  <roland@redhat.com>
4050         * libc-cancellation.c: Use <> rather than "" #includes.
4051         * pt-cleanup.c: Likewise.
4052         * pthread_create.c: Likewise.
4053         * pthread_join.c: Likewise.
4054         * pthread_timedjoin.c: Likewise.
4055         * pthread_tryjoin.c: Likewise.
4056         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
4057         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
4058         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4059         * unwind.c: Likewise.
4061 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4063         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
4064         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
4065         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4066         THREAD_COPY_POINTER_GUARD): Define.
4068 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
4070         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
4071         rather than one.
4072         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4073         THREAD_COPY_POINTER_GUARD): Define.
4074         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
4075         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
4076         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4077         THREAD_COPY_POINTER_GUARD): Define.
4078         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
4079         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
4080         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
4081         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
4082         Use PTR_DEMANGLE for B0 if defined.
4084 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
4086         * pthread_create.c (__pthread_create_2_1): Use
4087         THREAD_COPY_POINTER_GUARD if available.
4088         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
4089         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4090         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
4091         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
4092         * sysdeps/x86_64/tls.h: Likewise.
4094 2005-12-15  Roland McGrath  <roland@redhat.com>
4096         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
4098 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
4100         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
4101         sysdeps/generic.
4102         * errno-loc.c: New file.
4104 2005-12-12  Roland McGrath  <roland@redhat.com>
4106         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
4107         adjustments before choosing stack size.  Update minimum stack size
4108         calculation to match allocate_stack change.
4110 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
4112         * allocatestack.c (allocate_stack): Don't demand that there is an
4113         additional full page available on the stack beside guard, TLS, the
4114         minimum stack.
4116 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
4118         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4119         (__cleanup_fct_attribute): Use __regparm__ not regparm.
4121         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
4122         compiling 32-bit code we must define __cleanup_fct_attribute.
4124 005-11-24  Jakub Jelinek  <jakub@redhat.com>
4126         [BZ #1920]
4127         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
4128         __attribute__ instead of __attribute.
4129         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
4130         (__cleanup_fct_attribute): Likewise.
4132 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
4134         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
4135         a write barrier before writing libgcc_s_getcfa.
4137 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
4139         * sysdeps/unix/sysv/linux/configure: Removed.
4141 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
4143         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
4144         optional init_array/fini_array support.
4146 2005-10-24  Roland McGrath  <roland@redhat.com>
4148         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
4149         versioned_symbol use.
4151 2005-10-16  Roland McGrath  <roland@redhat.com>
4153         * init.c (__pthread_initialize_minimal_internal): Even when using a
4154         compile-time default stack size, apply the minimum that allocate_stack
4155         will require, and round up to page size.
4157 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
4159         * Makefile ($(test-modules)): Remove static pattern rule.
4161 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
4162             Ulrich Drepper  <drepper@redhat.com>
4164         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
4165         alignment in callback function.
4166         * Makefile: Add rules to build and run tst-align3.
4167         * tst-align3.c: New file.
4169 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
4171         * allocatestack.c (setxid_signal_thread): Add
4172         INTERNAL_SYSCALL_DECL (err).
4174 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
4176         * allocatestack.c (setxid_signal_thread): Need to use
4177         atomic_compare_and_exchange_bool_acq.
4179 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
4180             Jakub Jelinek  <jakub@redhat.com>
4182         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
4183         CANCEL_RESTMASK.
4184         (struct pthread): Move specific_used field to avoid padding.
4185         Add setxid_futex field.
4186         * init.c (sighandler_setxid): Reset setxid flag and release the
4187         setxid futex.
4188         * allocatestack.c (setxid_signal_thread): New function.  Broken
4189         out of the bodies of the two loops in __nptl_setxid.  For undetached
4190         threads check whether they are exiting and if yes, don't send a signal.
4191         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
4192         * pthread_create.c (start_thread): For undetached threads, check
4193         whether setxid bit is set.  If yes, wait until signal has been
4194         processed.
4196         * allocatestack.c (STACK_VARIABLES): Initialize them.
4197         * pthread_create.c (__pthread_create_2_1): Initialize pd.
4199 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4201         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4202         waiters, awake all waiters on the associated mutex.
4204 2005-09-22  Roland McGrath  <roland@redhat.com>
4206         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
4207         ../sysdeps/x86_64/hp-timing.h).
4209 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
4211         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
4212         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4213         (lll_futex_wake_unlock): Define.
4214         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
4215         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4216         (lll_futex_wake_unlock): Define.
4217         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
4218         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4219         (lll_futex_wake_unlock): Define.
4220         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
4221         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4222         (lll_futex_wake_unlock): Define.
4223         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
4224         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4225         (lll_futex_wake_unlock): Define.
4226         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
4227         lll_futex_wake_unlock.
4228         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
4229         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4230         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4232         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
4233         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
4235 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4237         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4238         Fix typo in register name.
4240 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
4242         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4243         Use __sigfillset.  Document that sigfillset does the right thing wrt
4244         to SIGSETXID.
4246 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4248         [BZ #1102]
4249         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
4250         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
4251         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4252         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4253         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4254         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4255         in the structure.
4256         * Makefile (tests): Add tst-initializers1.
4257         (CFLAGS-tst-initializers1.c): Set.
4258         * tst-initializers1.c: New test.
4260 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4262         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4263         Make sure __flags are located at offset 48 from the start of the
4264         structure.
4266 2005-07-02  Roland McGrath  <roland@redhat.com>
4268         * Makeconfig: Comment fix.
4270 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
4272         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4273         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4274         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4275         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4276         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4277         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4278         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4279         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4280         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4281         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4283 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
4285         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4286         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4287         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4288         fields.
4289         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4290         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4291         field.  Put in sysinfo field unconditionally.
4292         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4293         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4294         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4295         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4296         fields.
4297         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4298         * pthread_create.c (__pthread_create_2_1): Use
4299         THREAD_COPY_STACK_GUARD macro.
4300         * Makefile: Add rules to build and run tst-stackguard1{,-static}
4301         tests.
4302         * tst-stackguard1.c: New file.
4303         * tst-stackguard1-static.c: New file.
4305 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
4307         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4308         Invoke CGOTSETUP and CGOTRESTORE.
4309         (CGOTSETUP, CGOTRESTORE): Define.
4311 2005-05-29  Richard Henderson  <rth@redhat.com>
4313         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4314         (tf_write, tf_writev): Use it.
4315         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
4316         the system minimum.
4318 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
4320         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4321         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4322         __librt_*_asynccancel@local.
4324 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
4326         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4327         all occurrences of JUMPTARGET.  Instead append @local to labels.
4329 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
4331         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4332         size/alignment of struct pthread rather than tcbhead_t.
4333         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4334         Likewise.
4335         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4336         Likewise.
4337         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4338         Likewise.
4340 2005-05-19  Richard Henderson  <rth@redhat.com>
4342         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4343         __sync_val_compare_and_swap, not explicit _si variant.
4344         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4346 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
4348         [BZ #915]
4349         * sysdeps/pthread/pthread.h: Avoid empty initializers.
4351 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
4353         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4354         .eh_frame section, use cfi_* directives.
4356 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
4358         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4359         of "" includes.
4361 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
4363         [BZ #1075]
4364         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4365         aio_write blocks.
4367 2005-04-27  Roland McGrath  <roland@redhat.com>
4369         * Makefile (tests): Remove tst-clock2.
4371         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4372         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4373         translating to the kernel clockid_t for our own process/thread clock.
4375         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4377 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
4379         * old_pthread_cond_init.c: Include <errno.h>.
4380         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4381         process shared or uses clock other than CLOCK_REALTIME.
4382         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4384 2005-04-13  David S. Miller  <davem@davemloft.net>
4386         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4387         * sysdeps/sparc/sparc64/clone.S: New file.
4389 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4391         [BZ #1102]
4392         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4393         __inline instead of inline.
4394         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4396 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
4398         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4399         functionally equivalent, but shorter instructions.
4400         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4401         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4402         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4403         Likewise.
4404         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4405         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4406         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4407         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4409         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4410         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4411         Likewise.
4412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4413         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4415         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4416         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4418 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
4420         * sysdeps/mips/Makefile: New file.
4421         * sysdeps/mips/nptl-sysdep.S: New file.
4422         * sysdeps/mips/tcb-offsets.sym: New file.
4423         * sysdeps/mips/pthread_spin_lock.S: New file.
4424         * sysdeps/mips/pthread_spin_trylock.S: New file.
4425         * sysdeps/mips/pthreaddef.h: New file.
4426         * sysdeps/mips/tls.h: New file.
4427         * sysdeps/mips/jmpbuf-unwind.h: New file.
4428         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4429         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4430         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4431         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4432         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4433         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4434         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4435         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4436         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4437         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4439 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
4441         [BZ #1112]
4442         * pthread_create.c (__pthread_create_2_1): Rename syscall error
4443         variable to scerr.
4445 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
4447         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4449 2005-02-25  Roland McGrath  <roland@redhat.com>
4451         * alloca_cutoff.c: Correct license text.
4452         * tst-unload.c: Likewise.
4453         * sysdeps/pthread/allocalim.h: Likewise.
4454         * sysdeps/pthread/pt-initfini.c: Likewise.
4455         * sysdeps/pthread/bits/libc-lock.h: Likewise.
4456         * sysdeps/pthread/bits/sigthread.h: Likewise.
4457         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4458         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4460 2005-02-16  Roland McGrath  <roland@redhat.com>
4462         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4463         Use unsigned int * for ptr_nthreads.
4465 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
4467         [BZ #721]
4468         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4469         gcc4.
4471 2005-02-07  Richard Henderson  <rth@redhat.com>
4473         [BZ #787]
4474         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4475         argument.
4477 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4479         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4480         order of arguments in invocation of atomic_add_zero.
4482 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4484         [BZ #737]
4485         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4486         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4487         at least gotntpoff relocation and addition.
4488         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4489         Likewise.
4490         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4491         Likewise.
4492         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4493         Likewise.
4495 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4497         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4498         entry for static tls deallocation fix.
4499         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4500         also contains information whether the memory pointed to is static
4501         TLS or not.
4502         * sysdeps/i386/tls.h: Likewise.
4503         * sysdeps/ia64/tls.h: Likewise.
4504         * sysdeps/powerpc/tls.h: Likewise.
4505         * sysdeps/s390/tls.h: Likewise.
4506         * sysdeps/sh/tls.h: Likewise.
4507         * sysdeps/sparc/tls.h: Likewise.
4508         * sysdeps/x86_64/tls.h: Likewise.
4510 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4512         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4514 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4516         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4517         %esp.
4518         * Makefile (tests): Add tst-align2.
4519         * tst-align2.c: New test.
4520         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4521         -mpreferred-stack-boundary=4.
4523 2004-12-18  Roland McGrath  <roland@redhat.com>
4525         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4526         New file removed withdrawn for the moment.
4528 2004-12-17  Richard Henderson  <rth@redhat.com>
4530         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4531         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4533 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4535         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4536         Increased PTHREAD_STACK_MIN.
4538         * tst-context1.c (stacks): Use bigger stack size.
4540 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4542         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4543         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4545 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4547         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4548         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4549         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4551 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4553         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4555 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4557         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4558         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4560         * tst-getpid1.c: If child crashes, report this first.  Print which
4561         signal.
4563 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4565         * init.c (__pthread_initialize_minimal_internal): Also unblock
4566         SIGSETXID.
4568 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4570         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4571         _POSIX_THREAD_CPUTIME): Define to 0.
4572         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4573         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4574         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4575         __timer_signal_thread_tclk): Remove.
4576         (init_module): Remove their initialization.
4577         (thread_cleanup): Remove their cleanup assertions.
4578         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4579         __timer_signal_thread_tclk): Remove.
4580         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4581         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4582         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4584 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4586         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4587         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4589         * Makefile (tests): Add tst-getpid2.
4590         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4591         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4592         * tst-getpid2.c: New test.
4594 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4596         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4598 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4600         * Makefile (tests): Add tst-getpid1.
4601         * tst-getpid1.c: New file.
4602         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4603         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4605 2004-12-02  Roland McGrath  <roland@redhat.com>
4607         * Makefile (libpthread-nonshared): Variable removed.
4608         ($(objpfx)libpthread_nonshared.a): Target removed.
4609         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4610         These are now handled by generic magic from
4611         libpthread-static-only-routines being set.
4613 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4615         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4616         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4617         _POSIX_THREAD_PRIO_PROTECT): Define.
4618         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4619         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4620         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4622 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4624         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4625         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4626         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4627         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4628         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4629         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4630         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4632 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4634         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4636         * Makefile (libpthread-routines): Add pthread_setschedprio.
4637         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4638         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4639         * pthread_setschedprio.c: New file.
4641 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4643         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4644         * pthread_cancel.c (pthread_create): Likewise.
4646         * Makefile (libpthread-routines): Add vars.
4647         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4648         * init.c (__default_stacksize, __is_smp): Remove.
4649         * vars.c: New file.
4650         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4651         and define a wrapper macro.
4652         (PTHREAD_STATIC_FN_REQUIRE): Define.
4653         * allocatestack.c (__find_thread_by_id): Undefine.
4654         * pthread_create (__pthread_keys): Remove.
4655         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4656         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4657         PTHREAD_STATIC_FN_REQUIRE.
4659 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4661         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4662         parameter to REGISTER macro.
4664 2004-11-17  Roland McGrath  <roland@redhat.com>
4666         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4667         Make sure SIGCANCEL is blocked as well.
4669 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4671         * sysdeps/pthread/setxid.h: New file.
4672         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4673         (struct xid_command): Add forward decl.
4674         (struct pthread_functions): Change return type of __nptl_setxid hook
4675         to int.
4676         * pthreadP.h (__nptl_setxid): Change return type to int.
4677         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4678         calling thread, return its return value and set errno on failure.
4679         * descr.h (struct xid_command): Change id type to long array.
4681         * Makefile: Add rules to build and test tst-setuid1 and
4682         tst-setuid1-static.
4683         * tst-setuid1.c: New test.
4684         * tst-setuid1-static.c: New test.
4686 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4688         * Makefile (tests): Add tst-exit3.
4689         * tst-exit3.c: New test.
4691 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4693         * Makefile (tests): Add tst-exit2.
4694         * tst-exit2.c: New file.
4696 2004-11-09  Roland McGrath  <roland@redhat.com>
4698         [BZ #530]
4699         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4700         here, before calling clone.
4701         * pthread_create.c (start_thread): Don't do it here.
4703 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4705         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4707 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4709         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4710         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4711         assembler warning.
4713 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4715         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4716         if sched_priority is not between minprio and maxprio.
4718 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4720         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4721         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4723         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4724         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4726 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4728         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4729         not-cancelable I/O functions.
4731 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4733         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4734         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4735         make sure 2 is stored in the futex and we looked at the old value.
4736         Fix a few other problems to return the correct value.
4738 2004-10-14  Richard Henderson  <rth@redhat.com>
4740         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4741         make gcc4 happy.
4743 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4745         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4746         of pthread-functions.h and pthreaddef.h.
4747         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4749         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4750         Change __data.__nwaiters from int to unsigned int.
4752         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4753         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4755         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4756         before return type.
4758         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4759         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4761 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4763         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4764         test fails, remove message queue.
4765         (tf_msgsnd): Likewise.
4767 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4769         * tst-clock1.c: Change #ifdef to #if defined.
4770         * tst-clock2.c: Likewise.
4771         * tst-cond11.c: Likewise.
4773         * sysdeps/pthread/timer_create.c (timer_create): Use
4774         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4775         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4776         THREAD_CPUTIME.
4778 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4780         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4781         _POSIX_THREAD_CPUTIME): Define to 0.
4783 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4785         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4786         and _POSIX_THREAD_CPUTIME to zero.
4787         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4788         * tst-barrier2.c: Fix testing for POSIX feature.
4789         * tst-clock1.c: Likewise.
4790         * tst-clock2.c: Likewise.
4791         * tst-cond11.c: Likewise.
4792         * tst-cond4.c: Likewise.
4793         * tst-cond6.c: Likewise.
4794         * tst-flock2.c: Likewise.
4795         * tst-mutex4.c: Likewise.
4796         * tst-mutex9.c: Likewise.
4797         * tst-rwlock12.c: Likewise.
4798         * tst-rwlock4.c: Likewise.
4799         * tst-signal1.c: Likewise.
4800         * tst-spin2.c: Likewise.
4801         * sysdeps/pthread/posix-timer.h: Likewise.
4802         * sysdeps/pthread/timer_create.c: Likewise.
4803         * sysdeps/pthread/timer_routines.c: Likewise.
4805 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4807         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4808         (__lll_mutex_timedlock_wait): Address futex correctly.
4810         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4811         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4812         make sure 2 is stored in the futex and we looked at the old value.
4813         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4814         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4815         which might very well made the code not working at all before.
4816         [BZ #417]
4818 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4820         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4821         allow SIGSETXID to be sent.
4822         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4823         for SIGSETXID to be defined.
4824         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4825         SIGSETXID cannot be blocked.
4827         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4828         Add __extension__ to long long types.
4829         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4830         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4831         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4832         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4833         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4834         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4835         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4837 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4839         * descr.h (struct pthread): Add stopped_start field.
4840         * sysdeps/pthread/createthread.c (create_thread): Set
4841         start_stopped flag in descriptor for new thread appropriately.
4842         * pthread_create.c (start_thread): Only take lock to be stopped on
4843         startup if stopped_start flag says so.
4845 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4847         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4848         is created detached and if yes, do not try to free the stack in case
4849         the thread creation failed.
4850         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4851         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4852         case there has been no error.  [BZ #405]
4854         * pthread_create.c (start_thread): Don't wait for scheduler data
4855         etc to be set at the beginning of the function.  The cancellation
4856         infrastructure must have been set up.  And enable async
4857         cancellation before potentially going to sleep.  [BZ #401]
4859 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4861         * Versions: Remove exports for pthread_set*id_np functions.
4862         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4863         for now.
4864         * Makefile: Don't build pthread_set*id code for now.
4866 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4868         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4869         internal use.
4870         * allocatestack.c (__nptl_setxid): New function.
4871         * descr.h (struct xid_command): Define type.
4872         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4873         (sighandler_setxid): New function.
4874         (__pthread_initialize_minimal): Register sighandler_setxid for
4875         SIGCANCEL.
4876         * pt-allocrtsig.c: Update comment.
4877         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4878         Declare __nptl_setxid.
4879         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4880         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4881         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4882         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4883         and pthread_setresuid_np.
4884         * pthread_setgid_np.c: New file.
4885         * pthread_setuid_np.c: New file.
4886         * pthread_setegid_np.c: New file.
4887         * pthread_seteuid_np.c: New file.
4888         * pthread_setregid_np.c: New file.
4889         * pthread_setreuid_np.c: New file.
4890         * pthread_setresgid_np.c: New file.
4891         * pthread_setresuid_np.c: New file.
4892         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4893         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4894         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4895         and pthread_setresuid_np.
4896         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4897         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4898         pthread_setregid, and pthread_setresgid.
4900 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4902         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4903         ENOMEM when out of memory.
4905 2004-09-10  Roland McGrath  <roland@redhat.com>
4907         [BZ #379]
4908         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4909         code, since we don't try to use the broken CLONE_STOPPED any more.
4910         * pthread_create.c (start_thread): Likewise.
4912 2004-09-15  Richard Henderson  <rth@redhat.com>
4914         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4916 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4918         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4919         (__libc_unwind_longjmp): Delete macro and declare as function.
4920         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4921         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4922         nptl directory.
4923         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4924         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4925         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4927 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4929         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4930         for __USE_XOPEN2K.
4931         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4932         types also for __USE_XOPEN2K.
4933         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4934         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4935         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4936         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4937         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4938         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4939         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4940         [BZ #320]
4942 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/pthread/pthread.h
4945         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4946         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4947         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4948         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4949         [BZ #375]
4951 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4953         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4954         PSEUDO to be used with . prefix.
4956         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4957         Use atomic_increment instead of atomic_exchange_and_add.
4958         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4959         Likewise.
4960         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4961         Likewise.
4962         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4963         Likewise.
4965         * allocatestack.c (allocate_stack): Use atomic_increment_val
4966         instead of atomic_exchange_and_add.
4967         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4968         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4969         Likewise.
4970         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4971         Likewise.
4973         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4974         the initialization function might throw.
4976 2005-09-05  Richard Henderson  <rth@redhat.com>
4978         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4979         Move definition inside libpthread, libc, librt check.  Provide
4980         definition for rtld.
4982 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4984         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4985         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4986         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4987         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4988         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4989         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4990         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4991         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4992         * unwind.c: Use it.
4994         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4995         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4996         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4997         Likewise.
4998         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4999         Decrement __nwaiters.  If pthread_cond_destroy has been called and
5000         this is the last waiter, signal pthread_cond_destroy caller and
5001         avoid using the pthread_cond_t structure after unlock.
5002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5003         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5004         Read clock type from the least significant bits of __nwaiters instead
5005         of __clock.
5006         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5007         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
5009 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
5011         [BZ #342]
5012         * Makefile (tests): Add tst-cond20 and tst-cond21.
5013         * tst-cond20.c: New test.
5014         * tst-cond21.c: New test.
5015         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5016         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
5017         it unsigned int.
5018         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5019         Likewise.
5020         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5021         (pthread_cond_t): Likewise.
5022         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5023         Likewise.
5024         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5025         Likewise.
5026         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5027         Likewise.
5028         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
5029         (cond_nwaiters): New.
5030         (clock_bits): New.
5031         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
5032         if there are waiters not signalled yet.
5033         Wait until all already signalled waiters wake up.
5034         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
5035         __nwaiters.  If pthread_cond_destroy has been called and this is the
5036         last waiter, signal pthread_cond_destroy caller and avoid using
5037         the pthread_cond_t structure after unlock.
5038         (__pthread_cond_wait): Increment __nwaiters in the beginning,
5039         decrement it when leaving.  If pthread_cond_destroy has been called
5040         and this is the last waiter, signal pthread_cond_destroy caller.
5041         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5042         Likewise.  Read clock type from the least significant bits of
5043         __nwaiters instead of __clock.
5044         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
5045         whether clock ID can be encoded in COND_CLOCK_BITS bits.
5046         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
5047         clock type just from the last COND_CLOCK_BITS bits of value.
5048         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
5049         instead of __clock, just from second bit of condattr's value.
5051 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
5053         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
5054         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
5055         != 64.
5056         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5058 2004-08-15  Roland McGrath  <roland@frob.com>
5060         * pthread_atfork.c: Update copyright terms including special exception
5061         for these trivial files, which are statically linked into executables
5062         that use dynamic linking for the significant library code.
5064 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
5066         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
5067         pthread_rwlock_rdlock.
5068         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
5069         Decrease __nr_readers_queued after reacquiring lock.
5070         * sysdeps/pthread/pthread_rwlock_timedrdlock
5071         (pthread_rwlock_timedrdlock): Likewise.
5072         Reported by Bob Cook <bobcook47@hotmail.com>.
5074 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
5076         * tst-rwlock14.c (tf): Read main thread handle from *ARG
5077         before pthread_barrier_wait.
5079 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
5081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
5082         Remove unnecessary exception handling data.
5084 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
5086         [BZ #284]
5087         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
5088         instead of clockid_t.
5090 2004-07-21  Roland McGrath  <roland@redhat.com>
5092         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
5094 2004-07-19  Roland McGrath  <roland@redhat.com>
5096         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5098 2004-07-02  Roland McGrath  <roland@redhat.com>
5100         * configure: Don't exit.
5102 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5104         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5105         (__pthread_cond_timedwait): Check for invalid nanosecond in
5106         timeout value.
5108 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
5110         * Makefile: Add rules to build and run tst-fini1.
5111         * tst-fini1.c: New file.
5112         * tst-fini1mod.c: New file.
5114 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
5116         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
5117         if no cancellation support is needed.
5118         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
5119         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
5120         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5121         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
5122         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5123         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
5124         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
5125         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5126         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5128         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
5129         only if not already defined.
5131 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
5133         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
5134         constraint "m" instead of "0" for futex.
5136         * shlib-versions: Add powerpc64-.*-linux.*.
5138 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
5140         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
5141         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
5142         for valid tv_nsec.
5143         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
5144         1 billion and 64-bit tv_nsec which is valid when truncated to 32
5145         bits.
5147 2004-06-29  Roland McGrath  <roland@redhat.com>
5149         * Banner: NPTL no longer has its own version number.
5150         * Makefile (nptl-version): Variable removed.
5151         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
5152         using $(version), the glibc version number.
5154 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5156         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5157         Fix branch offset for a PLT entry.
5158         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
5159         Likewise.
5160         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5161         Likewise.
5162         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
5163         Likewise.
5164         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
5165         Likewise.
5167 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5169         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
5170         unconditionally.
5172 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
5174         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
5175         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
5176         instead of tv_sec.
5177         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
5178         (pthread_rwlock_timedrdlock): Likewise.
5180 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
5182         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5183         Set __r7 to val, not mutex.
5185 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
5187         * Makefile: Add rules to build tst-rwlock14.
5188         * tst-rwlock14.c: New file.
5190 2004-06-24  Boris Hu  <boris.hu@intel.com>
5192         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
5193         check.
5194         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
5196 2004-06-19  Andreas Jaeger  <aj@suse.de>
5198         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
5199         assembler in last patch.
5201 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
5203         * sysdeps/pthread/pthread_cond_timedwait.c
5204         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
5205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5206         (__pthread_cond_timedwait): Check for invalid nanosecond in
5207         timeout value.
5208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5209         * tst-cond19.c: New file.
5210         * Makefile: Add rules to build and run tst-cond19.
5212 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
5214         * tst-context1.c (GUARD_PATTERN): Defined.
5215         (tst_context_t): Define struct containing ucontext_t & guard words.
5216         (ctx): Declare as an array of tst_context_t.
5217         (fct): Verify uc_link & guard words are still valid.
5218         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
5220 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5222         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5223         Add __data.__futex field, reshuffle __data.__clock.
5224         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
5225         (__pthread_cond_signal): Increment __futex at the same time as
5226         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5227         address of low 32-bits of __wakeup_seq to futex syscall.
5228         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5229         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5230         releasing internal lock to FUTEX_WAIT.
5231         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5232         (__pthread_cond_timedwait): Likewise.
5233         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5234         (FUTEX_CMP_REQUEUE): Define.
5235         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5236         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5237         Pass __futex value from before the unlock and __futex address instead
5238         of address of low 32-bits of __wakeup_seq to futex syscall.
5239         Fallback to FUTEX_WAKE all on any errors.
5241 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
5243         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
5244         comment typo.
5245         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
5246         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
5247         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
5248         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
5249         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
5251 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5253         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5254         Add memory clobber to inline assembly.
5255         (__lll_mutex_trylock): Likewise.
5256         (__lll_mutex_cond_trylock): Likewise.
5258 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5260         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5261         Pass val argument as 6th system call argument in %r7.
5263 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5265         * Makefile (tests): Add tst-cond16.
5266         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5267         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5268         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5269         Add __data.__futex field, reshuffle __data.__clock.
5270         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5271         (__pthread_cond_signal): Increment __futex at the same time as
5272         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5273         address of low 32-bits of __wakeup_seq to futex syscall.
5274         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5275         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5276         releasing internal lock to FUTEX_WAIT.
5277         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5278         (__pthread_cond_timedwait): Likewise.
5279         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5280         (FUTEX_CMP_REQUEUE): Define.
5281         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5282         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5283         Pass __futex value from before the unlock and __futex address instead
5284         of address of low 32-bits of __wakeup_seq to futex syscall.
5285         Fallback to FUTEX_WAKE all on any errors.
5286         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5287         Define.
5288         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5289         internally.  Return non-zero if error, zero if success.
5290         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5291         Add __data.__futex field, reshuffle __data.__clock.
5292         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5293         Define.
5294         (lll_futex_requeue): Add val argument, return 1 unconditionally
5295         for the time being.
5296         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5297         Add __data.__futex field, reshuffle __data.__clock.
5298         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5299         Define.
5300         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5301         internally.  Return non-zero if error, zero if success.
5302         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5303         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5304         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5305         Define.
5306         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5307         internally.  Return non-zero if error, zero if success.
5308         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5309         Add __data.__futex field, reshuffle __data.__clock.
5310         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5311         Define.
5312         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5313         internally.  Return non-zero if error, zero if success.
5314         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5315         Add __data.__futex field, reshuffle __data.__clock.
5316         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5317         Add __data.__futex field, reshuffle __data.__clock.
5318         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5319         Increment __futex at the same time as __wakeup_seq or __total_seq.
5320         Pass address of __futex instead of address of low 32-bits of
5321         __wakeup_seq to futex syscall.
5322         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5323         Pass __futex value from before releasing internal lock
5324         to FUTEX_WAIT.
5325         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5326         Likewise.  Avoid unnecessary shadowing of variables.
5327         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5328         Set __futex to 2 * __total_seq.  Pass __futex value from before the
5329         unlock and __futex address instead of address of low 32-bits of
5330         __wakeup_seq to futex_requeue macro, adjust for new return value
5331         meaning.
5332         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5333         (__pthread_cond_signal): Increment __futex at the same time as
5334         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5335         address of low 32-bits of __wakeup_seq to futex syscall.
5336         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5337         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5338         releasing internal lock to FUTEX_WAIT.
5339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5340         (__pthread_cond_timedwait): Likewise.
5341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5342         (FUTEX_CMP_REQUEUE): Define.
5343         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5344         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5345         Pass __futex value from before the unlock and __futex address instead
5346         of address of low 32-bits of __wakeup_seq to futex syscall.
5347         Fallback to FUTEX_WAKE all on any errors.
5349 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5351         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5352         Add nop to align the end of critical section.
5353         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5355 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5357         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5358         Add __broadcast_seq field.
5359         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5360         all waiters as woken with woken_seq and bump broadcast counter.
5361         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5362         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
5363         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5364         Comment typo fixes.  Avoid returning -ETIMEDOUT.
5366 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
5368         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5369         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5370         Reported by Kaz Kojima.
5372 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
5374         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5376 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5378         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5379         __broadcast_seq with bc_seq after acquiring internal lock instead of
5380         before it.
5382 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
5384         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5385         compilation.
5386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5387         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5388         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5389         (pthread_cond_t): Add __data.__broadcast_seq field.
5390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5391         (FRAME_SIZE): Define.
5392         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
5393         Comment typo fixes.
5394         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5395         Define.
5396         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
5397         typo fixes.
5398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5399         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
5400         fixes.
5402 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
5404         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5405         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5406         Add __broadcast_seq field.
5407         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5408         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5409         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5410         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5411         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5412         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5413         all waiters as woken with woken_seq and bump broadcast counter.
5414         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5415         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5416         __broadcast_seq field.
5417         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5418         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5419         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5420         * pthread_cond_init.c: Initialize __broadcast_seq field.
5421         * Makefile (tests): Add tst-cond17 and tst-cond18.
5422         Add .NOTPARALLEL goal.
5423         * tst-cond16.c: New file.  From Jakub.
5424         * tst-cond17.c: New file.  From Jakub.
5425         * tst-cond18.c: New file.  From Jakub.
5427 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
5429         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5430         unwind info.
5432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5433         Parametrize frame size.  Correct some unwind info.
5434         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5436 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5438         * tst-stack3.c: Note testing functionality beyond POSIX.
5440 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5442         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5443         Change conditional from ifdef to if.
5445 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
5447         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5448         SYSDEP_CANCEL_ERROR): Define.
5449         (PSEUDO): Use it.
5451 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
5453         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5455 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
5457         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5459 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5461         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5462         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5463         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5464         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5466 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
5468         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5469         thread has all signals blocked.
5471 2004-04-18  Andreas Jaeger  <aj@suse.de>
5473         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5474         (SEM_VALUE_MAX): Add missing brace.
5476 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5478         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5479         in rt subdir.
5480         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5481         * sysdeps/pthread/tst-mqueue8x.c: New test.
5482         * tst-cancel4.c: Update comment about message queues.
5484         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5485         return it_value { 0, 0 }.
5486         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5487         like SIGEV_SIGNAL.
5488         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5489         assertion for SIGEV_NONE.
5490         (thread_attr_compare): Compare all attributes, not just a partial
5491         subset.
5493 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5495         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5497 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5499         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5500         Just use a plain number.
5501         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5502         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5503         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5504         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5505         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5506         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5507         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5509 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5511         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5512         frame info.
5513         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5515 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5517         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5518         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5519         of calling sigwaitinfo.
5521 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5523         * allocatestack.c (allocate_stack): Set reported_guardsize
5524         unconditionally.
5525         * pthread_getattr_np.c (pthread_getattr_np): Use
5526         reported_guardsize instead of guardsize.
5527         * descr.h (struct pthread): Add reported_guardsize field.
5529 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5531         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5533 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5535         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5537 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5539         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5540         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5541         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5542         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5543         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5544         Define.
5545         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5546         (_POSIX_MESSAGE_PASSING): Define.
5547         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5548         (_POSIX_MESSAGE_PASSING): Define.
5549         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5550         (_POSIX_MESSAGE_PASSING): Define.
5552 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5554         * tst-context1.c (fct): Check whether correct stack is used.
5556 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5559         matching constraints for asm mem parameters.
5561         * tst-clock2.c (tf): Don't define unless needed.
5563 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5565         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5566         $(gnulib).
5568 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5570         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5571         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5572         * pthreadP.h: Declare __nptl_deallocate_tsd.
5573         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5574         Adjust caller.
5576         * Makefile (tests): Add tst-tsd5.
5577         * tst-tsd5.c: New file.
5579 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5581         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5582         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5583         is SHLIB_COMPAT check.
5584         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5585         (__pthread_attr_getaffinity_old): Likewise.
5586         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5587         (__pthread_getaffinity_old): Likewise.
5588         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5589         (__pthread_setaffinity_old): Likewise.
5591 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5593         * allocatestack.c (_make_stacks_executable): Call
5594         _dl_make_stack_executable first.
5596 2004-03-24  Roland McGrath  <roland@redhat.com>
5598         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5599         constraint instead of "0".
5601 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5603         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5604         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5606         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5607         code to avoid warning.
5609 2004-03-24  Andreas Jaeger  <aj@suse.de>
5611         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5612         (__pthread_attr_setaffinity_old): Remove const.
5614 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5616         * sysdeps/unix/sysv/linux/smp.h: New file.
5617         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5618         * init.c: Define __is_smp.
5619         (__pthread_initialize_minimal_internal): Call is_smp_system to
5620         initialize __is_smp.
5621         * pthreadP.h: Declare __is_smp.
5622         Define MAX_ADAPTIVE_COUNT is necessary.
5623         * pthread_mutex_init.c: Add comment regarding __spins field.
5624         * pthread_mutex_lock.c: Implement adaptive mutex type.
5625         * pthread_mutex_timedlock.c: Likewise.
5626         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5627         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5628         Add __spins field.
5629         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5630         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5631         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5632         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5633         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5634         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5635         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5636         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5637         lll_mutex_cond_trylock.
5638         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5639         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5640         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5641         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5642         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5643         Define BUSY_WAIT_NOP.
5644         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5645         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5647         * tst-mutex5.c: Add support for testing adaptive mutexes.
5648         * tst-mutex7.c: Likewise.
5649         * tst-mutex5a.c: New file.
5650         * tst-mutex7a.c: New file.
5651         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5653         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5654         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5655         vgettimeofday call might destroy the content.
5657         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5658         @pause in the loop.
5660         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5661         No need to restrict type of ret.  Make it int.  Add comment.
5663         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5664         Remove unnecessary setne instruction.
5666 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5668         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5669         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5670         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5671         If realloc fails, break out of the loop.
5673 2004-03-20  Andreas Jaeger  <aj@suse.de>
5675         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5676         (__pthread_setaffinity_old): Fix interface.
5677         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5678         (__pthread_getaffinity_old): Likewise.
5680         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5681         (__pthread_setaffinity_new): Remove duplicate declaration.
5683 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5685         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5686         the return value to a safe register.
5687         (CDISABLE): Set the function argument correctly.
5689 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5691         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5692         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5693         Rewrite so that only one locked memory operation per round is needed.
5694         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5695         (pthread_barrier_wait): After wakeup, release lock only when the
5696         last thread stopped using the barrier object.
5697         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5698         (__pthread_cond_wait): Don't store mutex address if the current
5699         value is ~0l.  Add correct cleanup support and unwind info.
5700         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5701         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5702         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5703         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5704         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5705         Add correct cleanup support and unwind info.
5706         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5707         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5708         information for syscall wrappers.
5710 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5712         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5713         cpusetsize field, remove next.
5714         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5715         parameter for size of the CPU set.
5716         (pthread_setaffinity_np): Likewise.
5717         (pthread_attr_getaffinity_np): Likewise.
5718         (pthread_attr_setaffinity_np): Likewise.
5719         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5720         interface change, keep compatibility code.
5721         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5722         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5723         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5724         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5725         __pthread_getaffinity_np.
5726         * Versions: Add version for changed interfaces.
5727         * tst-attr3.c: Adjust test for interface change.
5728         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5729         increasing buffer sizes.
5730         * pthread_attr_destroy.c: Remove unused list handling.
5731         * pthread_attr_init.c: Likewise.
5733 2004-03-17  Roland McGrath  <roland@redhat.com>
5735         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5736         first argument to clock_getres so we ever enable kernel timers.
5738 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5740         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5742 2004-03-12  Richard Henderson  <rth@redhat.com>
5744         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5745         oldvalue from CENABLE to CDISABLE.
5747 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5749         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5750         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5751         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5752         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5754 2004-03-11  Richard Henderson  <rth@redhat.com>
5756         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5757         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5758         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5760 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5762         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5763         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5764         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5766 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5768         * forward.c (__pthread_cond_broadcast_2_0,
5769         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5770         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5771         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5773 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5775         * sysdeps/sh/tcb-offsets.sym: Add PID.
5776         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5777         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5779 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5781         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5782         include <sysdep-cancel.h>, vfork is no cancellation point.
5783         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5784         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5785         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5787 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5789         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5790         libc_hidden_def.
5791         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5792         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5793         Likewise.
5794         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5795         Likewise.
5796         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5797         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5798         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5799         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5800         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5802         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5803         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5804         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5805         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5806         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5807         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5809         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5810         a local register for saving old PID.  Negate PID in parent upon exit.
5812         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5813         tcb-offsets.h.
5814         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5815         before syscall, set to the old value in the parent afterwards.
5816         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5817         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5818         tcb-offsets.h.
5819         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5820         before syscall, set to the old value in the parent afterwards.
5821         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5822         * sysdeps/s390/tcb-offsets.sym: Add PID.
5824         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5825         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5826         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5827         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5828         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5829         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5831 2004-03-10  Andreas Schwab  <schwab@suse.de>
5833         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5834         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5835         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5837 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5839         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5840         * tst-cancel21.c (do_one_test): Likewise.
5841         Reported by Gordon Jin <gordon.jin@intel.com>.
5843 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5845         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5846         if non-zero and set to INT_MIN if zero.
5847         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5848         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5849         (SAVE_PID, RESTORE_PID): Define.
5850         (__vfork): Use it.
5851         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5852         Use relative path to avoid including NPTL i386/vfork.S.
5853         (SAVE_PID, RESTORE_PID): Define.
5854         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5855         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5856         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5857         tst-vfork2x.
5858         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5859         * tst-vfork1.c: New test.
5860         * tst-vfork2.c: New test.
5861         * tst-vfork1x.c: New test.
5862         * tst-vfork2x.c: New test.
5864 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5866         * sysdeps/i386/tcb-offsets.sym: Add PID.
5867         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5868         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5869         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5871 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5873         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5875 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5877         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5878         _rtld_global_ro.
5880 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5882         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5883         _rtld_global_ro.
5885         * tst-once4.c: Remove unnecessary macro definition.
5887         * tst-mutex7.c (do_test): Limit thread stack size.
5888         * tst-once2.c (do_test): Likewise.
5889         * tst-tls3.c (do_test): Likewise.
5890         * tst-tls1.c (do_test): Likewise.
5891         * tst-signal3.c (do_test): Likewise.
5892         * tst-kill6.c (do_test): Likewise.
5893         * tst-key4.c (do_test): Likewise.
5894         * tst-join4.c (do_test): Likewise.
5895         * tst-fork1.c (do_test): Likewise.
5896         * tst-context1.c (do_test): Likewise.
5897         * tst-cond2.c (do_test): Likewise.
5898         * tst-cond10.c (do_test): Likewise.
5899         * tst-clock2.c (do_test): Likewise.
5900         * tst-cancel10.c (do_test): Likewise.
5901         * tst-basic2.c (do_test): Likewise.
5902         * tst-barrier4.c (do_test): Likewise.
5904 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5906         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5908 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5910         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5911         (__pthread_cond_timedwait): Optimize wakeup test.
5912         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5913         (__pthread_cond_wait): Likewise.
5914         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5915         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5916         Likewise.
5918 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5920         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5921         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5922         the atomic instruction needed.
5923         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5924         (__lll_mutex_lock_wait): Likewise.
5926 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5928         * Makefile (tests): Add tst-cond14 and tst-cond15.
5929         * tst-cond14.c: New file.
5930         * tst-cond15.c: New file.
5932 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5934         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5935         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5936         needs to be implemented differently to be useful.
5938 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5940         * pthread_attr_setschedparam.c: Don't test priority against limits
5941         here.  Set ATTR_FLAG_SCHED_SET flag.
5942         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5943         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5944         from parent thread to child.  If attribute is used and scheduling
5945         parameters are not inherited, copy parameters from attribute or
5946         compute them.  Check priority value.
5947         * pthread_getschedparam.c: If the parameters aren't known yet get
5948         them from the kernel.
5949         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5950         ATTR_FLAG_POLICY_SET flag for thread.
5951         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5952         and ATTR_FLAG_POLICY_SET.
5954         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5956         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5957         fail if stack address hasn't been set.  Just return 0.
5959 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5961         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5962         libpthread for the files in this list.
5963         (CFLAGS-tst-unload): Removed.
5964         * tst-unload.c (do_test): Don't use complete path for
5965         LIBPHREAD_SO.
5967         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5968         tst-_res1mod2.
5970 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5972         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5973         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5974         operation per round is needed.
5975         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5976         (__lll_mutex_lock_wait): Likewise.
5978 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5980         * tst-cancel9.c (cleanup): Don't print to stderr.
5982 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5984         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5986 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5988         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5989         (__syscall_error_handler2): Call CDISABLE.
5990         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5991         (__syscall_error_handler2): Call CDISABLE.
5993         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5994         Release lock before the loop, don't reacquire it.
5996         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5998 2004-02-19  Andreas Schwab  <schwab@suse.de>
6000         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6001         Fix last change.
6003 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
6005         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
6006         (pthread_barrier_wait): After wakeup, release lock only when the
6007         last thread stopped using the barrier object.
6008         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
6009         (pthread_barrier_wait): Likewise.
6010         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6011         Likewise.
6012         * Makefile (tests): Add tst-barrier4.
6013         * tst-barrier4.c: New file.
6015         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6016         (__pthread_cond_timedwait): Perform timeout test while holding
6017         internal lock to prevent wakeup race.
6018         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6019         * sysdeps/pthread/pthread_cond_timedwait.c
6020         (__pthread_cond_timedwait): Likewise.
6021         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6022         (__pthread_cond_timedwait): Likewise.
6024 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
6026         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
6027         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
6028         * Makefile (tests): Add tst-rwlock13.
6029         * tst-rwlock13.c: New test.
6031 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
6033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6034         (__condvar_tw_cleanup): Little optimization.
6035         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
6037 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
6039         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
6040         libpthread as "lib" parameter to SHLIB_COMPAT.
6041         (__novmx_siglongjmp): Fix typo in function name.
6042         (__novmx_longjmp): Fix typo in function name.
6044 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6046         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
6047         __builtin_expect.
6049         * sysdeps/generic/pt-longjmp.c: Moved to...
6050         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
6052 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
6054         * Makefile (libpthread-routines): Add pt-cleanup.
6055         * pt-longjmp.c: Removed.
6056         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
6057         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
6058         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
6059         Version longjmp, siglongjmp for GLIBC_2.3.4.
6060         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
6062 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
6064         * sysdeps/pthread/pthread_cond_timedwait.c
6065         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
6066         Reuse code.  Add __builtin_expects.
6068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6069         (__pthread_cond_timedwait): Get internal lock in case timeout has
6070         passed before the futex syscall.
6071         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6073 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
6075         * allocatestack.c: Pretty printing.
6077         * sysdeps/pthread/createthread.c (create_thread): Don't add
6078         CLONE_DETACHED bit if it is not necessary.
6080 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
6082         * pthread_getattr_np.c: Include ldsodefs.h.
6084 2004-01-16  Richard Henderson  <rth@redhat.com>
6086         * allocatestack.c: Don't declare __libc_stack_end.
6087         * init.c (__pthread_initialize_minimal_internal): Likewise.
6088         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
6090 2004-01-15  Richard Henderson  <rth@redhat.com>
6092         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
6093         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
6094         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
6095         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
6096         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
6097         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
6098         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
6099         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
6101 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
6103         * init.c (pthread_functions): Make array const.
6105 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
6107         * allocatestack.c (__make_stacks_executable): Change interface.
6108         Check parameters.  Pass parameter on to libc counterpart.
6109         * pthreadP.h: Change declaration.
6111 2004-01-13  Richard Henderson  <rth@redhat.com>
6113         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
6114         prototype form.
6115         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
6116         Likewise.
6118         * sysdeps/alpha/Makefile: New file.
6119         * sysdeps/alpha/tcb-offsets.sym: New file.
6120         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6121         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
6123         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
6124         on powerpc version.
6126 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
6128         * Makefile (tests): Add tst-backtrace1.
6129         * tst-backtrace1.c: New test.
6131 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
6133         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
6134         register as second parameter to the REGISTER macro.
6135         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
6136         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
6137         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
6138         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
6139         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
6140         of thread register as second parameter to REGISTER macro in 64 case.
6142 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
6144         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
6145         (CFLAGS-getpid.o): Defined.
6146         (CFLAGS-getpid.os): Defined.
6148 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
6150         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
6151         returned for main thread does not overlap with any other VMA.
6152         Patch by Jakub Jelinek.
6154 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
6156         * tst-raise1.c: Include stdio.h.
6158 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
6160         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
6161         setting with __ASSUME_TGKILL || defined __NR_tgkill.
6162         If pid is 0, set it to selftid.
6163         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
6164         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
6165         != 0, return self->tid without doing a syscall.
6166         * descr.h (struct pthread): Move pid field after tid.
6168         * Makefile (tests): Add tst-raise1.
6169         * tst-raise1.c: New file.
6171 2003-12-23  Roland McGrath  <roland@redhat.com>
6173         * tst-oddstacklimit.c: New file.
6174         * Makefile (tests): Add it.
6175         (tst-oddstacklimit-ENV): New variable.
6177         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
6178         value up to page size for __default_stacksize.
6180 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
6182         * Makefile (tests): Add tst-eintr5.
6183         * tst-eintr5.c: New file.
6185         * eintr.c (eintr_source): Prevent sending signal to self.
6187         * tst-eintr2.c (tf1): Improve error message.
6189 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
6191         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
6192         * sysdeps/unix/sysv/linux/getpid.c: New file.
6193         * pthread_cancel.c: Add comment explaining use of PID field.
6194         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6195         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
6196         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
6197         temporarily to signal the field must not be relied on and updated
6198         by getpid().
6199         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
6200         temporarily negative.
6201         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6203 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
6205         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
6206         (eintr_source): If ARG != NULL, use pthread_kill.
6207         * tst-eintr1.c: Adjust for this change.
6208         * tst-eintr2.c: Likewise.
6209         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
6210         * tst-eintr3.c: New file.
6211         * tst-eintr4.c: New file.
6213 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
6215         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
6216         if CANCELSTATE_BITMASK is set.
6217         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
6218         Likewise.
6220         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
6221         (tests-reverse): Add tst-cancel23.
6222         * tst-cancel22.c: New test.
6223         * tst-cancel23.c: New test.
6225 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
6227         * tst-eintr1.c: Better error messages.
6229         * Makefile (tests): Add tst-eintr2.
6230         * tst-eintr2.c: New file.
6232 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
6234         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
6235         (CFLAGS-tst-cancelx21.c): Set.
6236         * tst-cancel21.c: New test.
6237         * tst-cancelx21.c: New test.
6239         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
6240         comparison operand.
6241         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
6242         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
6243         * pt-longjmp.c: Include jmpbuf-unwind.h.
6244         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
6245         _JMPBUF_UNWINDS.  Adjust compared pointers.
6246         * init.c (__pthread_initialize_minimal_internal): Initialize
6247         pd->stackblock_size.
6248         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
6249         * sysdeps/alpha/jmpbuf-unwind.h: New file.
6250         * sysdeps/i386/jmpbuf-unwind.h: New file.
6251         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6252         * sysdeps/s390/jmpbuf-unwind.h: New file.
6253         * sysdeps/sh/jmpbuf-unwind.h: New file.
6254         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6255         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6256         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6257         (_JMPBUF_CFA_UNWINDS): Remove.
6258         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6260 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
6262         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6263         (CFLAGS-tst-cancelx20.c): Set.
6264         * tst-cancel20.c: New test.
6265         * tst-cancelx20.c: New test.
6267 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
6269         * init.c (__pthread_initialize_minimal_internal): Don't treat
6270         architectures with separate register stack special here when
6271         computing default stack size.
6273 2003-12-17  Roland McGrath  <roland@redhat.com>
6275         * Makefile (tst-cancelx7-ARGS): New variable.
6276         Reportd by Greg Schafer <gschafer@zip.com.au>.
6278 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
6280         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
6281         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6282         (tst-stack3-ENV): Set.
6283         ($(objpfx)tst-stack3-mem): New.
6284         * tst-stack3.c: New test.
6286 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
6288         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6289         Add unwind directives.  Drop unused .regstk directive.
6290         (_fini_EPILOG_BEGINS): Add unwind directives.
6292 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
6294         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6295         Assume parameter is a pointer.
6296         (lll_futex_wake): Likewise.
6297         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6298         Likewise.
6299         (lll_futex_wake): Likewise.
6300         Reported by Boris Hu.
6301         * sysdeps/unix/sysv/linux/unregister-atfork.c
6302         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6304         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6306 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
6308         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6309         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6310         __rtld_lock_initialize for ld.so lock.
6311         Patch in part by Adam Li <adam.li@intel.com>.
6313 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
6315         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6316         in $(gnulib).  Also, remove stale comment.
6318 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
6320         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6321         advantage of new syscall stub and optimize accordingly.
6323         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6324         from SYS_futex, to match expectations of
6325         sysdep.h:DO_INLINE_SYSCALL.
6326         (lll_futex_clobbers): Remove.
6327         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6328         (lll_futex_wake): Likewise.
6329         (lll_futex_requeue): Likewise.
6330         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6331         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6332         Jelinek).
6333         (__lll_mutex_lock): Likewise.
6334         (__lll_mutex_cond_lock): Likewise.
6335         (__lll_mutex_timed_lock): Likewise.
6336         (__lll_mutex_unlock): Likewise.
6337         (__lll_mutex_unlock_force): Likewise.
6339         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6340         comes before the include of <sysdep.h>.
6341         (THREAD_SELF_SYSINFO): New macro.
6342         (THREAD_SYSINFO): Likewise.
6343         (INIT_SYSINFO): New macro.
6344         (TLS_INIT_TP): Call INIT_SYSINFO.
6346         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6348         * sysdeps/pthread/createthread.c (create_thread): Use
6349         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6350         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6351         THREAD_SELF_SYSINFO instead of open code.
6352         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6353         (THREAD_SYSINFO): Likewise.
6355         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6357         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6359 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
6361         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6362         instead of .init.  Patch by David Mosberger.
6364 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
6366         * sysdeps/pthread/configure.in: Remove broken declaration in C
6367         cleanup handling check.
6369 2003-11-30  Andreas Jaeger  <aj@suse.de>
6371         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6372         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6373         Likewise.
6375 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
6377         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6378         * pthread_attr_destroy.c: Include shlib-compat.h.
6379         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6380         is set in iattr->flags.
6381         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6383 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
6385         * Makefile (distribute): Add tst-cleanup4aux.c.
6387         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
6388         include.
6390 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
6392         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6393         pthread_cond_signal.
6395         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6396         store mutex address if the current value is ~0l.
6397         * sysdeps/pthread/pthread_cond_timedwait.c
6398         (__pthread_cond_timedwait): Likewise.
6399         * sysdeps/pthread/pthread_cond_broadcast.c
6400         (__pthread_cond_broadcast): Don't use requeue for pshared
6401         condvars.
6403         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6404         (__pthread_cond_wait): Don't store mutex address if the current
6405         value is ~0l.
6406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6407         (__pthread_cond_timedwait): Likewise.
6408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6409         (__pthread_cond_broadcast): Don't use requeue for pshared
6410         condvars.
6412         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6413         element with ~0l for pshared condvars, with NULL otherwise.
6415         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6416         (__pthread_cond_wait): Don't store mutex address if the current
6417         value is ~0l.
6418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6419         (__pthread_cond_timedwait): Likewise.
6420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6421         (__pthread_cond_broadcast): Don't use requeue for pshared
6422         condvars.
6424         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6425         * tst-cond12.c: New file.
6426         * tst-cond13.c: New file.
6428 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
6430         * sysdeps/pthread/configure.in: Make missing forced unwind support
6431         fatal.
6433 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
6435         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6437 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
6439         * Makefile: Add magic to clean up correctly.
6441 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
6443         * unwind.c (FRAME_LEFT): Define.
6444         (unwind_stop): Handle old style cleanups here.
6445         (__pthread_unwind): Handle old style cleanups only if
6446         !HAVE_FORCED_UNWIND.
6447         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6448         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6449         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6450         ($(objpfx)tst-cleanupx4): Likewise.
6451         * tst-cleanup4.c: New test.
6452         * tst-cleanup4aux.c: New.
6453         * tst-cleanupx4.c: New test.
6455 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
6457         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6458         lll_mutex_*lock macros to skip atomic operations on some archs.
6460 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
6462         * sysdeps/pthread/tst-timer.c (main): Initialize
6463         sigev2.sigev_value as well.
6465 2003-10-15  Roland McGrath  <roland@redhat.com>
6467         * sysdeps/pthread/configure.in: Barf if visibility attribute support
6468         is missing.
6469         * sysdeps/pthread/configure: Regenerated.
6471 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6473         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6474         locking macros.  No distinction between normal and mutex locking
6475         anymore.
6476         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6477         Merge bits from lowlevelmutex.S we still need.
6478         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6479         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6480         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6481         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6482         new mutex implementation.
6483         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6484         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6485         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6486         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6487         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6488         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6489         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6490         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6491         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6492         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6493         symbol for entry point to avoid cancellation.
6495 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6497         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6498         changes.
6499         (SAVE_OLDTYPE_0): Fix a typo.
6501 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6503         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6504         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6506 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6508         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6509         correct offset.
6511 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6513         * Makefile (tests): Add tst-cancel19.
6514         * tst-cancel19.c: New test.
6516 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6518         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6519         restoring of the old cancellation type.
6521 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6523         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6525 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6527         * sysdeps/pthread/malloc-machine.h: New file
6529 2003-09-24  Roland McGrath  <roland@redhat.com>
6531         * allocatestack.c (__make_stacks_executable): Don't ignore return
6532         value from _dl_make_stack_executable.
6534 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6536         * allocatestack.c (__make_stacks_executable): Also change
6537         permission of the currently unused stacks.
6539         * allocatestack.c (change_stack_perm): Split out from
6540         __make_stacks_executable.
6541         (allocate_stack): If the required permission changed between the time
6542         we started preparing the stack and queueing it, change the permission.
6543         (__make_stacks_executable): Call change_stack_perm.
6545         * Makefile: Build tst-execstack-mod locally.
6546         * tst-execstack-mod.c: New file.
6548 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6550         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6552 2003-09-23  Roland McGrath  <roland@redhat.com>
6554         * tst-execstack.c: New file.
6555         * Makefile (tests): Add it.
6556         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6557         (LDFLAGS-tst-execstack): New variable.
6559         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6560         whether to use PROT_EXEC for stack mmap.
6561         (__make_stacks_executable): New function.
6562         * pthreadP.h: Declare it.
6563         * init.c (__pthread_initialize_minimal_internal): Set
6564         GL(dl_make_stack_executable_hook) to that.
6566 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6568         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6569         recommendation from AMD re avoidance of lock prefix.
6571 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6573         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6574         lll_futex_timed_wait instead of lll_futex_wait.
6575         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6576         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6577         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6578         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6579         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6580         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6581         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6582         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6583         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6584         Completely revamp the locking macros.  No distinction between
6585         normal and mutex locking anymore.
6586         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6587         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6588         __lll_lock_timedwait): Fix prototypes.
6589         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6590         __lll_lock_timedwait): Likewise.
6591         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6592         macros, add __builtin_expect.
6593         (lll_mutex_timedlock): Likewise.  Fix return value.
6594         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6595         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6596         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6597         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6598         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6599         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6600         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6601         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6603 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6605         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6606         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6607         operation if possible.
6609         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6610         like jumping over the lock prefix.
6612 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6614         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6615         locking macros.  No distinction between normal and mutex locking
6616         anymore.
6617         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6618         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6619         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6620         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6621         locking.  Merge bits from lowlevelmutex.S we still need.
6622         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6623         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6624         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6625         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6626         * Makefile (routines): Remove libc-lowlevelmutex.
6627         (libpthread-rountines): Remove lowlevelmutex.
6628         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6629         for new mutex implementation.
6630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6633         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6635         Likewise.
6636         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6637         Likewise.
6638         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6639         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6640         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6641         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6642         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6643         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6644         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6645         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6646         Likewise.
6647         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6648         Likewise.
6649         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6650         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6651         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6652         Don't use requeue.
6653         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6654         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6656 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6658         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6659         in parameters of asm with output parameters.
6661         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6662         type of DECR parameter to int.
6663         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6665 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6667         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6668         guardsize for each thread.
6670 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6672         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6673         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6674         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6676         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6677         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6678         NULL.
6679         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6680         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6681         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6682         (pthread_getaffinity_np): Add hidden_def.
6684         * Makefile (tests): Add tst-attr3.
6685         * tst-attr3.c: New test.
6687         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6689 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6691         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6692         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6694 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6696         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6697         * tst-align.c: Include tst-stack-align.h.
6698         (tf, do_test): Use TEST_STACK_ALIGN macro.
6700 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6702         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6703         variable.
6705 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6707         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6708         stack-related values for the initial thread.
6710 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6712         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6714 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6716         * pthread_mutex_lock.c: Minor code rearrangements.
6718 2003-09-05  Roland McGrath  <roland@redhat.com>
6720         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6721         Instead, include ../nptl_db/db_info.c to do its magic.
6722         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6723         (__pthread_pthread_key_2ndlevel_size): Likewise.
6724         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6725         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6726         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6727         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6728         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6729         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6730         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6731         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6732         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6733         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6734         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6735         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6736         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6737         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6738         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6739         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6740         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6742 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6744         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6745         of pthread_t to be compatible with LT.
6746         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6747         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6748         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6749         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6750         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6751         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6752         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6754 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6756         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6758 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6760         * unwind-forcedunwind.c: Move to...
6761         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6762         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6763         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6764         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6765         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6766         * unwind.c: Include jmpbuf-unwind.h.
6767         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6769 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6771         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6772         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6773         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6774         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6775         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6776         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6777         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6778         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6779         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6780         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6781         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6782         function.
6783         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6784         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6785         * Makefile (tests): Add tst-stack2.
6786         * tst-stack2.c: New test.
6787         * tst-stack1.c: Include limits.h and sys/param.h.
6788         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6790         * pthread_condattr_setpshared.c: Include errno.h.
6791         (pthread_condattr_setpshared): Return EINVAL if pshared
6792         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6794         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6795         defined symbol for entry point to avoid cancellation.
6796         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6797         Likewise.
6798         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6799         Likewise.
6800         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6801         Likewise.
6802         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6803         Likewise.
6804         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6805         Likewise.
6806         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6807         __close_nocancel, __read_nocancel, __write_nocancel,
6808         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6809         libpthread.so or librt.so, define to corresponding function
6810         without _nocancel suffix.
6811         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6812         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6813         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6815         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6817 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6819         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6820         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6822         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6823         in subsections has a symbol associated with it.
6825         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6826         defined symbol for entry point to avoid cancellation.
6827         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6829 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6831         * Makefile (tests): Add tst-tls5.
6832         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6833         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6834         ($(objpfx)tst-tls5): New.
6835         ($(objpfx)tst-tls6.out): Likewise.
6836         (tests): Depend on $(objpfx)tst-tls6.out.
6837         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6838         (do_test): Check pthread_self () return value alignment.
6839         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6840         (tf): Check pthread_self () return value alignment.
6841         * tst-tls5.c: New test.
6842         * tst-tls5.h: New.
6843         * tst-tls5mod.c: New.
6844         * tst-tls5moda.c: New.
6845         * tst-tls5modb.c: New.
6846         * tst-tls5modc.c: New.
6847         * tst-tls5modd.c: New.
6848         * tst-tls5mode.c: New.
6849         * tst-tls5modf.c: New.
6850         * tst-tls6.sh: New test.
6852         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6853         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6854         * init.c (pthread_functions): Initialize them.
6855         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6856         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6857         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6858         pthread_cond_timedwait@@GLIBC_2.3.2.
6860 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6862         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6863         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6864         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6865         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6866         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6867         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6869         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6871         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6872         _POSIX_THREAD_PRIORITY_SCHEDULING.
6873         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6875 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6877         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6878         nested function, use static inline function from libio.h.
6879         Code by Richard Henderson.
6881         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6882         weak.
6884 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6886         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6887         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6888         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6889         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6890         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6891         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6892         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6893         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6894         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6895         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6896         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6897         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6898         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6899         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6900         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6901         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6902         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6903         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6904         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6905         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6906         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6907         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6908         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6909         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6910         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6911         * sysdeps/sparc/tls.h: New file.
6912         * sysdeps/sparc/tcb-offsets.sym: New file.
6913         * sysdeps/sparc/Makefile: New file.
6914         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6915         * init.c [__sparc__] (__NR_set_tid_address): Define.
6917 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6919         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6920         _IO_release_lock): Define.
6922 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6924         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6925         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6927 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6929         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6930         (__pthread_cleanup_class): Add missing return types of member
6931         functions.
6933 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6935         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6936         (lll_mutex_unlock_force): Add memory barrier between store and futex
6937         syscall.
6939 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6941         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6942         tempmsg in first loop.
6944 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6946         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6947         _POSIX_THREAD_PRIORITY_SCHEDULING.
6948         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6950 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6952         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6953         (__rtld_lock_default_lock_recursive,
6954         __rtld_lock_default_unlock_recursive): Define.
6955         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6956         __rtld_lock_unlock_recursive): Define using
6957         GL(_dl_rtld_*lock_recursive).
6958         * init.c (__pthread_initialize_minimal_internal): Initialize
6959         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6960         Lock GL(_dl_load_lock) the same number of times as
6961         GL(_dl_load_lock) using non-mt implementation was nested.
6963         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6964         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6966 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6968         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6969         PIPE_BUF.
6971 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6973         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6975 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6977         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6978         to first syscall error check.  Move syscall error check for tkill
6979         into __ASSUME_CLONE_STOPPED #ifdef.
6981 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6983         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6984         is not defined, do explicit synchronization.
6985         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6986         is not defined also unlock pd->lock for non-debugging case in case
6987         it is necessary.
6988         * pthread_create.c (start_thread): Always get and release pd->lock
6989         if __ASSUME_CLONE_STOPPED is not defined.
6990         (start_thread_debug): Removed.  Adjust users.
6991         * allocatestack.c (allocate_stack): Always initialize lock if
6992         __ASSUME_CLONE_STOPPED is not defined.
6993         * Makefile (tests): Add tst-sched1.
6994         * tst-sched1.c: New file.
6996         * sysdeps/pthread/createthread.c (do_clone): Only use
6997         sched_setschduler and pass correct parameters.
6999 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7001         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
7002         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
7003         PTHREAD_STACK_MIN in comments.
7005 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
7007         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7008         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
7009         argument.
7010         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
7011         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
7012         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
7013         (__pthread_cleanup_upto): Fix prototype.
7014         (_longjmp_unwind): Adjust caller.
7015         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
7016         Change second argument to const struct pointer.
7017         * tst-sem8.c (main): Remove unused s2 and s3 variables.
7018         * tst-sem9.c (main): Likewise.
7019         * unwind.c: Include string.h for strlen prototype.
7021 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
7023         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7024         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
7025         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
7026         Define HAVE_CMOV.
7027         Patch by Nicholas Miell <nmiell@attbi.com>.
7029 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
7031         * init.c (__pthread_initialize_minimal_internal): Initialize
7032         GL(dl_init_static_tls).
7033         * pthreadP.h (__pthread_init_static_tls): New prototype.
7034         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
7035         New functions.
7036         * Makefile (tests): Add tst-tls4.
7037         (modules-names): Add tst-tls4moda and tst-tls4modb.
7038         ($(objpfx)tst-tls4): Link against libdl and libpthread.
7039         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
7040         tst-tls4modb.so.
7041         * tst-tls4.c: New file.
7042         * tst-tls4moda.c: New file.
7043         * tst-tls4modb.c: New file.
7045 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
7047         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
7048         before __timer_dealloc.
7049         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
7050         Don't call list_unlink.
7052 2003-07-29  Roland McGrath  <roland@redhat.com>
7054         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
7056 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
7058         * tst-cancel17.c (do_test): Check if aio_cancel failed.
7059         Don't reuse struct aiocb A if it failed.
7060         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
7061         not just one byte, as that does not block.
7063 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
7065         * sysdeps/pthread/unwind-resume.c: New file.
7066         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
7067         unwind-resume in csu subdir.
7068         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
7069         exceptions.
7070         (librt-sysdep_routines, librt-shared-only-routines): Add
7071         rt-unwind-resume.
7072         * sysdeps/pthread/rt-unwind-resume.c: New file.
7073         * unwind-forcedunwind.c: New file.
7074         * Makefile (libpthread-routines): Add unwind-forcedunwind.
7075         (libpthread-shared-only-routines): Likewise.
7076         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
7077         * pthreadP.h (pthread_cancel_init): New prototype.
7078         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
7080         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
7081         attr argument const struct pthread_attr *.
7083         * res.c (__res_state): Return __resp.
7084         * descr.h: Include resolv.h.
7085         (struct pthread): Add res field.
7086         * pthread_create.c: Include resolv.h.
7087         (start_thread): Initialize __resp.
7088         * Makefile (tests): Add tst-_res1.
7089         (module-names): Add tst-_res1mod1, tst-_res1mod2.
7090         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
7091         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
7092         libpthread.
7093         * tst-_res1.c: New file.
7094         * tst-_res1mod1.c: New file.
7095         * tst-_res1mod2.c: New file.
7097 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
7099         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
7101         * Makefile: Define various *-no-z-defs variables for test DSOs
7102         which has undefined symbols.
7104 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
7106         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
7107         Retry if the stwcx fails to store once_control.
7109 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
7111         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
7112         pthread_attr_setaffinity.
7113         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
7114         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
7115         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
7116         * pthread_attr_destroy.c: Free cpuset element if allocated.
7117         * pthread_create.c: Pass iattr as additional parameter to
7118         create_thread.
7119         * sysdeps/pthread/createthread.c: If attribute is provided and
7120         a new thread is created with affinity set or scheduling parameters,
7121         start thread with CLONE_STOPPED.
7122         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
7123         pthread_attr_setaffinity.
7124         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7125         cpuset element.
7127 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
7129         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
7131 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
7133         * sysdeps/pthread/configure.in: Require CFI directives also for
7134         ppc and s390.
7136 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
7138         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7139         Add cfi directives.
7141 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7143         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
7144         CLEANUP_JMP_BUF.
7145         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
7146         registers as variables.  Call __pthread_mutex_unlock_usercnt.
7147         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7148         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
7149         not self pointer in __writer.  Compare with TID to determine
7150         deadlocks.
7151         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7152         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
7153         Likewise.
7154         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
7155         Likewise.
7156         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
7157         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7158         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
7159         macros also when compiling librt.
7161 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
7163         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
7164         -fasynchronous-unwind-tables.
7165         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
7166         (PSEUDO): Add cfi directives.
7167         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
7168         Likewise.
7169         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7170         Likewise.
7172 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
7174         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
7175         __pthread_unregister_cancel): Add prototypes and hidden_proto.
7176         * unwind.c (__pthread_unwind_next): Add hidden_def.
7177         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
7178         Likewise.
7179         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
7180         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7181         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
7182         Likewise.
7183         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
7184         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
7185         Likewise.
7186         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
7187         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
7188         __pthread_unregister_cancel and __pthread_unwind_next.
7190 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
7192         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
7193         different symbol for the cancellation syscall wrapper and
7194         non-cancellation syscall wrapper.
7195         (PSEUDO_END): Define.
7197 2003-07-05  Richard Henderson  <rth@redhat.com>
7199         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
7200         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
7201         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7202         return actual return value from the syscall, not 0.
7204 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
7206         * descr.h (struct pthread): Add pid field.
7207         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
7208         (__reclaim_stacks): Likewise.
7209         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
7210         also check for PID of the signal source.
7211         (__pthread_initialize_minimal_internal): Also initialize pid field
7212         of initial thread's descriptor.
7213         * pthread_cancel.c: Use tgkill instead of tkill if possible.
7214         * sysdeps/unix/sysv/linux/fork.c: Likewise.
7215         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
7216         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7217         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7219 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
7221         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
7222         Fix use of parameter.
7223         (__libc_cleanup_pop): Likewise.
7225 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
7227         * init.c (sigcancel_handler): Change parameters to match handler
7228         for SA_SIGACTION.  Check signal number and code to recognize
7229         invalid invocations.
7231 2003-07-03  Roland McGrath  <roland@redhat.com>
7233         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
7234         Apply sizeof (struct pthread) bias to r13 value.
7236 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
7238         * sysdeps/pthread/configure.in: Require CFI directives.
7240         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
7241         definition.
7242         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
7243         libpthread compilation.
7244         * unwind.c (__pthread_unwind): Add hidden_def.
7245         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
7247 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7249         * libc-cancellation.c (__libc_cleanup_routine): Define.
7250         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
7251         (__pthread_cleanup_pop): Define.
7253 2003-07-01  Richard Henderson  <rth@redhat.com>
7255         * sysdeps/alpha/elf/pt-initfini.c: New file.
7256         * sysdeps/alpha/pthread_spin_lock.S: New file.
7257         * sysdeps/alpha/pthread_spin_trylock.S: New file.
7258         * sysdeps/alpha/pthreaddef.h: New file.
7259         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7260         * sysdeps/alpha/tls.h: New file.
7261         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7262         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7263         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7264         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7265         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7266         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7267         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7268         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7269         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7270         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7272 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7274         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7275         cleanup support and unwind info.
7277 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
7279         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7280         Use correct cleanup handler registration.  Add unwind info.
7281         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7282         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7283         * tst-once3.c: Add cleanup handler and check it is called.
7284         * tst-once4.c: Likewise.
7285         * tst-oncex3.c: New file.
7286         * tst-oncex4.c: New file.
7287         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7289 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
7291         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7293 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
7295         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7296         (tf_msgsnd): Likewise.
7298         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7299         premature returns a bit more.
7301 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
7303         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7304         definition to the front.
7306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7307         the cleanup functions to make the names unique.  Fix dwarf opcode
7308         un unwind table.
7309         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7310         functions to make the names unique.  Fix CFA offset for two blocks.
7312 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
7314         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7315         missing closing braces.
7316         Patch by Christophe Saout <christophe@saout.de>.
7318 2003-06-24  Roland McGrath  <roland@redhat.com>
7320         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7322 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
7324         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7325         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7327         * pthreadP.h: Declare __find_thread_by_id.
7328         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7329         * pthread_clock_gettime.c: Allow using other thread's clock.
7330         * pthread_clock_settime.c: Likewise.
7331         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7332         * Makefile: Add rules to build and run tst-clock2.
7333         * tst-clock2.c: New file.
7335 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
7337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7338         to use exception-based cleanup handler.
7339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7341         * tst-cond8.c (ch): Announce that we are done.
7343         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7345         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7346         Also test aio_suspend with timeout value.
7348 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
7350         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7351         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7352         attribute_hidden.
7354         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7355         (__pthread_mutex_lock_internal): Likewise.
7356         (__pthread_mutex_unlock_internal): Likewise.
7357         (__pthread_mutex_unlock_usercnt): Declare.
7358         * pthread_mutex_destroy.c: Always fail if used in any way.
7359         * pthread_mutex_init.c: Update comment.
7360         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7361         * pthread_mutex_timedlock.c: Adjust __nusers.
7362         * pthread_mutex_trylock.c: Adjust __nusers.
7363         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7364         and public interfaces are wrapper with pass additional parameter.
7365         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7366         parameter zero.
7367         * tst-mutex8.c: New file.
7368         * Makefile (tests): Add tst-mutex8.
7369         * sysdeps/pthread/pthread_cond_timedwait.c: Call
7370         __pthread_mutex_unlock_usercnt.
7371         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7373         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7376         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7377         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7378         Add __nusers.
7379         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7380         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7381         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7382         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7383         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7385         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7386         * pthread_mutex_timedlock.c: Likewise.
7387         * pthread_mutex_trylock.c: Adjust __nusers.
7388         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7389         * tst-mutex9.c: New file.
7390         * Makefile (tests): Add tst-mutex9.
7391         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7392         * sysdeps/ia64/tls.h: Likewise.
7393         * sysdeps/powerpc/tls.h: Likewise.
7394         * sysdeps/s390/tls.h: Likewise.
7395         * sysdeps/sh/tls.h: Likewise.
7396         * sysdeps/x86_64/tls.h: Likewise.
7397         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7398         Change type of __owner.
7399         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7400         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7401         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7402         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7403         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7405 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
7407         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7408         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7410         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7411         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
7412         instead of nr to lll_futex_wake.  Only set errno and return -1
7413         if err < 0.
7415         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7416         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7417         return actual return value from the syscall, not 0.
7419 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
7421         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7422         find a random value.
7423         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
7424         errno==EIDRM.
7426         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7427         compat_timer_settime.
7428         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7429         compat_timer_gettime.
7430         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7431         compat_timer_getoverrun.
7432         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7433         compat_timer_delete.
7435         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7436         error-checking mutex detect busy mutexes.
7438 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7440         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7441         Add ax to clobber list.
7442         (lll_mutex_cond_lock): Likewise.
7443         (lll_mutex_unlock): Likewise.
7444         (lll_lock): Likewise.
7445         (lll_unlock): Likewise.
7447         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7448         * tst-cancel18.c: New file.
7449         * tst-cancelx18.c: New file.
7451         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7452         and tcdrain.
7454         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7455         * tst-cancel17.c: New file.
7456         * tst-cancelx17.c: New file.
7458         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7459         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7460         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7462         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7464 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
7466         * sysdeps/pthread/createthread.c (create_thread): Set
7467         header.multiple_threads unconditionally.
7468         * allocatestack.c (allocate_stack): Likewise.
7469         * descr.h (struct pthread): Add header.multiple_threads
7470         unconditionally.
7471         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7472         Define for librt.  #error if neither libpthread, libc nor librt.
7473         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7474         Likewise.
7475         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7476         CDISABLE): Likewise.
7477         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7478         CDISABLE): Likewise.
7479         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7480         CDISABLE): Likewise.
7481         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7482         CDISABLE): Likewise.  Access header.multiple_threads outside of
7483         libc and libpthread.
7484         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7485         Likewise.
7486         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7487         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7489 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7491         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7492         Also test early cancellation before the thread reaches the cancellation
7493         point.
7495         * Makefile: Compile forward.c with exceptions.
7497         * sysdeps/unix/sysv/linux/sleep.c: New file.
7499 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7501         * Makefile: Add CFLAGS definition to compile function wrappers
7502         duplicated from libc with exceptions.
7503         * tst-cancel4.c: Also check cancellation handlers.
7505         * Makefile: Add rules to build and run tst-cancel16 and
7506         tst-cancelx16.  Add missing CFLAGS definitions.
7507         * tst-cancel16.c: New file.
7508         * tst-cancelx16.c: New file.
7510 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7512         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7513         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7514         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7515         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7517         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7518         (LIBC_CANCEL_RESET): Likewise.
7519         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7520         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7521         librt-cancellation.
7522         (CFLAGS-libcrt-cancellation.c): Define.
7523         * sysdeps/pthread/librt-cancellation.c: New file.
7524         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7525         macros also when compiling librt.
7526         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7527         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7528         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7529         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7530         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7531         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7532         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7534         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7535         compat_timer_create.
7537 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7539         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7541         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7542         __register_atfork.
7543         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7544         Add libc_hidden_def.
7546 2003-06-13  Roland McGrath  <roland@redhat.com>
7548         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7549         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7551 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7553         * allocatestack.c (queue_stack): Always inline.
7554         * ptreadhP.h (__do_cancel): Likewise.
7556 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7558         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7559         a typo.
7561 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7564         (__pthread_cond_signal): Remove incorrect second addition for
7565         cond_lock!=0.
7567 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7570         (__pthread_cond_signal): Use correct futex pointer in
7571         __lll_mutex_lock_wait call.
7573         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7574         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7576 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7578         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7579         cancelable.
7580         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7581         Likewise.
7583         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7584         hand-written CFI generation code.  Since ENTRY/END also initiated
7585         CFI frames this caused two CFI sets to be generated.
7587 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7589         * cleanup_routine.c: New file.
7590         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7591         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7592         cleanup handling.
7593         * Makefile (libpthread-routines): Add cleanup_routine.
7594         Add more CFLAGS variables to compile with exceptions.  Add comments
7595         why which file needs unwind tables.
7596         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7597         tests.
7598         * tst-cancelx1.c: New file.
7599         * tst-cancelx2.c: New file.
7600         * tst-cancelx3.c: New file.
7601         * tst-cancelx4.c: New file.
7602         * tst-cancelx5.c: New file.
7603         * tst-cancelx6.c: New file.
7604         * tst-cancelx7.c: New file.
7605         * tst-cancelx8.c: New file.
7606         * tst-cancelx9.c: New file.
7607         * tst-cancelx10.c: New file.
7608         * tst-cancelx11.c: New file.
7609         * tst-cancelx12.c: New file.
7610         * tst-cancelx13.c: New file.
7611         * tst-cancelx14.c: New file.
7612         * tst-cancelx15.c: New file.
7613         * tst-cleanupx0.c: New file.
7614         * tst-cleanupx0.expect: New file.
7615         * tst-cleanupx1.c: New file.
7616         * tst-cleanupx2.c: New file.
7617         * tst-cleanupx3.c: New file.
7619         * tst-cleanup0.c: Make standard compliant.
7620         * tst-cleanup1.c: Likewise.
7622         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7623         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7624         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7625         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7626         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7627         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7628         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7629         CLEANUP_JMP_BUF.
7630         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7631         * tst-cancel12.c: New file.
7632         * tst-cancel13.c: New file.
7633         * tst-cancel14.c: New file.
7634         * tst-cancel15.c: New file.
7635         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7636         and tst-cancel15.
7638         * tst-cancel1.c: Add some comments.
7640         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7641         timeout correctly.
7643 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7645         * Makefile (CFLAGS-pthread_cancel.c): Define.
7647 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7649         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7650         Change type of __writer element to int.
7651         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7652         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7653         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7654         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7655         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7656         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7657         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7658         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7659         Compare with TID to determine deadlocks.
7660         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7661         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7662         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7663         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7664         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7665         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7666         Likewise.
7667         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7668         Likewise.
7669         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7670         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7671         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7672         Likewise.
7673         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7674         Likewise.
7675         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7676         * Makefile (tests): Add tst-rwlock12.
7677         * tst-rwlock12.c: New file.
7679 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7681         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7682         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7683         Remove bogus hidden_proto.
7684         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7685         Likewise.
7686         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7687         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7688         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7689         ___lll_mutex_timedlock): Likewise.
7691 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7693         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7694         (__pthread_cond_signal): Add some code to eventually handle
7695         cond_lock!=0.
7697 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7699         * Makefile (tests): Add tst-exec4.
7700         (tst-exec4-ARGS): Define.
7701         * tst-exec4.c: New file.
7703 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7705         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7706         Also fail if tv_nsec < 0.
7707         (__lll_timedwait_tid): Likewise.
7708         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7709         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7710         Likewise.
7711         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7712         Likewise.
7713         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7714         Likewise.
7715         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7716         Likewise.
7717         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7718         Likewise.
7719         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7720         Likewise.
7722         * Makefile (tests): Add tst-sem8 and tst-sem9.
7723         * tst-sem8.c: New file.
7724         * tst-sem9.c: New file.
7725         * sem_open.c: Fix creation of in_use record if the file exists but
7726         no internal record.
7728         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7729         definitions.
7731         * sysdeps/pthread/timer_create.c (timer_create): In case
7732         evp==NULL, assign timer ID to sival_ptr.
7734         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7735         struct pthread_unwind_buf *.
7736         (struct pthread): Likewise for cleanup_jmp_buf element.
7738         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7739         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7740         * unwind.c (__pthread_unwind_next): Likewise.
7742 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7744         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7745         (lll_futex_timed_wait): Use int for futex value parameter.
7746         (lll_futex_wake): Likewise.
7747         (lll_futex_requeue): Likewise.
7749         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7750         Replace one memory operation with one register operation.
7752         * tst-join4.c (do_test): Fix error message.
7754         * tst-rwlock6.c (do_test): Use correct format specifier.
7756         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7757         (__lll_mutex_lock_wait): Replace one memory operation with one
7758         register operation.
7759         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7760         (__lll_mutex_lock_wait): Likewise.
7762         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7763         (__lll_mutex_cond_lock): Add one to value parameter of
7764         __lll_lock_wait to reflect reality in the futex syscall.
7765         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7766         (lll_mutex_cond_lock): Likewise.
7768 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7770         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7771         New function.
7772         (lll_mutex_cond_lock): Define.
7774 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7776         * Makefile (tests): Add tst-signal6.
7777         * tst-signal6.c: New file.
7779         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7780         (__lll_mutex_unlock_force): New function
7781         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7783         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7784         (__lll_mutex_unlock_force): New function.
7785         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7787         * tst-rwlock7.c (do_test): Use correct format specifier.
7789         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7790         Find break parameter in correct asm argument.
7792 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7794         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7795         Remove out4.
7796         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7797         error occured.
7798         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7799         Add __mutex.
7800         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7801         lll_futex_requeue, lll_mutex_unlock_force): Define.
7803 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7805         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7806         (pthread_cond_t): Add __mutex.
7807         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7808         lll_futex_requeue, lll_mutex_unlock_force): Define.
7810 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7812         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7813         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7814         Add __mutex field.
7815         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7816         Define.
7817         (lll_futex_wait, lll_futex_wake): Define.
7818         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7819         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7820         FUTEX_REQUEUE instead of FUTEX_WAIT.
7821         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7822         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7823         mutex which was used in condvar structure.  Call
7824         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7825         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7827         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7828         include tcb-offsets.h.  Read wakeup value in locked region.
7829         Use the value of gbr register as THREAD_ID.
7830         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7831         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7832         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7834         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7835         macros.
7837 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7839         * sysdeps/pthread/pthread_cond_broadcast.c
7840         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7842 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7844         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7845         typo in register name.
7846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7847         correctly.  Actually use requeue.  Little optimization.
7848         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7849         mutex address early.  Handle cancellation state as 32-bit value.
7850         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7851         Remove unnecessary label.
7853 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7855         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7856         instead of FUTEX_WAIT.
7857         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7858         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7859         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7861         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7862         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7863         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7864         of __pthread_mutex_lock_internal.
7865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7867         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7868         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7871         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7872         Add pthread_mutex_cond_lock.
7873         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7874         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7875         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7876         lll_mutex_cond_lock.
7877         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7878         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7879         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7880         Add __mutex field.
7881         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7882         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7884         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7885         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7887         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7888         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7889         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7890         macro don't define aliases.
7892         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7893         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7894         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7895         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7898         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7902 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7904         * sem_open.c: Fix one endless loop.  Implement correct semantics
7905         wrt opening the same semaphore more then once.
7906         * sem_close.c: Adjust for sem_open change.
7907         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7908         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7909         * Makefile (tests): Add tst-sem7.
7910         * tst-sem7.c: New file.
7912 2003-05-16  Roland McGrath  <roland@redhat.com>
7914         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7915         uninitialized variable braino.
7917 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7919         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7920         test for syscall availability.
7922         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7923         __no_posix_timers to -1 if the syscalls don't exist.
7925         * pthread_join.c (pthread_join): Set tid field of the joined
7926         thread to -1.  This isn't necessary but helps to recognize some
7927         error conditions with almost no cost.
7929         * allocatestack.c (FREE_P): Also negative values indicate an
7930         unused stack.
7932         * unwind.c: Include <unistd.h>.
7934 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7936         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7938 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7940         * Makefile (crti-objs, crtn-objs): New variables.
7941         (omit-deps, extra-objs): Add crtn.
7942         ($(objpfx)libpthread.so): Depend on both crti and crtn
7943         and links to them in multidir.
7944         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7946 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7948         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7949         (lll_mutex_unlock): Use atomic_exchange_rel.
7951 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7953         * cond-perf.c (cons): Add missing locking around setting of alldone.
7955 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7957         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7958         related macros.
7959         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7961 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7963         * tst-sem6.c: New file.
7964         * Makefile (tests): Add tst-sem6.
7966         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7967         Use atomic_exchange_rel instead of atomic_exchange.
7968         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7969         Likewise.
7971         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7972         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7973         vsyscall is possible.
7975         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7976         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7977         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7978         pthread_setaffinity_np.
7979         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7980         and pthread_setaffinity_np.
7981         * Makefile (libpthread-routines): Add pthread_getaffinity and
7982         pthread_setaffinity.
7984         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7985         use it in case mmap to allocate the stack fails.
7986         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7987         ARCH_MAP_FLAGS here.
7988         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7989         ARCH_RETRY_MMAP.
7991 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7993         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7994         handler implementation.  It is now lockless in fork().
7995         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7996         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7997         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7998         declare the __fork_*_lists.
7999         (struct fork_handler): Include pointers to all three functions.
8000         Add next, refcntr and need_signal elements.
8001         (__fork_handlers): New declaration.
8002         (__register_atfork_malloc): Remove declaration.
8003         (HAVE_register_atfork_malloc): Remove definition.
8004         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
8005         __pthread_child_handler variable.
8006         (__libc_pthread_init): Use __register_atfork instead of explicitly
8007         adding to the list.
8008         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
8009         and lll_futex_wake.
8010         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8012         * unwind.c (unwind_cleanup): Print error message and then abort.  This
8013         function must never be reached.
8015         * cond-perf.c: New file.
8017 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
8019         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
8021 2003-05-04  Roland McGrath  <roland@redhat.com>
8023         * Makefile ($(objpfx)../libc.so): New target.
8025 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
8027         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8028         (pthread_condattr_t): Size is only an int, don't use long for
8029         alignment.
8030         (pthread_mutexattr_t): Likewise.
8031         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8032         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8033         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8035 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
8037         * sysdeps/i386/tls.h: Define THREAD_ID.
8038         * sysdeps/ia64/tls.h: Likewise.
8039         * sysdeps/powerpc/tls.h: Likewise.
8040         * sysdeps/s390/tls.h: Likewise.
8041         * sysdeps/sh/tls.h: Likewise.
8042         * sysdeps/x86_64/tls.h: Likewise.
8043         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
8044         record ownership.
8045         * pthread_mutex_timedlock.c: Likewise.
8046         * pthread_mutex_trylock.c: Likewise.
8047         * pthread_mutex_unlock.c: Likewise.
8048         * pthread_rwlock_trywrlock.c: Likewise.
8049         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
8050         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8051         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8052         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8054         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
8055         flag.
8057 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
8059         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8060         (__SIZEOF_PTHREAD_COND_T): Define to 48.
8061         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
8062         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8063         Make __align long long instead of long.
8064         (pthread_rwlock_t): Formatting.
8065         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
8066         (pthread_rwlock_t): Formatting.
8067         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8068         (pthread_cond_t): Make __align long long instead of long.
8069         (pthread_rwlock_t): Move __flags field to the same position as in
8070         linuxthreads.
8072 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
8074         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
8075         * tst-rwlock7.c (do_test): Likewise.
8077 2003-04-26  Roland McGrath  <roland@redhat.com>
8079         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
8081 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
8083         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
8084         sizeof (struct pthread).
8085         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
8086         1 struct pthread.
8087         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
8088         to 0.
8089         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
8090         struct pthread.
8091         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
8092         to 32-bit bytes.
8093         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
8094         tcbp.
8095         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
8096         unneccessarily.
8097         (NO_TLS_OFFSET): Define.
8098         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
8099         add TLS_TCB_SIZE unnecessarily.
8101 2003-04-22  Roland McGrath  <roland@redhat.com>
8103         * Makeconfig (shared-thread-library): Reverse link order to work
8104         around linker bug.
8106 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
8108         * semaphore.h: Fix typo in comment.
8110 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
8112         * sysdeps/pthread/sigfillset.c: New file.
8114         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
8115         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
8116         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
8117         * sysdeps/pthread/sigaction.c: Likewise.
8118         * sysdeps/pthread/sigprocmask.c: New file.
8119         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
8120         __SIGRTMIN+1.
8121         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8122         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
8123         in this case.
8125 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
8127         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8128         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
8130         * sysdeps/unix/sysv/linux/unregister-atfork.c
8131         (__unregister_atfork): Don't free memory not allocated dynamically.
8133         * semaphore.h: Remove __THROW marker from cancellation points.
8134         * nptl/sysdeps/pthread/pthread.h: Likewise.
8136 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
8138         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
8139         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
8140         __THROW.
8142 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
8144         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
8146 2003-04-15  Roland McGrath  <roland@redhat.com>
8148         * forward.c (__pthread_unwind): Tweak to avoid warning.
8150 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
8152         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
8154 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
8156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
8157         overflow CFA advance instructions.
8158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8160 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
8162         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
8163         * sysdeps/i386/pthread_spin_lock.c: Likewise.
8164         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
8165         defined.
8167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
8168         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
8169         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
8170         DW_CFA_advance_loc for .Laddl-.Lsubl.
8172 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
8174         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
8175         position-independent unwind data for static libraries.
8176         Add missing unwind info.  Add comments.
8178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
8179         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8181         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8183 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
8185         * Makefile: Make sure all cancellation points are compiled with
8186         exception and asynchronous unwind tables.
8188         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
8189         which mishandles loading of global object addresses in PIC.
8190         (THREAD_SETMEM_NC): Likewise.
8192 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8194         * pthread.h: Define new data structure for cleanup buffer.  Declare
8195         new cleanup handler interfaces.
8196         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
8197         (struct pthread): Add cleanup_jmp_buf pointer.  Define
8198         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
8199         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
8200         it.  Declare old cleanup handler installation functions.
8201         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
8202         handling.
8203         * cleanup_defer.c: Likewise.
8204         * cleanup_compat.c: New file.  Old cleanup code.
8205         * cleanup_def_compat.c: New file.  Old cleanup code.
8206         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
8207         if own thread descriptor.
8208         * unwind.c: New file.
8209         * forward.c: Add __pthread_unwind.
8210         * init.c (pthread_functions): Add __pthread_unwind.
8211         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
8212         Add ptr___pthread_unwind.
8213         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
8214         and unwind function.
8215         * Makefile (libpthread-routines): Add cleanup_compat,
8216         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
8217         table generation if necessary.
8218         * version.c: Record whether unwind support is compiled in.
8219         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
8220         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
8221         handler interfaces.
8222         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
8223         complication to generate unwind information for syscall wrappers.
8224         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8225         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
8226         __cleanup_fct_attribute.
8228         * Makefile: Add rules to build and run tst-cleanup0.
8229         * tst-cleanup0.c: New file.
8230         * tst-cleanup0.expect: New file.
8232         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
8233         caller.  Optimize to avoid often unecessary local variable.
8235 2003-04-11  Roland McGrath  <roland@redhat.com>
8237         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
8238         sets variable `multidir'; include that.
8239         (generated): Add it.
8240         ($(objpfx)$(multidir)/crti.o): New target.
8241         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
8243 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
8245         * tst-attr2.c (do_test): Add cast to avoid warning.
8246         * tst-mutex4.c (do_test): Likewise.
8248 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
8250         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
8251         in child.
8253 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
8255         * Makefile (tests): Add tst-detach1.
8256         * tst-detach1.c: New file.
8258 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
8260         * sysdeps/pthread/pthread.h: Remove duplicate
8261         pthread_cleanup_{push,pop} definitions.
8263         * tst-barrier2.c: Eliminate warnings.
8264         * tst-cancel4.c: Likewise.
8265         * tst-cond4.c: Likewise.
8266         * tst-cond6.c: Likewise.
8267         * tst-detach1.c: Likewise.
8268         * tst-rwlock4.c: Likewise.
8269         * tst-rwlock6.c: Likewise.
8270         * tst-rwlock7.c: Likewise.
8271         * tst-sem3.c: Likewise.
8272         * tst-spin2.c: Likewise.
8273         * tst-umask1.c: Likewise.
8275 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
8277         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8279 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
8281         * descr.h (struct pthread): Move cancelhandling member to the front.
8283 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
8285         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8286         malloc_parent, and malloc_child statically.
8287         (__register_atfork_malloc): New function.
8288         (free_mem): Don't free any of the malloc_* variables on the list.
8289         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8290         Define HAVE_register_atfork_malloc.
8292 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
8294         * sysdeps/pthread/createthread.c (create_thread): Add some more
8295         comments explaining when to set multiple_threads and when not.
8297         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8298         THREAD_ATOMIC_BIT_SET if not already defined.
8299         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8300         THREAD_ATOMIC_BIT_SET:
8301         * sysdeps/x86_64/tls.h: Likewise.
8302         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8303         THREAD_ATOMIC_CMPXCHG_VAL.
8304         (_pthread_cleanup_pop_restore): Likewise.
8305         * cancellation.c (__pthread_enable_asynccancel): Likewise.
8306         (__pthread_enable_asynccancel_2): Likewise.
8307         (__pthread_disable_asynccancel): Likewise.
8308         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8309         (__libc_disable_asynccancel): Likewise.
8310         * init.c (sigcancel_handler): Likewise.
8311         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8312         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8314 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
8316         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8317         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8318         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8319         * Makefile (tests): Add tst-cancel11.
8320         * tst-cancel11.c: New file.
8322 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
8324         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8325         round, not the first.  Use specific_used flag instead of local
8326         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
8327         (__free_tcb): Don't call deallocate_tsd here.
8328         (start_thread): Call deallocate_tsd here.
8329         * pthread_setspecific.c: Set specific_used flag really only when
8330         needed.
8331         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8332         * tst-tsd3.c: New file.
8333         * tst-tsd4.c: New file.
8335 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8337         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8338         Use atomic_exchange_and_add instead of __lll_add.
8339         (__lll_mutex_timedlock): Likewise.
8340         Patch by Ian Wienand.
8342 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
8344         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8345         (SINGLE_THREAD_P): Fix typo.
8346         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8348 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8350         * Makefile (tests): Add tst-align.
8351         * tst-align.c: New file.
8352         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8354         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8355         function correctly.
8357         * tst-tsd2.c: Add casts to avoid warnings.
8359 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
8361         * descr.h (struct pthread): Move most often used elements to the front.
8363 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
8365         * Makefile (libpthread-routines): Add pthread_atfork.
8366         (libpthread-static-only-routines): Add pthread_atfork.
8368 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8370         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8371         of TLS_DTV_AT_TP.
8372         (INSTALL_DTV): Add parens.
8373         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8374         Use passed descr instead of THREAD_SELF.
8375         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8376         (__lll_mutex_timedlock_wait): Correct expected value after
8377         spurious wakeup.
8378         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8379         Release lock before waking up the waiters.
8380         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8381         criteria.  Reorderstruct passed to cleanup handler.  Fix
8382         handling of cancellation and failung pthread_mutex_unlock call.
8383         Use __pthread_enable_asynccancel_2 instead of
8384         __pthread_enable_asynccancel.
8385         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8386         Return result of lock re-get if it fails.
8387         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8388         for __pthread_cleanup_push.
8389         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8390         completely broken rwlock implementation.
8391         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8392         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8393         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8394         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8395         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8396         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
8397         versioned_symbol macro.
8398         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8399         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8401 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
8403         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8404         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
8405         and __helper_tid.
8406         (struct timer): Remove th and bar field.
8407         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8408         debugging code.  Create only one helper thread.
8409         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8410         helper thread.
8411         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8412         Renamed.  Define statically.  Use thread info from siginfo.
8413         (__helper_once): New variable.
8414         (__helper_tid): New variable.
8415         (__reset_helper_control): New function.
8416         (__start_helper_thread): New function.
8418         * pthread_create.c (start_thread): Don't use setjmp inside
8419         __builtin_expect to work around gcc bug.
8421         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8422         timer_delete syscall fails, but not with ENOSYS, set
8423         __no_posix_timers.
8425         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8426         (timer_settime): Fix typo.
8427         * sysdeps/unix/sysv/linux/timer_getoverr.c
8428         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8430 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
8432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8433         offset of cleanupbuf.__prev.
8435 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
8437         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8438         of included file.
8440 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
8442         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8443         NULL provide default definition to syscall.
8445 2003-03-25  Roland McGrath  <roland@redhat.com>
8447         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8448         (timer_id2ptr): Fix typo.
8450 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
8452         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8453         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8454         * sysdeps/ia64/pthreaddef.h: Likewise.
8455         * sysdeps/powerpc/pthreaddef.h: Likewise.
8456         * sysdeps/s390/pthreaddef.h: Likewise.
8457         * sysdeps/sh/pthreaddef.h: Likewise.
8458         * sysdeps/x86_64/pthreaddef.h: Likewise.
8459         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8460         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8461         being changed.
8462         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8463         SIGTIMER is not unblocked.
8464         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8465         RT signal taken.
8466         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8467         be send.
8468         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8469         pass pointer through as ID.
8470         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8471         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8472         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8473         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8474         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8475         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8476         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8477         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8478         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8479         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8480         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8481         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8482         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8483         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8484         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8485         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8486         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8487         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8488         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8489         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8490         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8491         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8492         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8493         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8494         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8495         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8496         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8497         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8498         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8499         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8500         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8501         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8502         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8504         * pthreadP.h: Remove FRAME_LEFT definition.
8505         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8506         already left frame.  Programs which have this problem are not POSIX
8507         compliant.
8508         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8510 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8512         * sysdeps/pthread/tst-timer.c: Check return values of the
8513         functions we test.
8515 2003-03-23  Roland McGrath  <roland@redhat.com>
8517         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8518         * tst-tls3mod.c: Likewise.
8519         * tst-tls1.c: Likewise.
8520         * tst-tls2.c: Likewise.
8522         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8523         undefined behavior.
8525         * tst-join5.c (tf1, tf2): Add a cast.
8527         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8529         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8530         Don't test anything.
8531         * tst-cond4.c: Likewise.
8532         * tst-cond6.c: Likewise.
8533         * tst-flock2.c: Likewise.
8534         * tst-mutex4.c: Likewise.
8535         * tst-rwlock4.c: Likewise.
8536         * tst-signal1.c: Likewise.
8537         * tst-spin2.c: Likewise.
8538         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8540         * tst-mutex4.c: Use test-skeleton.c.
8541         * tst-spin2.c: Likewise.
8542         * tst-sysconf.c: Likewise.
8543         * tst-barrier2.c: Likewise.
8544         * tst-cond4.c: Likewise.
8545         * tst-cond6.c: Likewise.
8546         * tst-rwlock4.c: Likewise.
8547         * tst-unload.c: Likewise.
8548         * tst-flock2.c (do_test): Use return instead of exit.
8550 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8552         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8554 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8556         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8557         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8558         instead of __lll_compare_and_swap.
8559         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8560         Likewise.
8561         Removed definition if __lll_compare_and_swap.
8563         * cancellation.c: Adjust for new form of compare&exchange macros.
8564         * cleanup_defer.c: Likewise.
8565         * init.c: Likewise.
8566         * libc-cancellation.c: Likewise.
8567         * old_pthread_cond_broadcast.c: Likewise.
8568         * old_pthread_cond_signal.c: Likewise.
8569         * old_pthread_cond_timedwait.c: Likewise.
8570         * old_pthread_cond_wait.c: Likewise.
8571         * pthread_cancel.c: Likewise.
8572         * pthread_create.c: Likewise.
8573         * pthread_detach.c: Likewise.
8574         * pthread_join.c: Likewise.
8575         * pthread_key_delete.c: Likewise.
8576         * pthread_setcancelstate.c: Likewise.
8577         * pthread_setcanceltype.c: Likewise.
8578         * pthread_timedjoin.c: Likewise.
8579         * pthread_tryjoin.c: Likewise.
8580         * sysdeps/pthread/createthread.c: Likewise.
8582 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8584         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8585         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8586         definitions.  Replace uses with calls to atomic_* functions.
8587         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8588         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8589         __lll_test_and_set calls with atomic_exchange_and_add and
8590         atomic_exchange calls respectively.
8591         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8592         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8593         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8594         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8595         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8596         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8597         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8599         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8600         returns the old value.
8602 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8604         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8605         int for variable OLDVAL and correct inline assembler contraint.
8606         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8607         type int for variable OLD.
8609         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8610         only for s390-32.
8611         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8612         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8613         instead of multiple_threads field in the TCB.
8615 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8617         * sysdeps/i386/i686/bits/atomic.h: Removed.
8618         * sysdeps/i386/i586/bits/atomic.h: Removed.
8619         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8620         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8621         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8622         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8623         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8624         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8625         * atomic.h: Removed.  Moved to glibc.
8627         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8628         support for clock selection.
8630         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8631         signalling waiters.
8633 2003-03-18  Roland McGrath  <roland@redhat.com>
8635         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8636         Add __lll_rel_instr first.  Add memory clobber.
8637         (lll_mutex_unlock): Use __lll_test_and_set.
8638         From Paul Mackerras <paulus@samba.org>.
8640         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8641         unconditionally.
8642         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8643         (SINGLE_THREAD_P):  Add `header.' prefix.
8644         From Paul Mackerras <paulus@samba.org>.
8646         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8647         pthread_timedjoin_np to ...
8648         (libpthread: GLIBC_2.3.3): ... here.
8649         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8651         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8652         Avoid shadowing VAL variable.
8654         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8655         New macro.
8657 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8659         * Makefile (tests): Add tst-cond11.
8660         * tst-cond11.c: New file.
8662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8663         struct passed to cleanup handler to eliminate one more
8664         instruction.
8665         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8667         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8668         (pthrad_cond_t): Replace __unused field with __clock.
8670         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8671         waken all waiters in cleanup handler.
8672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8675         * pthread_condattr_getclock.c: New file.
8676         * pthread_condattr_setclock.c: New file.
8677         * sysdeps/pthread/pthread.h: Declare these new functions.
8678         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8679         * Makefile (libpthread-routines): Add the new functions.
8680         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8681         Renamed field to value.  Document use of the bits.
8682         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8683         change.
8684         * pthread_condattr_setpshared.c: Likewise.
8685         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8686         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8687         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8688         Add __clock field.
8689         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8690         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8691         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8692         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8693         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8694         Implement clock selection.
8695         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8696         * pthread-errnos.sym: Add ENOSYS.
8697         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8698         _POSIX_CLOCK_SELECTION.
8699         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8701         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8702         invalid .size directive.
8704 2003-03-17  Roland McGrath  <roland@redhat.com>
8706         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8707         Formatting tweaks.
8709 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8711         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8712         Use __lll_add instead of spelling it out.  Use protected symbol names.
8713         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8714         Use __lll_add.
8715         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8716         Renamed from lll_compare_and_swap.  Use new name where necessary.
8717         (__lll_add): Defined.
8718         (__lll_dec_if_positive): Defined.
8719         (__lll_test_and_set): Defined.
8720         * sysdeps/ia64/pthread_spin_init.c: Removed.
8721         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8722         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8723         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8724         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8725         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8726         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8727         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8728         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8729         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8730         __sync_lock_release_si.
8731         Patch by Jakub Jelinek.
8733         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8734         Fix timeout handling.
8735         (__lll_timedwait_tid): Likewise.
8736         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8737         Patch by Jakub Jelinek.
8739         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8741 2003-03-17  Roland McGrath  <roland@redhat.com>
8743         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8744         * sysdeps/pthread/pthread_spin_init.c: New file.
8745         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8746         * sysdeps/powerpc/Makefile: New file.
8747         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8748         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8749         * sysdeps/powerpc/pthreaddef.h: New file.
8750         * sysdeps/powerpc/tcb-offsets.sym: New file.
8751         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8752         * sysdeps/powerpc/tls.h: New file.
8753         * sysdeps/powerpc/bits/atomic.h: New file.
8754         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8755         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8756         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8758         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8759         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8760         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8761         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8762         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8763         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8764         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8765         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8766         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8767         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8768         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8769         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8770         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8771         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8772         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8774         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8775         not gettimeofday.
8776         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8777         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8778         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8779         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8780         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8782 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8784         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8785         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8786         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8787         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8788         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8790 2003-03-16  Roland McGrath  <roland@redhat.com>
8792         * tst-fork4.c: Include <string.h>.
8793         * tst-signal2.c: Likewise.
8794         * tst-mutex5.c (do_test): exit -> return.
8795         * tst-mutex2.c: Include <stdlib.h>.
8797 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8799         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8800         (__lll_mutex_timedlock_wait): Correct expected value after
8801         spurious wakeup.  Otherwise we would never wait again.
8803         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8804         zone versus inline asm stupidity.  Use correct instructions.
8806         * tst-rwlock6.c: Add some more status output.
8808 2003-03-15  Roland McGrath  <roland@redhat.com>
8810         * sysdeps/pthread/configure.in: New file.
8811         * sysdeps/pthread/configure: New file (generated).
8813 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8815         * allocatestack.c (allocate_stack): Store the exact stack size of
8816         user allocated stacks.
8818 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8820         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8821         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8822         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8823         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8824         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8825         Use `header.' prefix.
8826         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8828 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8830         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8831         __builtin_frame_address, use stack pointer.
8833         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8834         instead of __builtin_frame_pointer.
8836 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8838         * tst-basic1.c (do_test): Add cast to avoid warning.
8839         * tst-basic2.c (do_test): Likewise.
8841         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8842         amount of stack correction.
8844         * tst-fork4.c: Use test-skeleton.c.
8846 2003-03-14  Roland McGrath  <roland@redhat.com>
8848         * init.c: Fix typo "#eli" for "#else".
8850 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8852         * allocatestack.c (__stack_user): Use hidden_data_def.
8853         * pthread_create.c (__pthread_keys): Likewise.
8855         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8857 2003-03-14  Roland McGrath  <roland@redhat.com>
8859         * tst-fork4.c: New file.
8860         * Makefile (tests): Add it.
8862         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8863         we always define the padding space.
8864         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8865         stopped supporting its own extensions fully.
8866         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8867         struct also called `header', so `header.multiple_threads' is the field
8868         name to use on all machines.
8869         * allocatestack.c (allocate_stack): Use `header.' prefix.
8870         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8871         * pthread_create.c (__pthread_create_2_1): Likewise.
8872         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8873         (THREAD_SELF): Likewise.
8874         * sysdeps/x86_64/tls.h: Likewise.
8875         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8876         (SINGLE_THREAD_P): Likewise.
8877         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8878         (SINGLE_THREAD_P): Likewise.
8879         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8880         (SINGLE_THREAD_P): Likewise.
8882         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8883         value directly.
8885 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8887         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8888         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8890         * pthread_create.c (start_thread): setjmp is expected to return 0.
8892         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8893         (THREAD_GETMEM_NC): Likewise.
8895 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8897         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8898         and the size of the stack which must be allocated is a multiple,
8899         allocate one more page.
8900         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8901         MULTI_PAGE_ALIASING.
8903 2003-03-13  Roland McGrath  <roland@redhat.com>
8905         * pthread_create.c (start_thread): Set EXITING_BIT after the
8906         event-reporting (and destructors), not before.
8908 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8910         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8911         lll_futex_wake): Declare register variables as long int instead of
8912         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8913         Make syscall arguments clobbered by the syscall.
8914         (lll_futex_wait): Define using lll_futex_timed_wait.
8916         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8917         to void *.
8919         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8920         PPID if [! NDEBUG].
8922         * allocatestack.c (nptl_ncreated): Only declare if
8923         COLORING_INCREMENT != 0.
8925         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8926         (__libc_enable_asynccancel_2): Remove prototype.
8928         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8929         ctid to match kernel.
8931 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8933         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8934         libc_multiple_threads.
8935         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8936         __libc_multiple_threads to...
8937         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8939         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8940         versioning.
8941         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8942         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8944         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8945         (__pthread_once_internal): Define.
8947         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8948         macros instead of .symver directly.
8949         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8950         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8952         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8953         * sysdeps/x86_64/tcb-offsets.sym: New file.
8954         * sysdeps/x86_64/Makefile: New file.
8956         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8957         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8958         to access own pthread_t in TCB.
8959         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8960         Likewise.
8961         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8962         Likewise.
8963         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8965 2003-03-12  Roland McGrath  <roland@redhat.com>
8967         * pthread-errnos.sym: New file.
8968         * Makefile (gen-as-const-headers): New variable, list that file.
8969         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8970         header <pthread-errnos.h> instead of defining errno values here.
8971         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8972         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8973         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8974         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8975         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8976         Likewise.
8977         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8978         Likewise.
8979         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8981         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8982         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8983         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8984         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8985         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8986         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8987         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8988         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8989         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8990         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8991         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8992         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8993         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8994         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8995         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8996         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8997         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8998         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8999         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9000         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
9001         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
9002         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
9003         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
9004         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9005         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9007         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
9008         CLONE_CHILD_SETTID worked.
9010 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
9012         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
9013         file.
9014         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
9015         file.
9017         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9018         (pthread_cond_t): Add padding.
9020         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
9021         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
9022         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
9024         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
9025         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
9026         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
9027         (__pthread_rwlock_timedrdlock): Likewise.
9028         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
9029         (__pthread_rwlock_wrlock): Likewise.
9030         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
9031         (__pthread_rwlock_rdlock): Likewise.
9033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
9035         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
9036         result of lock re-get if it fails.
9038 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9040         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
9041         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9042         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
9043         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9044         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9045         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9046         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9047         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9048         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9049         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9051         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
9052         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
9054         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
9055         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
9056         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
9057         (create_thread): Likewise.
9058         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
9059         * init.c (__pthread_initialize_minimal_internal): Initialize
9060         __libc_multiple_threads_ptr if necessary.
9061         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
9062         __pthread_multiple_threads and __libc_multiple_threads_ptr.
9063         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
9064         __libc_multiple_threads.
9065         (__libc_pthread_init): Return pointer to __libc_pthread_init if
9066         necessary.
9068         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
9069         (THREAD_SETMEM_NC): Likewise.
9071         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
9072         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
9073         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
9074         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
9076         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
9077         Eliminate one entire instruction.
9079         * cancellation.c (__pthread_enable_asynccancel_2): New function.
9080         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
9081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
9082         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
9083         instead of __pthread_enable_asynccancel.
9084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9085         (__pthread_cond_wait): Likewise.
9086         * sysdeps/pthread/pthread_cond_timedwait.c
9087         (__pthread_cond_timedwait): Likewise.
9088         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
9090         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
9091         (__condvar_cleanup): Wake up all waiters in case we got signaled
9092         after being woken up but before disabling asynchronous
9093         cancellation.
9094         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9095         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
9096         (__condvar_cleanup): Likewise.
9098         * init.c (__NR_set_tid_address): If already defined, don't redefine.
9099         Make it an error if architecture has no #if case.  Add x86-64.
9101         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
9102         pt-initfini.s generation.
9104         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
9105         (TLS_INIT_TP): Fix typo.
9107 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9109         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
9110         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
9112         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
9113         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9114         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
9115         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
9116         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
9117         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9118         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9119         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9121 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
9123         * sysdeps/pthread/pthread_cond_timedwait.c
9124         (__pthread_cond_timedwait): Return the result of the final
9125         locking.  If it succeeds, the regular function return value.
9127         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
9128         Return result of the final locking.
9129         * version.c (__nptl_main): Work around problems with the strange
9130         INTERNAL_SYSCALL macro on ppc32.
9131         * init.c (__pthread_initialize_minimal_internal): Unblock
9132         SIGCANCEL in case the parent blocked it.
9133         Reported by Paul Mackerras <paulus@samba.org>.
9135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
9136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
9137         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
9139 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
9141         * sysdeps/pthread/pthread_cond_timedwait.c
9142         (__pthread_cond_timedwait): Unlock and fail if
9143         __pthread_mutex_unlock_internal failed.
9145         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
9146         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
9147         Use ARCH_CLONE.
9148         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
9149         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
9150         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
9151         ALLOCATE_STACK): New macros.
9152         (TLS_TPADJ): New macro.
9153         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
9154         (allocate_stack): Handle TLS_DTV_AT_TP and
9155         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
9156         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
9157         Don't set PD->self.
9158         * init.c [__ia64__] (__NR_set_tid_address): Define.
9160         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
9161         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
9162         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
9163         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
9164         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
9165         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
9166         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
9167         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
9168         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
9169         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
9170         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
9171         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
9172         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
9173         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
9174         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
9175         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
9176         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
9177         * sysdeps/ia64/bits/atomic.h: New file.
9178         * sysdeps/ia64/Makefile: New file.
9179         * sysdeps/ia64/pthread_spin_init.c: New file.
9180         * sysdeps/ia64/pthread_spin_lock.c: New file.
9181         * sysdeps/ia64/pthread_spin_trylock.c: New file.
9182         * sysdeps/ia64/pthread_spin_unlock.c: New file.
9183         * sysdeps/ia64/pthreaddef.h: New file.
9184         * sysdeps/ia64/tcb-offsets.sym: New file.
9185         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
9186         * sysdeps/ia64/tls.h: New file.
9188         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
9189         to syscall instead of no arguments.
9191 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
9193         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
9194         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
9195         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
9196         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
9198         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
9199         unused code.
9201         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
9203         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9204         lowlevelbarrier.sym.
9205         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
9206         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
9207         Include lowlevelbarrier.h and don't define offsets locally.
9208         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
9210         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
9211         (__lll_mutex_lock_wait): Reverse order of first two parameters.
9212         (__lll_mutex_timedlock_wait): Likewise.
9213         (lll_mutex_lock): Adjust asm for that.
9214         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
9215         (lll_lock): Adjust asm for operand order change.
9216         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
9217         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
9219         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
9220         Reverse order of parameters.
9221         (__lll_timedwait_tid): Remove regparms attribute.
9222         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
9223         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
9225         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9226         (__lll_timedwait_tid): Remove one unnecessary instruction.
9228         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
9229         __lll_mutex_timedlock_wait only for NOT_IN_libc.
9230         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
9231         lowlevelmutex.S.
9233         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9234         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
9235         for NOT_IN_libc.
9236         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
9237         lowlevellock.S.
9239         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
9240         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
9241         for libc.so.
9242         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
9243         define LOCK here (if UP is not defined).  The actual code is in
9244         lowlevelmutex.S.
9246         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
9247         LOCK is already defined.  Don't define lll_unlock_wake_cb and
9248         __lll_timedwait_tid for libc.so.
9249         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
9250         define LOCK here (if UP is not defined).  The actual code is in
9251         lowlevellock.S.
9253         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9254         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9255         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9256         instead of lowlevelsem.h.
9257         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9258         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9259         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9261         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9262         lowlevelrwlock.sym.
9263         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9264         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9265         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9267         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9268         register loading.
9269         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9270         last changed.  D'oh.
9272         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9274         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9275         of __libc_locking_needed.
9276         (lll_trylock): Initialize %eax to zero.
9278         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9279         pthread_cond_t definition.
9281 2003-03-10  Roland McGrath  <roland@redhat.com>
9283         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9284         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9285         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9286         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9287         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9289         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9290         Instead of setting PD->multiple_threads, set globals
9291         __pthread_multiple_threads and __libc_multiple_threads.
9292         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9293         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9294         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9296         * descr.h (struct pthread): Conditionalize first member on
9297         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
9298         containing an anonymous tcbhead_t.  Move `list' member out.
9299         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9300         * allocatestack.c: Remove use of `header.data.' prefix.
9301         * pthread_create.c: Likewise.
9302         * init.c (__pthread_initialize_minimal_internal): Likewise.
9303         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9304         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9305         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9306         * sysdeps/x86_64/tls.h: Likewise.
9307         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9308         (SINGLE_THREAD_P): Likewise.
9309         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9310         (SINGLE_THREAD_P): Likewise.
9311         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9312         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9314 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
9316         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9318         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9319         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9321         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9322         leftovers from the ia32 code.
9324         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9325         memory load.
9326         (clear_once_control): Don't load %esi.
9328         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9329         handling.
9331         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9333         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9334         * sysdeps/unix/sysv/linux/createthread.c: ...here.
9336         * Makefile (tests): Add tst-cond10.
9337         * tst-cond10.c: New file.
9339 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
9341         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9342         * tst-signal3.c (do_test): Likewise.
9343         * tst-sem5.c (do_test): Likewise.
9344         * tst-kill6.c (do_test): Likewise.
9345         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
9347         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9348         of inc/dec.
9349         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9350         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9351         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9352         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9353         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9354         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9355         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9356         Likewise.
9357         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9358         Likewise.
9359         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9360         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9361         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9362         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9363         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9364         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9365         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9366         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9368         * allocatestack.c (allocate_stack): If mprotect() fails free the
9369         TLS memory.
9371 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
9373         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9375         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9376         lll_wake_tid.  This was used only to work around kernel limits in
9377         the early days.
9378         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9379         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9380         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9381         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9383         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9384         (__pthread_initialize_minimal_internal): Change initialization of
9385         __static_tls_align_m1 appropriately.
9386         * pthreadP.h (__static_tls_align_m1): Renamed from
9387         __static_tls_align.
9388         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9389         instead of __static_tls_align-1.
9391 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
9393         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9395         * pthread_create.c: Define __pthread_keys using nocommon
9396         attribute, not by placing it explicitly in bss.
9397         Remove DEFINE_DEALLOC definition.  Not needed anymore.
9399         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9400         Use it in mmap call to allocate stacks.
9402         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9404         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9405         result of the thread function.
9407 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
9409         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
9410         version is just fine.
9412         * sysdeps/unix/sysv/linux/libc_pthread_init.c
9413         (__pthread_child_handler): Renamed from pthread_child_handler,
9414         exported, and marked hidden.  Change all users.
9415         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9416         free __pthread_child_handler from child list.
9418 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9420         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9422         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9423         Fix handling of cancellation and failing pthread_mutex_unlock call.
9424         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9425         (__pthread_cond_wait): Likewise.
9427         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9428         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9429         lll_futex_timed_wait call.
9430         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9431         (pthread_rwlock_timedwrlock): Likewise.
9433         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9434         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9435         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9437         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9438         check of lll_futex_wake return value.
9440 2003-03-03  Roland McGrath  <roland@redhat.com>
9442         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9444         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9445         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9446         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9448 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
9450         * sysdeps/pthread/timer_create.c (timer_create): Return correct
9451         error for CPU clocks.
9453         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9454         _POSIX_MONOTONIC_CLOCK.
9455         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9457         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9458         recent kernels.
9460 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9462         * descr.h (struct pthread): Move cleanup field to the front.
9464 2003-03-01  Roland McGrath  <roland@redhat.com>
9466         * sem_open.c (sem_open): Braino fix.
9468 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9470         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9471         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9472         __pthread_cleanup_pop functionality.
9473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9475         * descr.h (struct pthread): Move tid field to the front now that
9476         it is often used.
9478         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9479         (__lll_mutex_timedlock_wait): Remove.
9480         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9481         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9482         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9483         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9484         (lll_unlock_wake_cb): Don't save and restore %esi.
9485         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9486         %esi.
9487         (__lll_timedwait_tid): Add alignment.
9488         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9489         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9490         %esi.
9491         (__lll_timedwait_tid): Removed.
9492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9493         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9494         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9495         (pthread_barrier_wait): Don't save, load, and restore %esi for
9496         last thread.
9497         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9498         (__pthread_cond_signal): Don't save, load, and restore %esi.
9499         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9500         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9501         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9502         Don't save, load, and restore %esi.
9504 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9506         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9507         Release lock before waking up the waiters.
9509         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9511         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9512         (reader_thread): Likewise.
9514         * sysdeps/pthread/pthread_rwlock_unlock.c
9515         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9516         to wake up readers if there are none.
9518         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9519         Release internal lock before wake threads.
9521 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9523         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9524         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9525         predefined.
9526         * tst-rwlock9.c: Likewise.
9527         * tst-rwlock10.c: New file.
9528         * tst-rwlock11.c: New file.
9530         * Makefile (tests): Add tst-dlsym1.
9531         * tst-dlsym1.c: New file.
9533         * init.c (__pthread_initialize_minimal_internal): Set
9534         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9535         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9537 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9539         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9541         * tst-cond2.c: Fix sychronization with child.
9543         * tst-rwlock8.c (reader_thread): Remove unused variable.
9545         * Makefile: Add rules to build and run tst-tls3.
9546         * tst-tls3.c: New file.
9547         * tst-tls3mod.c: New file.
9549         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9550         * tst-rwlock8.c: New file.
9551         * tst-rwlock9.c: New file.
9552         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9553         complete broken rwlock implementation.
9554         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9555         Likewise.
9556         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9557         Likewise.
9558         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9559         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9560         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9561         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9562         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9563         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9564         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9566 2003-02-23  Roland McGrath  <roland@redhat.com>
9568         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9570 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9572         * Makefile (tests): Add tst-context1.
9573         * tst-context1.c: New file.
9575         * Makefile (tests): Add tst-tls1 and tst-tls2.
9576         * tst-tls1.c: New file.
9577         * tst-tls2.c: New file.
9579         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9580         for failed cmpxchg.
9582         * pthread_create.c (start_thread): Set EXITING_BIT early.
9584         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9585         (THREAD_GETMEM_NC): Likewise.
9587 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9589         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9590         off 3 more bytes by using offset-less instructions when possible.
9592         * Makefile: Add dependency for $(objpfx)version.d.
9594         * eintr.c (eintr_source): Add unnecessary return but the compiler
9595         insists.
9597         * tst-kill3.c: Include <unistd.h>.
9599 2003-02-21  Roland McGrath  <roland@redhat.com>
9601         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9603 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9605         * Makefile (tests): Add tst-eintr1.
9606         (distribute): Add eintr.c.
9607         * tst-eintr1.c: New file.
9608         * eintr.c: New file.
9610         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9612         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9613         Disallow sending SIGCANCEL.
9615         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9616         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9617         * tst-kill1.c: New file.
9618         * tst-kill2.c: New file.
9619         * tst-kill3.c: New file.
9620         * tst-kill5.c: New file.
9621         * tst-kill6.c: New file.
9622         * tst-basic7.c: Renamed to...
9623         * tst-kill4.c: ...this.
9625 2003-02-21  Roland McGrath  <roland@redhat.com>
9627         * Makefile (install-lib-ldscripts): New variable.
9629 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9631         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9632         * pthread_cancel.c: Use INVALID_TD_P.
9633         * pthread_detach.c: Likewise.
9634         * pthread_getschedparam.c: Likewise.
9635         * pthread_setschedparam.c: Likewise.
9636         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9637         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9638         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9639         * pthread_timedjoin.c: Likewise.
9641         * tst-basic7.c: Include <signal.h>.
9643         * pthread_join.c (pthread_join): Limited checking for invalid
9644         descriptors.
9645         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9647 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9649         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9650         beginning of the loop.  Clear the entire first block of TSD.
9651         * Makefile (tests): Add tst-key4.
9652         * tst-key4.c: New file.
9654 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9656         * Makefile (tests): Add tst-basic7.
9657         * tst-basic7.c: New file.
9659         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9660         Add some more __builtin_expect.
9662         * pthreadP.h: Define dummy version of DEBUGGING_P.
9664 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9666         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9667         _POSIX_THREAD_PRIORITY_SCHEDULING.
9668         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9669         _XOPEN_REALTIME_THREADS.
9670         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9672         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9673         kernel returns EINVAL for PID <= 0, work around it.
9675         * Makefile (tests): Add tst-signal5.
9676         * tst-signal5.c: New file.
9678         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9679         and LOGIN_NAME_MAX.
9681         * tst-cancel1.c (tf): Block all signals.
9683         * Makefile (tests): Add tst-basic6.
9684         * tst-basic6.c: New file.
9686         * tst-basic1.c: Add test for process ID.
9688         * Makefile (tests): Add tst-cancel10.
9689         * tst-cancel10.c: New file.
9691         * Makefile (tests): Add tst-signal4.
9692         * tst-signal4.c: New file.
9694         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9695         __sigismember instead of sigismember.  Add __builtin_expect.
9697 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9699         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9700         pthread_setcancelstate, and pthread_rwlock_setpshared.
9702         * tst-cancel7.c (do_test): Make sure the pid file exists before
9703         canceling the thread.
9705         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9706         pthread_rwlock_timedrdlock tests.
9707         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9708         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9709         Check for invalid tv_nsec field.
9710         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9711         Likewise.
9713         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9714         recursive mutex of overflow.
9716         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9718         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9719         going into an endless loop.
9720         * Makefile (tests): Add tst-cancel9.
9721         * tst-cancel9.c: New file.
9723         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9725 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9727         * tst-mutex5.c (do_test): Add more timedlock tests.
9729         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9730         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9732         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9733         use INLINE_SYSCALL.  Error number is returned, not -1.
9735         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9736         and __deallocate_stack with internal_function.
9737         * pthread_create.c: Adjust definitions appropriately.
9738         * allocatestack.c: Likewise.
9740         * pthread_join.c: Add one more __builtin_expect.
9741         * pthread_timedjoin.c: Likewise.
9743         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9744         not data of sequence number does not match.
9745         Add one __builtin_expect.
9747         * Makefile (tests): Add tst-clock1.
9748         * tst-clock1.c: New file.
9750         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9751         negative arguments.
9752         * Makefile (tests): Add tst-basic5.
9753         * tst-basic5.c: New file.
9755 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9757         * Makefile (tests): Add tst-basic4.
9758         * tst-basic4.c: New file.
9760         * pthreadP.h: Add declaraction for __nptl_nthreads.
9761         * pthread_create.c: Define __nptl_nthreads
9762         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9763         after thread is done.  If then zero, call exit(0).
9764         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9765         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9766         * init.c (pthread_functions): Initialize ptr_nthreads.
9767         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9768         (__reclaim_stacks): Decrement __nptl_nthreads.
9769         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9770         Define.
9771         * Makefile (tests): Add tst-basic3.
9772         * tst-basic3.c: New file.
9774         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9775         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9776         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9777         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9778         if asynchronous canceling is enabled.
9779         * pthread_join.c (pthread_join): When recognizing circular joins,
9780         take into account the other thread might be already canceled.
9781         * Makefile (tests): Add tst-join5.
9782         * tst-join5.c: New file.
9784         * Makefile (tests): Add tst-join4.
9785         * tst-join4.c: New file.
9787 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9789         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9791 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9793         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9794         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9795         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9796         warning.
9797         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9798         to avoid warning.
9799         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9800         error if lll_futex_wake failed.
9802 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9804         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9805         handling of cancellation and failung pthread_mutex_unlock call.
9806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9807         * Makefile (tests): Add tst-cond8 and tst-cond9.
9808         * tst-cond8.c: New file.
9809         * tst-cond9.c: New file.
9811         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9813         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9814         non-standard initializers with __USE_GNU.
9816         * Makefile (tests): Add tst-cleanup3.
9817         * tst-cleanup3.c: New file.
9819 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9821         * Makefile (tests): Add tst-attr1 and tst-attr2.
9822         * tst-attr1.c: New file.
9823         * tst-attr2.c: New file.
9825         * Makefile: Add rules to build and run tst-atfork2 test.
9826         * tst-atfork2.c: New file.
9827         * tst-atfork2mod.c: New file.
9829         * sysdeps/unix/sysv/linux/unregister-atfork.c
9830         (__unregister_atfork): Free the memory allocated for the handlers
9831         after removing them from the lists.
9833         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9834         cleanup function.
9836         * tst-atfork1.c (do_test): Wait for the child we forked.
9837         Report error in child.
9839         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9841         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9843 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9845         * Makefile (tests): Add tst-cancel8.
9846         * tst-cancel8.c: New file.
9848         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9849         clearing of control variable.
9850         * Makefile (tests): Add tst-once3 and tst-once4.
9851         * tst-once3.c: New file.
9852         * tst-once4.c: New file.
9854 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9856         * sysdeps/sh/Makefile: New file.
9857         * sysdeps/sh/bits/atomic.h: New file.
9858         * sysdeps/sh/pthread_spin_init.c: New file.
9859         * sysdeps/sh/pthread_spin_lock.c: New file.
9860         * sysdeps/sh/pthread_spin_trylock.S: New file.
9861         * sysdeps/sh/pthread_spin_unlock.S: New file.
9862         * sysdeps/sh/pthreaddef.h: New file.
9863         * sysdeps/sh/tcb-offsets.sym: New file.
9864         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9865         * sysdeps/sh/tls.h: New file.
9866         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9867         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9868         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9869         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9870         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9871         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9872         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9873         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9874         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9875         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9876         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9877         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9878         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9879         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9880         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9881         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9882         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9883         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9884         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9885         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9886         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9887         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9888         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9889         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9890         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9891         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9892         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9893         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9894         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9895         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9897 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9899         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9900         according to POSIX.
9902         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9904 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9906         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9907         (TLS_GET_FS): New #define.
9908         (TLS_SET_FS): New #define.
9909         Correct value of __NR_set_thread_area.
9911         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9913 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9915         * Makefile (tests): Add tst-popen1.
9916         * tst-popen1.c: New file.
9918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9919         but inactive generalization.
9920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9922         Minor optimization, remove one instruction.
9923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9925 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9927         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9929 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9931         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9932         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9933         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9934         * sysdeps/pthread/pthread_cond_signal.c: New file.
9935         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9936         * sysdeps/pthread/pthread_cond_wait.c: New file.
9937         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9938         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9939         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9940         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9941         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9942         * sysdeps/s390/Makefile: New file.
9943         * sysdeps/s390/bits/atomic.h: New file.
9944         * sysdeps/s390/pthread_spin_init.c: New file.
9945         * sysdeps/s390/pthread_spin_lock.c: New file.
9946         * sysdeps/s390/pthread_spin_trylock.c: New file.
9947         * sysdeps/s390/pthread_spin_unlock.c: New file.
9948         * sysdeps/s390/pthreaddef.h: New file.
9949         * sysdeps/s390/tcb-offsets.sym: New file.
9950         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9951         * sysdeps/s390/tls.h: New file.
9952         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9953         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9954         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9955         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9956         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9957         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9958         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9959         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9960         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9961         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9962         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9963         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9964         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9965         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9966         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9967         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9968         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9969         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9970         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9971         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9972         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9973         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9974         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9976 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9978         * atomic.h: Add a couple more default implementations.
9979         (atomic_compare_and_exchange_acq): Use
9980         __arch_compare_and_exchange_32_acq in return value definition.  It
9981         always exists.
9982         (atomic_bit_set): Renamed from atomic_set_bit.
9983         Add missing atomic_ prefixes.
9985         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9986         thread library is available, use correct value to mark initialized
9987         once variable.
9989 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9991         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9992         __sysconf to determine pagesize.
9994         * pthread_create.c: Include <atomic.h>.
9995         * allocatestack.c (allocate_stack): Implement coloring of the
9996         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9997         size minus one.  Adjust users.
9998         * sysdeps/i386/i686/Makefile: New file.
10000 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
10002         * allocatestack.c: Improve comment throughout the file.
10004         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10005         (__lll_lock_wait): Add branch prediction.
10006         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10007         (__lll_lock_wait): Likewise.
10008         (lll_unlock_wake_cb): Removed.
10010 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
10012         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
10013         _POSIX_THREAD_PRIORITY_SCHEDULING.
10015 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
10017         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10018         Fix return type of ptr___pthread_getspecific.
10020 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
10022         * Makefile (tests): Add tst-umask1.
10023         (tst-umask1-ARGS): Define.
10024         * tst-umask1.c: New file.
10026 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
10028         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
10029         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
10030         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
10031         pthread_rwlock_unlock.
10032         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
10033         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
10034         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
10035         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
10036         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10037         New file.
10038         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
10039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10040         New file.
10041         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
10042         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
10043         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
10044         New file.
10045         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
10046         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
10047         New file.
10048         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
10049         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
10050         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
10051         New file.
10052         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
10053         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
10054         New file.
10055         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
10057         * Makefile (libpthread-routines): Remove lowlevelcond and
10058         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
10059         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
10060         and pthread_cond_broadcast.
10061         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
10062         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
10063         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
10064         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
10065         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
10066         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
10067         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
10068         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
10069         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
10070         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
10071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
10072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
10073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
10074         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
10075         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
10076         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
10077         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
10078         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
10079         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
10080         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
10081         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
10082         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
10083         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
10084         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
10085         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
10086         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
10087         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
10088         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
10089         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
10090         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
10091         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
10093         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
10094         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
10095         of the code is moved to ...
10096         * sysdeps/pthread/createthread.c: ...here.  New file.
10098 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
10100         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
10101         (__new_sem_post): Clear %eax before returning.
10102         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
10104         * Makefile (tests): Add tst-cleanup2.
10105         * tst-cleanup2.c: New file.
10107         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10108         Interpret first parameter correctly.
10110 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
10112         * Makefile (headers): Add bits/semaphore.h.
10114 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
10116         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
10117         if not SHARED.
10119 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
10121         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
10122         must be used and mapping failed.
10123         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
10125         * Makefile (CFLAGS-pthread_self.os): Define this, not
10126         CFLAGS-pthread_self.c.
10128 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10130         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
10131         lll_unlock_wake_cb.
10133         * Makefile (libpthread-routines): Add version.  Add rules to build
10134         version.os and banner.h.
10135         * version.c: New file.
10137 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
10139         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
10140         the alias unconditional.
10141         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
10143 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
10145         * Makefile (CFLAGS-pthread_self.c): New definition.
10147 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10149         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
10150         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
10151         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
10152         * init.c (__pthread_initialize_minimal_internal): Likewise.
10154 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
10156         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
10158         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
10159         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10160         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10161         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
10162         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
10163         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
10165 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
10167         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
10168         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
10169         * tst-cancel-wrappers.sh: Remove all exceptions.
10171 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
10173         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
10174         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
10176         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
10177         Use __libc_pthread_functions array if SHARED.
10179         * pthreadP.h: Move pthread_cond_2_0_t definition to...
10180         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
10182         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
10183         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
10184         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
10185         __libc_ptf_call instead of __libc_maybe_call.
10186         (PTF): New #define.
10187         (__libc_cleanup_region_start): Wrap function name with PTF call.
10188         (__libc_cleanup_region_end): Likewise.
10189         (__libc_cleanup_end): Likewise.
10191         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
10192         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
10193         * pthread_key_create.c: Add __pthread_key_create_internal alias.
10194         * pthreadP.h: Add prototypes.
10196         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
10197         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
10198         __pthread_rwlock_unlock aliases.
10199         * pthreadP.h: Add prototypes for new aliases.
10201         * pthreadP.h (struct pthead_functions): Moved to...
10202         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
10203         * init.c (pthread_functions): Add initializers for new elements.
10205         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
10206         __pthread_cleanup_pop_restore aliases.
10207         * pthreadP.h: Add prototypes.
10209         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
10210         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
10211         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
10212         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
10213         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10214         * pthreadP.h: Adjust prototypes and callers.
10216 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
10218         * Makefile (tests): Add tst-cancel7.
10219         (tst-cancel7-ARGS): New variable.
10220         * tst-cancel7.c: New file.
10222         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
10223         around gcc defficiencies.
10224         * old_pthread_cond_signal.c: Likewise.
10225         * old_pthread_cond_timedwait.c: Likewise.
10226         * old_pthread_cond_wait.c: Likewise.
10228         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
10230 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10232         * Makefile (tests): Add tst-cond7.
10233         * tst-cond7.c: New file.
10235         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10236         (condvar_cleanup): Get condvar address from the right place.
10238         * atomic.h: Correct definitions of atomic_full_barrier,
10239         atomic_read_barrier, atomic_write_barrier.
10241         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
10242         race-free.
10243         * old_pthread_cond_signal.c: Likewise.
10244         * old_pthread_cond_timedwait.c: Likewise.
10245         * old_pthread_cond_wait.c: Likewise.
10247 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
10249         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
10251 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10253         * pthreadP.h (pthread_cond_2_0_t): New type.
10254         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10255         Use new type for the 2.0 condvar function prototypes.
10256         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10257         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10258         parameter.
10259         * old_pthread_cond_destroy.c: Likewise.
10260         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
10261         * old_pthread_cond_signal.c: Likewise.
10262         * old_pthread_cond_timedwait.c: Likewise.
10263         * old_pthread_cond_wait.c: Likewise.
10265         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10266         (__pthread_cond_wait): Don't save cancellation mode and seq value
10267         in same location.
10269         * herrno.c (__h_errno_location): Don't define as weak.
10271 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10273         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10274         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10275         and pthread_cond_wait.
10276         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10277         Renamed to...
10278         (__pthread_cond_broadcast_2_0): ... this.
10279         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10280         Renamed to...
10281         (__pthread_cond_destroy_2_0): ... this.
10282         * old_pthread_cond_init.c (__old_pthread_cond_init):
10283         Renamed to...
10284         (__pthread_cond_init_2_0): ... this.
10285         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10286         Renamed to...
10287         (__pthread_cond_signal_2_0): ... this.
10288         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10289         Renamed to...
10290         (__pthread_cond_wait_2_0): ... this.
10291         * pthread_cond_destroy.c: Include shlib-compat.h.
10292         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10293         * pthread_cond_init.c: Include shlib-compat.h.
10294         (pthread_cond_init): Change strong_alias into versioned_symbol.
10295         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10296         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10297         fields.
10298         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10299         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10300         __pthread_cond_wait_2_0): New prototypes.
10301         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10302         __old_pthread_cond_init, __old_pthread_cond_signal,
10303         __old_pthread_cond_wait): Removed.
10304         * init.c: Include shlib-compat.h.
10305         (pthread_functions): Guard ptr___pthread_attr_init_2_0
10306         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10307         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10308         ptr___pthread_cond_*_2_0 fields.
10309         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10310         pthread_cond_*@GLIBC_2.0 compatibility symbols.
10312         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10313         LIBC_SIGACTION was not yet defined.
10314         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10315         [!defined LIBC_SIGACTION] (__sigaction): New function and
10316         libc_hidden_weak.
10317         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10318         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10320 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10322         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10324 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
10326         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10327         New, larger type definition.
10328         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10329         implementation.
10330         * Versions [libpthread]: Add definitions for new pthread_cond_*
10331         interfaces for version GLIBC_2.3.2.
10332         * pthread_cond_init.c: Update initialization for new type definition.
10333         * Makefile (libpthread-routines): Remove pthread_cond_wait,
10334         pthread_cond_timedwait, pthread_cond_signal, and
10335         pthread_cond_broadcast.  Add old_pthread_cond_init,
10336         old_pthread_cond_destroy, old_pthread_cond_wait,
10337         old_pthread_cond_timedwait, old_pthread_cond_signal, and
10338         old_pthread_cond_broadcast.
10339         * old_pthread_cond_broadcast.c: New file.
10340         * old_pthread_cond_destroy.c: New file.
10341         * old_pthread_cond_init.c: New file.
10342         * old_pthread_cond_signal.c: New file.
10343         * old_pthread_cond_timedwait.c: New file.
10344         * old_pthread_cond_wait.c: New file.
10345         * pthreadP.h: Add prototypes for the compatibility interfaces.
10347         * pthread_cond_destroy.c: Don't include <errno.h>.
10349 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
10351         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10352         unnecessary zero offset when addressing MUTEX.
10354 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10356         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10357         __register_atfork.
10358         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10359         for __register_atfork.
10361 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10363         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10364         instead of ASSEMBLER test macro.
10366         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10367         __libc_current_sigrtmax): Add libc_hidden_def.
10369         * sysdeps/pthread/list.h: Remove assert.h include.
10371 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10373         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10374         __pthread_initialize_minimal_internal not
10375         __pthread_initialize_minimal.
10377 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
10379         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10380         __pthread_initialize_minimal as hidden.
10382         * init.c (__pthread_initialize_minimal_internal): Don't mark as
10383         constructor.
10385 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10387         * Makefile ($(inst_libdir)/libpthread.so): Depend on
10388         $(common-objpfx)format.lds, include that into the output script.
10389         Fix comment.
10390         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10392 2002-12-28  Andreas Jaeger  <aj@suse.de>
10394         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10395         nsec resolution changes.
10396         (xstat64_conv): Likewise.
10397         (xstat32_conv): Likewise.
10398         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10399         struct kernel_stat.
10400         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10401         structs stat and stat64.
10402         * time/time.h (__timespec_defined): Define for __USE_MISC.
10403         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10405 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
10407         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
10408         argument.
10409         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10410         (pthread_exit): Use strong_alias to avoid warnings.
10411         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10412         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10413         ptr___pthread_attr_init_2_*.
10414         * init.c (pthread_functions): Adjust.
10416 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
10418         * forward.c: Make all functions available by default again.  It
10419         caused too much trouble.
10421         * pt-siglongjmp.c: Removed.
10423 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
10425         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10426         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10427         * sysdeps/i386/Makefile: New file.
10428         * sysdeps/i386/tcb-offsets.sym: New file.
10429         * sysdeps/pthread/tcb-offsets.h: New file.
10430         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10431         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10433         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10434         __register_atfork...
10435         (GLIBC_2.3.2): ...here.
10437 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10439         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10440         pthread_attr_setstackaddr with __attribute_deprecated__.
10442 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10444         * pt-system.c (system): Remove cancellation handling.
10445         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10446         cancellation routines.
10448 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10450         * descr.h: Include <dl-sysdep.h>.
10451         (struct pthread): Move header.data.list to the back of the struct.
10452         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10453         (MULTIPLE_THREADS_OFFSET): Adjust offset.
10454         (SYSINFO_OFFSEET): Likewise.
10456 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10458         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10459         Define.
10460         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10461         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10462         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10463         (USE_DL_SYSINFO): Undef.
10465 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
10467         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10468         $(common-objpfx)libc.so.
10469         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10470         it is bigger than pipe buffer size even on arches with bigger
10471         page size.
10472         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10474 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10476         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10477         correct errno access for case that USE___THREAD is not defined.
10479 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10481         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10482         Patch by Marijn Ros <marijn@mad.scientist.com>.
10484 2002-12-22  Roland McGrath  <roland@redhat.com>
10486         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10488 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10490         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10492 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10494         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10495         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10496         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10498         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10499         of int $0x80.
10500         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10501         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10502         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10503         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10504         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10505         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10506         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10507         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10509         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10510         sysenter.
10511         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10513         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10515         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10516         in new TCB.
10517         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10518         that sysinfo is properly initialized.
10519         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10520         to 1 only for ld.so.
10522         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10523         RTLD_CORRECT_DYNAMIC_WEAK.
10525 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10527         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10528         Use return 0 as 6th argument to FORWARD4.
10529         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10531 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10533         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10534         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10535         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10536         (INIT_SYSINFO): New #define.
10537         (TLS_TP_INIT): Use INIT_SYSINFO.
10538         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10539         At test to make sure SYSINFO_OFFSET value is correct.
10540         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10542 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10544         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10545         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10546         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10547         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10548         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10549         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10550         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10552 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10554         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10555         macro instead of using int $0x80 directly.
10557         * sysdeps/pthread/bits/stdio-lock.h: New file.
10558         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10559         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10560         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10561         * Makefile (routines): Add libc-lowlevelmutex.
10563         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10564         __i686.get_pc_thunk.dx.
10566 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10568         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10569         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10570         ($(objpfx)tst-cancel-wrappers.out): New rule.
10571         * tst-cancel-wrappers.sh: New test.
10572         * tst-locale1.c: Include signal.h.
10573         (uselocale): Test static linking of __libc_current_sigrt*.
10575 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10577         * Makefile (tests): Add tst-cancel6.
10578         * tst-cancel6.c: New file
10580 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10582         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10583         Define meaningfully for assembler as well.
10584         * pthreadP.h (struct pthread_functions): Remove
10585         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10586         and ptr_pthread_attr_init_2_1 fields.
10587         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10588         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10589         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10590         (FORWARD3): Define using FORWARD4.
10591         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10592         versions.
10593         * pt-system.c: Remove duplicate stdlib.h include.
10595 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10597         * sem_init.c: Define sem_init@GLIBC_2.0.
10598         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10599         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10601         * flockfile.c: Moved to...
10602         * sysdeps/pthread/flockfile.c: ...here.  New file.
10603         * funlockfile.c: Moved to...
10604         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10605         * ftrylockfile.c: Moved to...
10606         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10608 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10610         * libc-cancellation.c: Guard both function with
10611         #if !defined NOT_IN_libc.
10612         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10613         automatically provided pthread wrappers.
10614         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10615         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10616         nor in libpthread.
10617         * pt-open.c: Removed.
10618         * pt-fcntl.c: Removed.
10619         * pt-fsync.c: Removed.
10620         * pt-lseek.c: Removed.
10621         * pt-msgrcv.c: Removed.
10622         * pt-msgsnd.c: Removed.
10623         * pt-msync.c: Removed.
10624         * pt-nanosleep.c: Removed.
10625         * pt-open64.c: Removed.
10626         * pt-pause.c: Removed.
10627         * pt-pread.c: Removed.
10628         * pt-pread64.c: Removed.
10629         * pt-pwrite.c: Removed.
10630         * pt-pwrite64.c: Removed.
10631         * pt-read.c: Removed.
10632         * pt-recv.c: Removed.
10633         * pt-recvfrom.c: Removed.
10634         * pt-recvmsg.c: Removed.
10635         * pt-send.c: Removed.
10636         * pt-sendto.c: Removed.
10637         * pt-sigtimedwait.c: Removed.
10638         * pt-sigwait.c: Removed.
10639         * pt-wait.c: Removed.
10640         * pt-waitpid.c: Removed.
10641         * pt-write.c: Removed.
10642         * pt-accept.c: Removed.
10643         * pt-close.c: Removed.
10644         * pt-connect.c: Removed.
10645         * pt-lseek64.c: Removed.
10646         * pt-sendmsg.c: Removed.
10647         * pt-tcdrain.c: Removed.
10649 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10651         * init.c (__pthread_initialize_minimal_internal): Renamed from
10652         __pthread_initialize_minimal.  Make old name an alias.  This
10653         converts a normal relocation into a relative relocation.
10655         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10657         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10658         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10659         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10660         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10661         pt-sigwaitinfo, pt-waitid, and pt-writev.
10662         * pt-creat.c: Removed.
10663         * pt-poll.c: Removed.
10664         * pt-pselect.c: Removed.
10665         * pt-readv.c: Removed.
10666         * pt-select.c: Removed.
10667         * pt-sigpause.c: Removed.
10668         * pt-sigsuspend.c: Removed.
10669         * pt-sigwaitinfo.c: Removed.
10670         * pt-waitid.c: Removed.
10671         * pt-writev.c: Removed.
10673         * init.c (pthread_functions): New variable.
10674         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10675         (or NULL) to __libc_pthread_init.
10676         * forward.c: Rewrite to use __libc:pthread_functions array to get
10677         function addresses.
10678         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10679         prototype.
10680         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10681         Take new parameter.  Copy content of variable pointed to by it
10682         to __libc_pthread_init.
10684         * pthreadP.h (struct pthread_functions): New type.
10685         (__libc_pthread_init): Declare.
10687         * pthread_attr_destroy.c: Add namespace protected alias.
10688         * pthread_attr_getdetachstate.c: Likewise.
10689         * pthread_attr_getinheritsched.c: Likewise.
10690         * pthread_attr_getschedparam.c: Likewise.
10691         * pthread_attr_getschedpolicy.c: Likewise.
10692         * pthread_attr_getscope.c: Likewise.
10693         * pthread_attr_setdetachstate.c: Likewise.
10694         * pthread_attr_setinheritsched.c: Likewise.
10695         * pthread_attr_setschedparam.c: Likewise.
10696         * pthread_attr_setschedpolicy.c: Likewise.
10697         * pthread_attr_setscope.c: Likewise.
10698         * pthread_cond_broadcast.c: Likewise.
10699         * pthread_cond_destroy.c: Likewise.
10700         * pthread_cond_init.c: Likewise.
10701         * pthread_cond_signal.c: Likewise.
10702         * pthread_cond_wait.c: Likewise.
10703         * pthread_condattr_destroy.c: Likewise.
10704         * pthread_condattr_init.c: Likewise.
10705         * pthread_equal.c: Likewise.
10706         * pthread_exit.c: Likewise.
10707         * pthread_getschedparam.c: Likewise.
10708         * pthread_self.c: Likewise.
10709         * pthread_setcancelstate.c: Likewise.
10710         * pthread_setschedparam.c: Likewise.
10711         * pthread_mutex_destroy.c: Likewise.
10712         * pthread_mutex_init.c: Likewise.
10713         * pthreadP.h: Add prototypes for the aliases.
10715         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10716         multiple_threads member in correct TCB to 1.
10718         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10719         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10720         member of thread decriptor, otherwise return unconditionally 1.
10722 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10724         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10725         regular Linux version.  Remove file.
10726         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10727         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10728         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10729         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10730         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10731         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10732         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10733         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10734         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10735         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10736         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10737         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10738         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10739         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10740         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10741         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10742         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10743         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10744         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10745         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10746         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10747         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10748         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10749         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10750         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10751         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10752         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10753         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10754         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10755         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10757 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10759         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10760         * sysdeps/unix/sysv/linux/open.c: Removed.
10761         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10762         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10763         * sysdeps/unix/sysv/linux/msync.c: Removed.
10764         * sysdeps/unix/sysv/linux/read.c: Removed.
10765         * sysdeps/unix/sysv/linux/close.c: Removed.
10766         * sysdeps/unix/sysv/linux/creat.c: Removed.
10767         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10768         * sysdeps/unix/sysv/linux/pause.c: Removed.
10769         * sysdeps/unix/sysv/linux/select.c: Removed.
10770         * sysdeps/unix/sysv/linux/write.c: Removed.
10772 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10774         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10775         element in TCB to see whether locking is needed.
10777         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10778         MULTIPLE_THREADS_OFFSET value is correct.
10780         * sysdeps/unix/sysv/linux/close.c: New file.
10781         * sysdeps/unix/sysv/linux/connect.S: New file.
10782         * sysdeps/unix/sysv/linux/creat.c: New file.
10783         * sysdeps/unix/sysv/linux/fsync.c: New file.
10784         * sysdeps/unix/sysv/linux/llseek.c: New file.
10785         * sysdeps/unix/sysv/linux/lseek.c: New file.
10786         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10787         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10788         * sysdeps/unix/sysv/linux/msync.c: New file.
10789         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10790         * sysdeps/unix/sysv/linux/open.c: New file.
10791         * sysdeps/unix/sysv/linux/open64.c: New file.
10792         * sysdeps/unix/sysv/linux/pause.c: New file.
10793         * sysdeps/unix/sysv/linux/poll.c: New file.
10794         * sysdeps/unix/sysv/linux/pread.c: New file.
10795         * sysdeps/unix/sysv/linux/pread64.c: New file.
10796         * sysdeps/unix/sysv/linux/pselect.c: New file.
10797         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10798         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10799         * sysdeps/unix/sysv/linux/readv.c: New file.
10800         * sysdeps/unix/sysv/linux/recv.S: New file.
10801         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10802         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10803         * sysdeps/unix/sysv/linux/select.c: New file.
10804         * sysdeps/unix/sysv/linux/send.S: New file.
10805         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10806         * sysdeps/unix/sysv/linux/sendto.S: New file.
10807         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10808         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10809         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10810         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10811         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10812         * sysdeps/unix/sysv/linux/system.c: New file.
10813         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10814         * sysdeps/unix/sysv/linux/wait.c: New file.
10815         * sysdeps/unix/sysv/linux/waitid.c: New file.
10816         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10817         * sysdeps/unix/sysv/linux/writev.c: New file.
10818         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10820         * pt-readv.c: Fix comment.
10822 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10824         * tst-cleanup1.c: Include stdlib.h.
10826         * tst-cancel5.c: New test.
10827         * Makefile (tests): Add tst-cancel5.
10828         (tst-cancel5): Link against libc.so libpthread.so in that order.
10830 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10832         * forward.c (test_loaded): Prevent recursive calls.
10834         * Makefile (routines): Add libc-cancellation.
10835         * libc-cancellation.c: New file.
10836         * descr.h (struct pthread): Add multiple_threads field.
10837         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10838         new thread descriptor to 1.
10839         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10840         Initialize multiple_thread field after successful thread creation.
10841         * cancellation.c (__do_cancel): Move to pthreadP.h.
10842         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10843         (__pthread_disable_asynccancel): Add internal_function attribute.
10844         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10845         * pthread_setcancelstate.c: Likewise.
10846         * pthread_setcanceltype.c: Likewise.
10847         * pthread_exit.c: Likewise.
10848         * pthreadP.h (CANCELLATION_P): Likewise.
10849         (__do_cancel): Define as static inline.
10850         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10851         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10852         declarations.
10853         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10854         fields.  Define MULTIPLE_THREADS_OFFSET.
10855         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10856         declaration.
10857         * sysdeps/unix/sysv/linux/accept.S: New file.
10858         * sysdeps/unix/sysv/linux/read.c: New file.
10859         * sysdeps/unix/sysv/linux/write.c: New file.
10860         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10861         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10862         initialization of __libc_locking_needed.
10863         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10864         __libc_locking_needed, use multiple_threads field in TCB.
10865         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10867 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10869         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10870         version.
10871         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10873         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10874         access to __libc_locking_needed for PIC.
10876 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10878         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10879         declare for libc.so.
10880         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10881         expression.
10882         (__libc_lock_lock): Put into statement expression.
10883         (__libc_lock_unlock): Remove trailing semicolon.
10884         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10886 2002-12-12  Roland McGrath  <roland@redhat.com>
10888         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10889         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10891 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10893         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10894         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10895         Initialize __libc_locking_needed.
10896         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10897         instead of __register_pthread_fork_handler.
10898         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10899         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10900         fork-gen with libc_pthread_init.
10901         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10902         of __register_pthread_fork_handler.
10903         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10904         of __register_pthread_fork_handler.
10905         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10906         __libc_locking_needed to determine whether lock prefix can be avoided.
10907         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10909 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10911         * Makefile (tests): Add tst-cleanup1.
10912         * tst-cleanup1.c: New file.
10913         * cancellation.c (__cleanup_thread): Removed.
10914         (__do_cancel): Remove call to __cleanup_thread.
10915         * pthreadP.h: Remove __cleanup_thread prorotype.
10917         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10918         Remember function and argument even if cancellation handler
10919         function is not available.
10920         (__libc_cleanup_region_end): Execute registered function directly if
10921         pthread functions are not available.
10922         (__libc_cleanup_end): Likewise.
10924         * init.c (__pthread_initialize_minimal): Fix initialization in
10925         static lib by preventing gcc from being too clever.
10927 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10929         * init.c (__pthread_initialize_minimal): Remove unneccesary
10930         sigaddset call.
10932         * Makefile (tests): We can run tst-locale2 now.
10934 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10936         * Versions: Remove duplicated sigwait entry.
10938 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10940         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10941         inside libpthread.
10943         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10945         * pthreadP.h: Declare __pthread_enable_asynccancel and
10946         __pthread_disable_asynccancel.
10947         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10948         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10949         * cancellation.c (__pthread_enable_asynccancel): New function.
10950         (__pthread_disable_asynccancel): New function.
10951         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10952         * pt-close.c: Likewise.
10953         * pt-connect.c: Likewise.
10954         * pt-creat.c: Likewise.
10955         * pt-fcntl.c: Likewise.
10956         * pt-fsync.c: Likewise.
10957         * pt-lseek.c: Likewise.
10958         * pt-lseek64.c: Likewise.
10959         * pt-msgrcv.c: Likewise.
10960         * pt-msgsnd.c: Likewise.
10961         * pt-msync.c: Likewise.
10962         * pt-nanosleep.c: Likewise.
10963         * pt-open.c: Likewise.
10964         * pt-open64.c: Likewise.
10965         * pt-pause.c: Likewise.
10966         * pt-poll.c: Likewise.
10967         * pt-pread.c: Likewise.
10968         * pt-pread64.c: Likewise.
10969         * pt-pselect.c: Likewise.
10970         * pt-pwrite.c: Likewise.
10971         * pt-pwrite64.c: Likewise.
10972         * pt-read.c: Likewise.
10973         * pt-readv.c: Likewise.
10974         * pt-recv.c: Likewise.
10975         * pt-recvfrom.c: Likewise.
10976         * pt-recvmsg.c: Likewise.
10977         * pt-select.c: Likewise.
10978         * pt-send.c: Likewise.
10979         * pt-sendmsg.c: Likewise.
10980         * pt-sendto.c: Likewise.
10981         * pt-sigpause.c: Likewise.
10982         * pt-sigsuspend.c: Likewise.
10983         * pt-sigtimedwait.c: Likewise.
10984         * pt-sigwait.c: Likewise.
10985         * pt-sigwaitinfo.c: Likewise.
10986         * pt-system.c: Likewise.
10987         * pt-tcdrain.c: Likewise.
10988         * pt-wait.c: Likewise.
10989         * pt-waitid.c: Likewise.
10990         * pt-waitpid.c: Likewise.
10991         * pt-write.c: Likewise.
10992         * pt-writev.c: Likewise.
10993         * pthread_join.c: Likewise.
10994         * pthread_timedjoin.c: Likewise.
10996         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10997         (__xpg_sigpause): New function.
10998         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
11000 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
11002         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
11004         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
11005         _GI_pthread_cleanup_pop to pthreadP.h.
11007         * ftrylockfile.c: Use _IO_lock_trylock instead of
11008         pthread_mutex_trylock.
11010         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
11011         (CANCEL_RESET): Likewise.
11012         (__pthread_setcanceltype_): Declare.
11013         (__pthread_mutex_lock_internal): Declare.
11014         (__pthread_mutex_unlock_internal): Declare.
11015         (__pthread_once_internal): Declare.
11016         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
11017         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
11019         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
11020         and pthread_mutex_unlock.
11021         * pthread_cond_wait.c: Likewise.
11022         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
11023         * pthread_mutex_unlock.c: Likewise.
11025         * pthread_setcanceltype.c: Add additional alias
11026         __pthread_setcanceltype.
11028         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
11029         * sem_open.c (sem_open): Likewise.
11030         Use __libc_open, __libc_write, and __libc_close instead of
11031         open, write, and close respectively.
11033         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
11034         Rewrite as statement expression since it must return a value.
11036         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
11037         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
11038         __pthread_kill.
11040         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
11041         alias __pthread_once_internal.
11043         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
11045 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
11047         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
11048         * tst-stdio1.c: New file.
11049         * tst-stdio2.c: New file.
11051         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
11053         * Makefile (tests): Comment out tst-locale2 for now.
11054         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
11056         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
11057         -D_IO_MTSAFE_IO.
11058         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
11059         Use _IO_lock_init instead of explicit assignment.
11061         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
11062         Define __libc_lock_* and __libc_lock_recursive macros with
11063         lowlevellock macros, not pthread mutexes.
11065         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
11066         of pthread_mutex_lock.
11067         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
11068         instead of pthread_mutex_unlock.
11070 2002-12-06  Roland McGrath  <roland@redhat.com>
11072         * allocatestack.c (__stack_user): Use uninitialized defn.
11073         * init.c (__pthread_initialize_minimal): Initialize it here.
11075 2002-12-05  Roland McGrath  <roland@redhat.com>
11077         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
11078         string.
11079         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
11081         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
11082         missing & here too.
11084 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
11086         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11087         lowlevellock.
11088         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
11089         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
11090         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
11091         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
11092         for __libc_lock_* macros.
11093         * Makefile (routines): Add libc-lowlevellock.
11095 2002-10-09  Roland McGrath  <roland@redhat.com>
11097         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
11098         Under [__PIC__], call the function via the pointer fetched for
11099         comparison rather than a call by name that uses the PLT.
11100         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
11101         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
11102         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
11103         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
11104         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
11106 2002-12-04  Roland McGrath  <roland@redhat.com>
11108         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
11110         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
11111         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
11113         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
11115 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11117         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
11118         a completely opaque, non-integer type.
11119         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
11121 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
11123         * sysdeps/i386/tls.h: Include stdlib.h.
11124         * sysdeps/x86_64/tls.h: Likewise.
11126 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
11128         * Makefile (tests): Add tst-locale2.
11129         (tests-static): Likewise.
11130         * tst-locale2.c: New file.
11132         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
11133         volatile and add memory clobbers to lock operations.
11135 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
11137         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
11138         * sysdeps/i386/i486/bits/atomic.h: New file.
11139         * sysdeps/i386/i586/bits/atomic.h: New file.
11140         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
11141         include i486 version.
11142         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
11143         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
11144         Patch by Marijn Ros <marijn@mad.scientist.com>.
11146         * allocatestack.c (get_cached_stack): Don't crash if we first
11147         found a stack with a larger size then needed.
11148         Reported by Hui Huang <hui.huang@sun.com>.
11150         * Makefile (tests): Add tst-sysconf.
11151         * tst-sysconf.c: New file.
11153         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
11154         PTHREAD_THREADS_MAX.
11156 2002-12-02  Roland McGrath  <roland@redhat.com>
11158         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
11159         Declare using hidden_proto instead of attribute_hidden, so there are
11160         non-.hidden static symbols for gdb to find.
11161         (__pthread_keys): Likewise.
11162         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
11163         * allocatestack.c (__stack_user): Likewise.
11164         * pthread_create.c (__pthread_keys): Likewise.
11165         (__nptl_threads_events, __nptl_last_event): Make these static instead
11166         of hidden.
11167         * pthread_key_create.c (__pthread_pthread_keys_max,
11168         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
11170 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
11172         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
11173         statically.
11174         * tst-locale1.c: New file.
11176         * pthread_cond_timedwait.c: Include <stdlib.h>.
11178         * Makefile (tests): Add tst-fork2 and tst-fork3.
11179         * tst-fork2.c: New file.
11180         * tst-fork3.c: New file.
11182 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
11184         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
11186         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
11187         require it to 200112L.
11189         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
11190         instruction only if HAVE_CMOV is defined.
11191         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
11193         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
11195         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
11197         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
11199         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
11201 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
11203         * sysdeps/x86_64/bits/atomic.h: New file.
11205         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
11206         16-bit operations.
11208         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
11209         possible since gettid cannot fail.
11211         * sysdeps/x86_64/pthreaddef.h: New file.
11213         * sysdeps/i386/pthreaddef.h (gettid): Removed.
11215         * sysdeps/x86_64/pthread_spin_init.c: New file.
11216         * sysdeps/x86_64/pthread_spin_lock.c: New file.
11217         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
11218         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
11220         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
11221         Add missing lock prefix.  Minute optimization.
11223         * tst-spin2.c (main): Also check successful trylock call.
11225         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
11226         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
11228         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
11229         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
11231         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
11232         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
11233         value in case of an error.  Add support for INTERNAL_SYSCALL.
11235         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
11236         value in case of an error.
11238         * sysdeps/x86_64/tls.h: New file.
11240 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11242         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
11243         takes the array member name and the index as parameters.
11244         (THREAD_SETMEM_NC): Likewise.
11245         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
11246         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
11247         interfaces.
11249         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
11250         to decide which code to use.
11251         (THREAD_SETMEM_NC): Likewise.
11253         * allocatestack.c (queue_stack): Don't remove stack from list here.
11254         Do it in the caller.  Correct condition to prematurely terminate
11255         loop to free stacks.
11256         (__deallocate_stack): Remove stack from list here.
11258 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11260         * Makefile (tests): Add tst-stack1.
11261         * tst-stack1.c: New file.
11263         * allocatestack.c (allocate_stack): Initialize the TCB on a user
11264         provided stack.
11266         * pthread_attr_getstack.c: Return bottom of the thread area.
11268 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
11270         * Makefile (libpthread-routines): Add pt-allocrtsig and
11271         pthread_kill_other_threads.
11272         * pt-allocrtsig.c: New file.
11273         * pthread_kill_other_threads.c: New file.
11274         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11275         all three functions.
11276         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11277         allocrtsig.
11278         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11279         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11280         and __libc_allocate_rtsig_private.
11281         * Versions (libpthread): Export pthread_kill_other_threads_np,
11282         __libc_current_sigrtmin, and __libc_current_sigrtmax.
11284 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
11286         * allocatestack.c (allocate_stack): stackaddr in attribute points to
11287         the end of the stack.  Adjust computations.
11288         When mprotect call fails dequeue stack and free it.
11289         * pthread_attr_setstack.c: Store top of the stack in stackaddr
11290         attribute.
11291         * pthread_getattr_np.c: Likewise.
11293         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11294         surprises.
11296 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
11298         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11299         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11301 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
11303         * pthread_getspecific.c: Optimize access to first 2nd-level array.
11304         * pthread_setspecific.c: Likewise.
11306 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
11308         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11309         definitions.  Get them from the official place.
11310         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11312         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11313         Use new CLONE_ flags in clone() calls.
11315         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11316         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11318         * Versions: Add pthread_* functions for libc.
11319         * forward.c: New file.
11321         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11322         errno-loc.
11323         * herrno.c: New file.
11324         * res.c: New file.
11326         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11327         sem_trywait, and sem_timedwait.  Add herrno and res.
11328         * sem_init.c: Don't initialize lock and waiters members.
11329         * sem_open.c: Likewise.
11330         * sem_post.c: Removed.
11331         * sem_wait.c: Removed.
11332         * sem_trywait.c: Removed.
11333         * sem_timedwait.c: Removed.
11334         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11335         Includes full implementations of sem_post, sem_wait, sem_trywait,
11336         and sem_timedwait.
11337         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11338         for new implementation.
11339         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11340         and waiters fields.
11342         * tst-sem3.c: Improve error message.
11343         * tst-signal3.c: Likewise.
11345         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11346         to tell the kernel about the termination futex and to initialize tid
11347         member.  Don't initialize main_thread.
11348         * descr.h (struct pthread): Remove main_thread member.
11349         * cancelllation.c (__do_cancel): Remove code handling main thread.
11350         The main thread is not special anymore.
11352         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
11353         size of the stacks to stack_cache_actsize.
11355         * pt-readv.c: Add missing "defined".
11356         * pt-sigwait.c: Likewise.
11357         * pt-writev.c: Likewise.
11359 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
11361         * Versions: Export __connect from libpthread.
11362         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11364         * Makefile (libpthread-routines): Add pt-raise.
11365         * sysdeps/unix/sysv/linux/raise.c: New file.
11366         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11367         * sysdeps/generic/pt-raise.c: New file.
11369         * pthread_cond_init.c: Initialize all data elements of the condvar
11370         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11372         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11373         * pthread_create.c: Likewise.
11375         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11376         * tst-key1.c: New file.
11377         * tst-key2.c: New file.
11378         * tst-key3.c: New file.
11380         * Versions: Export pthread_detach for version GLIBC_2.0.
11381         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11383 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
11385         * pthread_key_create.c: Terminate search after an unused key was found.
11386         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11388         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11389         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11391 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
11393         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11394         dynamic lookup for errno in PIC.
11396         * allocatestack.c (get_cached_stack): Rearrange code slightly to
11397         release the stack lock as soon as possible.
11398         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11399         the static TLS block.
11400         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11402         * cancellation.c: Renamed from cancelation.c.
11403         * Makefile: Adjust accordingly.
11404         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11405         * cleanup_defer.c: Use CANCELLATION_P.
11406         * pthread_testcancel.c: Likewise.
11407         * descr.h: Fix spelling in comments.
11408         * init.c: Likewise.
11409         * pthread_getattr_np.c: Likewise.
11410         * pthread_getschedparam.c: Likewise.
11411         * pthread_setschedparam.c: Likewise.
11412         * Versions: Likewise.
11414         * pt-pselect.c: New file.
11415         * Makefile (libpthread-routines): Add pt-pselect.
11416         * Versions: Add pselect.
11418         * tst-cancel4.c: New file.
11419         * Makefile (tests): Add tst-cancel4.
11421 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
11423         * pthread_mutex_lock.c: Always record lock ownership.
11424         * pthread_mutex_timedlock.c: Likewise.
11425         * pthread_mutex_trylock.c: Likewise.
11427         * pt-readv.c: New file.
11428         * pt-writev.c: New file.
11429         * pt-creat.c: New file.
11430         * pt-msgrcv.c: New file.
11431         * pt-msgsnd.c: New file.
11432         * pt-poll.c: New file.
11433         * pt-select.c: New file.
11434         * pt-sigpause.c: New file.
11435         * pt-sigsuspend.c: New file.
11436         * pt-sigwait.c: New file.
11437         * pt-sigwaitinfo.c: New file.
11438         * pt-waitid.c: New file.
11439         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11440         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11441         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11442         * Versions: Add all the new functions.
11444         * tst-exit1.c: New file.
11445         * Makefile (tests): Add tst-exit1.
11447         * sem_timedwait.c: Minor optimization for more optimal fastpath.
11449 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
11451         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11453         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11454         call.  pthread_join is an official cancellation point.
11455         * pthread_timedjoin.c: Likewise.
11457         * pthread_cond_wait.c: Revert order in which internal lock are dropped
11458         and the condvar's mutex are retrieved.
11459         * pthread_cond_timedwait.c: Likewise.
11460         Reported by dice@saros.East.Sun.COM.
11462 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
11464         * pthreadP.h: Cut out all type definitions and move them...
11465         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
11466         * pthreadP.h: Include <internaltypes.h>.
11468         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11469         performance tweaks.
11471         * sem_trywait.c: Shuffle #includes around to get right order.
11472         * sem_timedwait.c: Likewise.
11473         * sem_post.c: Likewise.
11474         * sem_wait.c: Likewise.
11476         * nptl 0.3 released.
11478         * Makefile (tests): Add tst-signal3.
11479         * tst-signal3.c: New file.
11481 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11483         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11484         the asms modify the sem object.
11485         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11487         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11488         the actual members.
11489         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11490         * semaphoreP.h: Include pthreadP.h.
11491         * sem_getvalue.c: Adjust to sem_t change.
11492         * sem_init.c: Likewise.
11493         * sem_open.c: Likewise.
11494         * sem_post.c: Likewise.
11495         * sem_timedwait.c: Likewise.
11496         * sem_trywait.c: Likewise.
11497         * sem_wait.c: Likewise.
11499 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11501         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11502         * tst-basic2.c: New file.
11503         * tst-exec1.c: New file.
11504         * tst-exec2.c: New file.
11505         * tst-exec3.c: New file.
11507         * tst-fork1.c: Remove extra */.
11509         * nptl 0.2 released.  The API for IA-32 is complete.