AVX audit test failures with gcc 4.6
[glibc.git] / nptl / ChangeLog
blob802abcdbc41b75cb23d35218151ede82c42ce86a
1 2011-01-19  Roland McGrath  <roland@redhat.com>
3         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
4         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
5         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
6         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
7         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
8         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
10 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
12         * Makefile (test-extras): Add tst-cleanup4aux.
14 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
16         [BZ #10563]
17         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
18         (__SETXID_2): Likewise.
19         (__SETXID_3): Likewise.
21 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
23         [BZ #10484]
24         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
25         * alloca_cutoff.c: Add libc_hidden_def.
27 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
29         [BZ #12113]
30         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
31         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
32         of "struct pthread".
34 2010-09-21  Andreas Schwab  <schwab@redhat.com>
36         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
37         [!__EXCEPTIONS]: Mangle local variable not_first_call.
38         (pthread_cleanup_push_defer_np): Likewise.
40 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
42         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
43         small.
45 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
46             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
48         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
49         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
51 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
53         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
55 2010-05-01  Alan Modra  <amodra@gmail.com>
57         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
58         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
59         to save temps.  Correct cfi for possible later frame manipulation.
60         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
61         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
62         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
63         (DOCARGS_6, UNDOCARGS_6): Likewise.
64         (CENABLE, CDISABLE): Add nops for non-shared calls.
66 2010-07-06  Andreas Schwab  <schwab@redhat.com>
68         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
69         Fix type mismatch.
71 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
73         * tst-abstime.c (do_test): Some more cleanups
75 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
77         * tst-abstime.c: Correct testing and add test for sem_timedwait.
79 2010-07-01  Andreas Schwab  <schwab@redhat.com>
80             Ulrich Drepper  <drepper@redhat.com>
82         * Makefile (tests): Add tst-abstime.
83         * tst-abstime.c: New file.
84         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
85         (__lll_timedlock_wait): Check for timestamp before the Epoch.
86         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
87         (__lll_timedlock_wait): Likewise.
88         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
89         (__lll_robust_timedlock_wait): Likewise.
90         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
91         (__pthread_cond_timedwait): Likewise.
92         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
93         (pthread_rwlock_timedrdlock): Likewise.
94         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
95         (pthread_rwlock_timedwrlock): Likewise.
96         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
97         Likewise.
99 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
101         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
103 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
105         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
106         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
108 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
110         [BZ #11390]
111         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
112         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
113         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
114         pthread_setname.
115         * Makefile (libpthread-routines): Add pthread_getname and
116         pthread_setname.
117         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
119 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
121         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
122         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
123         * sysdeps/pthread/Makefile: Remove csu section and rt section's
124         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
126 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
128         * pthread_cond_timedwait.c: Add check for
129         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
130         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
131         INTERNAL_SYSCALL.
133 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
135         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
136         and the call fails wake eventually waiting setxid threads.  Don't free
137         stack here if we try starting a thread.
138         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
139         if the clone call failed.
141 2010-03-08  Andreas Schwab  <schwab@redhat.com>
143         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
144         * allocatestack.c (get_cached_stack): Set setxid_futex.
145         (allocate_stack): Likewise.
147 2010-03-05  Andreas Schwab  <schwab@redhat.com>
148             Ulrich Drepper  <drepper@redhat.com>
150         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
151         it is creating a thread or it is just being created.
152         * pthread_create.c (start_thread): Wake setxid thread if it is
153         waiting.
154         (__pthread_create_2_1): Initialize setxid_futex.
155         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
156         is waiting.
158 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
161         Fix unwind info.
162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
164 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
167         Fix pthread_cond_timedwait with requeue-PI.
168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
169         Fix pthread_cond_wait with requeue-PI.
171 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
173         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
174         and pthread_mutexattr_setrobust for GLIBC_2.12.
175         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
176         * pthread_mutexattr_getrobust.c: Define alias
177         pthread_mutexattr_getrobust.
178         * pthread_mutexattr_setrobust.c: Define alias
179         pthread_mutexattr_setrobust.
181 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
183         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
185 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
187         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
189 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
191         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
192         call __gmon_start__.
193         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
195 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
197         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
198         using memset.
200 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
202         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
203         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
205         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
208         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
211 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
213         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
214         Don't update nwaiters after invalid timeout is recognized.
216 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
218         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
219         __gmon_start__.
221 2009-11-27  Andreas Schwab  <schwab@redhat.com>
223         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
224         THREAD_SELF->cancelhandling after returning from futex call.
226 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
228         * tst-sem13.c: New file.
229         * Makefile (tests): Add tst-sem13.
231 2009-11-22  Roland McGrath  <roland@redhat.com>
233         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
234         instead of recapitulating its contents.
236 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
239         optimizations and cleanups.
241 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
244         Remove redundant code. Fix cfi offsets.
245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
246         Fix cfi offsets.
248 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
250         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
251         reduce size of unwind info.
253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
254         cfi directives.
255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
256         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
258 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
260         [BZ #4457]
261         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
262         LIBGCC_S_SO.
263         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
265 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
267         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
269         [BZ #3270]
270         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
271         steps to avoid races with creation and terminations.
272         * nptl-init.c (sighandler_setxid): Adjust.
273         Patch by Daniel Jacobowitz.
275 2009-09-07  Andreas Schwab  <schwab@redhat.com>
277         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
279 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
280             Joseph Myers  <joseph@codesourcery.com>
282         [BZ #7094]
283         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
284         Initialize the sigev_notify field for newly created timer to make sure
285         the timer gets deleted from the active timer's list upon timer_delete.
287 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
289         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
290         Correct a logic error.
292 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
294         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
295         of the field in local variables.
296         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
297         variable and don't unconditionally clear it.
299 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
301         * pthread_create.c (start_thread): Hint to the kernel that memory for
302         the stack can be reused.  We do not mark all the memory.  The part
303         still in use and some reserve are kept.
305 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
307         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
309 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
311         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
312         directives.
314 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
316         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
317         directives.
318         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
320 2009-08-10  Andreas Schwab  <schwab@redhat.com>
322         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
323         (__pthread_cond_signal): Don't clobber register used for syscall
324         number.
326 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
328         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
329         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
331         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
332         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
333         register.
335 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
337         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
338         enabled by the special *_asynccancel functions.
339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
340         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
342         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
344 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
346         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
347         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
348         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
349         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
350         since we can assume the special __*_{en,dis}able_asynccancel
351         functions.
352         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
353         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
354         and PTHREAD_CANCELED.
356 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
358         * descr.h: Better definition of *_BITMASK macros for cancellation.
360 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
362         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
364         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
365         dynamic linker might have to save.
366         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
367         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
368         printing.
370         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
372 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
374         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
375         New function.
376         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
377         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
378         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
379         requeue_pi for robust mutexes.
380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
382         Don't only skip __pthread_mutex_cond_lock.  Call instead
383         __pthread_mutex_cond_lock_adjust.
384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
386         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
387         optimization of PI mutex handling.
389 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
391         [BZ #10418]
392         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
393         instead of of _acq variants of cmpxchg.
395 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
397         * sysdeps/x86_64/configure.in: New file.
399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
400         path when not using absolute timeout futex.
402 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
404         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
405         optimizations of last changes.
406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
408 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
410         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
411         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
413         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
415         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
416         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
417         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
419         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
420         (__pthread_cond_timedwait): Make more robust.
422 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
424         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
425         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
426         directly use absolute timeout.
428         * tst-sem5.c (do_test): Add test for premature timeout.
429         * Makefile: Linu tst-sem5 with librt.
431         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
432         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
433         directly use absolute timeout.
434         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
435         (pthread_rwlock_timedrdlock): Likewise.
437         * tst-cond11.c (run_test): Add test to check that the timeout is
438         long enough.
440         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
441         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
442         directly use absolute timeout.
444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
445         (__pthread_cond_wait): Convert to using exception handler instead of
446         registered unwind buffer.
447         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
448         (__pthread_cond_timedwait): Likewise.
450 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
452         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
453         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
454         use absolute timeout.
456         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
457         handling of uncontested semaphore.
459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
460         (__condvar_cleanup): Rewrite to use cfi directives instead of
461         hand-coded unwind tables.
462         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
463         Likewise.
464         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
465         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
466         Likewise.
468 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
470         * Makefile (libpthread-routines): Add pthread_sigqueue.
471         * Versions: Add pthread_sigqueue for GLIBC_2.11.
472         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
473         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
475 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
477         [BZ #10262]
478         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
479         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
480         cannot be assumed.
481         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
483 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
485         * libc-cancellation.c: Move __libc_cleanup_routine to...
486         * libc-cleanup.c: ...here.  New file.
487         * Makefile (routines): Add libc-cleanup.
489         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
490         test.
491         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
492         * sysdeps/pthread/librt-cancellation.c: Likewise.
494         [BZ #9924]
495         * nptl-init.c: Renamed from init.c.
496         * Makefile: Change all occurences of init.c to nptl-init.c.
498 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
500         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
501         to test when deciding on the delay.
502         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
503         * pthread_cancel.c: Close race between deciding on sending a signal
504         and setting the CANCELING_BIT bit.
506         * cancellation.c (__pthread_disable_asynccancel): Don't return if
507         thread is canceled.
508         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
510 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
512         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
513         is available.
514         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
515         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
516         * sysdeps/i386/tls.h: Likewise.
517         (tcbhead_t): Add __private_tm member.
519 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
521         * sem_open.c (sem_open): Rewrite initialization of initsem to
522         avoid warnings.
524         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
525         Avoid warning by using may_alias attribute on ptrhack.
527 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
529         [BZ #10090]
530         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
531         Check policy and priority for validity.
532         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
534 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
536         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
537         (__pthread_cond_timedwait): Change to use cfi directives instead of
538         hand-coded unwind sections.
540 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
542         * init.c (nptl_freeres): Compile only for SHARED.
544 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
546         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
547         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
548         FUTEX_BITSET_MATCH_ANY.
550 2009-02-27  Roland McGrath  <roland@redhat.com>
552         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
553         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
555 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
557         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
558         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
559         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
560         200112L to 200809L.
562 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
564         * sysdeps/pthread/pthread.h: The robust mutex functions are in
565         POSIX 2008.
567 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
569         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
570         Unify name of include protector macro.
572 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
574         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
575         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
577 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
579         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
580         pointer variables.
582         * allocatestack.c (__free_stacks): Renamed from free_stacks.
583         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
584         * init.c (nptl_freeres): New function.
585         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
586         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
587         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
588         variable.
589         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
590         load DSO.  Assign last.
591         (__unwind_freeres): New function.
593         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
594         for better debugging.  No need to use stack_list_add here.
596 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
598         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
599         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
600         instead of computing relative timeout.
601         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
602         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
604 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
606         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
608 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
610         * sysdeps/pthread/list.h (list_add): Initialize new element first.
611         (list_add_tail): Removed.
613 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
615         * (in_flight_stack): New variable.
616         (stack_list_del): New function.  Use instead of list_del.
617         (stack_list_add): New function.  Use instead of list_add when adding to
618         stack_cache and stack_used lists.
619         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
620         when the fork call interrupted another thread.
622 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
624         * init.c (__pthread_initialize_minimal_internal): Optimize test
625         FUTEX_CLOCK_REALTIME a bit.
627 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
629         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
630         only passing five parameters to FUTEX_WAIT_BITSET call.
632         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
633         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
634         instead of computing relative timeout.
636 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
638         * init.c (__pthread_initialize_minimal_internal): Check for
639         FUTEX_CLOCK_REALTIME flag.
640         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
641         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
642         relative timeout.
644         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
645         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
646         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
647         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
648         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
649         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
651 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
653         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
654         loop body instead of ; to avoid gcc warnings.
655         (pthread_cleanup_pop_restore_np): Likewise.
656         Patch by Caolán McNamara <caolanm@redhat.com>.
658 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
660         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
661         fast path here, for robust/PI/PP mutexes call
662         __pthread_mutex_lock_full.  Don't use switch, instead use a series
663         of ifs according to their probability.
664         (__pthread_mutex_lock_full): New function.
665         * pthread_mutex_unlock.c: Include assert.h.
666         (__pthread_mutex_unlock_usercnt): Handle only the
667         fast path here, for robust/PI/PP mutexes call
668         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
669         of ifs according to their probability.
670         (__pthread_mutex_unlock_full): New function.
671         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
672         (__pthread_mutex_lock_full): Define.
674 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
676         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
677         implementation.  Add necessary padding and.
678         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
679         words.
681 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
683         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
684         and FUTEX_WAKE_BITSET.
686 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
688         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
689         and FUTEX_WAKE_BITSET.
690         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
691         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
692         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
693         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
695 2008-11-25  Roland McGrath  <roland@redhat.com>
697         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
698         Subdirectories moved to ports repository as
699         sysdeps/.../nptl subdirectories.
701 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
703         [BZ #7008]
704         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
705         of old value.
706         * pthread_cond_init.c (__pthread_cond_init): Fix
707         cond->__data.__nwaiters initialization.
708         * Makefile (tests): Add tst-cond23.
709         * tst-cond23.c: New test.
711 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
713         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
714         arguments.
715         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
716         arguments.
718 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
720         [BZ #6955]
721         * pthread_mutex_lock.c: Add support for private PI mutexes.
722         * pthread_mutex_timedlock.c: Likewise.
723         * pthread_mutex_trylock.c: Likewise.
724         * pthread_mutex_unlock.c: Likewise.
725         Patch mostly by Ben Jackson <ben@ben.com>.
727 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
729         [BZ #6843]
730         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
731         Increase stack size for helper thread.
733 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
735         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
736         assembly with a clobber list for access registers a0 and a1.
738 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
740         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
741         to force runp->refcntr to be read from memory.
743 2008-09-08  Richard Guenther  <rguenther@suse.de>
745         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
746         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
747         lll_timedlock, lll_robust_timedlock, lll_unlock,
748         lll_robust_unlock): Promote private to int.
750 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
752         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
753         ARCH_RETRY_MMAP definitions.
754         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
755         Define MAP_STACK when not defined.
756         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
757         handling of ARCH_RETRY_MMAP.
759 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
761         * tst-align2.c (f): Print message that f is reached.
763 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
765         [BZ #6740]
766         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
767         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
769 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
771         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
772         SOCK_CLOEXEC if possible.
774 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
776         * Makefile (tests): Add tst-rwlock2a.
777         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
778         * tst-rwlock2a.c: New file.
780 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
782         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
784 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
786         * sysdeps/pthread/pthread.h: Fix typo in comment.
788 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
790         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
791         of CPU set to the kernel.
793 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
795         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
796         cfi directives.
797         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
798         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
799         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
800         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
801         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
802         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
804 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
806         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
807         cfi directives.
808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
809         Likewise.
810         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
811         Likewise.
812         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
813         Likewise.
815 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
817         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
819 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
821         David S. Miller  <davem@davemloft.net>
823         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
825 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
827         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
828         __pshared correctly.
829         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
830         Likewise.
831         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
832         Likewise.
833         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
834         Likewise.
835         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
836         Likewise.
837         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
839 2008-04-14  David S. Miller  <davem@davemloft.net>
841         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
842         (__old_sem_wait): Fix argument to lll_futex_wait().
844 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
846         * pthread_create.c: Require pthread_mutex_trylock and
847         pthread_key_delete for libgcc.
849 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
851         [BZ #6020]
852         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
853         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
854         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
856 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
858         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
859         <linux/limits.h> has defined it.
860         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
861         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
862         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
863         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
865 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
867         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
868         of ASSEMBLER.
869         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
870         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
872 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
874         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
875         HAVE_DL_DISCOVER_OSVERSION.
876         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
877         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
879 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
881         [BZ #5778]
882         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
883         _POSIX_CHOWN_RESTRICTED value to zero.
885 2008-01-31  Roland McGrath  <roland@redhat.com>
887         * Makefile (omit-deps): Variable removed.
889 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
891         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
892         unnecessary addr32 prefix.
894 2008-01-29  Roland McGrath  <roland@redhat.com>
896         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
898 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
900         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
902 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
904         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
905         a scratch register.
906         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
907         (__lll_lock_wait_private): Fix typo.
908         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
909         (pthread_barrier_wait): Likewise.  Adjust XADD use.
910         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
911         Adjust XADD use.
912         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
913         (pthread_rwlock_timedrdlock): Return correct return value.
914         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
915         (pthread_rwlock_timedwrlock): Likewise.
917 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
919         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
920         thread returns the program exits with an error code.
922 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
924         * pthread-errnos.sym: Add EOVERFLOW.
925         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
926         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
927         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
928         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
930 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
932         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
933         parameter.  Passed it as permission to mmap.
934         * allocatestack.c (allocate_stack): Pass prot as second parameter
935         to ARCH_RETRY_MMAP.
937 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
939         * tst-basic7.c: Allocate memory for the stack.
941         [BZ #5465]
942         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
943         (__pthread_cond_timedwait): Don't use VDSO.
944         Patch by Michal Januszewski.
946 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
948         [BZ #5455]
949         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
950         Allow label before pthread_cleanup_pop.
951         (pthread_cleanup_pop_restore_np): Likewise.
953 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
955         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
956         Store 2 before returning ETIMEDOUT.
958 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
960         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
961         Store 2 before returning ETIMEDOUT.
962         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
963         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
964         (__lll_lock_wait_private): Optimize.
965         (__lll_lock_wait): Likewise.
967 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
969         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
970         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
971         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
973 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
975         [BZ #5240]
976         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
977         If we time out, try one last time to lock the futex to avoid
978         losing a wakeup signal.
979         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
980         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
982         [BZ #5245]
983         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
984         if necessary.
986 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
988         [BZ #5245]
989         * allocatestack.c (allocate_stack): Change ENOMEM error in case
990         mmap failed to EAGAIN.
991         * Makefile (tests): Add tst-basic7.
992         * tst-basic7.c: New file.
994 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
996         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
997         Use __linkin_atfork.
999 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
1001         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
1002         missing line continuations.
1003         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
1004         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
1006 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
1008         [BZ #5220]
1009         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
1010         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
1011         (struct timer): Add next element.
1012         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
1013         enqueue timer structure into __active_timer_sigev_thread list.
1014         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
1015         remove timer struct from __active_timer_sigev_thread.
1016         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1017         Before using timer structure make sure it is still on the
1018         __active_timer_sigev_thread list.  Keep lock until done.
1019         Define __active_timer_sigev_thread and
1020         __active_timer_sigev_thread_lock.
1022 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
1024         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
1025         Redefine thread_atfork for use of ATFORK_MEM.
1026         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
1027         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
1028         function.
1029         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1030         Use atomic operation when removing first element of list.
1032 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
1034         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
1035         routine instead of an alias to __new_sem_post.
1037 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
1039         * init.c (__pthread_initialize_minimal): Initialize word to appease
1040         valgrind.
1042 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
1044         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
1045         libc.so just clear NAME.
1046         (__libc_rwlock_fini): Nop inside of libc.so.
1047         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
1048         all zeros.
1050 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
1052         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1053         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
1054         unlocking failed.
1055         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
1057 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
1059         [BZ #4938]
1060         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
1061         reclaimed stack if necessary.
1062         * Makefile (tests): Add tst-tsd6.
1063         * tst-tsd6.c: New file.
1065 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
1067         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
1068         Add private argument.
1070 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
1072         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1073         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
1075 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
1077         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
1078         (__lll_robust_timedlock): Pass private as last argument to
1079         __lll_robust_timedlock_wait.
1080         (__lll_unlock): Fix a pasto.
1082 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
1084         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
1085         sparc_old_sem): New structs.
1086         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
1087         (__sem_wait_cleanup): New function.
1088         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
1089         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1090         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1091         lll_futex_wait.
1092         (__old_sem_wait): New function.
1093         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
1094         nptl/sysdeps/unix/sysv/linux/sparc version.
1095         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
1096         Likewise.
1097         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
1098         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
1099         (__new_sem_trywait): Use sparc_old_sem structure.
1100         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1101         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
1102         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
1103         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1104         lll_futex_timed_wait.
1105         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
1106         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
1107         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
1108         lll_futex_wake.
1109         (__old_sem_post): New function.
1110         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
1111         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
1112         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
1113         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
1114         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
1115         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
1117 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1119         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1120         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1121         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1122         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1123         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
1124         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1125         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1126         Use FUTEX_WAKE_OP.
1127         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1128         kernel-features.h and tcb-offsets.h.
1129         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1130         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1131         process private.
1132         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1133         tcb-offsets.h.
1134         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
1135         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1136         process private.
1137         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
1138         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1139         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1140         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1141         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1142         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1143         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1145 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
1147         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
1148         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1149         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
1150         lll_futex_timed_wait.
1152         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
1153         __lll_robust_unlock): Rewrite as macros instead of inline functions.
1154         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
1155         __lll_robust_unlock, __lll_wait_tid): Likewise.
1157 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1159         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1160         Fix a pasto.
1161         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
1162         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1163         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1164         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1166         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1167         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
1169         kernel-features.h.
1170         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
1171         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1172         process private.  Switch DW_CFA_advance_loc1 and some
1173         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1175         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
1176         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
1177         process private.  Switch DW_CFA_advance_loc{1,2} and some
1178         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
1179         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
1180         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
1181         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1182         Likewise.
1183         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1184         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1185         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1186         Likewise.
1187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1188         (__pthread_cond_broadcast): Compare %r8 instead of
1189         dep_mutex-cond_*(%rdi) with $-1.
1190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1191         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
1192         of oring.
1194 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
1196         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
1198 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
1200         * allocatestack.c: Include kernel-features.h.
1201         * pthread_create.c: Likewise.
1202         * pthread_mutex_init.c: Likewise.
1203         * init.c: Likewise.
1204         * pthread_cond_timedwait.c: Likewise.
1205         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1206         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1207         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1208         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1209         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1210         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1211         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1212         Likewise.
1213         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1214         Likewise.
1215         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1216         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1217         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1218         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1220 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1222         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1223         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1224         byte elements.  One of them is the new __shared element.
1225         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1226         adjust names of other padding elements.
1227         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1228         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1229         byte elements.  One of them is the new __shared element.
1230         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1231         adjust names of other padding elements.
1232         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1233         Renamed __pad1 element to __shared, adjust names of other padding
1234         elements.
1235         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1236         (pthread_rwlock_t): Likewise.
1237         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1238         typo.
1240 2007-08-09  Anton Blanchard  <anton@samba.org>
1242         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1244 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1246         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1247         <kernel-features.h>.
1248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1250 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1252         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1253         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1254         dealing with robust mutexes.
1255         * pthread_mutex_timedlock.c: Likewise.
1256         * pthread_mutex_trylock.c: Likewise.
1257         * pthread_mutex_unlock.c: Likewise.
1258         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1260 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1262         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1263         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1264         (PTHREAD_MUTEX_PSHARED): Define.
1265         * pthread_mutex_init.c (__pthread_mutex_init): Set
1266         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1267         mutexes.
1268         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1269         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1270         as second argument to lll_lock.
1271         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1272         instead of its __data.__lock field.
1273         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1274         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1275         to lll_robust_lock.
1276         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1277         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1278         instead of mutex->__data.__kind directly, pass
1279         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1280         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1281         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1282         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1283         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1284         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1285         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1286         of mutex->__data.__kind directly.
1287         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1288         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1289         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1290         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1291         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1292         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1293         and lll_futex_wake.
1294         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1295         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1296         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1297         directly.
1298         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1299         Take mutex as argument instead of its __data.__lock field, pass
1300         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1301         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1302         __data.__lock field.
1303         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1304         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1305         to lll_robust_cond_lock.
1306         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1307         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1308         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1309         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1310         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1311         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1312         lll_futex_wait.
1313         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1314         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1315         lll_futex_wake.
1316         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1317         pshared variable, pass it to lll_lock, lll_unlock,
1318         lll_futex_timedwait and lll_futex_wake.
1319         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1320         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1321         and lll_futex_wake.
1322         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1323         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1324         macro.
1325         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1326         lll_futex_wake_unlock): Likewise.
1327         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1328         Likewise.
1329         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1330         lll_futex_wake_unlock): Likewise.
1331         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1332         Likewise.
1333         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1334         lll_futex_wake_unlock): Likewise.
1335         (lll_futex_wake): Fix a typo.
1336         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1337         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1338         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1339         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1340         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1342         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1343         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1344         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1345         (__pthread_cond_timedwait): Likewise.
1346         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1347         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1349 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1351         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1352         Don't use CGOTSETUP and CGOTRESTORE macros.
1353         (CGOTSETUP, CGOTRESTORE): Remove.
1354         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1355         @local symbol.
1357 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1359         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1360         definitions for private futexes.
1361         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1362         kernel-features.h and lowlevellock.h.  Use private futexes if
1363         they are available.
1364         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1365         (__lll_mutex_lock_wait): Rename to
1366         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1367         (__lll_mutex_timedlock_wait): Rename to ...
1368         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1369         Don't compile in for libc.so.
1370         (__lll_mutex_unlock_wake): Rename to ...
1371         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1372         (__lll_timedwait_tid): Use __NR_gettimeofday.
1373         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1374         the header from assembler.  Renamed all lll_mutex_* resp.
1375         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1376         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1377         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1378         Define.
1379         (__lll_lock_wait_private): Add prototype.
1380         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1381         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1382         __lll_unlock_wake): Likewise.
1383         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1384         if private is constant LLL_PRIVATE.
1385         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1386         lll_timedlock, lll_robust_timedlock): Add private argument.
1387         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1388         if private is constant LLL_PRIVATE.
1389         (lll_robust_unlock, lll_robust_dead): Add private argument.
1390         (lll_lock_t): Remove.
1391         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1392         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1393         lll_cond_wake, lll_cond_broadcast): Remove.
1394         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1395         kernel-features.h and lowlevellock.h.
1396         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1397         (LOAD_FUTEX_WAIT): Define.
1398         (__lll_robust_mutex_lock_wait): Rename to ...
1399         (__lll_robust_lock_wait): ... this.  Add private argument.
1400         Use LOAD_FUTEX_WAIT macro.
1401         (__lll_robust_mutex_timedlock_wait): Rename to ...
1402         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1403         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1404         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1405         lowlevellock.h.
1406         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1407         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1408         __lll_mutex_{lock,unlock}_*.
1409         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1410         lowlevellock.h and pthread-errnos.h.
1411         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1412         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1413         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1414         __lll_mutex_{lock,unlock}_*.
1415         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1416         lowlevellock.h and pthread-errnos.h.
1417         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1418         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1419         __lll_mutex_{lock,unlock}_*.
1420         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1421         lowlevellock.h.
1422         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1423         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1424         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1425         (__condvar_tw_cleanup): Likewise.
1426         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1427         lowlevellock.h.
1428         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1429         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1430         __lll_mutex_{lock,unlock}_*.
1431         ( __condvar_w_cleanup): Likewise.
1432         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1433         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1434         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1435         lowlevellock.h.
1436         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1437         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1438         __lll_mutex_{lock,unlock}_*.
1439         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1440         lowlevellock.h.
1441         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1442         FUTEX_PRIVATE_FLAG): Remove.
1443         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1444         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1445         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1446         lowlevellock.h.
1447         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1448         FUTEX_PRIVATE_FLAG): Remove.
1449         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1450         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1451         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1452         lowlevellock.h.
1453         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1454         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1455         __lll_mutex_{lock,unlock}_*.
1456         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1457         lowlevellock.h.
1458         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1459         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1460         __lll_mutex_{lock,unlock}_*.
1461         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1462         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1463         (__new_sem_post): Use standard initial exec code sequences.
1464         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1465         lowlevellock.h.
1466         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1467         FUTEX_PRIVATE_FLAG): Remove.
1468         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1469         exec code sequences.
1470         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1471         (__new_sem_trywait): Use standard initial exec code sequences.
1472         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1473         (__new_sem_wait): Use standard initial exec code sequences.
1475 2007-07-31  Anton Blanchard  <anton@samba.org>
1477         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1478         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1479         atomic_full_barrier.
1481 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1483         * allocatestack.c (stack_cache_lock): Change type to int.
1484         (get_cached_stack, allocate_stack, __deallocate_stack,
1485         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1486         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1487         as second argument to lll_lock and lll_unlock macros on
1488         stack_cache_lock.
1489         * pthread_create.c (__find_in_stack_list): Likewise.
1490         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1491         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1492         as second argument.
1493         * descr.h (struct pthread): Change lock and setxid_futex field
1494         type to int.
1495         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1496         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1497         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1498         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1499         Likewise.
1500         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1501         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1502         * pthreadP.h (__attr_list_lock): Change type to int.
1503         * pthread_attr_init.c (__attr_list_lock): Likewise.
1504         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1505         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1506         lll_{,un}lock.
1507         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1508         also for lll_futex_{wake,wait}.
1509         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1510         a pointer to const.
1511         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1512         LLL_SHARED as second argument to lll_{,un}lock.
1513         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1514         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1515         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1516         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1517         Likewise.
1518         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1519         as second argument to lll_{,un}lock macros on pd->lock.
1520         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1521         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1522         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1523         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1524         Likewise.
1525         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1526         Likewise.
1527         * pthread_once.c (once_lock): Change type to int.
1528         (__pthread_once): Pass LLL_PRIVATE as second argument to
1529         lll_{,un}lock macros on once_lock.
1530         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1531         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1532         rwlock->__data.__shared as second argument to them and similarly
1533         for lll_futex_w*.
1534         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1535         Likewise.
1536         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1537         Likewise.
1538         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1539         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1540         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1541         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1542         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1543         to lll_{,un}lock macros on __sem_mappings_lock.
1544         * sem_open.c (check_add_mapping): Likewise.
1545         (__sem_mappings_lock): Change type to int.
1546         * semaphoreP.h (__sem_mappings_lock): Likewise.
1547         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1548         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1549         instead of lll_*mutex_*, pass LLL_SHARED as last
1550         argument.
1551         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1552         pass LLL_SHARED as last argument.
1553         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1554         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1555         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1556         pass LLL_SHARED as last argument.
1557         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1558         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1559         LLL_SHARED as last argument.
1560         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1561         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1562         Similarly.
1563         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1564         __libc_lock_lock_recursive, __libc_lock_unlock,
1565         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1566         argument to lll_{,un}lock.
1567         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1568         _IO_lock_unlock): Likewise.
1569         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1570         compound literal.
1571         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1572         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1573         __fork_lock.
1574         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1575         free_mem): Likewise.
1576         (__fork_lock): Change type to int.
1577         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1578         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1579         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1580         lll_futex_wake.
1581         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1582         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1583         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1584         New function.
1585         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1586         pass it through to lll_futex_*wait, only compile in when
1587         IS_IN_libpthread.
1588         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1589         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1590         argument and pass it through to lll_futex_*wait.
1591         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1592         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1593         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1594         inline functions to __lll_* resp. __lll_robust_*.
1595         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1596         (lll_mutex_dead): Add private argument.
1597         (__lll_lock_wait_private): New prototype.
1598         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1599         __lll_robust_lock_timedwait): Add private argument to prototypes.
1600         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1601         call __lll_lock_wait_private, otherwise pass private to
1602         __lll_lock_wait.
1603         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1604         __lll_robust_timedlock): Add private argument, pass it to
1605         __lll_*wait functions.
1606         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1607         call __lll_unlock_wake_private, otherwise pass private to
1608         __lll_unlock_wake.
1609         (__lll_robust_unlock): Add private argument, pass it to
1610         __lll_robust_unlock_wake.
1611         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1612         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1613         argument, pass it through to __lll_* inline function.
1614         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1615         (lll_lock_t): Remove.
1616         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1617         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1618         lll_cond_wake, lll_cond_broadcast): Remove.
1619         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1620         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1621         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1622         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1623         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1624         the header from assembler.  Renamed all lll_mutex_* resp.
1625         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1626         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1627         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1628         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1629         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1630         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1631         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1632         Remove prototype.
1633         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1634         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1635         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1636         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1637         MULTIPLE_THREADS_OFFSET as another asm operand.
1638         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1639         MULTIPLE_THREADS_OFFSET as last asm operand, call
1640         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1641         otherwise pass private as another argument to __lll_lock_wait.
1642         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1643         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1644         private as another argument to __lll_*lock_wait call.
1645         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1646         MULTIPLE_THREADS_OFFSET as another asm operand, call
1647         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1648         otherwise pass private as another argument to __lll_unlock_wake.
1649         (lll_robust_unlock): Add private argument, pass private as another
1650         argument to __lll_unlock_wake.
1651         (lll_robust_dead): Add private argument, use __lll_private_flag
1652         macro.
1653         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1654         LLL_MUTEX_LOCK_INITIALIZER.
1655         (lll_lock_t): Remove.
1656         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1657         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1658         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1659         lll_cond_wake, lll_cond_broadcast): Remove.
1660         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1661         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1662         2007-05-2{3,9} changes.
1663         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1664         kernel-features.h and lowlevellock.h.
1665         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1666         (LOAD_FUTEX_WAIT): Rewritten.
1667         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1668         define.
1669         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1670         (__lll_mutex_lock_wait): Rename to ...
1671         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1672         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1673         (__lll_mutex_timedlock_wait): Rename to ...
1674         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1675         contains private argument.  Don't compile in for libc.so.
1676         (__lll_mutex_unlock_wake): Rename to ...
1677         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1678         Don't compile in for libc.so.
1679         (__lll_timedwait_tid): Use __NR_gettimeofday.
1680         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1681         kernel-features.h and lowlevellock.h.
1682         (LOAD_FUTEX_WAIT): Define.
1683         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1684         define.
1685         (__lll_robust_mutex_lock_wait): Rename to ...
1686         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1687         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1688         macro.
1689         (__lll_robust_mutex_timedlock_wait): Rename to ...
1690         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1691         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1692         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1693         lowlevellock.h.
1694         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1695         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1696         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1697         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1698         to __lll_lock_wait in %edx.
1699         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1700         Include lowlevellock.h and pthread-errnos.h.
1701         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1702         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1703         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1704         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1705         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1706         __lll_unlock_wake.
1707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1708         Include lowlevellock.h and pthread-errnos.h.
1709         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1710         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1711         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1712         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1713         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1714         __lll_unlock_wake.
1715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1716         Include lowlevellock.h.
1717         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1718         Don't define.
1719         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1720         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1721         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1722         __lll_unlock_wake.  Use __NR_gettimeofday.
1723         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1724         Include lowlevellock.h.
1725         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1726         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1727         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1728         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1729         and __lll_unlock_wake.
1730         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1731         Include lowlevellock.h.
1732         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1733         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1734         MUTEX(%ebx) address in %edx rather than %ecx to
1735         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1736         and __lll_unlock_wake.  Move return value from %ecx to %edx
1737         register.
1738         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1739         Include lowlevellock.h.
1740         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1741         Don't define.
1742         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1743         MUTEX(%ebp) address in %edx rather than %ecx to
1744         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1745         and __lll_unlock_wake.  Move return value from %ecx to %edx
1746         register.  Use __NR_gettimeofday.
1747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1748         Include lowlevellock.h.
1749         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1750         Don't define.
1751         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1752         MUTEX(%ebp) address in %edx rather than %ecx to
1753         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1754         and __lll_unlock_wake.  Move return value from %ecx to %edx
1755         register.  Use __NR_gettimeofday.
1756         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1757         Include lowlevellock.h.
1758         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1759         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1760         MUTEX(%edi) address in %edx rather than %ecx to
1761         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1762         and __lll_unlock_wake.
1763         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1764         Include lowlevellock.h.
1765         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1766         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1767         MUTEX(%ebx) address in %edx rather than %ecx to
1768         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1769         and __lll_unlock_wake.  Move return value from %ecx to %edx
1770         register.
1771         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1772         lowlevellock.h.
1773         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1774         define.
1775         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1776         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1777         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1778         lowlevellock.h.
1779         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1780         (sem_timedwait): Use __NR_gettimeofday.
1781         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1782         lowlevellock.h.
1783         (LOCK): Don't define.
1784         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1785         lowlevellock.h.
1786         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1787         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1788         are waiters.
1789         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1790         2007-05-2{3,9} changes.
1791         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1792         kernel-features.h and lowlevellock.h.
1793         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1794         (LOAD_FUTEX_WAIT): Rewritten.
1795         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1796         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1797         (__lll_mutex_lock_wait): Rename to ...
1798         (__lll_lock_wait): ... this.  %esi is now private argument.
1799         Don't compile in for libc.so.
1800         (__lll_mutex_timedlock_wait): Rename to ...
1801         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1802         Don't compile in for libc.so.
1803         (__lll_mutex_unlock_wake): Rename to ...
1804         (__lll_unlock_wake): ... this.  %esi contains private argument.
1805         Don't compile in for libc.so.
1806         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1807         kernel-features.h and lowlevellock.h.
1808         (LOAD_FUTEX_WAIT): Define.
1809         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1810         (__lll_robust_mutex_lock_wait): Rename to ...
1811         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1812         Use LOAD_FUTEX_WAIT macro.
1813         (__lll_robust_mutex_timedlock_wait): Rename to ...
1814         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1815         private, use LOAD_FUTEX_WAIT macro.
1816         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1817         lowlevellock.h.
1818         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1819         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1820         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1821         __lll_lock_wait and __lll_unlock_wake.
1822         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1823         Include lowlevellock.h and pthread-errnos.h.
1824         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1825         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1826         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1827         pass LLL_SHARED in %esi to both __lll_lock_wait and
1828         __lll_unlock_wake.
1829         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1830         Include lowlevellock.h and pthread-errnos.h.
1831         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1832         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1833         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1834         pass LLL_SHARED in %esi to both __lll_lock_wait and
1835         __lll_unlock_wake.
1836         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1837         Include lowlevellock.h.
1838         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1839         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1840         pass LLL_SHARED in %esi to both __lll_lock_wait and
1841         __lll_unlock_wake.
1842         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1843         Include lowlevellock.h.
1844         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1845         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1846         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1847         and __lll_unlock_wake.
1848         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1849         Include lowlevellock.h.
1850         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1851         Don't define.
1852         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1853         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1854         and __lll_unlock_wake.
1855         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1856         Include lowlevellock.h.
1857         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1858         Don't define.
1859         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1860         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1861         and __lll_unlock_wake.
1862         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1863         Include lowlevellock.h.
1864         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1865         Don't define.
1866         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1867         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1868         and __lll_unlock_wake.
1869         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1870         Include lowlevellock.h.
1871         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1872         Don't define.
1873         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1874         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1875         and __lll_unlock_wake.
1876         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1877         Include lowlevellock.h.
1878         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1879         Don't define.
1880         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1881         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1882         and __lll_unlock_wake.
1883         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1884         lowlevellock.h.
1885         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1886         define.
1887         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1888         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1889         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1890         lowlevellock.h.
1891         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1892         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1893         lowlevellock.h.
1894         (LOCK): Don't define.
1895         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1896         lowlevellock.h.
1897         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1898         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1899         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1900         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1901         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1902         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1903         (__lll_lock_wait_private): New function.
1904         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1905         it to lll_futex_*wait.  Don't compile in for libc.so.
1906         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1907         Remove.
1908         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1909         (struct sparc_pthread_barrier): Remove.
1910         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1911         struct sparc_pthread_barrier.  Pass
1912         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1913         and lll_futex_wait macros.
1914         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1915         Remove.
1916         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1917         Include sparc pthread_barrier_wait.c instead of generic one.
1919 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1921         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1923         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1924         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1925         %ecx.
1926         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1927         (pthread_rwlock_timedwrlock): Likewise.
1928         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1929         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1931 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1933         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1935 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1937         * tst-locale2.c (useless): Add return statement.
1939 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1941         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1942         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1943         * pthread_create.c (start_thread): Likewise.
1944         * init.c (sighandler_setxid): Likewise.
1945         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1946         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1947         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1948         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1949         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1950         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1951         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1952         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1953         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1954         Likewise.
1955         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1956         Likewise.
1957         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1958         Likewise.
1959         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1960         __rtld_notify): Likewise.
1961         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1962         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1963         __pthread_once): Likewise.
1964         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1965         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1966         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1967         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1968         (lll_futex_wait): Add private argument, define as wrapper around
1969         lll_futex_timed_wait.
1970         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1971         use __lll_private_flag macro.
1972         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1973         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1974         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1975         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1976         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1977         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1978         (lll_futex_wait): Add private argument, define as wrapper around
1979         lll_futex_timed_wait.
1980         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1981         use __lll_private_flag macro.
1982         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1983         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1984         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1985         Define.
1986         (lll_futex_timed_wait, lll_futex_wake): Use it.
1987         (lll_private_futex_wait, lll_private_futex_timed_wait,
1988         lll_private_futex_wake): Removed.
1989         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1990         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1991         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1992         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1993         (lll_futex_wait): Add private argument, define as wrapper around
1994         lll_futex_timed_wait.
1995         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1996         use __lll_private_flag macro.
1997         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1998         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1999         to lll_futex_*.
2000         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2001         (lll_private_futex_wait, lll_private_futex_timed_wait,
2002         lll_private_futex_wake): Removed.
2003         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
2004         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
2005         (lll_private_futex_wait, lll_private_futex_timed_wait,
2006         lll_private_futex_wake): Removed.
2007         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
2008         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
2009         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
2010         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
2011         (lll_futex_wait): Add private argument, define as wrapper around
2012         lll_futex_timed_wait.
2013         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
2014         use __lll_private_flag macro.
2015         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
2016         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
2017         to lll_futex_*.
2018         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
2019         Define.
2020         (lll_futex_timed_wait, lll_futex_wake): Use it.
2021         (lll_private_futex_wait, lll_private_futex_timed_wait,
2022         lll_private_futex_wake): Removed.
2024 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
2026         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
2027         of the structure for sparc32.
2029 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
2031         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
2033 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2035         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2036         code used when private futexes are assumed.
2037         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2038         Likewise.
2040 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
2042         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2043         (__lll_private_flag): Define.
2044         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
2045         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
2046         __lll_private_flag.
2047         (lll_private_futex_wait, lll_private_futex_timedwait,
2048         lll_private_futex_wake): Define as wrapper around non-_private
2049         macros.
2050         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2051         (__lll_private_flag): Define.
2052         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
2053         (lll_private_futex_wait, lll_private_futex_timedwait,
2054         lll_private_futex_wake): Define as wrapper around non-_private
2055         macros.
2057 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
2059         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
2060         parameter to lll_futex_wait call.
2061         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2063         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2064         Replace lll_futex_wait with lll_private_futex_wait.
2065         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2066         Add LLL_SHARED parameter to lll_futex_wake().
2068         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
2069         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
2070         lll_private_futex_wake.
2071         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
2072         bit from private parm before syscall.
2073         (lll_futex_timed_wait): Likewise.
2074         (lll_futex_wake): Likewise.
2075         (lll_futex_wake_unlock): Likewise.
2076         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
2077         (lll_robust_mutex_unlock): Likewise.
2078         (lll_mutex_unlock_force): Likewise.
2079         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
2081 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
2083         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
2084         compilation when unconditionally using private futexes.
2085         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
2086         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2087         Likewise.
2088         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2089         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2091 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
2093         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
2094         Define.
2096 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2098         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
2099         kernel-features.h.
2101 2007-05-16  Roland McGrath  <roland@redhat.com>
2103         * init.c (__nptl_initial_report_events): New variable.
2104         (__pthread_initialize_minimal_internal): Initialize pd->report_events
2105         to that.
2107 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
2109         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
2110         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
2112 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
2114         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
2115         implementation.
2117 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
2119         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
2120         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
2121         * pthread_mutex_timedlock.c: Likewise.
2122         * pthread_mutex_trylock.c: Likewise.
2123         * pthread_mutex_unlock.c: Likewise.
2125 2007-06-17  Andreas Schwab  <schwab@suse.de>
2127         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
2128         sections.
2130 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
2132         * allocatestack.c (allocate_stack): Make code compile if
2133         __ASSUME_PRIVATE_FUTEX is set.
2135 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2137         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
2138         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
2139         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
2140         (__pthread_rwlock_wrlock): Likewise.
2141         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
2142         (pthread_rwlock_timedrdlock): Likewise.
2143         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
2144         (pthread_rwlock_timedwrlock): Likewise.
2145         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
2146         (__pthread_rwlock_unlock): Likewise.
2148 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2150         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
2151         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
2152         Split __flags into __flags, __shared, __pad1 and __pad2.
2153         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
2154         futexes if they are available.
2155         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
2156         in libc-lowlevellock.S allow using private futexes.
2157         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2158         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
2159         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
2160         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
2161         lll_private_futex_timed_wait and lll_private_futex_wake.
2162         (lll_robust_mutex_unlock): Fix typo.
2163         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
2164         field in futex command setup.
2165         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
2166         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
2167         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
2168         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
2169         if they are available.  Remove clear_once_control.
2170         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
2171         futexes if they are available.
2172         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2173         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2174         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2175         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2176         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
2177         Wake only when there are waiters.
2178         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
2179         support.  Indicate that there are waiters.  Remove unnecessary
2180         extra cancellation test.
2181         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
2182         left-over duplication of __sem_wait_cleanup.
2184 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
2186         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
2187         parameter to lll_futex_wait, lll_futex_timed_wait, and
2188         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
2189         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
2190         lll_private_futex_wake.
2191         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2192         * allocatestack.c: Adjust use of lll_futex_* macros.
2193         * init.c: Likewise.
2194         * lowlevellock.h: Likewise.
2195         * pthread_barrier_wait.c: Likewise.
2196         * pthread_cond_broadcast.c: Likewise.
2197         * pthread_cond_destroy.c: Likewise.
2198         * pthread_cond_signal.c: Likewise.
2199         * pthread_cond_timedwait.c: Likewise.
2200         * pthread_cond_wait.c: Likewise.
2201         * pthread_create.c: Likewise.
2202         * pthread_mutex_lock.c: Likewise.
2203         * pthread_mutex_setprioceiling.c: Likewise.
2204         * pthread_mutex_timedlock.c: Likewise.
2205         * pthread_mutex_unlock.c: Likewise.
2206         * pthread_rwlock_timedrdlock.c: Likewise.
2207         * pthread_rwlock_timedwrlock.c: Likewise.
2208         * pthread_rwlock_unlock.c: Likewise.
2209         * sysdeps/alpha/tls.h: Likewise.
2210         * sysdeps/i386/tls.h: Likewise.
2211         * sysdeps/ia64/tls.h: Likewise.
2212         * sysdeps/powerpc/tls.h: Likewise.
2213         * sysdeps/pthread/aio_misc.h: Likewise.
2214         * sysdeps/pthread/gai_misc.h: Likewise.
2215         * sysdeps/s390/tls.h: Likewise.
2216         * sysdeps/sh/tls.h: Likewise.
2217         * sysdeps/sparc/tls.h: Likewise.
2218         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2219         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2220         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2221         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2222         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2223         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2224         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2225         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2226         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2227         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2228         Likewise.
2229         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2230         * sysdeps/x86_64/tls.h: Likewise.
2232 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2234         * pthread_getattr_np.c: No need to install a cancellation handler,
2235         this is no cancellation point.
2236         * pthread_getschedparam.c: Likewise.
2237         * pthread_setschedparam.c: Likewise.
2238         * pthread_setschedprio.c: Likewise.
2239         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2240         lll_unlock_wake_cb.
2241         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2242         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2243         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2244         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2245         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2246         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2247         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2248         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2249         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2250         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2251         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2252         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2254         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2255         whether there are more than one thread makes no sense here since
2256         we only call the slow path if the locks are taken.
2257         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2259         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2260         COND_NWAITERS_SHIFT.
2261         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2262         COND_CLOCK_BITS.
2263         * pthread_cond_init.c: Likewise.
2264         * pthread_cond_timedwait.c: Likewise.
2265         * pthread_cond_wait.c: Likewise.
2266         * pthread_condattr_getclock.c: Likewise.
2267         * pthread_condattr_setclock.c: Likewise.
2268         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2270         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2271         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2272         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2274 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2276         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2277         unistd.h.
2279         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2280         insn suffix.
2281         (THREAD_GSCOPE_GET_FLAG): Remove.
2282         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2283         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2284         changes.
2285         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2286         (THREAD_GSCOPE_GET_FLAG): Remove.
2287         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2288         instead of THREAD_GSCOPE_GET_FLAG.
2289         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2290         it.
2291         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2292         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2293         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2294         THREAD_GSCOPE_WAIT): Define.
2295         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2296         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2297         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2298         THREAD_GSCOPE_WAIT): Define.
2299         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2300         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2301         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2302         THREAD_GSCOPE_WAIT): Define.
2303         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2304         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2305         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2306         THREAD_GSCOPE_WAIT): Define.
2308 2007-05-24  Richard Henderson  <rth@redhat.com>
2310         * descr.h (struct pthread): Add header.gscope_flag.
2311         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2312         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2313         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2314         THREAD_GSCOPE_WAIT): Define.
2316 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2318         * init.c: Make it compile with older kernel headers.
2320         * tst-initializers1.c: Show through exit code which test failed.
2322         * pthread_rwlock_init.c: Also initialize __shared field.
2323         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2324         element in rwlock structure into four byte elements.  One of them is
2325         the new __shared element.
2326         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2327         Likewise.
2328         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2329         __shared, adjust names of other padding elements.
2330         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2331         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2332         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2333         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2334         FUTEX_PRIVATE_FLAG.
2335         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2336         futex to use private operations if possible.
2337         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2338         Likewise.
2339         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2340         Likewise.
2341         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2342         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2344         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2345         Likewise.
2346         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2347         Likewise.
2348         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2349         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2351 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2353         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2354         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2355         * pthread_rwlock_timedrdlock.c: Likewise.
2356         * pthread_rwlock_tryrdlock.c: Likewise.
2358         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2359         optimization.
2361         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2362         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2363         duplication of __sem_wait_cleanup.
2365         * allocatestack.c: Revert last change.
2366         * init.c: Likewise.
2367         * sysdeps/i386/tls.h: Likewise.
2368         * sysdeps/x86_64/tls.h: Likewise.
2369         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2370         header structure.
2371         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2373         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2374         Add private field.
2375         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2376         * pthread_barrier_init.c: Set private flag if pshared and private
2377         futexes are supported.
2378         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2379         private field in futex command setup.
2380         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2382 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2384         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2385         support.
2386         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2387         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2388         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2389         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2390         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2392         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2393         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2394         fields in the structure.
2395         (__old_sem_init): New function.
2396         * sem_open.c: Initialize all fields of the structure.
2397         * sem_getvalue.c: Adjust for renamed element.
2398         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2399         (gen-as-const-headers): Add structsem.sym.
2400         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2401         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2402         struct new_sem.  Add struct old_sem.
2403         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2404         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2405         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2406         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2407         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2408         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2409         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2410         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2411         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2412         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2413         * tst-sem10.c: New file.
2414         * tst-sem11.c: New file.
2415         * tst-sem12.c: New file.
2416         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2417         of struct sem.
2419 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2420             Jakub Jelinek  <jakub@redhat.com>
2422         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2423         Move __pthread_enable_asynccancel right before futex syscall.
2424         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2425         Likewise.
2427 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2429         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2430         THREAD_COPY_PRIVATE_FUTEX): Define.
2431         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2432         THREAD_COPY_PRIVATE_FUTEX): Define.
2433         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2434         * init.c (__pthread_initialize_minimal_internal): Use
2435         THREAD_SET_PRIVATE_FUTEX.
2437         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2438         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2439         THREAD_GSCOPE_FLAG_WAIT): Define.
2440         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2441         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2442         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2443         PTR_DEMANGLE.
2444         (THREAD_GSCOPE_GET_FLAG): Define.
2445         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2446         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2447         instead of ->header.gscope_flag directly.
2449 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2451         * init.c (__pthread_initialize_minimal_internal): Check whether
2452         private futexes are available.
2453         * allocatestack.c (allocate_stack): Copy private_futex field from
2454         current thread into the new stack.
2455         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2456         futexes if they are available.
2457         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2458         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2459         in libc-lowlevellock.S allow using private futexes.
2460         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2461         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2462         FUTEX_PRIVATE_FLAG.
2463         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2464         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2465         if they are available.
2466         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2467         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2468         * sysdeps/i386/tcb-offsets.sym: Likewise.
2469         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2470         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2472 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2474         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2475         Remove ptr_wait_lookup_done again.
2476         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2477         (__pthread_initialize_minimal_internal): Initialize
2478         _dl_wait_lookup_done pointer in _rtld_global directly.
2479         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2480         Remove code to code _dl_wait_lookup_done.
2481         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2482         encrypted for now.
2484 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2486         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2487         pthread_mutex_init failed with ENOTSUP.
2489 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2491         * allocatestack.c (__wait_lookup_done): New function.
2492         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2493         Add ptr_wait_lookup_done.
2494         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2495         * pthreadP.h: Declare __wait_lookup_done.
2496         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2497         Define macros to implement reference handling of global scope.
2498         * sysdeps/x86_64/tls.h: Likewise.
2499         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2500         Initialize GL(dl_wait_lookup_done).
2502 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2504         [BZ #4512]
2505         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2506         is detected.
2507         * pthread_mutex_timedlock.c: Likewise.
2508         * pthread_mutex_trylock.c: Likewise.
2509         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2511         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2512         * tst-robust9.c: New file.
2513         * tst-robustpi9.c: New file.
2515         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2516         unnecessary extra cancellation test.
2518 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2520         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2521         extra cancellation test.
2522         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2524 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2526         * descr.h (struct pthread): Rearrange members to fill hole in
2527         64-bit layout.
2529         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2530         (__pthread_setaffinity_new): If syscall was successful and
2531         RESET_VGETCPU_CACHE is defined, use it before returning.
2532         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2534 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2536         [BZ #4455]
2537         * tst-align2.c: Include stackinfo.h.
2538         * tst-getpid1.c: Likewise.
2540 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2542         [BZ #4455]
2543         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2544         * tst-getpid1.c (do_test): Likewise.
2546         [BZ #4456]
2547         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2548         (allocate_stack): Likewise.
2550 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2552         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2553         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2554         (__lll_robust_timedlock_wait): Likewise.
2555         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2557 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2559         [BZ #4465]
2560         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2561         * tst-cancel4.c (tf_fdatasync): New test.
2563 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2565         [BZ #4392]
2566         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2567         check mutexes like normal mutexes.
2569         [BZ #4306]
2570         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2571         Initialize the whole sigevent structure to appease valgrind.
2573 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2575         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2576         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2578 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2580         * tst-locale1.c: Avoid warnings.
2581         * tst-locale2.c: Likewise.
2583 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2585         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2586         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2588 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2590         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2591         __extern_always_inline where appropriate.
2592         * sysdeps/pthread/pthread.h: Likewise.
2594 2007-03-13  Richard Henderson  <rth@redhat.com>
2596         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2597         separate cfi regions for the two subsections.
2599 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2601         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2602         new thread, don't just decrement it.
2603         Patch by Suzuki K P <suzuki@in.ibm.com>.
2605 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2607         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2608         PTHFCT_CALL definition.
2610 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2612         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2613         available, don't use it.
2615 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2617         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2618         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2619         call into the kernel to delay.
2621 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2623         * tst-initializers1.c: We want to test the initializers as seen
2624         outside of libc, so undefined _LIBC.
2626         * pthread_join.c (cleanup): Avoid warning.
2628 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2631         (__lll_timedwait_tid): Add unwind info.
2633         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2634         function table, mangle the pointers.
2635         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2636         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2637         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2638         demangle pointers before use.
2639         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2640         demangle pointer.
2641         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2642         * sysdeps/pthread/setxid.h: Likewise.
2644 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2646         * tst-rwlock7.c: Show some more information in case of correct
2647         behavior.
2649 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2651         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2652         (lll_futex_timed_wait): Undo part of last change, don't negate
2653         return value.
2655 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2657         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2658         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2660 2006-12-28  David S. Miller  <davem@davemloft.net>
2662         * shlib-versions: Fix sparc64 linux target specification.
2664 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2666         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2667         Adjust include path for pthread_barrier_wait.c move.
2669 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2671         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2672         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2674 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2676         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2677         6 argument cancellable syscalls.
2678         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2679         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2680         6 argument cancellable syscalls.
2681         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2683 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2685         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2686         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2688 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2690         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2691         __sync_lock_release instead of __sync_lock_release_si.
2693 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2695         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2696         Define.
2697         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2698         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2699         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2700         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2701         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2702         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2703         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2704         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2705         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2706         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2707         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2709 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2711         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2712         * pthread_barrier_wait.c: ...here.
2713         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2714         * pthread_cond_broadcast.c: ...here.
2715         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2716         * pthread_cond_signal.c: ...here.
2717         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2718         * pthread_cond_timedwait.c: ...here.
2719         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2720         * pthread_cond_wait.c: ...here.
2721         * sysdeps/pthread/pthread_once.c: Move to...
2722         * pthread_once.c: ...here.
2723         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2724         * pthread_rwlock_rdlock.c: ...here.
2725         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2726         * pthread_rwlock_timedrdlock.c: ...here.
2727         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2728         * pthread_rwlock_timedwrlock.c: ...here.
2729         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2730         * pthread_rwlock_unlock.c: ...here.
2731         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2732         * pthread_rwlock_wrlock.c: ...here.
2733         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2734         * pthread_spin_destroy.c: ...here.
2735         * sysdeps/pthread/pthread_spin_init.c: Move to...
2736         * pthread_spin_init.c: ...here.
2737         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2738         * pthread_spin_unlock.c: ...here.
2739         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2740         * pthread_getcpuclockid.c: ...here.
2742         * init.c: USE_TLS support is now always enabled.
2743         * tst-tls5.h: Likewise.
2744         * sysdeps/alpha/tls.h: Likewise.
2745         * sysdeps/i386/tls.h: Likewise.
2746         * sysdeps/ia64/tls.h: Likewise.
2747         * sysdeps/powerpc/tls.h: Likewise.
2748         * sysdeps/s390/tls.h: Likewise.
2749         * sysdeps/sh/tls.h: Likewise.
2750         * sysdeps/sparc/tls.h: Likewise.
2751         * sysdeps/x86_64/tls.h: Likewise.
2753 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2755         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2756         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2757         failed.
2759         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2760         Define to THREAD_SELF->header.multiple_threads.
2761         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2762         Likewise.
2763         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2764         Likewise.
2765         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2766         (SINGLE_THREAD_P): Likewise.
2767         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2768         (SINGLE_THREAD_P): Likewise.
2769         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2770         (SINGLE_THREAD_P): Likewise.
2771         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2772         (SINGLE_THREAD_P): Likewise.
2773         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2774         Likewise.
2775         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2776         (SINGLE_THREAD_P): Likewise.
2777         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2778         (SINGLE_THREAD_P): Likewise.
2779         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2780         Likewise.
2782 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2784         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2785         by default rather than 2_3_3.
2787 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2789         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2790         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2791         atomic_* instead of catomic_* macros.
2793 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2795         [BZ #3285]
2796         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2797         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2798         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2799         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2800         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2801         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2802         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2803         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2804         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2805         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2806         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2807         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2808         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2810 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2812         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2813         cancelable syscalls with six parameters.
2815         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2816         operations instead of atomic_*.
2818 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2820         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2822 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2824         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2825         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2826         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2827         New file.
2828         * pthread_attr_setstack.c: Allow overwriting the version number of the
2829         new symbol.
2830         * pthread_attr_setstacksize.c: Likewise.
2831         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2832         it.
2833         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2834         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2836 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2838         [BZ #3251]
2839         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2840         Patch by Petr Baudis.
2842 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2844         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2846         * tst-cancel2.c (tf): Loop as long as something was written.
2848 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2850         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2851         mutexes wake all mutexes.
2852         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2853         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2854         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2856 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2858         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2859         to guarantee the thread is always canceled.
2861 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2863         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2864         Include stdlib.h.
2865         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2866         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2867         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2868         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2871 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2873         [BZ #3123]
2874         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2875         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2878         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2879         * Makefile (tests): Add tst-cond22.
2880         * tst-cond22.c: New file.
2882 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2884         [BZ #3124]
2885         * descr.h (struct pthread): Add parent_cancelhandling.
2886         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2887         cancelhandling value to child.
2888         * pthread_create.c (start_thread): If parent thread was canceled
2889         reset the SIGCANCEL mask.
2890         * Makefile (tests): Add tst-cancel25.
2891         * tst-cancel25.c: New file.
2893 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2894             Ulrich Drepper  <drepper@redhat.com>
2896         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2897         counterp if it is already zero.
2898         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2900 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2901             Roland McGrath  <roland@redhat.com>
2903         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2904         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2905         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2906         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2907         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2908         lll_robust_mutex_timedlock, lll_mutex_unlock,
2909         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2910         Add _L_*_ symbols around the subsection.
2911         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2912         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2914 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2915             Roland McGrath  <roland@redhat.com>
2917         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2918         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2919         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2920         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2921         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2922         lll_robust_mutex_timedlock, lll_mutex_unlock,
2923         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2924         Add _L_*_ symbols around the subsection.
2925         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2926         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2928 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2930         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2931         change because it can disturb too much existing code.  If real hard
2932         reader preference is needed we'll introduce another type.
2933         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2934         (pthread_rwlock_timedwrlock): Likewise.
2935         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2936         Likewise.
2938 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2940         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2941         reader preference.
2942         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2943         (pthread_rwlock_timedwrlock): Likewise.
2944         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2945         Likewise.
2947 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2949         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2950         Only define ifdef SHARED.
2952 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2954         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2955         (free_stacks): ...here.
2956         (__free_stack_cache): New function.
2957         * pthreadP.h: Declare __free_stack_cache.
2958         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2959         ptr_freeres.
2960         * init.c (pthread_functions): Initialize ptr_freeres.
2961         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2962         New freeres function.
2964 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2966         [BZ #3018]
2967         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2969 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2971         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2972         _XOPEN_REALTIME_THREADS.
2974 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2976         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2977         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2978         HAVE_CLOCK_GETTIME_VSYSCALL.
2979         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2981 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2983         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2984         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2985         * descr.h (struct priority_protection_data): New type.
2986         (struct pthread): Add tpp field.
2987         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2988         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2989         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2990         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2991         TPP mutexes.
2992         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2993         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2994         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2995         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2996         * tpp.c: New file.
2997         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2998         boosted by TPP.
2999         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3000         * pthread_mutexattr_getprioceiling.c
3001         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
3002         in the SCHED_FIFO priority range.
3003         * pthread_mutexattr_setprioceiling.c
3004         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
3005         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
3006         if mutex is not TPP.  Ceiling is now in __data.__lock.
3007         * pthread_mutex_setprioceiling.c: Include stdbool.h.
3008         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
3009         is now in __data.__lock.  Add locking.
3010         * pthread_create.c (__free_tcb): Free pd->tpp structure.
3011         * Makefile (libpthread-routines): Add tpp.
3012         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
3013         * tst-tpp.h: New file.
3014         * tst-mutexpp1.c: New file.
3015         * tst-mutexpp6.c: New file.
3016         * tst-mutexpp10.c: New file.
3017         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
3018         * tst-mutex6.c (TEST_FUNCTION): Likewise.
3020 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
3022         [BZ #2843]
3023         * pthread_join.c (pthread_join): Account for self being canceled
3024         when checking for deadlocks.
3025         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
3026         (tf1): Don't print anything after pthread_join returns, this would be
3027         another cancellation point.
3028         (tf2): Likewise.
3029         * tst-join6.c: New file.
3030         * Makefile (tests): Add tst-join6.
3032 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
3034         [BZ #2892]
3035         * pthread_setspecific.c (__pthread_setspecific): Check
3036         out-of-range index before checking for unused key.
3038         * sysdeps/pthread/gai_misc.h: New file.
3040 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
3042         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
3043         file.  Don't use sysctl.
3044         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
3045         overwrite the file if this is likely not true.
3047 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
3049         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
3050         * Makefile (tests): Add tst-getpid3.
3051         * tst-getpid3.c: New file.
3053 2006-07-30  Roland McGrath  <roland@redhat.com>
3055         * Makefile (libpthread-routines): Add ptw-sigsuspend.
3057         * sysdeps/unix/sysv/linux/i386/not-cancel.h
3058         (pause_not_cancel): New macro.
3059         (nanosleep_not_cancel): New macro.
3060         (sigsuspend_not_cancel): New macro.
3061         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3062         nanosleep_not_cancel macro from <not-cancel.h>.
3063         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
3064         macro from <not-cancel.h>.
3066 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
3067             Jakub Jelinek  <jakub@redhat.com>
3069         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
3070         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
3071         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
3072         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
3073         * pthread_mutex_init.c: Add support for priority inheritance mutex.
3074         * pthread_mutex_lock.c: Likewise.
3075         * pthread_mutex_timedlock.c: Likewise.
3076         * pthread_mutex_trylock.c: Likewise.
3077         * pthread_mutex_unlock.c: Likewise.
3078         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
3079         all mutexes.
3080         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
3081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
3082         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
3083         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
3084         pthread-pi-defines.sym.
3085         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
3086         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
3087         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3088         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3089         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3090         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3091         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3092         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3093         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3094         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
3095         _POSIX_THREAD_PRIO_INHERIT to 200112L.
3096         * tst-mutex1.c: Adjust to allow use in PI mutex test.
3097         * tst-mutex2.c: Likewise.
3098         * tst-mutex3.c: Likewise.
3099         * tst-mutex4.c: Likewise.
3100         * tst-mutex5.c: Likewise.
3101         * tst-mutex6.c: Likewise.
3102         * tst-mutex7.c: Likewise.
3103         * tst-mutex7a.c: Likewise.
3104         * tst-mutex8.c: Likewise.
3105         * tst-mutex9.c: Likewise.
3106         * tst-robust1.c: Likewise.
3107         * tst-robust7.c: Likewise.
3108         * tst-robust8.c: Likewise.
3109         * tst-mutexpi1.c: New file.
3110         * tst-mutexpi2.c: New file.
3111         * tst-mutexpi3.c: New file.
3112         * tst-mutexpi4.c: New file.
3113         * tst-mutexpi5.c: New file.
3114         * tst-mutexpi6.c: New file.
3115         * tst-mutexpi7.c: New file.
3116         * tst-mutexpi7a.c: New file.
3117         * tst-mutexpi8.c: New file.
3118         * tst-mutexpi9.c: New file.
3119         * tst-robust1.c: New file.
3120         * tst-robust2.c: New file.
3121         * tst-robust3.c: New file.
3122         * tst-robust4.c: New file.
3123         * tst-robust5.c: New file.
3124         * tst-robust6.c: New file.
3125         * tst-robust7.c: New file.
3126         * tst-robust8.c: New file.
3127         * Makefile (tests): Add the new tests.
3129         * pthread_create.c (start_thread): Add some casts to avoid warnings.
3130         * pthread_mutex_destroy.c: Remove unneeded label.
3132 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
3134         * pthread_mutex_init.c (__pthread_mutex_init): Move some
3135         computations to compile time.
3137 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
3139         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
3141 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
3143         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
3145 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
3147         * pthread_key_create.c (__pthread_key_create): Do away with
3148         __pthread_keys_lock.
3150         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3151         (__kernel_cpumask_size): Mark as hidden.
3152         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3154         * sem_open.c (__sem_mappings_lock): Mark as hidden.
3155         * semaphoreP.h (__sem_mappings_lock): Likewise.
3157 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
3159         * pthread_atfork.c: Mark __dso_handle as hidden.
3161 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
3163         [BZ #2644]
3164         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
3165         the reload problem.  Change the one path in pthread_cancel_init
3166         which causes the problem.  Force gcc to reload.  Simplify callers.
3167         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
3168         (_Unwind_GetBSP): Undo last patch.
3170 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
3172         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
3173         function pointer is reloaded after pthread_cancel_init calls.
3175         [BZ #2644]
3176         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
3177         pointers are reloaded after pthread_cancel_init calls.
3179 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
3181         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
3182         __always_inline.
3184 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
3186         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3187         Allocate new object which is passed to timer_sigev_thread so that
3188         the timer can be deleted before the new thread is scheduled.
3190 2006-04-26  Roland McGrath  <roland@redhat.com>
3192         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
3194 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
3196         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
3197         suffix for conditional jumps.
3198         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
3199         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3200         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
3201         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
3202         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3203         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3205         * init.c (sigcancel_handler): Compare with correct PID even if the
3206         thread is in the middle of a fork call.
3207         (sighandler_setxid): Likewise.
3208         Reported by Suzuki K P <suzuki@in.ibm.com> .
3210 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
3212         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
3214 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
3216         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3217         fails [Coverity CID 105].
3219 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3221         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3223 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3225         [BZ #2505]
3226         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3227         Define __lll_rel_instr using lwsync.
3229 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3231         * allocatestack.c (allocate_stack): Always initialize robust_head.
3232         * descr.h: Define struct robust_list_head.
3233         (struct pthread): Use robust_list_head in robust mutex list definition.
3234         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3235         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3236         (__pthread_initialize_minimal_internal): Register robust_list with
3237         the kernel.
3238         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3239         Declare __set_robust_list_avail.
3240         * pthread_create.c (start_thread): Register robust_list of new thread.
3241         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3242         waiters.
3243         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3244         number of users, it's unreliable.
3245         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3246         set_robust_list syscall is available.
3247         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3248         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3249         Set robust_head.list_op_pending before trying to lock a robust mutex.
3250         * pthread_mutex_timedlock.c: Likewise.
3251         * pthread_mutex_trylock.c: Likewise.
3252         * pthread_mutex_unlock.c: Likewise for unlocking.
3253         * Makefile (tests): Add tst-robust8.
3254         * tst-robust8.c: New file.
3256 2006-03-08  Andreas Schwab  <schwab@suse.de>
3258         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3259         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3261 2006-03-05  Roland McGrath  <roland@redhat.com>
3263         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3264         and $config_os doesn't match *linux*.
3266 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3268         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3269         Use __syscall_error.
3270         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3271         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3272         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3273         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3274         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3275         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3277 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3279         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3281 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3283         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3284         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3285         mutex.
3286         (__lll_robust_timedlock_wait): Likewise.
3287         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3288         (__lll_robust_lock_wait): Likewise.
3289         (__lll_robust_timedlock_wait): Likewise.
3290         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3291         (__lll_robust_lock_wait): Likewise.
3292         (__lll_robust_timedlock_wait): Likewise.
3294 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3296         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3297         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3298         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3299         lll_robust_mutex_unlock): Define.
3300         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3302 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3304         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3305         instead of <clone.S>.
3307 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3309         * Makefile (libpthread-routines): Add
3310         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3311         and pthread_mutex_[sg]etprioceiling.
3312         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3313         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3314         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3315         pthread_mutex_setprioceiling.
3316         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3317         PTHREAD_PRIO_PROTECT): New enum values.
3318         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3319         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3320         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3321         prototypes.
3322         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3323         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3324         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3325         Define.
3326         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3327         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3328         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3329         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3330         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3331         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3332         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3333         protocol mutexes.
3334         * pthread_mutex_getprioceiling.c: New file.
3335         * pthread_mutex_setprioceiling.c: New file.
3336         * pthread_mutexattr_getprioceiling.c: New file.
3337         * pthread_mutexattr_setprioceiling.c: New file.
3338         * pthread_mutexattr_getprotocol.c: New file.
3339         * pthread_mutexattr_setprotocol.c: New file.
3341 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3343         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3345 2006-02-27  Roland McGrath  <roland@redhat.com>
3347         * sysdeps/pthread/Subdirs: List nptl here too.
3348         * configure (libc_add_on_canonical): New variable.
3350         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3352         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3353         self to get main source tree's file.
3354         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3355         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3356         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3357         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3358         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3359         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3360         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3361         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3362         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3363         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3364         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3365         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3366         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3368         * Makefile: Use $(sysdirs) in vpath directive.
3370         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3371         (CPPFLAGS-timer_routines.c): Likewise.
3373         * Makeconfig (includes): Variable removed.
3375 2006-02-26  Roland McGrath  <roland@redhat.com>
3377         * sysdeps/generic/pt-raise.c: Moved to ...
3378         * pt-raise.c: ... here.
3379         * sysdeps/generic/lowlevellock.h: Moved to ...
3380         * lowlevellock.h: ... here.
3382 2006-02-23  Roland McGrath  <roland@redhat.com>
3384         * descr.h (struct pthread): Add final member `end_padding'.
3385         (PTHREAD_STRUCT_END_PADDING): Use it.
3387 2006-02-20  Roland McGrath  <roland@redhat.com>
3389         * sysdeps/mips: Directory removed, saved in ports repository.
3390         * sysdeps/unix/sysv/linux/mips: Likewise.
3392 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3394         * tst-robust1.c: Add second mutex to check that the mutex list is
3395         handled correctly.
3397 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3399         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3400         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3401         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3402         lll_robust_mutex_unlock): New macros.
3403         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3404         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3405         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3406         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3407         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3409 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3411         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3412         definitions.
3413         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3415 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3417         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3418         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3419         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3420         (lll_robust_mutex_unlock): Likewise.
3422 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3424         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3425         Set robust_list.__next rather than robust_list.
3426         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3427         (__pthread_list_t): New typedef.
3428         (pthread_mutex_t): Replace __next and __prev fields with __list.
3429         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3430         (__pthread_list_t): New typedef.
3431         (pthread_mutex_t): Replace __next and __prev fields with __list.
3432         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3433         (__pthread_list_t, __pthread_slist_t): New typedefs.
3434         (pthread_mutex_t): Replace __next and __prev fields with __list.
3435         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3436         (__pthread_list_t, __pthread_slist_t): New typedefs.
3437         (pthread_mutex_t): Replace __next and __prev fields with __list.
3438         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3439         (__pthread_list_t, __pthread_slist_t): New typedefs.
3440         (pthread_mutex_t): Replace __next and __prev fields with __list.
3441         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3442         (__pthread_slist_t): New typedef.
3443         (pthread_mutex_t): Replace __next field with __list.
3445 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3447         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3448         PTHREAD_MUTEX_OWNERDEAD.
3449         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3450         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3451         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3452         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3453         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3454         to PTHREAD_MUTEX_INCONSISTENT.
3455         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3456         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3457         * pthread_mutex_trylock.c: Likewise.
3458         * pthread_mutex_timedlock.c: Likewise.
3459         * pthread_mutex_unlock.c: Likewise.
3460         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3461         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3462         lowlevelrobustlock.sym.
3463         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3464         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3465         definitions.
3466         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3467         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3468         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3469         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3470         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3472 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3474         * allocatestack.c (allocate_stack): Initialize robust_list.
3475         * init.c (__pthread_initialize_minimal_internal): Likewise.
3476         * descr.h (struct xid_command): Pretty printing.
3477         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3478         robust_list.  Adjust macros.
3479         * pthread_create.c (start_thread): Adjust robust_list handling.
3480         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3481         but the owner for all robust mutex types.
3482         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3483         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3484         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3485         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3487         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3488         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3490 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3492         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3493         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3495 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3497         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3498         Return status.
3499         (lll_futex_timed_wait): Define.
3501 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3503         * tst-cancel4.c: Test ppoll.
3505 2006-01-18  Andreas Jaeger  <aj@suse.de>
3507         [BZ #2167]
3508         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3509         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3510         by Jim Gifford <patches@jg555.com>.
3512 2006-01-13  Richard Henderson  <rth@redhat.com>
3514         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3516 2006-01-10  Roland McGrath  <roland@redhat.com>
3518         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3519         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3520         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3521         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3522         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3523         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3524         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3525         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3526         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3527         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3529 2006-01-09  Roland McGrath  <roland@redhat.com>
3531         * tst-initializers1-c89.c: New file.
3532         * tst-initializers1-c99.c: New file.
3533         * tst-initializers1-gnu89.c: New file.
3534         * tst-initializers1-gnu99.c: New file.
3535         * Makefile (tests): Add them.
3536         (CFLAGS-tst-initializers1-c89.c): New variable.
3537         (CFLAGS-tst-initializers1-c99.c): New variable.
3538         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3539         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3541         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3542         Use __extension__ on anonymous union definition.
3543         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3544         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3545         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3546         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3547         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3549 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3551         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3552         Don't give the union a name because it changes the mangled name.
3553         Instead name the struct for __data.
3554         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3555         Likewise.
3556         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3557         Likewise.
3559 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3561         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3562         stack bias to mc_ftp field.
3564 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3566         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3567         being too clever and reloading the futex value where it shouldn't.
3569 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3571         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3572         correct type.
3574 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3576         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3577         Add cfi directives.
3579 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3581         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3582         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3583         rename in tcbhead_t.
3585         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3586         Don't give the union a name because it changes the mangled name.
3587         Instead name the struct for __data.
3588         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3589         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3590         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3591         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3592         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3593         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3595 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3597         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3598         Return status.
3599         (lll_futex_timed_wait): Define.
3600         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3601         * sysdeps/pthread/aio_misc.h: New file.
3603 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3605         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3607 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3609         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3610         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3611         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3613 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3615         * tst-cancel24.cc: Use C headers instead of C++ headers.
3617 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3619         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3620         sparc-linux configured glibc.
3621         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3622         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3623         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3624         atomic_compare_and_exchange_val_24_acq instead of
3625         atomic_compare_and_exchange_val_acq.
3626         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3627         instead of atomic_exchange_rel.
3628         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3629         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3630         file.
3631         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3632         file.
3633         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3634         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3635         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3636         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3637         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3638         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3639         New file.
3640         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3641         New file.
3642         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3643         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3644         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3645         file.
3646         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3647         file.
3648         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3650 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3652         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3653         mutex initializers.
3655 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3657         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3658         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3659         THREAD_COPY_POINTER_GUARD): Define.
3660         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3661         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3663 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3665         * version.c: Update copyright year.
3667 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3669         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3670         .eh_frame section, use cfi_* directives.
3671         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3673 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3675         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3676         now.
3678 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3680         * sysdeps/pthread/sigaction.c: Removed.
3681         * sigaction.c: New file.
3682         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3684 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3686         * Makefile (tests): Add tst-signal7.
3687         * tst-signal7.c: New file.
3689 2005-12-27  Roland McGrath  <roland@redhat.com>
3691         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3692         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3693         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3694         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3695         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3696         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3697         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3698         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3699         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3700         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3701         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3703 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3705         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3706         and __prev field to pthread_mutex_t.
3707         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3708         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3709         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3710         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3711         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3712         to pthread_mutex_t.
3714 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3716         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3717         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3718         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3719         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3720         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3721         and PTHREAD_MUTEXATTR_FLAG_BITS.
3722         * descr.h (struct pthread): Add robust_list field and define
3723         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3724         * pthread_mutexattr_getrobust.c: New file.
3725         * pthread_mutexattr_setrobust.c: New file.
3726         * pthread_mutex_consistent.c: New file.
3727         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3728         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3729         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3730         Adjust pthread_mutex_t initializers.
3731         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3732         field to pthread_mutex_t.
3733         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3734         and __prev field to pthread_mutex_t.
3735         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3736         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3737         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3738         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3739         * pthread_mutexattr_gettype.c: Likewise.
3740         * pthread_mutexattr_setpshared.c: Likewise.
3741         * pthread_mutexattr_settype.c: Likewise.
3742         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3743         Initialize mutex kind according to robust flag.
3744         * pthread_mutex_lock.c: Implement local robust mutex.
3745         * pthread_mutex_timedlock.c: Likewise.
3746         * pthread_mutex_trylock.c: Likewise.
3747         * pthread_mutex_unlock.c: Likewise.
3748         * pthread_create.c (start_thread): Mark robust mutexes which remained
3749         locked as dead.
3750         * tst-robust1.c: New file.
3751         * tst-robust2.c: New file.
3752         * tst-robust3.c: New file.
3753         * tst-robust4.c: New file.
3754         * tst-robust5.c: New file.
3755         * tst-robust6.c: New file.
3756         * tst-robust7.c: New file.
3757         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3758         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3759         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3760         tst-robust5, tst-robust6, and tst-robust7.
3762         * tst-typesizes.c: New file.
3763         * Makefile (tests): Add tst-typesizes.
3765         * tst-once3.c: More debug output.
3767 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3769         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3770         missing after last change.
3772         * version.c: Update copyright year.
3774 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3776         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3777         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3778         * pthread_mutex_trylock.c: Likewise.
3779         * pthread_mutex_timedlock.c: Likewise.
3780         * pthread_mutex_unlock.c: Likewise.
3782 2005-12-22  Roland McGrath  <roland@redhat.com>
3784         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3785         so that #include_next's search location is not reset to the -I..
3786         directory where <nptl/...> can be found.
3788 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3790         [BZ #1913]
3791         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3792         Fix unwind info.  Remove useless branch prediction prefix.
3793         * tst-cancel24.cc: New file.
3794         * Makefile: Add rules to build and run tst-cancel24.
3796 2005-12-21  Roland McGrath  <roland@redhat.com>
3798         * libc-cancellation.c: Use <> rather than "" #includes.
3799         * pt-cleanup.c: Likewise.
3800         * pthread_create.c: Likewise.
3801         * pthread_join.c: Likewise.
3802         * pthread_timedjoin.c: Likewise.
3803         * pthread_tryjoin.c: Likewise.
3804         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3805         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3806         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3807         * unwind.c: Likewise.
3809 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3811         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3812         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3813         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3814         THREAD_COPY_POINTER_GUARD): Define.
3816 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3818         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3819         rather than one.
3820         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3821         THREAD_COPY_POINTER_GUARD): Define.
3822         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3823         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3824         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3825         THREAD_COPY_POINTER_GUARD): Define.
3826         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3827         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3828         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3829         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3830         Use PTR_DEMANGLE for B0 if defined.
3832 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3834         * pthread_create.c (__pthread_create_2_1): Use
3835         THREAD_COPY_POINTER_GUARD if available.
3836         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3837         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3838         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3839         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3840         * sysdeps/x86_64/tls.h: Likewise.
3842 2005-12-15  Roland McGrath  <roland@redhat.com>
3844         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3846 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3848         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3849         sysdeps/generic.
3850         * errno-loc.c: New file.
3852 2005-12-12  Roland McGrath  <roland@redhat.com>
3854         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3855         adjustments before choosing stack size.  Update minimum stack size
3856         calculation to match allocate_stack change.
3858 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3860         * allocatestack.c (allocate_stack): Don't demand that there is an
3861         additional full page available on the stack beside guard, TLS, the
3862         minimum stack.
3864 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3866         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3867         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3869         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3870         compiling 32-bit code we must define __cleanup_fct_attribute.
3872 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3874         [BZ #1920]
3875         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3876         __attribute__ instead of __attribute.
3877         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3878         (__cleanup_fct_attribute): Likewise.
3880 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3882         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3883         a write barrier before writing libgcc_s_getcfa.
3885 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3887         * sysdeps/unix/sysv/linux/configure: Removed.
3889 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3891         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3892         optional init_array/fini_array support.
3894 2005-10-24  Roland McGrath  <roland@redhat.com>
3896         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3897         versioned_symbol use.
3899 2005-10-16  Roland McGrath  <roland@redhat.com>
3901         * init.c (__pthread_initialize_minimal_internal): Even when using a
3902         compile-time default stack size, apply the minimum that allocate_stack
3903         will require, and round up to page size.
3905 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3907         * Makefile ($(test-modules)): Remove static pattern rule.
3909 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3910             Ulrich Drepper  <drepper@redhat.com>
3912         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3913         alignment in callback function.
3914         * Makefile: Add rules to build and run tst-align3.
3915         * tst-align3.c: New file.
3917 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3919         * allocatestack.c (setxid_signal_thread): Add
3920         INTERNAL_SYSCALL_DECL (err).
3922 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3924         * allocatestack.c (setxid_signal_thread): Need to use
3925         atomic_compare_and_exchange_bool_acq.
3927 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3928             Jakub Jelinek  <jakub@redhat.com>
3930         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3931         CANCEL_RESTMASK.
3932         (struct pthread): Move specific_used field to avoid padding.
3933         Add setxid_futex field.
3934         * init.c (sighandler_setxid): Reset setxid flag and release the
3935         setxid futex.
3936         * allocatestack.c (setxid_signal_thread): New function.  Broken
3937         out of the bodies of the two loops in __nptl_setxid.  For undetached
3938         threads check whether they are exiting and if yes, don't send a signal.
3939         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3940         * pthread_create.c (start_thread): For undetached threads, check
3941         whether setxid bit is set.  If yes, wait until signal has been
3942         processed.
3944         * allocatestack.c (STACK_VARIABLES): Initialize them.
3945         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3947 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3949         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3950         waiters, awake all waiters on the associated mutex.
3952 2005-09-22  Roland McGrath  <roland@redhat.com>
3954         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3955         ../sysdeps/x86_64/hp-timing.h).
3957 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3959         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3960         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3961         (lll_futex_wake_unlock): Define.
3962         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3963         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3964         (lll_futex_wake_unlock): Define.
3965         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3966         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3967         (lll_futex_wake_unlock): Define.
3968         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3969         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3970         (lll_futex_wake_unlock): Define.
3971         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3972         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3973         (lll_futex_wake_unlock): Define.
3974         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3975         lll_futex_wake_unlock.
3976         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3977         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3978         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3979         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3980         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3981         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3983 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3985         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3986         Fix typo in register name.
3988 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3990         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3991         Use __sigfillset.  Document that sigfillset does the right thing wrt
3992         to SIGSETXID.
3994 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3996         [BZ #1102]
3997         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3998         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3999         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
4000         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
4001         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
4002         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
4003         in the structure.
4004         * Makefile (tests): Add tst-initializers1.
4005         (CFLAGS-tst-initializers1.c): Set.
4006         * tst-initializers1.c: New test.
4008 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
4010         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
4011         Make sure __flags are located at offset 48 from the start of the
4012         structure.
4014 2005-07-02  Roland McGrath  <roland@redhat.com>
4016         * Makeconfig: Comment fix.
4018 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
4020         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
4021         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
4022         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
4023         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
4024         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4025         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4026         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
4027         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
4028         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
4029         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
4031 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
4033         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
4034         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4035         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
4036         fields.
4037         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4038         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
4039         field.  Put in sysinfo field unconditionally.
4040         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4041         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
4042         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4043         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
4044         fields.
4045         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
4046         * pthread_create.c (__pthread_create_2_1): Use
4047         THREAD_COPY_STACK_GUARD macro.
4048         * Makefile: Add rules to build and run tst-stackguard1{,-static}
4049         tests.
4050         * tst-stackguard1.c: New file.
4051         * tst-stackguard1-static.c: New file.
4053 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
4055         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
4056         Invoke CGOTSETUP and CGOTRESTORE.
4057         (CGOTSETUP, CGOTRESTORE): Define.
4059 2005-05-29  Richard Henderson  <rth@redhat.com>
4061         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
4062         (tf_write, tf_writev): Use it.
4063         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
4064         the system minimum.
4066 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
4068         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4069         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
4070         __librt_*_asynccancel@local.
4072 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
4074         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
4075         all occurrences of JUMPTARGET.  Instead append @local to labels.
4077 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
4079         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
4080         size/alignment of struct pthread rather than tcbhead_t.
4081         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4082         Likewise.
4083         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4084         Likewise.
4085         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
4086         Likewise.
4088 2005-05-19  Richard Henderson  <rth@redhat.com>
4090         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
4091         __sync_val_compare_and_swap, not explicit _si variant.
4092         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
4094 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
4096         [BZ #915]
4097         * sysdeps/pthread/pthread.h: Avoid empty initializers.
4099 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
4101         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
4102         .eh_frame section, use cfi_* directives.
4104 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
4106         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
4107         of "" includes.
4109 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
4111         [BZ #1075]
4112         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
4113         aio_write blocks.
4115 2005-04-27  Roland McGrath  <roland@redhat.com>
4117         * Makefile (tests): Remove tst-clock2.
4119         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
4120         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
4121         translating to the kernel clockid_t for our own process/thread clock.
4123         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
4125 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
4127         * old_pthread_cond_init.c: Include <errno.h>.
4128         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
4129         process shared or uses clock other than CLOCK_REALTIME.
4130         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
4132 2005-04-13  David S. Miller  <davem@davemloft.net>
4134         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
4135         * sysdeps/sparc/sparc64/clone.S: New file.
4137 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
4139         [BZ #1102]
4140         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
4141         __inline instead of inline.
4142         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
4144 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
4146         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
4147         functionally equivalent, but shorter instructions.
4148         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4149         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4150         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4151         Likewise.
4152         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4153         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4154         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4155         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4157         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
4158         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4159         Likewise.
4160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4161         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4162         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4163         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4164         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4166 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
4168         * sysdeps/mips/Makefile: New file.
4169         * sysdeps/mips/nptl-sysdep.S: New file.
4170         * sysdeps/mips/tcb-offsets.sym: New file.
4171         * sysdeps/mips/pthread_spin_lock.S: New file.
4172         * sysdeps/mips/pthread_spin_trylock.S: New file.
4173         * sysdeps/mips/pthreaddef.h: New file.
4174         * sysdeps/mips/tls.h: New file.
4175         * sysdeps/mips/jmpbuf-unwind.h: New file.
4176         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
4177         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
4178         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
4179         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
4180         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
4181         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
4182         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
4183         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
4184         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
4185         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
4187 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
4189         [BZ #1112]
4190         * pthread_create.c (__pthread_create_2_1): Rename syscall error
4191         variable to scerr.
4193 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
4195         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
4197 2005-02-25  Roland McGrath  <roland@redhat.com>
4199         * alloca_cutoff.c: Correct license text.
4200         * tst-unload.c: Likewise.
4201         * sysdeps/pthread/allocalim.h: Likewise.
4202         * sysdeps/pthread/pt-initfini.c: Likewise.
4203         * sysdeps/pthread/bits/libc-lock.h: Likewise.
4204         * sysdeps/pthread/bits/sigthread.h: Likewise.
4205         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
4206         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
4208 2005-02-16  Roland McGrath  <roland@redhat.com>
4210         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4211         Use unsigned int * for ptr_nthreads.
4213 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
4215         [BZ #721]
4216         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4217         gcc4.
4219 2005-02-07  Richard Henderson  <rth@redhat.com>
4221         [BZ #787]
4222         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4223         argument.
4225 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4227         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4228         order of arguments in invocation of atomic_add_zero.
4230 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4232         [BZ #737]
4233         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4234         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4235         at least gotntpoff relocation and addition.
4236         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4237         Likewise.
4238         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4239         Likewise.
4240         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4241         Likewise.
4243 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4245         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4246         entry for static tls deallocation fix.
4247         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4248         also contains information whether the memory pointed to is static
4249         TLS or not.
4250         * sysdeps/i386/tls.h: Likewise.
4251         * sysdeps/ia64/tls.h: Likewise.
4252         * sysdeps/powerpc/tls.h: Likewise.
4253         * sysdeps/s390/tls.h: Likewise.
4254         * sysdeps/sh/tls.h: Likewise.
4255         * sysdeps/sparc/tls.h: Likewise.
4256         * sysdeps/x86_64/tls.h: Likewise.
4258 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4260         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4262 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4264         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4265         %esp.
4266         * Makefile (tests): Add tst-align2.
4267         * tst-align2.c: New test.
4268         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4269         -mpreferred-stack-boundary=4.
4271 2004-12-18  Roland McGrath  <roland@redhat.com>
4273         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4274         New file removed withdrawn for the moment.
4276 2004-12-17  Richard Henderson  <rth@redhat.com>
4278         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4279         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4281 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4283         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4284         Increased PTHREAD_STACK_MIN.
4286         * tst-context1.c (stacks): Use bigger stack size.
4288 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4290         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4291         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4293 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4295         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4296         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4297         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4299 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4301         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4303 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4305         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4306         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4308         * tst-getpid1.c: If child crashes, report this first.  Print which
4309         signal.
4311 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4313         * init.c (__pthread_initialize_minimal_internal): Also unblock
4314         SIGSETXID.
4316 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4318         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4319         _POSIX_THREAD_CPUTIME): Define to 0.
4320         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4321         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4322         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4323         __timer_signal_thread_tclk): Remove.
4324         (init_module): Remove their initialization.
4325         (thread_cleanup): Remove their cleanup assertions.
4326         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4327         __timer_signal_thread_tclk): Remove.
4328         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4329         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4330         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4332 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4334         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4335         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4337         * Makefile (tests): Add tst-getpid2.
4338         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4339         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4340         * tst-getpid2.c: New test.
4342 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4344         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4346 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4348         * Makefile (tests): Add tst-getpid1.
4349         * tst-getpid1.c: New file.
4350         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4351         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4353 2004-12-02  Roland McGrath  <roland@redhat.com>
4355         * Makefile (libpthread-nonshared): Variable removed.
4356         ($(objpfx)libpthread_nonshared.a): Target removed.
4357         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4358         These are now handled by generic magic from
4359         libpthread-static-only-routines being set.
4361 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4363         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4364         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4365         _POSIX_THREAD_PRIO_PROTECT): Define.
4366         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4367         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4368         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4370 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4372         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4373         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4374         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4375         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4376         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4377         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4378         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4380 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4382         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4384         * Makefile (libpthread-routines): Add pthread_setschedprio.
4385         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4386         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4387         * pthread_setschedprio.c: New file.
4389 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4391         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4392         * pthread_cancel.c (pthread_create): Likewise.
4394         * Makefile (libpthread-routines): Add vars.
4395         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4396         * init.c (__default_stacksize, __is_smp): Remove.
4397         * vars.c: New file.
4398         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4399         and define a wrapper macro.
4400         (PTHREAD_STATIC_FN_REQUIRE): Define.
4401         * allocatestack.c (__find_thread_by_id): Undefine.
4402         * pthread_create (__pthread_keys): Remove.
4403         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4404         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4405         PTHREAD_STATIC_FN_REQUIRE.
4407 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4409         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4410         parameter to REGISTER macro.
4412 2004-11-17  Roland McGrath  <roland@redhat.com>
4414         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4415         Make sure SIGCANCEL is blocked as well.
4417 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4419         * sysdeps/pthread/setxid.h: New file.
4420         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4421         (struct xid_command): Add forward decl.
4422         (struct pthread_functions): Change return type of __nptl_setxid hook
4423         to int.
4424         * pthreadP.h (__nptl_setxid): Change return type to int.
4425         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4426         calling thread, return its return value and set errno on failure.
4427         * descr.h (struct xid_command): Change id type to long array.
4429         * Makefile: Add rules to build and test tst-setuid1 and
4430         tst-setuid1-static.
4431         * tst-setuid1.c: New test.
4432         * tst-setuid1-static.c: New test.
4434 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4436         * Makefile (tests): Add tst-exit3.
4437         * tst-exit3.c: New test.
4439 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4441         * Makefile (tests): Add tst-exit2.
4442         * tst-exit2.c: New file.
4444 2004-11-09  Roland McGrath  <roland@redhat.com>
4446         [BZ #530]
4447         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4448         here, before calling clone.
4449         * pthread_create.c (start_thread): Don't do it here.
4451 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4453         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4455 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4457         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4458         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4459         assembler warning.
4461 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4463         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4464         if sched_priority is not between minprio and maxprio.
4466 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4468         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4469         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4471         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4472         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4474 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4476         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4477         not-cancelable I/O functions.
4479 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4481         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4482         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4483         make sure 2 is stored in the futex and we looked at the old value.
4484         Fix a few other problems to return the correct value.
4486 2004-10-14  Richard Henderson  <rth@redhat.com>
4488         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4489         make gcc4 happy.
4491 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4493         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4494         of pthread-functions.h and pthreaddef.h.
4495         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4497         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4498         Change __data.__nwaiters from int to unsigned int.
4500         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4501         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4503         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4504         before return type.
4506         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4507         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4509 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4511         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4512         test fails, remove message queue.
4513         (tf_msgsnd): Likewise.
4515 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4517         * tst-clock1.c: Change #ifdef to #if defined.
4518         * tst-clock2.c: Likewise.
4519         * tst-cond11.c: Likewise.
4521         * sysdeps/pthread/timer_create.c (timer_create): Use
4522         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4523         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4524         THREAD_CPUTIME.
4526 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4528         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4529         _POSIX_THREAD_CPUTIME): Define to 0.
4531 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4533         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4534         and _POSIX_THREAD_CPUTIME to zero.
4535         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4536         * tst-barrier2.c: Fix testing for POSIX feature.
4537         * tst-clock1.c: Likewise.
4538         * tst-clock2.c: Likewise.
4539         * tst-cond11.c: Likewise.
4540         * tst-cond4.c: Likewise.
4541         * tst-cond6.c: Likewise.
4542         * tst-flock2.c: Likewise.
4543         * tst-mutex4.c: Likewise.
4544         * tst-mutex9.c: Likewise.
4545         * tst-rwlock12.c: Likewise.
4546         * tst-rwlock4.c: Likewise.
4547         * tst-signal1.c: Likewise.
4548         * tst-spin2.c: Likewise.
4549         * sysdeps/pthread/posix-timer.h: Likewise.
4550         * sysdeps/pthread/timer_create.c: Likewise.
4551         * sysdeps/pthread/timer_routines.c: Likewise.
4553 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4555         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4556         (__lll_mutex_timedlock_wait): Address futex correctly.
4558         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4559         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4560         make sure 2 is stored in the futex and we looked at the old value.
4561         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4562         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4563         which might very well made the code not working at all before.
4564         [BZ #417]
4566 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4568         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4569         allow SIGSETXID to be sent.
4570         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4571         for SIGSETXID to be defined.
4572         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4573         SIGSETXID cannot be blocked.
4575         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4576         Add __extension__ to long long types.
4577         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4578         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4579         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4580         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4581         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4582         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4583         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4585 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4587         * descr.h (struct pthread): Add stopped_start field.
4588         * sysdeps/pthread/createthread.c (create_thread): Set
4589         start_stopped flag in descriptor for new thread appropriately.
4590         * pthread_create.c (start_thread): Only take lock to be stopped on
4591         startup if stopped_start flag says so.
4593 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4595         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4596         is created detached and if yes, do not try to free the stack in case
4597         the thread creation failed.
4598         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4599         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4600         case there has been no error.  [BZ #405]
4602         * pthread_create.c (start_thread): Don't wait for scheduler data
4603         etc to be set at the beginning of the function.  The cancellation
4604         infrastructure must have been set up.  And enable async
4605         cancellation before potentially going to sleep.  [BZ #401]
4607 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4609         * Versions: Remove exports for pthread_set*id_np functions.
4610         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4611         for now.
4612         * Makefile: Don't build pthread_set*id code for now.
4614 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4616         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4617         internal use.
4618         * allocatestack.c (__nptl_setxid): New function.
4619         * descr.h (struct xid_command): Define type.
4620         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4621         (sighandler_setxid): New function.
4622         (__pthread_initialize_minimal): Register sighandler_setxid for
4623         SIGCANCEL.
4624         * pt-allocrtsig.c: Update comment.
4625         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4626         Declare __nptl_setxid.
4627         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4628         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4629         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4630         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4631         and pthread_setresuid_np.
4632         * pthread_setgid_np.c: New file.
4633         * pthread_setuid_np.c: New file.
4634         * pthread_setegid_np.c: New file.
4635         * pthread_seteuid_np.c: New file.
4636         * pthread_setregid_np.c: New file.
4637         * pthread_setreuid_np.c: New file.
4638         * pthread_setresgid_np.c: New file.
4639         * pthread_setresuid_np.c: New file.
4640         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4641         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4642         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4643         and pthread_setresuid_np.
4644         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4645         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4646         pthread_setregid, and pthread_setresgid.
4648 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4650         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4651         ENOMEM when out of memory.
4653 2004-09-10  Roland McGrath  <roland@redhat.com>
4655         [BZ #379]
4656         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4657         code, since we don't try to use the broken CLONE_STOPPED any more.
4658         * pthread_create.c (start_thread): Likewise.
4660 2004-09-15  Richard Henderson  <rth@redhat.com>
4662         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4664 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4666         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4667         (__libc_unwind_longjmp): Delete macro and declare as function.
4668         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4669         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4670         nptl directory.
4671         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4672         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4673         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4675 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4677         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4678         for __USE_XOPEN2K.
4679         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4680         types also for __USE_XOPEN2K.
4681         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4682         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4683         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4684         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4685         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4686         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4687         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4688         [BZ #320]
4690 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4692         * sysdeps/pthread/pthread.h
4693         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4694         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4695         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4696         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4697         [BZ #375]
4699 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4701         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4702         PSEUDO to be used with . prefix.
4704         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4705         Use atomic_increment instead of atomic_exchange_and_add.
4706         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4707         Likewise.
4708         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4709         Likewise.
4710         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4711         Likewise.
4713         * allocatestack.c (allocate_stack): Use atomic_increment_val
4714         instead of atomic_exchange_and_add.
4715         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4716         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4717         Likewise.
4718         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4719         Likewise.
4721         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4722         the initialization function might throw.
4724 2005-09-05  Richard Henderson  <rth@redhat.com>
4726         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4727         Move definition inside libpthread, libc, librt check.  Provide
4728         definition for rtld.
4730 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4732         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4733         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4734         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4735         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4736         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4737         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4738         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4739         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4740         * unwind.c: Use it.
4742         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4743         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4744         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4745         Likewise.
4746         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4747         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4748         this is the last waiter, signal pthread_cond_destroy caller and
4749         avoid using the pthread_cond_t structure after unlock.
4750         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4751         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4752         Read clock type from the least significant bits of __nwaiters instead
4753         of __clock.
4754         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4755         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4757 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4759         [BZ #342]
4760         * Makefile (tests): Add tst-cond20 and tst-cond21.
4761         * tst-cond20.c: New test.
4762         * tst-cond21.c: New test.
4763         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4764         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4765         it unsigned int.
4766         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4767         Likewise.
4768         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4769         (pthread_cond_t): Likewise.
4770         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4771         Likewise.
4772         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4773         Likewise.
4774         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4775         Likewise.
4776         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4777         (cond_nwaiters): New.
4778         (clock_bits): New.
4779         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4780         if there are waiters not signalled yet.
4781         Wait until all already signalled waiters wake up.
4782         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4783         __nwaiters.  If pthread_cond_destroy has been called and this is the
4784         last waiter, signal pthread_cond_destroy caller and avoid using
4785         the pthread_cond_t structure after unlock.
4786         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4787         decrement it when leaving.  If pthread_cond_destroy has been called
4788         and this is the last waiter, signal pthread_cond_destroy caller.
4789         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4790         Likewise.  Read clock type from the least significant bits of
4791         __nwaiters instead of __clock.
4792         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4793         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4794         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4795         clock type just from the last COND_CLOCK_BITS bits of value.
4796         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4797         instead of __clock, just from second bit of condattr's value.
4799 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4801         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4802         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4803         != 64.
4804         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4806 2004-08-15  Roland McGrath  <roland@frob.com>
4808         * pthread_atfork.c: Update copyright terms including special exception
4809         for these trivial files, which are statically linked into executables
4810         that use dynamic linking for the significant library code.
4812 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4814         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4815         pthread_rwlock_rdlock.
4816         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4817         Decrease __nr_readers_queued after reacquiring lock.
4818         * sysdeps/pthread/pthread_rwlock_timedrdlock
4819         (pthread_rwlock_timedrdlock): Likewise.
4820         Reported by Bob Cook <bobcook47@hotmail.com>.
4822 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4824         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4825         before pthread_barrier_wait.
4827 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4830         Remove unnecessary exception handling data.
4832 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4834         [BZ #284]
4835         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4836         instead of clockid_t.
4838 2004-07-21  Roland McGrath  <roland@redhat.com>
4840         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4842 2004-07-19  Roland McGrath  <roland@redhat.com>
4844         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4846 2004-07-02  Roland McGrath  <roland@redhat.com>
4848         * configure: Don't exit.
4850 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4852         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4853         (__pthread_cond_timedwait): Check for invalid nanosecond in
4854         timeout value.
4856 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4858         * Makefile: Add rules to build and run tst-fini1.
4859         * tst-fini1.c: New file.
4860         * tst-fini1mod.c: New file.
4862 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4864         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4865         if no cancellation support is needed.
4866         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4867         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4868         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4869         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4870         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4871         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4872         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4873         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4874         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4876         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4877         only if not already defined.
4879 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4881         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4882         constraint "m" instead of "0" for futex.
4884         * shlib-versions: Add powerpc64-.*-linux.*.
4886 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4888         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4889         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4890         for valid tv_nsec.
4891         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4892         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4893         bits.
4895 2004-06-29  Roland McGrath  <roland@redhat.com>
4897         * Banner: NPTL no longer has its own version number.
4898         * Makefile (nptl-version): Variable removed.
4899         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4900         using $(version), the glibc version number.
4902 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4904         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4905         Fix branch offset for a PLT entry.
4906         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4907         Likewise.
4908         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4909         Likewise.
4910         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4911         Likewise.
4912         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4913         Likewise.
4915 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4917         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4918         unconditionally.
4920 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4922         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4923         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4924         instead of tv_sec.
4925         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4926         (pthread_rwlock_timedrdlock): Likewise.
4928 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4930         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4931         Set __r7 to val, not mutex.
4933 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4935         * Makefile: Add rules to build tst-rwlock14.
4936         * tst-rwlock14.c: New file.
4938 2004-06-24  Boris Hu  <boris.hu@intel.com>
4940         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4941         check.
4942         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4944 2004-06-19  Andreas Jaeger  <aj@suse.de>
4946         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4947         assembler in last patch.
4949 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4951         * sysdeps/pthread/pthread_cond_timedwait.c
4952         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4954         (__pthread_cond_timedwait): Check for invalid nanosecond in
4955         timeout value.
4956         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4957         * tst-cond19.c: New file.
4958         * Makefile: Add rules to build and run tst-cond19.
4960 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4962         * tst-context1.c (GUARD_PATTERN): Defined.
4963         (tst_context_t): Define struct containing ucontext_t & guard words.
4964         (ctx): Declare as an array of tst_context_t.
4965         (fct): Verify uc_link & guard words are still valid.
4966         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4968 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4970         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4971         Add __data.__futex field, reshuffle __data.__clock.
4972         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4973         (__pthread_cond_signal): Increment __futex at the same time as
4974         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4975         address of low 32-bits of __wakeup_seq to futex syscall.
4976         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4977         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4978         releasing internal lock to FUTEX_WAIT.
4979         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4980         (__pthread_cond_timedwait): Likewise.
4981         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4982         (FUTEX_CMP_REQUEUE): Define.
4983         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4984         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4985         Pass __futex value from before the unlock and __futex address instead
4986         of address of low 32-bits of __wakeup_seq to futex syscall.
4987         Fallback to FUTEX_WAKE all on any errors.
4989 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4991         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4992         comment typo.
4993         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4994         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4995         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4996         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4997         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4999 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5001         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
5002         Add memory clobber to inline assembly.
5003         (__lll_mutex_trylock): Likewise.
5004         (__lll_mutex_cond_trylock): Likewise.
5006 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
5008         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
5009         Pass val argument as 6th system call argument in %r7.
5011 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5013         * Makefile (tests): Add tst-cond16.
5014         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
5015         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
5016         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
5017         Add __data.__futex field, reshuffle __data.__clock.
5018         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
5019         (__pthread_cond_signal): Increment __futex at the same time as
5020         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5021         address of low 32-bits of __wakeup_seq to futex syscall.
5022         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
5023         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5024         releasing internal lock to FUTEX_WAIT.
5025         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
5026         (__pthread_cond_timedwait): Likewise.
5027         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
5028         (FUTEX_CMP_REQUEUE): Define.
5029         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5030         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5031         Pass __futex value from before the unlock and __futex address instead
5032         of address of low 32-bits of __wakeup_seq to futex syscall.
5033         Fallback to FUTEX_WAKE all on any errors.
5034         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
5035         Define.
5036         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5037         internally.  Return non-zero if error, zero if success.
5038         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5039         Add __data.__futex field, reshuffle __data.__clock.
5040         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
5041         Define.
5042         (lll_futex_requeue): Add val argument, return 1 unconditionally
5043         for the time being.
5044         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
5045         Add __data.__futex field, reshuffle __data.__clock.
5046         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5047         Define.
5048         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5049         internally.  Return non-zero if error, zero if success.
5050         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5051         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
5052         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
5053         Define.
5054         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5055         internally.  Return non-zero if error, zero if success.
5056         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
5057         Add __data.__futex field, reshuffle __data.__clock.
5058         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
5059         Define.
5060         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
5061         internally.  Return non-zero if error, zero if success.
5062         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
5063         Add __data.__futex field, reshuffle __data.__clock.
5064         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5065         Add __data.__futex field, reshuffle __data.__clock.
5066         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
5067         Increment __futex at the same time as __wakeup_seq or __total_seq.
5068         Pass address of __futex instead of address of low 32-bits of
5069         __wakeup_seq to futex syscall.
5070         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5071         Pass __futex value from before releasing internal lock
5072         to FUTEX_WAIT.
5073         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5074         Likewise.  Avoid unnecessary shadowing of variables.
5075         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
5076         Set __futex to 2 * __total_seq.  Pass __futex value from before the
5077         unlock and __futex address instead of address of low 32-bits of
5078         __wakeup_seq to futex_requeue macro, adjust for new return value
5079         meaning.
5080         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5081         (__pthread_cond_signal): Increment __futex at the same time as
5082         __wakeup_seq or __total_seq.  Pass address of __futex instead of
5083         address of low 32-bits of __wakeup_seq to futex syscall.
5084         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5085         (__pthread_cond_wait): Likewise.  Pass __futex value from before
5086         releasing internal lock to FUTEX_WAIT.
5087         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5088         (__pthread_cond_timedwait): Likewise.
5089         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5090         (FUTEX_CMP_REQUEUE): Define.
5091         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
5092         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
5093         Pass __futex value from before the unlock and __futex address instead
5094         of address of low 32-bits of __wakeup_seq to futex syscall.
5095         Fallback to FUTEX_WAKE all on any errors.
5097 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5099         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
5100         Add nop to align the end of critical section.
5101         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
5103 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5105         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5106         Add __broadcast_seq field.
5107         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
5108         all waiters as woken with woken_seq and bump broadcast counter.
5109         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
5110         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
5111         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5112         Comment typo fixes.  Avoid returning -ETIMEDOUT.
5114 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
5116         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5117         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
5118         Reported by Kaz Kojima.
5120 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
5122         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
5124 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
5126         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
5127         __broadcast_seq with bc_seq after acquiring internal lock instead of
5128         before it.
5130 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
5132         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
5133         compilation.
5134         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5135         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
5136         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
5137         (pthread_cond_t): Add __data.__broadcast_seq field.
5138         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5139         (FRAME_SIZE): Define.
5140         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
5141         Comment typo fixes.
5142         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
5143         Define.
5144         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
5145         typo fixes.
5146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5147         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
5148         fixes.
5150 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
5152         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
5153         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
5154         Add __broadcast_seq field.
5155         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5156         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5157         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5158         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5159         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
5161         all waiters as woken with woken_seq and bump broadcast counter.
5162         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
5163         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
5164         __broadcast_seq field.
5165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5166         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
5167         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
5168         * pthread_cond_init.c: Initialize __broadcast_seq field.
5169         * Makefile (tests): Add tst-cond17 and tst-cond18.
5170         Add .NOTPARALLEL goal.
5171         * tst-cond16.c: New file.  From Jakub.
5172         * tst-cond17.c: New file.  From Jakub.
5173         * tst-cond18.c: New file.  From Jakub.
5175 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
5177         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
5178         unwind info.
5180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
5181         Parametrize frame size.  Correct some unwind info.
5182         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5184 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5186         * tst-stack3.c: Note testing functionality beyond POSIX.
5188 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
5190         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
5191         Change conditional from ifdef to if.
5193 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
5195         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
5196         SYSDEP_CANCEL_ERROR): Define.
5197         (PSEUDO): Use it.
5199 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
5201         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
5203 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
5205         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
5207 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5209         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
5210         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5211         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
5212         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
5214 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
5216         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5217         thread has all signals blocked.
5219 2004-04-18  Andreas Jaeger  <aj@suse.de>
5221         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5222         (SEM_VALUE_MAX): Add missing brace.
5224 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5226         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5227         in rt subdir.
5228         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5229         * sysdeps/pthread/tst-mqueue8x.c: New test.
5230         * tst-cancel4.c: Update comment about message queues.
5232         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5233         return it_value { 0, 0 }.
5234         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5235         like SIGEV_SIGNAL.
5236         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5237         assertion for SIGEV_NONE.
5238         (thread_attr_compare): Compare all attributes, not just a partial
5239         subset.
5241 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5243         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5245 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5247         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5248         Just use a plain number.
5249         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5250         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5251         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5252         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5253         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5254         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5255         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5257 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5259         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5260         frame info.
5261         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5263 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5265         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5266         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5267         of calling sigwaitinfo.
5269 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5271         * allocatestack.c (allocate_stack): Set reported_guardsize
5272         unconditionally.
5273         * pthread_getattr_np.c (pthread_getattr_np): Use
5274         reported_guardsize instead of guardsize.
5275         * descr.h (struct pthread): Add reported_guardsize field.
5277 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5279         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5281 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5283         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5285 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5287         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5288         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5289         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5290         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5291         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5292         Define.
5293         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5294         (_POSIX_MESSAGE_PASSING): Define.
5295         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5296         (_POSIX_MESSAGE_PASSING): Define.
5297         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5298         (_POSIX_MESSAGE_PASSING): Define.
5300 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5302         * tst-context1.c (fct): Check whether correct stack is used.
5304 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5306         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5307         matching constraints for asm mem parameters.
5309         * tst-clock2.c (tf): Don't define unless needed.
5311 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5313         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5314         $(gnulib).
5316 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5318         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5319         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5320         * pthreadP.h: Declare __nptl_deallocate_tsd.
5321         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5322         Adjust caller.
5324         * Makefile (tests): Add tst-tsd5.
5325         * tst-tsd5.c: New file.
5327 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5329         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5330         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5331         is SHLIB_COMPAT check.
5332         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5333         (__pthread_attr_getaffinity_old): Likewise.
5334         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5335         (__pthread_getaffinity_old): Likewise.
5336         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5337         (__pthread_setaffinity_old): Likewise.
5339 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5341         * allocatestack.c (_make_stacks_executable): Call
5342         _dl_make_stack_executable first.
5344 2004-03-24  Roland McGrath  <roland@redhat.com>
5346         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5347         constraint instead of "0".
5349 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5351         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5352         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5354         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5355         code to avoid warning.
5357 2004-03-24  Andreas Jaeger  <aj@suse.de>
5359         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5360         (__pthread_attr_setaffinity_old): Remove const.
5362 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5364         * sysdeps/unix/sysv/linux/smp.h: New file.
5365         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5366         * init.c: Define __is_smp.
5367         (__pthread_initialize_minimal_internal): Call is_smp_system to
5368         initialize __is_smp.
5369         * pthreadP.h: Declare __is_smp.
5370         Define MAX_ADAPTIVE_COUNT is necessary.
5371         * pthread_mutex_init.c: Add comment regarding __spins field.
5372         * pthread_mutex_lock.c: Implement adaptive mutex type.
5373         * pthread_mutex_timedlock.c: Likewise.
5374         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5375         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5376         Add __spins field.
5377         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5378         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5379         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5380         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5381         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5382         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5383         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5384         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5385         lll_mutex_cond_trylock.
5386         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5387         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5388         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5389         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5390         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5391         Define BUSY_WAIT_NOP.
5392         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5393         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5395         * tst-mutex5.c: Add support for testing adaptive mutexes.
5396         * tst-mutex7.c: Likewise.
5397         * tst-mutex5a.c: New file.
5398         * tst-mutex7a.c: New file.
5399         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5401         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5402         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5403         vgettimeofday call might destroy the content.
5405         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5406         @pause in the loop.
5408         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5409         No need to restrict type of ret.  Make it int.  Add comment.
5411         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5412         Remove unnecessary setne instruction.
5414 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5416         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5417         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5418         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5419         If realloc fails, break out of the loop.
5421 2004-03-20  Andreas Jaeger  <aj@suse.de>
5423         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5424         (__pthread_setaffinity_old): Fix interface.
5425         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5426         (__pthread_getaffinity_old): Likewise.
5428         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5429         (__pthread_setaffinity_new): Remove duplicate declaration.
5431 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5433         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5434         the return value to a safe register.
5435         (CDISABLE): Set the function argument correctly.
5437 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5439         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5440         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5441         Rewrite so that only one locked memory operation per round is needed.
5442         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5443         (pthread_barrier_wait): After wakeup, release lock only when the
5444         last thread stopped using the barrier object.
5445         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5446         (__pthread_cond_wait): Don't store mutex address if the current
5447         value is ~0l.  Add correct cleanup support and unwind info.
5448         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5449         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5450         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5451         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5452         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5453         Add correct cleanup support and unwind info.
5454         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5455         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5456         information for syscall wrappers.
5458 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5460         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5461         cpusetsize field, remove next.
5462         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5463         parameter for size of the CPU set.
5464         (pthread_setaffinity_np): Likewise.
5465         (pthread_attr_getaffinity_np): Likewise.
5466         (pthread_attr_setaffinity_np): Likewise.
5467         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5468         interface change, keep compatibility code.
5469         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5470         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5471         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5472         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5473         __pthread_getaffinity_np.
5474         * Versions: Add version for changed interfaces.
5475         * tst-attr3.c: Adjust test for interface change.
5476         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5477         increasing buffer sizes.
5478         * pthread_attr_destroy.c: Remove unused list handling.
5479         * pthread_attr_init.c: Likewise.
5481 2004-03-17  Roland McGrath  <roland@redhat.com>
5483         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5484         first argument to clock_getres so we ever enable kernel timers.
5486 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5488         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5490 2004-03-12  Richard Henderson  <rth@redhat.com>
5492         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5493         oldvalue from CENABLE to CDISABLE.
5495 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5497         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5498         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5499         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5500         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5502 2004-03-11  Richard Henderson  <rth@redhat.com>
5504         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5505         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5506         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5508 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5510         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5511         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5512         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5514 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5516         * forward.c (__pthread_cond_broadcast_2_0,
5517         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5518         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5519         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5521 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5523         * sysdeps/sh/tcb-offsets.sym: Add PID.
5524         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5525         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5527 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5529         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5530         include <sysdep-cancel.h>, vfork is no cancellation point.
5531         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5532         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5533         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5535 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5537         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5538         libc_hidden_def.
5539         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5540         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5541         Likewise.
5542         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5543         Likewise.
5544         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5545         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5546         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5547         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5548         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5550         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5551         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5552         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5553         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5554         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5555         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5557         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5558         a local register for saving old PID.  Negate PID in parent upon exit.
5560         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5561         tcb-offsets.h.
5562         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5563         before syscall, set to the old value in the parent afterwards.
5564         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5565         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5566         tcb-offsets.h.
5567         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5568         before syscall, set to the old value in the parent afterwards.
5569         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5570         * sysdeps/s390/tcb-offsets.sym: Add PID.
5572         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5573         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5574         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5575         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5576         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5577         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5579 2004-03-10  Andreas Schwab  <schwab@suse.de>
5581         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5582         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5583         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5585 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5587         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5588         * tst-cancel21.c (do_one_test): Likewise.
5589         Reported by Gordon Jin <gordon.jin@intel.com>.
5591 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5593         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5594         if non-zero and set to INT_MIN if zero.
5595         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5596         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5597         (SAVE_PID, RESTORE_PID): Define.
5598         (__vfork): Use it.
5599         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5600         Use relative path to avoid including NPTL i386/vfork.S.
5601         (SAVE_PID, RESTORE_PID): Define.
5602         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5603         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5604         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5605         tst-vfork2x.
5606         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5607         * tst-vfork1.c: New test.
5608         * tst-vfork2.c: New test.
5609         * tst-vfork1x.c: New test.
5610         * tst-vfork2x.c: New test.
5612 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5614         * sysdeps/i386/tcb-offsets.sym: Add PID.
5615         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5616         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5617         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5619 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5621         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5623 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5625         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5626         _rtld_global_ro.
5628 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5630         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5631         _rtld_global_ro.
5633         * tst-once4.c: Remove unnecessary macro definition.
5635         * tst-mutex7.c (do_test): Limit thread stack size.
5636         * tst-once2.c (do_test): Likewise.
5637         * tst-tls3.c (do_test): Likewise.
5638         * tst-tls1.c (do_test): Likewise.
5639         * tst-signal3.c (do_test): Likewise.
5640         * tst-kill6.c (do_test): Likewise.
5641         * tst-key4.c (do_test): Likewise.
5642         * tst-join4.c (do_test): Likewise.
5643         * tst-fork1.c (do_test): Likewise.
5644         * tst-context1.c (do_test): Likewise.
5645         * tst-cond2.c (do_test): Likewise.
5646         * tst-cond10.c (do_test): Likewise.
5647         * tst-clock2.c (do_test): Likewise.
5648         * tst-cancel10.c (do_test): Likewise.
5649         * tst-basic2.c (do_test): Likewise.
5650         * tst-barrier4.c (do_test): Likewise.
5652 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5654         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5656 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5658         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5659         (__pthread_cond_timedwait): Optimize wakeup test.
5660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5661         (__pthread_cond_wait): Likewise.
5662         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5663         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5664         Likewise.
5666 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5668         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5669         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5670         the atomic instruction needed.
5671         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5672         (__lll_mutex_lock_wait): Likewise.
5674 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5676         * Makefile (tests): Add tst-cond14 and tst-cond15.
5677         * tst-cond14.c: New file.
5678         * tst-cond15.c: New file.
5680 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5682         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5683         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5684         needs to be implemented differently to be useful.
5686 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5688         * pthread_attr_setschedparam.c: Don't test priority against limits
5689         here.  Set ATTR_FLAG_SCHED_SET flag.
5690         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5691         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5692         from parent thread to child.  If attribute is used and scheduling
5693         parameters are not inherited, copy parameters from attribute or
5694         compute them.  Check priority value.
5695         * pthread_getschedparam.c: If the parameters aren't known yet get
5696         them from the kernel.
5697         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5698         ATTR_FLAG_POLICY_SET flag for thread.
5699         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5700         and ATTR_FLAG_POLICY_SET.
5702         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5704         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5705         fail if stack address hasn't been set.  Just return 0.
5707 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5709         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5710         libpthread for the files in this list.
5711         (CFLAGS-tst-unload): Removed.
5712         * tst-unload.c (do_test): Don't use complete path for
5713         LIBPHREAD_SO.
5715         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5716         tst-_res1mod2.
5718 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5720         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5721         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5722         operation per round is needed.
5723         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5724         (__lll_mutex_lock_wait): Likewise.
5726 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5728         * tst-cancel9.c (cleanup): Don't print to stderr.
5730 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5732         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5734 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5736         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5737         (__syscall_error_handler2): Call CDISABLE.
5738         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5739         (__syscall_error_handler2): Call CDISABLE.
5741         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5742         Release lock before the loop, don't reacquire it.
5744         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5746 2004-02-19  Andreas Schwab  <schwab@suse.de>
5748         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5749         Fix last change.
5751 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5753         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5754         (pthread_barrier_wait): After wakeup, release lock only when the
5755         last thread stopped using the barrier object.
5756         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5757         (pthread_barrier_wait): Likewise.
5758         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5759         Likewise.
5760         * Makefile (tests): Add tst-barrier4.
5761         * tst-barrier4.c: New file.
5763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5764         (__pthread_cond_timedwait): Perform timeout test while holding
5765         internal lock to prevent wakeup race.
5766         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5767         * sysdeps/pthread/pthread_cond_timedwait.c
5768         (__pthread_cond_timedwait): Likewise.
5769         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5770         (__pthread_cond_timedwait): Likewise.
5772 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5774         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5775         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5776         * Makefile (tests): Add tst-rwlock13.
5777         * tst-rwlock13.c: New test.
5779 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5782         (__condvar_tw_cleanup): Little optimization.
5783         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5785 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5787         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5788         libpthread as "lib" parameter to SHLIB_COMPAT.
5789         (__novmx_siglongjmp): Fix typo in function name.
5790         (__novmx_longjmp): Fix typo in function name.
5792 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5794         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5795         __builtin_expect.
5797         * sysdeps/generic/pt-longjmp.c: Moved to...
5798         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5800 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5802         * Makefile (libpthread-routines): Add pt-cleanup.
5803         * pt-longjmp.c: Removed.
5804         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5805         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5806         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5807         Version longjmp, siglongjmp for GLIBC_2.3.4.
5808         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5810 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5812         * sysdeps/pthread/pthread_cond_timedwait.c
5813         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5814         Reuse code.  Add __builtin_expects.
5816         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5817         (__pthread_cond_timedwait): Get internal lock in case timeout has
5818         passed before the futex syscall.
5819         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5821 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5823         * allocatestack.c: Pretty printing.
5825         * sysdeps/pthread/createthread.c (create_thread): Don't add
5826         CLONE_DETACHED bit if it is not necessary.
5828 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5830         * pthread_getattr_np.c: Include ldsodefs.h.
5832 2004-01-16  Richard Henderson  <rth@redhat.com>
5834         * allocatestack.c: Don't declare __libc_stack_end.
5835         * init.c (__pthread_initialize_minimal_internal): Likewise.
5836         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5838 2004-01-15  Richard Henderson  <rth@redhat.com>
5840         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5841         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5842         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5843         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5844         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5845         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5846         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5847         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5849 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5851         * init.c (pthread_functions): Make array const.
5853 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5855         * allocatestack.c (__make_stacks_executable): Change interface.
5856         Check parameters.  Pass parameter on to libc counterpart.
5857         * pthreadP.h: Change declaration.
5859 2004-01-13  Richard Henderson  <rth@redhat.com>
5861         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5862         prototype form.
5863         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5864         Likewise.
5866         * sysdeps/alpha/Makefile: New file.
5867         * sysdeps/alpha/tcb-offsets.sym: New file.
5868         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5869         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5871         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5872         on powerpc version.
5874 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5876         * Makefile (tests): Add tst-backtrace1.
5877         * tst-backtrace1.c: New test.
5879 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5881         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5882         register as second parameter to the REGISTER macro.
5883         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5884         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5885         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5886         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5887         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5888         of thread register as second parameter to REGISTER macro in 64 case.
5890 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5892         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5893         (CFLAGS-getpid.o): Defined.
5894         (CFLAGS-getpid.os): Defined.
5896 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5898         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5899         returned for main thread does not overlap with any other VMA.
5900         Patch by Jakub Jelinek.
5902 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5904         * tst-raise1.c: Include stdio.h.
5906 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5908         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5909         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5910         If pid is 0, set it to selftid.
5911         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5912         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5913         != 0, return self->tid without doing a syscall.
5914         * descr.h (struct pthread): Move pid field after tid.
5916         * Makefile (tests): Add tst-raise1.
5917         * tst-raise1.c: New file.
5919 2003-12-23  Roland McGrath  <roland@redhat.com>
5921         * tst-oddstacklimit.c: New file.
5922         * Makefile (tests): Add it.
5923         (tst-oddstacklimit-ENV): New variable.
5925         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5926         value up to page size for __default_stacksize.
5928 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5930         * Makefile (tests): Add tst-eintr5.
5931         * tst-eintr5.c: New file.
5933         * eintr.c (eintr_source): Prevent sending signal to self.
5935         * tst-eintr2.c (tf1): Improve error message.
5937 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5939         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5940         * sysdeps/unix/sysv/linux/getpid.c: New file.
5941         * pthread_cancel.c: Add comment explaining use of PID field.
5942         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5943         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5944         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5945         temporarily to signal the field must not be relied on and updated
5946         by getpid().
5947         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5948         temporarily negative.
5949         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5951 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5953         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5954         (eintr_source): If ARG != NULL, use pthread_kill.
5955         * tst-eintr1.c: Adjust for this change.
5956         * tst-eintr2.c: Likewise.
5957         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5958         * tst-eintr3.c: New file.
5959         * tst-eintr4.c: New file.
5961 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5963         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5964         if CANCELSTATE_BITMASK is set.
5965         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5966         Likewise.
5968         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5969         (tests-reverse): Add tst-cancel23.
5970         * tst-cancel22.c: New test.
5971         * tst-cancel23.c: New test.
5973 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5975         * tst-eintr1.c: Better error messages.
5977         * Makefile (tests): Add tst-eintr2.
5978         * tst-eintr2.c: New file.
5980 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5982         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5983         (CFLAGS-tst-cancelx21.c): Set.
5984         * tst-cancel21.c: New test.
5985         * tst-cancelx21.c: New test.
5987         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5988         comparison operand.
5989         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5990         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5991         * pt-longjmp.c: Include jmpbuf-unwind.h.
5992         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5993         _JMPBUF_UNWINDS.  Adjust compared pointers.
5994         * init.c (__pthread_initialize_minimal_internal): Initialize
5995         pd->stackblock_size.
5996         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5997         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5998         * sysdeps/i386/jmpbuf-unwind.h: New file.
5999         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
6000         * sysdeps/s390/jmpbuf-unwind.h: New file.
6001         * sysdeps/sh/jmpbuf-unwind.h: New file.
6002         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
6003         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
6004         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
6005         (_JMPBUF_CFA_UNWINDS): Remove.
6006         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
6008 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
6010         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
6011         (CFLAGS-tst-cancelx20.c): Set.
6012         * tst-cancel20.c: New test.
6013         * tst-cancelx20.c: New test.
6015 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
6017         * init.c (__pthread_initialize_minimal_internal): Don't treat
6018         architectures with separate register stack special here when
6019         computing default stack size.
6021 2003-12-17  Roland McGrath  <roland@redhat.com>
6023         * Makefile (tst-cancelx7-ARGS): New variable.
6024         Reportd by Greg Schafer <gschafer@zip.com.au>.
6026 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
6028         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
6029         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
6030         (tst-stack3-ENV): Set.
6031         ($(objpfx)tst-stack3-mem): New.
6032         * tst-stack3.c: New test.
6034 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
6036         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
6037         Add unwind directives.  Drop unused .regstk directive.
6038         (_fini_EPILOG_BEGINS): Add unwind directives.
6040 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
6042         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
6043         Assume parameter is a pointer.
6044         (lll_futex_wake): Likewise.
6045         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
6046         Likewise.
6047         (lll_futex_wake): Likewise.
6048         Reported by Boris Hu.
6049         * sysdeps/unix/sysv/linux/unregister-atfork.c
6050         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
6052         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
6054 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
6056         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
6057         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
6058         __rtld_lock_initialize for ld.so lock.
6059         Patch in part by Adam Li <adam.li@intel.com>.
6061 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
6063         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
6064         in $(gnulib).  Also, remove stale comment.
6066 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
6068         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
6069         advantage of new syscall stub and optimize accordingly.
6071         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
6072         from SYS_futex, to match expectations of
6073         sysdep.h:DO_INLINE_SYSCALL.
6074         (lll_futex_clobbers): Remove.
6075         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
6076         (lll_futex_wake): Likewise.
6077         (lll_futex_requeue): Likewise.
6078         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
6079         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
6080         Jelinek).
6081         (__lll_mutex_lock): Likewise.
6082         (__lll_mutex_cond_lock): Likewise.
6083         (__lll_mutex_timed_lock): Likewise.
6084         (__lll_mutex_unlock): Likewise.
6085         (__lll_mutex_unlock_force): Likewise.
6087         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
6088         comes before the include of <sysdep.h>.
6089         (THREAD_SELF_SYSINFO): New macro.
6090         (THREAD_SYSINFO): Likewise.
6091         (INIT_SYSINFO): New macro.
6092         (TLS_INIT_TP): Call INIT_SYSINFO.
6094         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
6096         * sysdeps/pthread/createthread.c (create_thread): Use
6097         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
6098         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
6099         THREAD_SELF_SYSINFO instead of open code.
6100         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
6101         (THREAD_SYSINFO): Likewise.
6103         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
6105         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
6107 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
6109         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
6110         instead of .init.  Patch by David Mosberger.
6112 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
6114         * sysdeps/pthread/configure.in: Remove broken declaration in C
6115         cleanup handling check.
6117 2003-11-30  Andreas Jaeger  <aj@suse.de>
6119         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
6120         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
6121         Likewise.
6123 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
6125         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
6126         * pthread_attr_destroy.c: Include shlib-compat.h.
6127         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
6128         is set in iattr->flags.
6129         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
6131 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
6133         * Makefile (distribute): Add tst-cleanup4aux.c.
6135         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
6136         include.
6138 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
6140         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
6141         pthread_cond_signal.
6143         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
6144         store mutex address if the current value is ~0l.
6145         * sysdeps/pthread/pthread_cond_timedwait.c
6146         (__pthread_cond_timedwait): Likewise.
6147         * sysdeps/pthread/pthread_cond_broadcast.c
6148         (__pthread_cond_broadcast): Don't use requeue for pshared
6149         condvars.
6151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6152         (__pthread_cond_wait): Don't store mutex address if the current
6153         value is ~0l.
6154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6155         (__pthread_cond_timedwait): Likewise.
6156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6157         (__pthread_cond_broadcast): Don't use requeue for pshared
6158         condvars.
6160         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
6161         element with ~0l for pshared condvars, with NULL otherwise.
6163         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6164         (__pthread_cond_wait): Don't store mutex address if the current
6165         value is ~0l.
6166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6167         (__pthread_cond_timedwait): Likewise.
6168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
6169         (__pthread_cond_broadcast): Don't use requeue for pshared
6170         condvars.
6172         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
6173         * tst-cond12.c: New file.
6174         * tst-cond13.c: New file.
6176 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
6178         * sysdeps/pthread/configure.in: Make missing forced unwind support
6179         fatal.
6181 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
6183         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
6185 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
6187         * Makefile: Add magic to clean up correctly.
6189 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
6191         * unwind.c (FRAME_LEFT): Define.
6192         (unwind_stop): Handle old style cleanups here.
6193         (__pthread_unwind): Handle old style cleanups only if
6194         !HAVE_FORCED_UNWIND.
6195         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
6196         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
6197         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
6198         ($(objpfx)tst-cleanupx4): Likewise.
6199         * tst-cleanup4.c: New test.
6200         * tst-cleanup4aux.c: New.
6201         * tst-cleanupx4.c: New test.
6203 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
6205         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
6206         lll_mutex_*lock macros to skip atomic operations on some archs.
6208 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
6210         * sysdeps/pthread/tst-timer.c (main): Initialize
6211         sigev2.sigev_value as well.
6213 2003-10-15  Roland McGrath  <roland@redhat.com>
6215         * sysdeps/pthread/configure.in: Barf if visibility attribute support
6216         is missing.
6217         * sysdeps/pthread/configure: Regenerated.
6219 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6221         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6222         locking macros.  No distinction between normal and mutex locking
6223         anymore.
6224         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6225         Merge bits from lowlevelmutex.S we still need.
6226         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6227         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6228         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6229         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6230         new mutex implementation.
6231         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6232         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6233         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6234         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6235         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6236         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6237         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6238         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6239         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6240         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6241         symbol for entry point to avoid cancellation.
6243 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6245         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6246         changes.
6247         (SAVE_OLDTYPE_0): Fix a typo.
6249 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6251         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6252         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6254 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6256         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6257         correct offset.
6259 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6261         * Makefile (tests): Add tst-cancel19.
6262         * tst-cancel19.c: New test.
6264 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6266         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6267         restoring of the old cancellation type.
6269 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6271         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6273 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6275         * sysdeps/pthread/malloc-machine.h: New file
6277 2003-09-24  Roland McGrath  <roland@redhat.com>
6279         * allocatestack.c (__make_stacks_executable): Don't ignore return
6280         value from _dl_make_stack_executable.
6282 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6284         * allocatestack.c (__make_stacks_executable): Also change
6285         permission of the currently unused stacks.
6287         * allocatestack.c (change_stack_perm): Split out from
6288         __make_stacks_executable.
6289         (allocate_stack): If the required permission changed between the time
6290         we started preparing the stack and queueing it, change the permission.
6291         (__make_stacks_executable): Call change_stack_perm.
6293         * Makefile: Build tst-execstack-mod locally.
6294         * tst-execstack-mod.c: New file.
6296 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6298         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6300 2003-09-23  Roland McGrath  <roland@redhat.com>
6302         * tst-execstack.c: New file.
6303         * Makefile (tests): Add it.
6304         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6305         (LDFLAGS-tst-execstack): New variable.
6307         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6308         whether to use PROT_EXEC for stack mmap.
6309         (__make_stacks_executable): New function.
6310         * pthreadP.h: Declare it.
6311         * init.c (__pthread_initialize_minimal_internal): Set
6312         GL(dl_make_stack_executable_hook) to that.
6314 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6316         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6317         recommendation from AMD re avoidance of lock prefix.
6319 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6321         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6322         lll_futex_timed_wait instead of lll_futex_wait.
6323         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6324         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6325         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6326         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6327         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6328         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6329         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6330         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6331         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6332         Completely revamp the locking macros.  No distinction between
6333         normal and mutex locking anymore.
6334         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6335         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6336         __lll_lock_timedwait): Fix prototypes.
6337         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6338         __lll_lock_timedwait): Likewise.
6339         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6340         macros, add __builtin_expect.
6341         (lll_mutex_timedlock): Likewise.  Fix return value.
6342         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6343         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6344         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6345         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6346         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6347         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6348         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6349         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6351 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6353         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6354         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6355         operation if possible.
6357         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6358         like jumping over the lock prefix.
6360 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6362         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6363         locking macros.  No distinction between normal and mutex locking
6364         anymore.
6365         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6366         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6368         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6369         locking.  Merge bits from lowlevelmutex.S we still need.
6370         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6371         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6372         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6373         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6374         * Makefile (routines): Remove libc-lowlevelmutex.
6375         (libpthread-rountines): Remove lowlevelmutex.
6376         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6377         for new mutex implementation.
6378         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6379         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6381         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6382         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6383         Likewise.
6384         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6385         Likewise.
6386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6387         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6388         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6389         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6391         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6392         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6393         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6394         Likewise.
6395         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6396         Likewise.
6397         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6398         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6400         Don't use requeue.
6401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6402         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6404 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6406         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6407         in parameters of asm with output parameters.
6409         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6410         type of DECR parameter to int.
6411         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6413 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6415         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6416         guardsize for each thread.
6418 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6420         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6421         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6422         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6424         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6425         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6426         NULL.
6427         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6428         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6429         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6430         (pthread_getaffinity_np): Add hidden_def.
6432         * Makefile (tests): Add tst-attr3.
6433         * tst-attr3.c: New test.
6435         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6437 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6439         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6440         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6442 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6444         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6445         * tst-align.c: Include tst-stack-align.h.
6446         (tf, do_test): Use TEST_STACK_ALIGN macro.
6448 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6450         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6451         variable.
6453 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6455         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6456         stack-related values for the initial thread.
6458 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6460         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6462 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6464         * pthread_mutex_lock.c: Minor code rearrangements.
6466 2003-09-05  Roland McGrath  <roland@redhat.com>
6468         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6469         Instead, include ../nptl_db/db_info.c to do its magic.
6470         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6471         (__pthread_pthread_key_2ndlevel_size): Likewise.
6472         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6473         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6474         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6475         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6476         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6477         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6478         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6479         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6480         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6481         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6482         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6483         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6484         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6485         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6486         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6487         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6488         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6490 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6492         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6493         of pthread_t to be compatible with LT.
6494         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6495         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6496         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6497         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6498         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6499         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6500         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6502 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6504         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6506 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6508         * unwind-forcedunwind.c: Move to...
6509         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6510         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6511         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6512         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6513         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6514         * unwind.c: Include jmpbuf-unwind.h.
6515         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6517 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6519         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6520         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6521         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6522         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6523         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6524         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6525         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6526         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6527         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6528         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6529         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6530         function.
6531         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6532         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6533         * Makefile (tests): Add tst-stack2.
6534         * tst-stack2.c: New test.
6535         * tst-stack1.c: Include limits.h and sys/param.h.
6536         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6538         * pthread_condattr_setpshared.c: Include errno.h.
6539         (pthread_condattr_setpshared): Return EINVAL if pshared
6540         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6542         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6543         defined symbol for entry point to avoid cancellation.
6544         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6545         Likewise.
6546         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6547         Likewise.
6548         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6549         Likewise.
6550         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6551         Likewise.
6552         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6553         Likewise.
6554         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6555         __close_nocancel, __read_nocancel, __write_nocancel,
6556         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6557         libpthread.so or librt.so, define to corresponding function
6558         without _nocancel suffix.
6559         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6560         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6561         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6563         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6565 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6567         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6568         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6570         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6571         in subsections has a symbol associated with it.
6573         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6574         defined symbol for entry point to avoid cancellation.
6575         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6577 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6579         * Makefile (tests): Add tst-tls5.
6580         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6581         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6582         ($(objpfx)tst-tls5): New.
6583         ($(objpfx)tst-tls6.out): Likewise.
6584         (tests): Depend on $(objpfx)tst-tls6.out.
6585         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6586         (do_test): Check pthread_self () return value alignment.
6587         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6588         (tf): Check pthread_self () return value alignment.
6589         * tst-tls5.c: New test.
6590         * tst-tls5.h: New.
6591         * tst-tls5mod.c: New.
6592         * tst-tls5moda.c: New.
6593         * tst-tls5modb.c: New.
6594         * tst-tls5modc.c: New.
6595         * tst-tls5modd.c: New.
6596         * tst-tls5mode.c: New.
6597         * tst-tls5modf.c: New.
6598         * tst-tls6.sh: New test.
6600         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6601         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6602         * init.c (pthread_functions): Initialize them.
6603         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6604         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6605         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6606         pthread_cond_timedwait@@GLIBC_2.3.2.
6608 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6610         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6611         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6612         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6613         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6614         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6615         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6617         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6619         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6620         _POSIX_THREAD_PRIORITY_SCHEDULING.
6621         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6623 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6625         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6626         nested function, use static inline function from libio.h.
6627         Code by Richard Henderson.
6629         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6630         weak.
6632 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6634         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6635         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6636         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6637         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6638         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6639         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6640         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6641         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6642         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6643         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6644         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6645         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6646         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6647         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6648         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6649         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6650         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6651         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6652         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6653         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6654         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6655         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6656         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6657         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6658         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6659         * sysdeps/sparc/tls.h: New file.
6660         * sysdeps/sparc/tcb-offsets.sym: New file.
6661         * sysdeps/sparc/Makefile: New file.
6662         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6663         * init.c [__sparc__] (__NR_set_tid_address): Define.
6665 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6667         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6668         _IO_release_lock): Define.
6670 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6672         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6673         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6675 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6677         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6678         (__pthread_cleanup_class): Add missing return types of member
6679         functions.
6681 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6683         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6684         (lll_mutex_unlock_force): Add memory barrier between store and futex
6685         syscall.
6687 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6689         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6690         tempmsg in first loop.
6692 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6694         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6695         _POSIX_THREAD_PRIORITY_SCHEDULING.
6696         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6698 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6700         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6701         (__rtld_lock_default_lock_recursive,
6702         __rtld_lock_default_unlock_recursive): Define.
6703         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6704         __rtld_lock_unlock_recursive): Define using
6705         GL(_dl_rtld_*lock_recursive).
6706         * init.c (__pthread_initialize_minimal_internal): Initialize
6707         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6708         Lock GL(_dl_load_lock) the same number of times as
6709         GL(_dl_load_lock) using non-mt implementation was nested.
6711         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6712         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6714 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6716         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6717         PIPE_BUF.
6719 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6721         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6723 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6725         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6726         to first syscall error check.  Move syscall error check for tkill
6727         into __ASSUME_CLONE_STOPPED #ifdef.
6729 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6731         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6732         is not defined, do explicit synchronization.
6733         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6734         is not defined also unlock pd->lock for non-debugging case in case
6735         it is necessary.
6736         * pthread_create.c (start_thread): Always get and release pd->lock
6737         if __ASSUME_CLONE_STOPPED is not defined.
6738         (start_thread_debug): Removed.  Adjust users.
6739         * allocatestack.c (allocate_stack): Always initialize lock if
6740         __ASSUME_CLONE_STOPPED is not defined.
6741         * Makefile (tests): Add tst-sched1.
6742         * tst-sched1.c: New file.
6744         * sysdeps/pthread/createthread.c (do_clone): Only use
6745         sched_setschduler and pass correct parameters.
6747 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6749         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6750         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6751         PTHREAD_STACK_MIN in comments.
6753 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6755         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6756         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6757         argument.
6758         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6759         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6760         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6761         (__pthread_cleanup_upto): Fix prototype.
6762         (_longjmp_unwind): Adjust caller.
6763         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6764         Change second argument to const struct pointer.
6765         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6766         * tst-sem9.c (main): Likewise.
6767         * unwind.c: Include string.h for strlen prototype.
6769 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6772         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6773         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6774         Define HAVE_CMOV.
6775         Patch by Nicholas Miell <nmiell@attbi.com>.
6777 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6779         * init.c (__pthread_initialize_minimal_internal): Initialize
6780         GL(dl_init_static_tls).
6781         * pthreadP.h (__pthread_init_static_tls): New prototype.
6782         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6783         New functions.
6784         * Makefile (tests): Add tst-tls4.
6785         (modules-names): Add tst-tls4moda and tst-tls4modb.
6786         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6787         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6788         tst-tls4modb.so.
6789         * tst-tls4.c: New file.
6790         * tst-tls4moda.c: New file.
6791         * tst-tls4modb.c: New file.
6793 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6795         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6796         before __timer_dealloc.
6797         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6798         Don't call list_unlink.
6800 2003-07-29  Roland McGrath  <roland@redhat.com>
6802         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6804 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6806         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6807         Don't reuse struct aiocb A if it failed.
6808         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6809         not just one byte, as that does not block.
6811 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6813         * sysdeps/pthread/unwind-resume.c: New file.
6814         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6815         unwind-resume in csu subdir.
6816         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6817         exceptions.
6818         (librt-sysdep_routines, librt-shared-only-routines): Add
6819         rt-unwind-resume.
6820         * sysdeps/pthread/rt-unwind-resume.c: New file.
6821         * unwind-forcedunwind.c: New file.
6822         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6823         (libpthread-shared-only-routines): Likewise.
6824         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6825         * pthreadP.h (pthread_cancel_init): New prototype.
6826         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6828         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6829         attr argument const struct pthread_attr *.
6831         * res.c (__res_state): Return __resp.
6832         * descr.h: Include resolv.h.
6833         (struct pthread): Add res field.
6834         * pthread_create.c: Include resolv.h.
6835         (start_thread): Initialize __resp.
6836         * Makefile (tests): Add tst-_res1.
6837         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6838         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6839         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6840         libpthread.
6841         * tst-_res1.c: New file.
6842         * tst-_res1mod1.c: New file.
6843         * tst-_res1mod2.c: New file.
6845 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6847         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6849         * Makefile: Define various *-no-z-defs variables for test DSOs
6850         which has undefined symbols.
6852 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6854         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6855         Retry if the stwcx fails to store once_control.
6857 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6859         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6860         pthread_attr_setaffinity.
6861         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6862         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6863         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6864         * pthread_attr_destroy.c: Free cpuset element if allocated.
6865         * pthread_create.c: Pass iattr as additional parameter to
6866         create_thread.
6867         * sysdeps/pthread/createthread.c: If attribute is provided and
6868         a new thread is created with affinity set or scheduling parameters,
6869         start thread with CLONE_STOPPED.
6870         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6871         pthread_attr_setaffinity.
6872         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6873         cpuset element.
6875 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6877         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6879 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6881         * sysdeps/pthread/configure.in: Require CFI directives also for
6882         ppc and s390.
6884 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6886         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6887         Add cfi directives.
6889 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6891         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6892         CLEANUP_JMP_BUF.
6893         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6894         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6895         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6896         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6897         not self pointer in __writer.  Compare with TID to determine
6898         deadlocks.
6899         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6900         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6901         Likewise.
6902         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6903         Likewise.
6904         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6905         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6906         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6907         macros also when compiling librt.
6909 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6911         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6912         -fasynchronous-unwind-tables.
6913         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6914         (PSEUDO): Add cfi directives.
6915         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6916         Likewise.
6917         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6918         Likewise.
6920 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6922         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6923         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6924         * unwind.c (__pthread_unwind_next): Add hidden_def.
6925         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6926         Likewise.
6927         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6928         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6929         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6930         Likewise.
6931         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6932         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6933         Likewise.
6934         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6935         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6936         __pthread_unregister_cancel and __pthread_unwind_next.
6938 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6940         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6941         different symbol for the cancellation syscall wrapper and
6942         non-cancellation syscall wrapper.
6943         (PSEUDO_END): Define.
6945 2003-07-05  Richard Henderson  <rth@redhat.com>
6947         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6948         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6949         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6950         return actual return value from the syscall, not 0.
6952 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6954         * descr.h (struct pthread): Add pid field.
6955         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6956         (__reclaim_stacks): Likewise.
6957         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6958         also check for PID of the signal source.
6959         (__pthread_initialize_minimal_internal): Also initialize pid field
6960         of initial thread's descriptor.
6961         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6962         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6963         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6964         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6965         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6967 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6969         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6970         Fix use of parameter.
6971         (__libc_cleanup_pop): Likewise.
6973 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6975         * init.c (sigcancel_handler): Change parameters to match handler
6976         for SA_SIGACTION.  Check signal number and code to recognize
6977         invalid invocations.
6979 2003-07-03  Roland McGrath  <roland@redhat.com>
6981         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6982         Apply sizeof (struct pthread) bias to r13 value.
6984 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6986         * sysdeps/pthread/configure.in: Require CFI directives.
6988         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6989         definition.
6990         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6991         libpthread compilation.
6992         * unwind.c (__pthread_unwind): Add hidden_def.
6993         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6995 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6997         * libc-cancellation.c (__libc_cleanup_routine): Define.
6998         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6999         (__pthread_cleanup_pop): Define.
7001 2003-07-01  Richard Henderson  <rth@redhat.com>
7003         * sysdeps/alpha/elf/pt-initfini.c: New file.
7004         * sysdeps/alpha/pthread_spin_lock.S: New file.
7005         * sysdeps/alpha/pthread_spin_trylock.S: New file.
7006         * sysdeps/alpha/pthreaddef.h: New file.
7007         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
7008         * sysdeps/alpha/tls.h: New file.
7009         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
7010         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
7011         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
7012         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
7013         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
7014         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
7015         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
7016         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
7017         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
7018         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
7020 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
7022         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
7023         cleanup support and unwind info.
7025 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
7027         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7028         Use correct cleanup handler registration.  Add unwind info.
7029         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
7030         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
7031         * tst-once3.c: Add cleanup handler and check it is called.
7032         * tst-once4.c: Likewise.
7033         * tst-oncex3.c: New file.
7034         * tst-oncex4.c: New file.
7035         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
7037 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
7039         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
7041 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
7043         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
7044         (tf_msgsnd): Likewise.
7046         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
7047         premature returns a bit more.
7049 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
7051         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
7052         definition to the front.
7054         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
7055         the cleanup functions to make the names unique.  Fix dwarf opcode
7056         un unwind table.
7057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
7058         functions to make the names unique.  Fix CFA offset for two blocks.
7060 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
7062         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
7063         missing closing braces.
7064         Patch by Christophe Saout <christophe@saout.de>.
7066 2003-06-24  Roland McGrath  <roland@redhat.com>
7068         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
7070 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
7072         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
7073         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
7075         * pthreadP.h: Declare __find_thread_by_id.
7076         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
7077         * pthread_clock_gettime.c: Allow using other thread's clock.
7078         * pthread_clock_settime.c: Likewise.
7079         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
7080         * Makefile: Add rules to build and run tst-clock2.
7081         * tst-clock2.c: New file.
7083 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
7085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
7086         to use exception-based cleanup handler.
7087         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7089         * tst-cond8.c (ch): Announce that we are done.
7091         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
7093         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
7094         Also test aio_suspend with timeout value.
7096 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
7098         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
7099         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
7100         attribute_hidden.
7102         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
7103         (__pthread_mutex_lock_internal): Likewise.
7104         (__pthread_mutex_unlock_internal): Likewise.
7105         (__pthread_mutex_unlock_usercnt): Declare.
7106         * pthread_mutex_destroy.c: Always fail if used in any way.
7107         * pthread_mutex_init.c: Update comment.
7108         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
7109         * pthread_mutex_timedlock.c: Adjust __nusers.
7110         * pthread_mutex_trylock.c: Adjust __nusers.
7111         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
7112         and public interfaces are wrapper with pass additional parameter.
7113         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
7114         parameter zero.
7115         * tst-mutex8.c: New file.
7116         * Makefile (tests): Add tst-mutex8.
7117         * sysdeps/pthread/pthread_cond_timedwait.c: Call
7118         __pthread_mutex_unlock_usercnt.
7119         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7124         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
7125         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7126         Add __nusers.
7127         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7128         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7129         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7130         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7131         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7133         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
7134         * pthread_mutex_timedlock.c: Likewise.
7135         * pthread_mutex_trylock.c: Adjust __nusers.
7136         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
7137         * tst-mutex9.c: New file.
7138         * Makefile (tests): Add tst-mutex9.
7139         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
7140         * sysdeps/ia64/tls.h: Likewise.
7141         * sysdeps/powerpc/tls.h: Likewise.
7142         * sysdeps/s390/tls.h: Likewise.
7143         * sysdeps/sh/tls.h: Likewise.
7144         * sysdeps/x86_64/tls.h: Likewise.
7145         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
7146         Change type of __owner.
7147         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7148         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7149         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7150         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7151         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7153 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
7155         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
7156         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
7158         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
7159         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
7160         instead of nr to lll_futex_wake.  Only set errno and return -1
7161         if err < 0.
7163         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
7164         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
7165         return actual return value from the syscall, not 0.
7167 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
7169         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
7170         find a random value.
7171         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
7172         errno==EIDRM.
7174         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
7175         compat_timer_settime.
7176         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
7177         compat_timer_gettime.
7178         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
7179         compat_timer_getoverrun.
7180         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
7181         compat_timer_delete.
7183         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
7184         error-checking mutex detect busy mutexes.
7186 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7188         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
7189         Add ax to clobber list.
7190         (lll_mutex_cond_lock): Likewise.
7191         (lll_mutex_unlock): Likewise.
7192         (lll_lock): Likewise.
7193         (lll_unlock): Likewise.
7195         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
7196         * tst-cancel18.c: New file.
7197         * tst-cancelx18.c: New file.
7199         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
7200         and tcdrain.
7202         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
7203         * tst-cancel17.c: New file.
7204         * tst-cancelx17.c: New file.
7206         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
7207         * sysdeps/unix/sysv/linux/sigwait.c: New file.
7208         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
7210         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
7212 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
7214         * sysdeps/pthread/createthread.c (create_thread): Set
7215         header.multiple_threads unconditionally.
7216         * allocatestack.c (allocate_stack): Likewise.
7217         * descr.h (struct pthread): Add header.multiple_threads
7218         unconditionally.
7219         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7220         Define for librt.  #error if neither libpthread, libc nor librt.
7221         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7222         Likewise.
7223         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7224         CDISABLE): Likewise.
7225         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7226         CDISABLE): Likewise.
7227         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7228         CDISABLE): Likewise.
7229         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7230         CDISABLE): Likewise.  Access header.multiple_threads outside of
7231         libc and libpthread.
7232         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7233         Likewise.
7234         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7235         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7237 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7239         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7240         Also test early cancellation before the thread reaches the cancellation
7241         point.
7243         * Makefile: Compile forward.c with exceptions.
7245         * sysdeps/unix/sysv/linux/sleep.c: New file.
7247 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7249         * Makefile: Add CFLAGS definition to compile function wrappers
7250         duplicated from libc with exceptions.
7251         * tst-cancel4.c: Also check cancellation handlers.
7253         * Makefile: Add rules to build and run tst-cancel16 and
7254         tst-cancelx16.  Add missing CFLAGS definitions.
7255         * tst-cancel16.c: New file.
7256         * tst-cancelx16.c: New file.
7258 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7260         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7261         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7262         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7263         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7265         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7266         (LIBC_CANCEL_RESET): Likewise.
7267         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7268         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7269         librt-cancellation.
7270         (CFLAGS-libcrt-cancellation.c): Define.
7271         * sysdeps/pthread/librt-cancellation.c: New file.
7272         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7273         macros also when compiling librt.
7274         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7275         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7276         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7277         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7278         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7279         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7280         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7282         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7283         compat_timer_create.
7285 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7287         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7289         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7290         __register_atfork.
7291         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7292         Add libc_hidden_def.
7294 2003-06-13  Roland McGrath  <roland@redhat.com>
7296         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7297         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7299 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7301         * allocatestack.c (queue_stack): Always inline.
7302         * ptreadhP.h (__do_cancel): Likewise.
7304 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7306         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7307         a typo.
7309 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7311         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7312         (__pthread_cond_signal): Remove incorrect second addition for
7313         cond_lock!=0.
7315 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7317         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7318         (__pthread_cond_signal): Use correct futex pointer in
7319         __lll_mutex_lock_wait call.
7321         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7322         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7324 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7326         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7327         cancelable.
7328         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7329         Likewise.
7331         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7332         hand-written CFI generation code.  Since ENTRY/END also initiated
7333         CFI frames this caused two CFI sets to be generated.
7335 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7337         * cleanup_routine.c: New file.
7338         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7339         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7340         cleanup handling.
7341         * Makefile (libpthread-routines): Add cleanup_routine.
7342         Add more CFLAGS variables to compile with exceptions.  Add comments
7343         why which file needs unwind tables.
7344         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7345         tests.
7346         * tst-cancelx1.c: New file.
7347         * tst-cancelx2.c: New file.
7348         * tst-cancelx3.c: New file.
7349         * tst-cancelx4.c: New file.
7350         * tst-cancelx5.c: New file.
7351         * tst-cancelx6.c: New file.
7352         * tst-cancelx7.c: New file.
7353         * tst-cancelx8.c: New file.
7354         * tst-cancelx9.c: New file.
7355         * tst-cancelx10.c: New file.
7356         * tst-cancelx11.c: New file.
7357         * tst-cancelx12.c: New file.
7358         * tst-cancelx13.c: New file.
7359         * tst-cancelx14.c: New file.
7360         * tst-cancelx15.c: New file.
7361         * tst-cleanupx0.c: New file.
7362         * tst-cleanupx0.expect: New file.
7363         * tst-cleanupx1.c: New file.
7364         * tst-cleanupx2.c: New file.
7365         * tst-cleanupx3.c: New file.
7367         * tst-cleanup0.c: Make standard compliant.
7368         * tst-cleanup1.c: Likewise.
7370         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7371         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7372         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7373         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7374         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7375         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7376         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7377         CLEANUP_JMP_BUF.
7378         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7379         * tst-cancel12.c: New file.
7380         * tst-cancel13.c: New file.
7381         * tst-cancel14.c: New file.
7382         * tst-cancel15.c: New file.
7383         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7384         and tst-cancel15.
7386         * tst-cancel1.c: Add some comments.
7388         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7389         timeout correctly.
7391 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7393         * Makefile (CFLAGS-pthread_cancel.c): Define.
7395 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7397         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7398         Change type of __writer element to int.
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/powerpc/bits/pthreadtypes.h: Likewise.
7402         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7403         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7404         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7405         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7406         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7407         Compare with TID to determine deadlocks.
7408         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7409         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7410         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7411         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7412         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7413         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7414         Likewise.
7415         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7416         Likewise.
7417         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7418         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7419         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7420         Likewise.
7421         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7422         Likewise.
7423         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7424         * Makefile (tests): Add tst-rwlock12.
7425         * tst-rwlock12.c: New file.
7427 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7429         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7430         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7431         Remove bogus hidden_proto.
7432         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7433         Likewise.
7434         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7435         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7436         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7437         ___lll_mutex_timedlock): Likewise.
7439 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7442         (__pthread_cond_signal): Add some code to eventually handle
7443         cond_lock!=0.
7445 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7447         * Makefile (tests): Add tst-exec4.
7448         (tst-exec4-ARGS): Define.
7449         * tst-exec4.c: New file.
7451 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7453         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7454         Also fail if tv_nsec < 0.
7455         (__lll_timedwait_tid): Likewise.
7456         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7457         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7458         Likewise.
7459         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7460         Likewise.
7461         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7462         Likewise.
7463         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7464         Likewise.
7465         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7466         Likewise.
7467         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7468         Likewise.
7470         * Makefile (tests): Add tst-sem8 and tst-sem9.
7471         * tst-sem8.c: New file.
7472         * tst-sem9.c: New file.
7473         * sem_open.c: Fix creation of in_use record if the file exists but
7474         no internal record.
7476         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7477         definitions.
7479         * sysdeps/pthread/timer_create.c (timer_create): In case
7480         evp==NULL, assign timer ID to sival_ptr.
7482         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7483         struct pthread_unwind_buf *.
7484         (struct pthread): Likewise for cleanup_jmp_buf element.
7486         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7487         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7488         * unwind.c (__pthread_unwind_next): Likewise.
7490 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7492         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7493         (lll_futex_timed_wait): Use int for futex value parameter.
7494         (lll_futex_wake): Likewise.
7495         (lll_futex_requeue): Likewise.
7497         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7498         Replace one memory operation with one register operation.
7500         * tst-join4.c (do_test): Fix error message.
7502         * tst-rwlock6.c (do_test): Use correct format specifier.
7504         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7505         (__lll_mutex_lock_wait): Replace one memory operation with one
7506         register operation.
7507         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7508         (__lll_mutex_lock_wait): Likewise.
7510         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7511         (__lll_mutex_cond_lock): Add one to value parameter of
7512         __lll_lock_wait to reflect reality in the futex syscall.
7513         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7514         (lll_mutex_cond_lock): Likewise.
7516 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7518         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7519         New function.
7520         (lll_mutex_cond_lock): Define.
7522 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7524         * Makefile (tests): Add tst-signal6.
7525         * tst-signal6.c: New file.
7527         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7528         (__lll_mutex_unlock_force): New function
7529         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7531         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7532         (__lll_mutex_unlock_force): New function.
7533         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7535         * tst-rwlock7.c (do_test): Use correct format specifier.
7537         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7538         Find break parameter in correct asm argument.
7540 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7542         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7543         Remove out4.
7544         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7545         error occured.
7546         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7547         Add __mutex.
7548         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7549         lll_futex_requeue, lll_mutex_unlock_force): Define.
7551 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7553         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7554         (pthread_cond_t): Add __mutex.
7555         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7556         lll_futex_requeue, lll_mutex_unlock_force): Define.
7558 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7560         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7561         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7562         Add __mutex field.
7563         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7564         Define.
7565         (lll_futex_wait, lll_futex_wake): Define.
7566         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7567         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7568         FUTEX_REQUEUE instead of FUTEX_WAIT.
7569         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7570         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7571         mutex which was used in condvar structure.  Call
7572         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7573         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7575         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7576         include tcb-offsets.h.  Read wakeup value in locked region.
7577         Use the value of gbr register as THREAD_ID.
7578         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7579         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7580         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7582         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7583         macros.
7585 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7587         * sysdeps/pthread/pthread_cond_broadcast.c
7588         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7590 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7593         typo in register name.
7594         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7595         correctly.  Actually use requeue.  Little optimization.
7596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7597         mutex address early.  Handle cancellation state as 32-bit value.
7598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7599         Remove unnecessary label.
7601 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7603         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7604         instead of FUTEX_WAIT.
7605         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7608         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7609         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7610         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7611         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7612         of __pthread_mutex_lock_internal.
7613         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7614         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7615         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7616         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7619         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7620         Add pthread_mutex_cond_lock.
7621         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7622         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7623         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7624         lll_mutex_cond_lock.
7625         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7626         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7627         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7628         Add __mutex field.
7629         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7630         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7632         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7633         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7635         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7636         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7637         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7638         macro don't define aliases.
7640         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7641         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7642         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7643         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7645         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7646         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7650 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7652         * sem_open.c: Fix one endless loop.  Implement correct semantics
7653         wrt opening the same semaphore more then once.
7654         * sem_close.c: Adjust for sem_open change.
7655         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7656         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7657         * Makefile (tests): Add tst-sem7.
7658         * tst-sem7.c: New file.
7660 2003-05-16  Roland McGrath  <roland@redhat.com>
7662         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7663         uninitialized variable braino.
7665 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7667         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7668         test for syscall availability.
7670         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7671         __no_posix_timers to -1 if the syscalls don't exist.
7673         * pthread_join.c (pthread_join): Set tid field of the joined
7674         thread to -1.  This isn't necessary but helps to recognize some
7675         error conditions with almost no cost.
7677         * allocatestack.c (FREE_P): Also negative values indicate an
7678         unused stack.
7680         * unwind.c: Include <unistd.h>.
7682 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7684         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7686 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7688         * Makefile (crti-objs, crtn-objs): New variables.
7689         (omit-deps, extra-objs): Add crtn.
7690         ($(objpfx)libpthread.so): Depend on both crti and crtn
7691         and links to them in multidir.
7692         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7694 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7696         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7697         (lll_mutex_unlock): Use atomic_exchange_rel.
7699 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7701         * cond-perf.c (cons): Add missing locking around setting of alldone.
7703 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7705         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7706         related macros.
7707         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7709 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7711         * tst-sem6.c: New file.
7712         * Makefile (tests): Add tst-sem6.
7714         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7715         Use atomic_exchange_rel instead of atomic_exchange.
7716         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7717         Likewise.
7719         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7720         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7721         vsyscall is possible.
7723         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7724         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7725         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7726         pthread_setaffinity_np.
7727         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7728         and pthread_setaffinity_np.
7729         * Makefile (libpthread-routines): Add pthread_getaffinity and
7730         pthread_setaffinity.
7732         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7733         use it in case mmap to allocate the stack fails.
7734         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7735         ARCH_MAP_FLAGS here.
7736         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7737         ARCH_RETRY_MMAP.
7739 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7741         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7742         handler implementation.  It is now lockless in fork().
7743         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7744         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7745         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7746         declare the __fork_*_lists.
7747         (struct fork_handler): Include pointers to all three functions.
7748         Add next, refcntr and need_signal elements.
7749         (__fork_handlers): New declaration.
7750         (__register_atfork_malloc): Remove declaration.
7751         (HAVE_register_atfork_malloc): Remove definition.
7752         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7753         __pthread_child_handler variable.
7754         (__libc_pthread_init): Use __register_atfork instead of explicitly
7755         adding to the list.
7756         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7757         and lll_futex_wake.
7758         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7760         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7761         function must never be reached.
7763         * cond-perf.c: New file.
7765 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7767         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7769 2003-05-04  Roland McGrath  <roland@redhat.com>
7771         * Makefile ($(objpfx)../libc.so): New target.
7773 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7775         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7776         (pthread_condattr_t): Size is only an int, don't use long for
7777         alignment.
7778         (pthread_mutexattr_t): Likewise.
7779         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7780         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7781         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7783 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7785         * sysdeps/i386/tls.h: Define THREAD_ID.
7786         * sysdeps/ia64/tls.h: Likewise.
7787         * sysdeps/powerpc/tls.h: Likewise.
7788         * sysdeps/s390/tls.h: Likewise.
7789         * sysdeps/sh/tls.h: Likewise.
7790         * sysdeps/x86_64/tls.h: Likewise.
7791         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7792         record ownership.
7793         * pthread_mutex_timedlock.c: Likewise.
7794         * pthread_mutex_trylock.c: Likewise.
7795         * pthread_mutex_unlock.c: Likewise.
7796         * pthread_rwlock_trywrlock.c: Likewise.
7797         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7798         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7799         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7800         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7802         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7803         flag.
7805 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7807         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7808         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7809         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7810         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7811         Make __align long long instead of long.
7812         (pthread_rwlock_t): Formatting.
7813         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7814         (pthread_rwlock_t): Formatting.
7815         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7816         (pthread_cond_t): Make __align long long instead of long.
7817         (pthread_rwlock_t): Move __flags field to the same position as in
7818         linuxthreads.
7820 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7822         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7823         * tst-rwlock7.c (do_test): Likewise.
7825 2003-04-26  Roland McGrath  <roland@redhat.com>
7827         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7829 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7831         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7832         sizeof (struct pthread).
7833         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7834         1 struct pthread.
7835         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7836         to 0.
7837         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7838         struct pthread.
7839         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7840         to 32-bit bytes.
7841         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7842         tcbp.
7843         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7844         unneccessarily.
7845         (NO_TLS_OFFSET): Define.
7846         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7847         add TLS_TCB_SIZE unnecessarily.
7849 2003-04-22  Roland McGrath  <roland@redhat.com>
7851         * Makeconfig (shared-thread-library): Reverse link order to work
7852         around linker bug.
7854 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7856         * semaphore.h: Fix typo in comment.
7858 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7860         * sysdeps/pthread/sigfillset.c: New file.
7862         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7863         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7864         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7865         * sysdeps/pthread/sigaction.c: Likewise.
7866         * sysdeps/pthread/sigprocmask.c: New file.
7867         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7868         __SIGRTMIN+1.
7869         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7870         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7871         in this case.
7873 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7875         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7876         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7878         * sysdeps/unix/sysv/linux/unregister-atfork.c
7879         (__unregister_atfork): Don't free memory not allocated dynamically.
7881         * semaphore.h: Remove __THROW marker from cancellation points.
7882         * nptl/sysdeps/pthread/pthread.h: Likewise.
7884 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7886         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7887         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7888         __THROW.
7890 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7892         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7894 2003-04-15  Roland McGrath  <roland@redhat.com>
7896         * forward.c (__pthread_unwind): Tweak to avoid warning.
7898 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7900         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7902 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7905         overflow CFA advance instructions.
7906         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7908 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7910         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7911         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7912         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7913         defined.
7915         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7916         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7918         DW_CFA_advance_loc for .Laddl-.Lsubl.
7920 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7922         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7923         position-independent unwind data for static libraries.
7924         Add missing unwind info.  Add comments.
7926         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7929         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7931 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7933         * Makefile: Make sure all cancellation points are compiled with
7934         exception and asynchronous unwind tables.
7936         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7937         which mishandles loading of global object addresses in PIC.
7938         (THREAD_SETMEM_NC): Likewise.
7940 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7942         * pthread.h: Define new data structure for cleanup buffer.  Declare
7943         new cleanup handler interfaces.
7944         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7945         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7946         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7947         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7948         it.  Declare old cleanup handler installation functions.
7949         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7950         handling.
7951         * cleanup_defer.c: Likewise.
7952         * cleanup_compat.c: New file.  Old cleanup code.
7953         * cleanup_def_compat.c: New file.  Old cleanup code.
7954         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7955         if own thread descriptor.
7956         * unwind.c: New file.
7957         * forward.c: Add __pthread_unwind.
7958         * init.c (pthread_functions): Add __pthread_unwind.
7959         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7960         Add ptr___pthread_unwind.
7961         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7962         and unwind function.
7963         * Makefile (libpthread-routines): Add cleanup_compat,
7964         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7965         table generation if necessary.
7966         * version.c: Record whether unwind support is compiled in.
7967         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7968         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7969         handler interfaces.
7970         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7971         complication to generate unwind information for syscall wrappers.
7972         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7973         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7974         __cleanup_fct_attribute.
7976         * Makefile: Add rules to build and run tst-cleanup0.
7977         * tst-cleanup0.c: New file.
7978         * tst-cleanup0.expect: New file.
7980         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7981         caller.  Optimize to avoid often unecessary local variable.
7983 2003-04-11  Roland McGrath  <roland@redhat.com>
7985         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7986         sets variable `multidir'; include that.
7987         (generated): Add it.
7988         ($(objpfx)$(multidir)/crti.o): New target.
7989         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7991 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7993         * tst-attr2.c (do_test): Add cast to avoid warning.
7994         * tst-mutex4.c (do_test): Likewise.
7996 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7998         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7999         in child.
8001 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
8003         * Makefile (tests): Add tst-detach1.
8004         * tst-detach1.c: New file.
8006 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
8008         * sysdeps/pthread/pthread.h: Remove duplicate
8009         pthread_cleanup_{push,pop} definitions.
8011         * tst-barrier2.c: Eliminate warnings.
8012         * tst-cancel4.c: Likewise.
8013         * tst-cond4.c: Likewise.
8014         * tst-cond6.c: Likewise.
8015         * tst-detach1.c: Likewise.
8016         * tst-rwlock4.c: Likewise.
8017         * tst-rwlock6.c: Likewise.
8018         * tst-rwlock7.c: Likewise.
8019         * tst-sem3.c: Likewise.
8020         * tst-spin2.c: Likewise.
8021         * tst-umask1.c: Likewise.
8023 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
8025         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
8027 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
8029         * descr.h (struct pthread): Move cancelhandling member to the front.
8031 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
8033         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
8034         malloc_parent, and malloc_child statically.
8035         (__register_atfork_malloc): New function.
8036         (free_mem): Don't free any of the malloc_* variables on the list.
8037         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
8038         Define HAVE_register_atfork_malloc.
8040 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
8042         * sysdeps/pthread/createthread.c (create_thread): Add some more
8043         comments explaining when to set multiple_threads and when not.
8045         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8046         THREAD_ATOMIC_BIT_SET if not already defined.
8047         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
8048         THREAD_ATOMIC_BIT_SET:
8049         * sysdeps/x86_64/tls.h: Likewise.
8050         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
8051         THREAD_ATOMIC_CMPXCHG_VAL.
8052         (_pthread_cleanup_pop_restore): Likewise.
8053         * cancellation.c (__pthread_enable_asynccancel): Likewise.
8054         (__pthread_enable_asynccancel_2): Likewise.
8055         (__pthread_disable_asynccancel): Likewise.
8056         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8057         (__libc_disable_asynccancel): Likewise.
8058         * init.c (sigcancel_handler): Likewise.
8059         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
8060         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
8062 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
8064         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
8065         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
8066         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
8067         * Makefile (tests): Add tst-cancel11.
8068         * tst-cancel11.c: New file.
8070 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
8072         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
8073         round, not the first.  Use specific_used flag instead of local
8074         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
8075         (__free_tcb): Don't call deallocate_tsd here.
8076         (start_thread): Call deallocate_tsd here.
8077         * pthread_setspecific.c: Set specific_used flag really only when
8078         needed.
8079         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
8080         * tst-tsd3.c: New file.
8081         * tst-tsd4.c: New file.
8083 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8085         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
8086         Use atomic_exchange_and_add instead of __lll_add.
8087         (__lll_mutex_timedlock): Likewise.
8088         Patch by Ian Wienand.
8090 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
8092         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8093         (SINGLE_THREAD_P): Fix typo.
8094         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
8096 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
8098         * Makefile (tests): Add tst-align.
8099         * tst-align.c: New file.
8100         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
8102         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
8103         function correctly.
8105         * tst-tsd2.c: Add casts to avoid warnings.
8107 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
8109         * descr.h (struct pthread): Move most often used elements to the front.
8111 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
8113         * Makefile (libpthread-routines): Add pthread_atfork.
8114         (libpthread-static-only-routines): Add pthread_atfork.
8116 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8118         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
8119         of TLS_DTV_AT_TP.
8120         (INSTALL_DTV): Add parens.
8121         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
8122         Use passed descr instead of THREAD_SELF.
8123         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
8124         (__lll_mutex_timedlock_wait): Correct expected value after
8125         spurious wakeup.
8126         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
8127         Release lock before waking up the waiters.
8128         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
8129         criteria.  Reorderstruct passed to cleanup handler.  Fix
8130         handling of cancellation and failung pthread_mutex_unlock call.
8131         Use __pthread_enable_asynccancel_2 instead of
8132         __pthread_enable_asynccancel.
8133         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8134         Return result of lock re-get if it fails.
8135         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
8136         for __pthread_cleanup_push.
8137         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
8138         completely broken rwlock implementation.
8139         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8140         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8141         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8142         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8143         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8144         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
8145         versioned_symbol macro.
8146         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
8147         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8149 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
8151         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
8152         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
8153         and __helper_tid.
8154         (struct timer): Remove th and bar field.
8155         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
8156         debugging code.  Create only one helper thread.
8157         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
8158         helper thread.
8159         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
8160         Renamed.  Define statically.  Use thread info from siginfo.
8161         (__helper_once): New variable.
8162         (__helper_tid): New variable.
8163         (__reset_helper_control): New function.
8164         (__start_helper_thread): New function.
8166         * pthread_create.c (start_thread): Don't use setjmp inside
8167         __builtin_expect to work around gcc bug.
8169         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
8170         timer_delete syscall fails, but not with ENOSYS, set
8171         __no_posix_timers.
8173         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
8174         (timer_settime): Fix typo.
8175         * sysdeps/unix/sysv/linux/timer_getoverr.c
8176         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
8178 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
8180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
8181         offset of cleanupbuf.__prev.
8183 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
8185         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
8186         of included file.
8188 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
8190         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
8191         NULL provide default definition to syscall.
8193 2003-03-25  Roland McGrath  <roland@redhat.com>
8195         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
8196         (timer_id2ptr): Fix typo.
8198 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
8200         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
8201         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
8202         * sysdeps/ia64/pthreaddef.h: Likewise.
8203         * sysdeps/powerpc/pthreaddef.h: Likewise.
8204         * sysdeps/s390/pthreaddef.h: Likewise.
8205         * sysdeps/sh/pthreaddef.h: Likewise.
8206         * sysdeps/x86_64/pthreaddef.h: Likewise.
8207         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
8208         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
8209         being changed.
8210         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
8211         SIGTIMER is not unblocked.
8212         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
8213         RT signal taken.
8214         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8215         be send.
8216         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8217         pass pointer through as ID.
8218         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8219         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8220         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8221         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8222         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8223         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8224         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8225         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8226         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8227         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8228         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8229         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8230         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8231         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8232         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8233         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8234         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8235         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8236         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8237         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8238         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8239         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8240         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8241         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8242         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8243         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8244         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8245         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8246         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8247         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8248         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8249         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8250         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8252         * pthreadP.h: Remove FRAME_LEFT definition.
8253         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8254         already left frame.  Programs which have this problem are not POSIX
8255         compliant.
8256         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8258 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8260         * sysdeps/pthread/tst-timer.c: Check return values of the
8261         functions we test.
8263 2003-03-23  Roland McGrath  <roland@redhat.com>
8265         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8266         * tst-tls3mod.c: Likewise.
8267         * tst-tls1.c: Likewise.
8268         * tst-tls2.c: Likewise.
8270         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8271         undefined behavior.
8273         * tst-join5.c (tf1, tf2): Add a cast.
8275         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8277         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8278         Don't test anything.
8279         * tst-cond4.c: Likewise.
8280         * tst-cond6.c: Likewise.
8281         * tst-flock2.c: Likewise.
8282         * tst-mutex4.c: Likewise.
8283         * tst-rwlock4.c: Likewise.
8284         * tst-signal1.c: Likewise.
8285         * tst-spin2.c: Likewise.
8286         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8288         * tst-mutex4.c: Use test-skeleton.c.
8289         * tst-spin2.c: Likewise.
8290         * tst-sysconf.c: Likewise.
8291         * tst-barrier2.c: Likewise.
8292         * tst-cond4.c: Likewise.
8293         * tst-cond6.c: Likewise.
8294         * tst-rwlock4.c: Likewise.
8295         * tst-unload.c: Likewise.
8296         * tst-flock2.c (do_test): Use return instead of exit.
8298 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8300         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8302 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8304         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8305         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8306         instead of __lll_compare_and_swap.
8307         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8308         Likewise.
8309         Removed definition if __lll_compare_and_swap.
8311         * cancellation.c: Adjust for new form of compare&exchange macros.
8312         * cleanup_defer.c: Likewise.
8313         * init.c: Likewise.
8314         * libc-cancellation.c: Likewise.
8315         * old_pthread_cond_broadcast.c: Likewise.
8316         * old_pthread_cond_signal.c: Likewise.
8317         * old_pthread_cond_timedwait.c: Likewise.
8318         * old_pthread_cond_wait.c: Likewise.
8319         * pthread_cancel.c: Likewise.
8320         * pthread_create.c: Likewise.
8321         * pthread_detach.c: Likewise.
8322         * pthread_join.c: Likewise.
8323         * pthread_key_delete.c: Likewise.
8324         * pthread_setcancelstate.c: Likewise.
8325         * pthread_setcanceltype.c: Likewise.
8326         * pthread_timedjoin.c: Likewise.
8327         * pthread_tryjoin.c: Likewise.
8328         * sysdeps/pthread/createthread.c: Likewise.
8330 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8332         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8333         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8334         definitions.  Replace uses with calls to atomic_* functions.
8335         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8336         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8337         __lll_test_and_set calls with atomic_exchange_and_add and
8338         atomic_exchange calls respectively.
8339         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8340         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8341         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8342         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8343         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8344         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8345         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8347         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8348         returns the old value.
8350 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8352         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8353         int for variable OLDVAL and correct inline assembler contraint.
8354         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8355         type int for variable OLD.
8357         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8358         only for s390-32.
8359         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8360         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8361         instead of multiple_threads field in the TCB.
8363 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8365         * sysdeps/i386/i686/bits/atomic.h: Removed.
8366         * sysdeps/i386/i586/bits/atomic.h: Removed.
8367         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8368         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8369         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8370         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8371         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8372         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8373         * atomic.h: Removed.  Moved to glibc.
8375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8376         support for clock selection.
8378         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8379         signalling waiters.
8381 2003-03-18  Roland McGrath  <roland@redhat.com>
8383         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8384         Add __lll_rel_instr first.  Add memory clobber.
8385         (lll_mutex_unlock): Use __lll_test_and_set.
8386         From Paul Mackerras <paulus@samba.org>.
8388         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8389         unconditionally.
8390         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8391         (SINGLE_THREAD_P):  Add `header.' prefix.
8392         From Paul Mackerras <paulus@samba.org>.
8394         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8395         pthread_timedjoin_np to ...
8396         (libpthread: GLIBC_2.3.3): ... here.
8397         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8399         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8400         Avoid shadowing VAL variable.
8402         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8403         New macro.
8405 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8407         * Makefile (tests): Add tst-cond11.
8408         * tst-cond11.c: New file.
8410         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8411         struct passed to cleanup handler to eliminate one more
8412         instruction.
8413         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8415         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8416         (pthrad_cond_t): Replace __unused field with __clock.
8418         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8419         waken all waiters in cleanup handler.
8420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8423         * pthread_condattr_getclock.c: New file.
8424         * pthread_condattr_setclock.c: New file.
8425         * sysdeps/pthread/pthread.h: Declare these new functions.
8426         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8427         * Makefile (libpthread-routines): Add the new functions.
8428         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8429         Renamed field to value.  Document use of the bits.
8430         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8431         change.
8432         * pthread_condattr_setpshared.c: Likewise.
8433         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8434         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8435         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8436         Add __clock field.
8437         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8438         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8439         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8440         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8442         Implement clock selection.
8443         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8444         * pthread-errnos.sym: Add ENOSYS.
8445         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8446         _POSIX_CLOCK_SELECTION.
8447         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8449         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8450         invalid .size directive.
8452 2003-03-17  Roland McGrath  <roland@redhat.com>
8454         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8455         Formatting tweaks.
8457 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8459         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8460         Use __lll_add instead of spelling it out.  Use protected symbol names.
8461         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8462         Use __lll_add.
8463         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8464         Renamed from lll_compare_and_swap.  Use new name where necessary.
8465         (__lll_add): Defined.
8466         (__lll_dec_if_positive): Defined.
8467         (__lll_test_and_set): Defined.
8468         * sysdeps/ia64/pthread_spin_init.c: Removed.
8469         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8470         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8471         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8472         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8473         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8474         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8475         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8476         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8477         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8478         __sync_lock_release_si.
8479         Patch by Jakub Jelinek.
8481         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8482         Fix timeout handling.
8483         (__lll_timedwait_tid): Likewise.
8484         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8485         Patch by Jakub Jelinek.
8487         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8489 2003-03-17  Roland McGrath  <roland@redhat.com>
8491         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8492         * sysdeps/pthread/pthread_spin_init.c: New file.
8493         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8494         * sysdeps/powerpc/Makefile: New file.
8495         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8496         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8497         * sysdeps/powerpc/pthreaddef.h: New file.
8498         * sysdeps/powerpc/tcb-offsets.sym: New file.
8499         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8500         * sysdeps/powerpc/tls.h: New file.
8501         * sysdeps/powerpc/bits/atomic.h: New file.
8502         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8503         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8504         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8506         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8507         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8508         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8509         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8510         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8511         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8512         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8513         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8514         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8515         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8516         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8517         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8518         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8519         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8520         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8522         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8523         not gettimeofday.
8524         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8525         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8526         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8527         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8528         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8530 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8532         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8533         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8534         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8536         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8538 2003-03-16  Roland McGrath  <roland@redhat.com>
8540         * tst-fork4.c: Include <string.h>.
8541         * tst-signal2.c: Likewise.
8542         * tst-mutex5.c (do_test): exit -> return.
8543         * tst-mutex2.c: Include <stdlib.h>.
8545 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8547         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8548         (__lll_mutex_timedlock_wait): Correct expected value after
8549         spurious wakeup.  Otherwise we would never wait again.
8551         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8552         zone versus inline asm stupidity.  Use correct instructions.
8554         * tst-rwlock6.c: Add some more status output.
8556 2003-03-15  Roland McGrath  <roland@redhat.com>
8558         * sysdeps/pthread/configure.in: New file.
8559         * sysdeps/pthread/configure: New file (generated).
8561 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8563         * allocatestack.c (allocate_stack): Store the exact stack size of
8564         user allocated stacks.
8566 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8568         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8569         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8570         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8571         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8572         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8573         Use `header.' prefix.
8574         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8576 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8578         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8579         __builtin_frame_address, use stack pointer.
8581         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8582         instead of __builtin_frame_pointer.
8584 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8586         * tst-basic1.c (do_test): Add cast to avoid warning.
8587         * tst-basic2.c (do_test): Likewise.
8589         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8590         amount of stack correction.
8592         * tst-fork4.c: Use test-skeleton.c.
8594 2003-03-14  Roland McGrath  <roland@redhat.com>
8596         * init.c: Fix typo "#eli" for "#else".
8598 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8600         * allocatestack.c (__stack_user): Use hidden_data_def.
8601         * pthread_create.c (__pthread_keys): Likewise.
8603         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8605 2003-03-14  Roland McGrath  <roland@redhat.com>
8607         * tst-fork4.c: New file.
8608         * Makefile (tests): Add it.
8610         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8611         we always define the padding space.
8612         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8613         stopped supporting its own extensions fully.
8614         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8615         struct also called `header', so `header.multiple_threads' is the field
8616         name to use on all machines.
8617         * allocatestack.c (allocate_stack): Use `header.' prefix.
8618         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8619         * pthread_create.c (__pthread_create_2_1): Likewise.
8620         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8621         (THREAD_SELF): Likewise.
8622         * sysdeps/x86_64/tls.h: Likewise.
8623         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8624         (SINGLE_THREAD_P): Likewise.
8625         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8626         (SINGLE_THREAD_P): Likewise.
8627         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8628         (SINGLE_THREAD_P): Likewise.
8630         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8631         value directly.
8633 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8635         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8636         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8638         * pthread_create.c (start_thread): setjmp is expected to return 0.
8640         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8641         (THREAD_GETMEM_NC): Likewise.
8643 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8645         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8646         and the size of the stack which must be allocated is a multiple,
8647         allocate one more page.
8648         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8649         MULTI_PAGE_ALIASING.
8651 2003-03-13  Roland McGrath  <roland@redhat.com>
8653         * pthread_create.c (start_thread): Set EXITING_BIT after the
8654         event-reporting (and destructors), not before.
8656 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8658         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8659         lll_futex_wake): Declare register variables as long int instead of
8660         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8661         Make syscall arguments clobbered by the syscall.
8662         (lll_futex_wait): Define using lll_futex_timed_wait.
8664         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8665         to void *.
8667         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8668         PPID if [! NDEBUG].
8670         * allocatestack.c (nptl_ncreated): Only declare if
8671         COLORING_INCREMENT != 0.
8673         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8674         (__libc_enable_asynccancel_2): Remove prototype.
8676         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8677         ctid to match kernel.
8679 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8681         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8682         libc_multiple_threads.
8683         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8684         __libc_multiple_threads to...
8685         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8687         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8688         versioning.
8689         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8690         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8692         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8693         (__pthread_once_internal): Define.
8695         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8696         macros instead of .symver directly.
8697         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8698         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8700         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8701         * sysdeps/x86_64/tcb-offsets.sym: New file.
8702         * sysdeps/x86_64/Makefile: New file.
8704         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8705         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8706         to access own pthread_t in TCB.
8707         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8708         Likewise.
8709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8710         Likewise.
8711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8713 2003-03-12  Roland McGrath  <roland@redhat.com>
8715         * pthread-errnos.sym: New file.
8716         * Makefile (gen-as-const-headers): New variable, list that file.
8717         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8718         header <pthread-errnos.h> instead of defining errno values here.
8719         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8720         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8721         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8722         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8723         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8724         Likewise.
8725         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8726         Likewise.
8727         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8728         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8729         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8730         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8731         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8732         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8733         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8734         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8735         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8736         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8737         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8738         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8739         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8740         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8741         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8742         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8743         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8744         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8745         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8746         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8747         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8748         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8749         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8750         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8751         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8752         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8753         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8755         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8756         CLONE_CHILD_SETTID worked.
8758 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8760         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8761         file.
8762         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8763         file.
8765         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8766         (pthread_cond_t): Add padding.
8768         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8769         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8770         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8773         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8774         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8775         (__pthread_rwlock_timedrdlock): Likewise.
8776         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8777         (__pthread_rwlock_wrlock): Likewise.
8778         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8779         (__pthread_rwlock_rdlock): Likewise.
8781         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8784         result of lock re-get if it fails.
8786 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8788         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8789         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8790         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8791         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8792         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8793         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8794         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8795         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8796         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8797         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8799         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8800         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8802         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8803         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8804         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8805         (create_thread): Likewise.
8806         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8807         * init.c (__pthread_initialize_minimal_internal): Initialize
8808         __libc_multiple_threads_ptr if necessary.
8809         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8810         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8811         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8812         __libc_multiple_threads.
8813         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8814         necessary.
8816         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8817         (THREAD_SETMEM_NC): Likewise.
8819         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8820         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8821         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8822         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8824         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8825         Eliminate one entire instruction.
8827         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8828         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8830         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8831         instead of __pthread_enable_asynccancel.
8832         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8833         (__pthread_cond_wait): Likewise.
8834         * sysdeps/pthread/pthread_cond_timedwait.c
8835         (__pthread_cond_timedwait): Likewise.
8836         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8839         (__condvar_cleanup): Wake up all waiters in case we got signaled
8840         after being woken up but before disabling asynchronous
8841         cancellation.
8842         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8843         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8844         (__condvar_cleanup): Likewise.
8846         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8847         Make it an error if architecture has no #if case.  Add x86-64.
8849         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8850         pt-initfini.s generation.
8852         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8853         (TLS_INIT_TP): Fix typo.
8855 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8857         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8858         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8860         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8861         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8862         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8863         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8864         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8865         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8866         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8867         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8869 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8871         * sysdeps/pthread/pthread_cond_timedwait.c
8872         (__pthread_cond_timedwait): Return the result of the final
8873         locking.  If it succeeds, the regular function return value.
8875         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8876         Return result of the final locking.
8877         * version.c (__nptl_main): Work around problems with the strange
8878         INTERNAL_SYSCALL macro on ppc32.
8879         * init.c (__pthread_initialize_minimal_internal): Unblock
8880         SIGCANCEL in case the parent blocked it.
8881         Reported by Paul Mackerras <paulus@samba.org>.
8883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8884         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8885         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8887 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8889         * sysdeps/pthread/pthread_cond_timedwait.c
8890         (__pthread_cond_timedwait): Unlock and fail if
8891         __pthread_mutex_unlock_internal failed.
8893         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8894         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8895         Use ARCH_CLONE.
8896         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8897         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8898         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8899         ALLOCATE_STACK): New macros.
8900         (TLS_TPADJ): New macro.
8901         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8902         (allocate_stack): Handle TLS_DTV_AT_TP and
8903         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8904         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8905         Don't set PD->self.
8906         * init.c [__ia64__] (__NR_set_tid_address): Define.
8908         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8909         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8910         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8911         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8912         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8913         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8914         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8915         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8916         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8917         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8918         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8919         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8920         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8921         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8922         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8923         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8924         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8925         * sysdeps/ia64/bits/atomic.h: New file.
8926         * sysdeps/ia64/Makefile: New file.
8927         * sysdeps/ia64/pthread_spin_init.c: New file.
8928         * sysdeps/ia64/pthread_spin_lock.c: New file.
8929         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8930         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8931         * sysdeps/ia64/pthreaddef.h: New file.
8932         * sysdeps/ia64/tcb-offsets.sym: New file.
8933         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8934         * sysdeps/ia64/tls.h: New file.
8936         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8937         to syscall instead of no arguments.
8939 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8941         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8942         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8943         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8944         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8946         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8947         unused code.
8949         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8951         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8952         lowlevelbarrier.sym.
8953         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8954         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8955         Include lowlevelbarrier.h and don't define offsets locally.
8956         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8958         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8959         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8960         (__lll_mutex_timedlock_wait): Likewise.
8961         (lll_mutex_lock): Adjust asm for that.
8962         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8963         (lll_lock): Adjust asm for operand order change.
8964         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8965         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8967         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8968         Reverse order of parameters.
8969         (__lll_timedwait_tid): Remove regparms attribute.
8970         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8971         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8973         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8974         (__lll_timedwait_tid): Remove one unnecessary instruction.
8976         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8977         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8978         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8979         lowlevelmutex.S.
8981         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8982         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8983         for NOT_IN_libc.
8984         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8985         lowlevellock.S.
8987         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8988         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8989         for libc.so.
8990         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8991         define LOCK here (if UP is not defined).  The actual code is in
8992         lowlevelmutex.S.
8994         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8995         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8996         __lll_timedwait_tid for libc.so.
8997         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8998         define LOCK here (if UP is not defined).  The actual code is in
8999         lowlevellock.S.
9001         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
9002         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
9003         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
9004         instead of lowlevelsem.h.
9005         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9006         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
9007         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
9009         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
9010         lowlevelrwlock.sym.
9011         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
9012         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
9013         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
9015         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
9016         register loading.
9017         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
9018         last changed.  D'oh.
9020         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
9022         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
9023         of __libc_locking_needed.
9024         (lll_trylock): Initialize %eax to zero.
9026         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
9027         pthread_cond_t definition.
9029 2003-03-10  Roland McGrath  <roland@redhat.com>
9031         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
9032         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
9033         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
9034         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
9035         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
9037         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
9038         Instead of setting PD->multiple_threads, set globals
9039         __pthread_multiple_threads and __libc_multiple_threads.
9040         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9041         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
9042         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
9044         * descr.h (struct pthread): Conditionalize first member on
9045         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
9046         containing an anonymous tcbhead_t.  Move `list' member out.
9047         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
9048         * allocatestack.c: Remove use of `header.data.' prefix.
9049         * pthread_create.c: Likewise.
9050         * init.c (__pthread_initialize_minimal_internal): Likewise.
9051         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9052         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
9053         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
9054         * sysdeps/x86_64/tls.h: Likewise.
9055         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9056         (SINGLE_THREAD_P): Likewise.
9057         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9058         (SINGLE_THREAD_P): Likewise.
9059         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
9060         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
9062 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
9064         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
9066         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
9067         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9069         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
9070         leftovers from the ia32 code.
9072         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
9073         memory load.
9074         (clear_once_control): Don't load %esi.
9076         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
9077         handling.
9079         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
9081         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
9082         * sysdeps/unix/sysv/linux/createthread.c: ...here.
9084         * Makefile (tests): Add tst-cond10.
9085         * tst-cond10.c: New file.
9087 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
9089         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
9090         * tst-signal3.c (do_test): Likewise.
9091         * tst-sem5.c (do_test): Likewise.
9092         * tst-kill6.c (do_test): Likewise.
9093         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
9095         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
9096         of inc/dec.
9097         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9098         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
9099         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9100         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
9101         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9102         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9103         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9104         Likewise.
9105         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9106         Likewise.
9107         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9108         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9109         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9110         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9111         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9112         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9113         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9114         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9116         * allocatestack.c (allocate_stack): If mprotect() fails free the
9117         TLS memory.
9119 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
9121         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
9123         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
9124         lll_wake_tid.  This was used only to work around kernel limits in
9125         the early days.
9126         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
9127         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
9128         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
9129         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
9131         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
9132         (__pthread_initialize_minimal_internal): Change initialization of
9133         __static_tls_align_m1 appropriately.
9134         * pthreadP.h (__static_tls_align_m1): Renamed from
9135         __static_tls_align.
9136         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
9137         instead of __static_tls_align-1.
9139 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
9141         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
9143         * pthread_create.c: Define __pthread_keys using nocommon
9144         attribute, not by placing it explicitly in bss.
9145         Remove DEFINE_DEALLOC definition.  Not needed anymore.
9147         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
9148         Use it in mmap call to allocate stacks.
9150         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
9152         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
9153         result of the thread function.
9155 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
9157         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
9158         version is just fine.
9160         * sysdeps/unix/sysv/linux/libc_pthread_init.c
9161         (__pthread_child_handler): Renamed from pthread_child_handler,
9162         exported, and marked hidden.  Change all users.
9163         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
9164         free __pthread_child_handler from child list.
9166 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9168         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
9170         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9171         Fix handling of cancellation and failing pthread_mutex_unlock call.
9172         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
9173         (__pthread_cond_wait): Likewise.
9175         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
9176         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
9177         lll_futex_timed_wait call.
9178         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
9179         (pthread_rwlock_timedwrlock): Likewise.
9181         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9182         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
9183         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
9185         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
9186         check of lll_futex_wake return value.
9188 2003-03-03  Roland McGrath  <roland@redhat.com>
9190         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
9192         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9193         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
9194         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
9196 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
9198         * sysdeps/pthread/timer_create.c (timer_create): Return correct
9199         error for CPU clocks.
9201         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9202         _POSIX_MONOTONIC_CLOCK.
9203         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9205         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
9206         recent kernels.
9208 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9210         * descr.h (struct pthread): Move cleanup field to the front.
9212 2003-03-01  Roland McGrath  <roland@redhat.com>
9214         * sem_open.c (sem_open): Braino fix.
9216 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9218         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9220         __pthread_cleanup_pop functionality.
9221         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9223         * descr.h (struct pthread): Move tid field to the front now that
9224         it is often used.
9226         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9227         (__lll_mutex_timedlock_wait): Remove.
9228         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9229         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9230         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9231         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9232         (lll_unlock_wake_cb): Don't save and restore %esi.
9233         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9234         %esi.
9235         (__lll_timedwait_tid): Add alignment.
9236         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9237         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9238         %esi.
9239         (__lll_timedwait_tid): Removed.
9240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9241         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9242         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9243         (pthread_barrier_wait): Don't save, load, and restore %esi for
9244         last thread.
9245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9246         (__pthread_cond_signal): Don't save, load, and restore %esi.
9247         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9248         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9249         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9250         Don't save, load, and restore %esi.
9252 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9255         Release lock before waking up the waiters.
9257         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9259         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9260         (reader_thread): Likewise.
9262         * sysdeps/pthread/pthread_rwlock_unlock.c
9263         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9264         to wake up readers if there are none.
9266         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9267         Release internal lock before wake threads.
9269 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9271         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9272         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9273         predefined.
9274         * tst-rwlock9.c: Likewise.
9275         * tst-rwlock10.c: New file.
9276         * tst-rwlock11.c: New file.
9278         * Makefile (tests): Add tst-dlsym1.
9279         * tst-dlsym1.c: New file.
9281         * init.c (__pthread_initialize_minimal_internal): Set
9282         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9283         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9285 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9287         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9289         * tst-cond2.c: Fix sychronization with child.
9291         * tst-rwlock8.c (reader_thread): Remove unused variable.
9293         * Makefile: Add rules to build and run tst-tls3.
9294         * tst-tls3.c: New file.
9295         * tst-tls3mod.c: New file.
9297         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9298         * tst-rwlock8.c: New file.
9299         * tst-rwlock9.c: New file.
9300         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9301         complete broken rwlock implementation.
9302         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9303         Likewise.
9304         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9305         Likewise.
9306         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9307         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9308         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9309         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9310         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9311         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9312         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9314 2003-02-23  Roland McGrath  <roland@redhat.com>
9316         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9318 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9320         * Makefile (tests): Add tst-context1.
9321         * tst-context1.c: New file.
9323         * Makefile (tests): Add tst-tls1 and tst-tls2.
9324         * tst-tls1.c: New file.
9325         * tst-tls2.c: New file.
9327         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9328         for failed cmpxchg.
9330         * pthread_create.c (start_thread): Set EXITING_BIT early.
9332         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9333         (THREAD_GETMEM_NC): Likewise.
9335 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9337         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9338         off 3 more bytes by using offset-less instructions when possible.
9340         * Makefile: Add dependency for $(objpfx)version.d.
9342         * eintr.c (eintr_source): Add unnecessary return but the compiler
9343         insists.
9345         * tst-kill3.c: Include <unistd.h>.
9347 2003-02-21  Roland McGrath  <roland@redhat.com>
9349         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9351 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9353         * Makefile (tests): Add tst-eintr1.
9354         (distribute): Add eintr.c.
9355         * tst-eintr1.c: New file.
9356         * eintr.c: New file.
9358         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9360         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9361         Disallow sending SIGCANCEL.
9363         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9364         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9365         * tst-kill1.c: New file.
9366         * tst-kill2.c: New file.
9367         * tst-kill3.c: New file.
9368         * tst-kill5.c: New file.
9369         * tst-kill6.c: New file.
9370         * tst-basic7.c: Renamed to...
9371         * tst-kill4.c: ...this.
9373 2003-02-21  Roland McGrath  <roland@redhat.com>
9375         * Makefile (install-lib-ldscripts): New variable.
9377 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9379         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9380         * pthread_cancel.c: Use INVALID_TD_P.
9381         * pthread_detach.c: Likewise.
9382         * pthread_getschedparam.c: Likewise.
9383         * pthread_setschedparam.c: Likewise.
9384         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9385         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9386         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9387         * pthread_timedjoin.c: Likewise.
9389         * tst-basic7.c: Include <signal.h>.
9391         * pthread_join.c (pthread_join): Limited checking for invalid
9392         descriptors.
9393         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9395 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9397         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9398         beginning of the loop.  Clear the entire first block of TSD.
9399         * Makefile (tests): Add tst-key4.
9400         * tst-key4.c: New file.
9402 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9404         * Makefile (tests): Add tst-basic7.
9405         * tst-basic7.c: New file.
9407         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9408         Add some more __builtin_expect.
9410         * pthreadP.h: Define dummy version of DEBUGGING_P.
9412 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9414         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9415         _POSIX_THREAD_PRIORITY_SCHEDULING.
9416         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9417         _XOPEN_REALTIME_THREADS.
9418         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9420         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9421         kernel returns EINVAL for PID <= 0, work around it.
9423         * Makefile (tests): Add tst-signal5.
9424         * tst-signal5.c: New file.
9426         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9427         and LOGIN_NAME_MAX.
9429         * tst-cancel1.c (tf): Block all signals.
9431         * Makefile (tests): Add tst-basic6.
9432         * tst-basic6.c: New file.
9434         * tst-basic1.c: Add test for process ID.
9436         * Makefile (tests): Add tst-cancel10.
9437         * tst-cancel10.c: New file.
9439         * Makefile (tests): Add tst-signal4.
9440         * tst-signal4.c: New file.
9442         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9443         __sigismember instead of sigismember.  Add __builtin_expect.
9445 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9447         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9448         pthread_setcancelstate, and pthread_rwlock_setpshared.
9450         * tst-cancel7.c (do_test): Make sure the pid file exists before
9451         canceling the thread.
9453         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9454         pthread_rwlock_timedrdlock tests.
9455         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9457         Check for invalid tv_nsec field.
9458         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9459         Likewise.
9461         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9462         recursive mutex of overflow.
9464         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9466         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9467         going into an endless loop.
9468         * Makefile (tests): Add tst-cancel9.
9469         * tst-cancel9.c: New file.
9471         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9473 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9475         * tst-mutex5.c (do_test): Add more timedlock tests.
9477         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9478         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9480         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9481         use INLINE_SYSCALL.  Error number is returned, not -1.
9483         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9484         and __deallocate_stack with internal_function.
9485         * pthread_create.c: Adjust definitions appropriately.
9486         * allocatestack.c: Likewise.
9488         * pthread_join.c: Add one more __builtin_expect.
9489         * pthread_timedjoin.c: Likewise.
9491         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9492         not data of sequence number does not match.
9493         Add one __builtin_expect.
9495         * Makefile (tests): Add tst-clock1.
9496         * tst-clock1.c: New file.
9498         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9499         negative arguments.
9500         * Makefile (tests): Add tst-basic5.
9501         * tst-basic5.c: New file.
9503 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9505         * Makefile (tests): Add tst-basic4.
9506         * tst-basic4.c: New file.
9508         * pthreadP.h: Add declaraction for __nptl_nthreads.
9509         * pthread_create.c: Define __nptl_nthreads
9510         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9511         after thread is done.  If then zero, call exit(0).
9512         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9513         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9514         * init.c (pthread_functions): Initialize ptr_nthreads.
9515         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9516         (__reclaim_stacks): Decrement __nptl_nthreads.
9517         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9518         Define.
9519         * Makefile (tests): Add tst-basic3.
9520         * tst-basic3.c: New file.
9522         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9523         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9524         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9525         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9526         if asynchronous canceling is enabled.
9527         * pthread_join.c (pthread_join): When recognizing circular joins,
9528         take into account the other thread might be already canceled.
9529         * Makefile (tests): Add tst-join5.
9530         * tst-join5.c: New file.
9532         * Makefile (tests): Add tst-join4.
9533         * tst-join4.c: New file.
9535 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9537         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9539 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9541         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9542         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9543         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9544         warning.
9545         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9546         to avoid warning.
9547         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9548         error if lll_futex_wake failed.
9550 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9553         handling of cancellation and failung pthread_mutex_unlock call.
9554         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9555         * Makefile (tests): Add tst-cond8 and tst-cond9.
9556         * tst-cond8.c: New file.
9557         * tst-cond9.c: New file.
9559         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9561         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9562         non-standard initializers with __USE_GNU.
9564         * Makefile (tests): Add tst-cleanup3.
9565         * tst-cleanup3.c: New file.
9567 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9569         * Makefile (tests): Add tst-attr1 and tst-attr2.
9570         * tst-attr1.c: New file.
9571         * tst-attr2.c: New file.
9573         * Makefile: Add rules to build and run tst-atfork2 test.
9574         * tst-atfork2.c: New file.
9575         * tst-atfork2mod.c: New file.
9577         * sysdeps/unix/sysv/linux/unregister-atfork.c
9578         (__unregister_atfork): Free the memory allocated for the handlers
9579         after removing them from the lists.
9581         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9582         cleanup function.
9584         * tst-atfork1.c (do_test): Wait for the child we forked.
9585         Report error in child.
9587         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9589         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9591 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9593         * Makefile (tests): Add tst-cancel8.
9594         * tst-cancel8.c: New file.
9596         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9597         clearing of control variable.
9598         * Makefile (tests): Add tst-once3 and tst-once4.
9599         * tst-once3.c: New file.
9600         * tst-once4.c: New file.
9602 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9604         * sysdeps/sh/Makefile: New file.
9605         * sysdeps/sh/bits/atomic.h: New file.
9606         * sysdeps/sh/pthread_spin_init.c: New file.
9607         * sysdeps/sh/pthread_spin_lock.c: New file.
9608         * sysdeps/sh/pthread_spin_trylock.S: New file.
9609         * sysdeps/sh/pthread_spin_unlock.S: New file.
9610         * sysdeps/sh/pthreaddef.h: New file.
9611         * sysdeps/sh/tcb-offsets.sym: New file.
9612         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9613         * sysdeps/sh/tls.h: New file.
9614         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9615         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9616         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9617         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9618         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9619         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9620         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9621         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9622         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9623         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9624         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9625         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9626         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9627         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9628         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9629         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9630         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9631         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9632         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9633         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9634         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9635         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9636         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9637         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9638         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9639         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9640         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9641         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9642         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9643         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9645 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9647         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9648         according to POSIX.
9650         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9652 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9654         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9655         (TLS_GET_FS): New #define.
9656         (TLS_SET_FS): New #define.
9657         Correct value of __NR_set_thread_area.
9659         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9661 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9663         * Makefile (tests): Add tst-popen1.
9664         * tst-popen1.c: New file.
9666         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9667         but inactive generalization.
9668         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9669         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9670         Minor optimization, remove one instruction.
9671         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9673 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9675         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9677 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9679         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9680         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9681         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9682         * sysdeps/pthread/pthread_cond_signal.c: New file.
9683         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9684         * sysdeps/pthread/pthread_cond_wait.c: New file.
9685         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9686         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9687         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9688         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9689         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9690         * sysdeps/s390/Makefile: New file.
9691         * sysdeps/s390/bits/atomic.h: New file.
9692         * sysdeps/s390/pthread_spin_init.c: New file.
9693         * sysdeps/s390/pthread_spin_lock.c: New file.
9694         * sysdeps/s390/pthread_spin_trylock.c: New file.
9695         * sysdeps/s390/pthread_spin_unlock.c: New file.
9696         * sysdeps/s390/pthreaddef.h: New file.
9697         * sysdeps/s390/tcb-offsets.sym: New file.
9698         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9699         * sysdeps/s390/tls.h: New file.
9700         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9701         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9702         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9703         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9704         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9705         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9706         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9707         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9708         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9709         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9710         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9711         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9712         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9713         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9714         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9715         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9716         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9717         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9718         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9719         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9720         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9721         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9722         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9724 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9726         * atomic.h: Add a couple more default implementations.
9727         (atomic_compare_and_exchange_acq): Use
9728         __arch_compare_and_exchange_32_acq in return value definition.  It
9729         always exists.
9730         (atomic_bit_set): Renamed from atomic_set_bit.
9731         Add missing atomic_ prefixes.
9733         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9734         thread library is available, use correct value to mark initialized
9735         once variable.
9737 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9739         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9740         __sysconf to determine pagesize.
9742         * pthread_create.c: Include <atomic.h>.
9743         * allocatestack.c (allocate_stack): Implement coloring of the
9744         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9745         size minus one.  Adjust users.
9746         * sysdeps/i386/i686/Makefile: New file.
9748 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9750         * allocatestack.c: Improve comment throughout the file.
9752         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9753         (__lll_lock_wait): Add branch prediction.
9754         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9755         (__lll_lock_wait): Likewise.
9756         (lll_unlock_wake_cb): Removed.
9758 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9760         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9761         _POSIX_THREAD_PRIORITY_SCHEDULING.
9763 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9765         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9766         Fix return type of ptr___pthread_getspecific.
9768 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9770         * Makefile (tests): Add tst-umask1.
9771         (tst-umask1-ARGS): Define.
9772         * tst-umask1.c: New file.
9774 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9776         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9777         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9778         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9779         pthread_rwlock_unlock.
9780         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9781         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9782         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9783         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9785         New file.
9786         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9787         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9788         New file.
9789         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9790         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9791         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9792         New file.
9793         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9794         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9795         New file.
9796         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9797         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9798         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9799         New file.
9800         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9801         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9802         New file.
9803         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9805         * Makefile (libpthread-routines): Remove lowlevelcond and
9806         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9807         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9808         and pthread_cond_broadcast.
9809         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9810         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9811         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9812         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9813         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9814         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9815         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9816         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9817         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9818         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9819         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9823         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9824         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9825         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9826         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9827         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9828         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9829         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9830         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9831         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9832         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9833         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9834         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9835         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9836         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9837         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9838         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9839         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9841         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9842         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9843         of the code is moved to ...
9844         * sysdeps/pthread/createthread.c: ...here.  New file.
9846 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9848         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9849         (__new_sem_post): Clear %eax before returning.
9850         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9852         * Makefile (tests): Add tst-cleanup2.
9853         * tst-cleanup2.c: New file.
9855         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9856         Interpret first parameter correctly.
9858 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9860         * Makefile (headers): Add bits/semaphore.h.
9862 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9864         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9865         if not SHARED.
9867 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9869         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9870         must be used and mapping failed.
9871         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9873         * Makefile (CFLAGS-pthread_self.os): Define this, not
9874         CFLAGS-pthread_self.c.
9876 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9878         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9879         lll_unlock_wake_cb.
9881         * Makefile (libpthread-routines): Add version.  Add rules to build
9882         version.os and banner.h.
9883         * version.c: New file.
9885 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9887         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9888         the alias unconditional.
9889         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9891 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9893         * Makefile (CFLAGS-pthread_self.c): New definition.
9895 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9897         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9898         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9899         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9900         * init.c (__pthread_initialize_minimal_internal): Likewise.
9902 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9904         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9906         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9907         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9908         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9909         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9910         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9911         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9913 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9915         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9916         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9917         * tst-cancel-wrappers.sh: Remove all exceptions.
9919 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9921         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9922         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9924         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9925         Use __libc_pthread_functions array if SHARED.
9927         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9928         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9930         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9931         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9932         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9933         __libc_ptf_call instead of __libc_maybe_call.
9934         (PTF): New #define.
9935         (__libc_cleanup_region_start): Wrap function name with PTF call.
9936         (__libc_cleanup_region_end): Likewise.
9937         (__libc_cleanup_end): Likewise.
9939         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9940         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9941         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9942         * pthreadP.h: Add prototypes.
9944         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9945         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9946         __pthread_rwlock_unlock aliases.
9947         * pthreadP.h: Add prototypes for new aliases.
9949         * pthreadP.h (struct pthead_functions): Moved to...
9950         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9951         * init.c (pthread_functions): Add initializers for new elements.
9953         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9954         __pthread_cleanup_pop_restore aliases.
9955         * pthreadP.h: Add prototypes.
9957         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9958         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9959         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9960         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9961         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9962         * pthreadP.h: Adjust prototypes and callers.
9964 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9966         * Makefile (tests): Add tst-cancel7.
9967         (tst-cancel7-ARGS): New variable.
9968         * tst-cancel7.c: New file.
9970         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9971         around gcc defficiencies.
9972         * old_pthread_cond_signal.c: Likewise.
9973         * old_pthread_cond_timedwait.c: Likewise.
9974         * old_pthread_cond_wait.c: Likewise.
9976         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9978 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9980         * Makefile (tests): Add tst-cond7.
9981         * tst-cond7.c: New file.
9983         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9984         (condvar_cleanup): Get condvar address from the right place.
9986         * atomic.h: Correct definitions of atomic_full_barrier,
9987         atomic_read_barrier, atomic_write_barrier.
9989         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9990         race-free.
9991         * old_pthread_cond_signal.c: Likewise.
9992         * old_pthread_cond_timedwait.c: Likewise.
9993         * old_pthread_cond_wait.c: Likewise.
9995 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9997         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9999 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
10001         * pthreadP.h (pthread_cond_2_0_t): New type.
10002         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
10003         Use new type for the 2.0 condvar function prototypes.
10004         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
10005         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
10006         parameter.
10007         * old_pthread_cond_destroy.c: Likewise.
10008         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
10009         * old_pthread_cond_signal.c: Likewise.
10010         * old_pthread_cond_timedwait.c: Likewise.
10011         * old_pthread_cond_wait.c: Likewise.
10013         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
10014         (__pthread_cond_wait): Don't save cancellation mode and seq value
10015         in same location.
10017         * herrno.c (__h_errno_location): Don't define as weak.
10019 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10021         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
10022         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
10023         and pthread_cond_wait.
10024         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
10025         Renamed to...
10026         (__pthread_cond_broadcast_2_0): ... this.
10027         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
10028         Renamed to...
10029         (__pthread_cond_destroy_2_0): ... this.
10030         * old_pthread_cond_init.c (__old_pthread_cond_init):
10031         Renamed to...
10032         (__pthread_cond_init_2_0): ... this.
10033         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
10034         Renamed to...
10035         (__pthread_cond_signal_2_0): ... this.
10036         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
10037         Renamed to...
10038         (__pthread_cond_wait_2_0): ... this.
10039         * pthread_cond_destroy.c: Include shlib-compat.h.
10040         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
10041         * pthread_cond_init.c: Include shlib-compat.h.
10042         (pthread_cond_init): Change strong_alias into versioned_symbol.
10043         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
10044         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
10045         fields.
10046         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
10047         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
10048         __pthread_cond_wait_2_0): New prototypes.
10049         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
10050         __old_pthread_cond_init, __old_pthread_cond_signal,
10051         __old_pthread_cond_wait): Removed.
10052         * init.c: Include shlib-compat.h.
10053         (pthread_functions): Guard ptr___pthread_attr_init_2_0
10054         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
10055         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
10056         ptr___pthread_cond_*_2_0 fields.
10057         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
10058         pthread_cond_*@GLIBC_2.0 compatibility symbols.
10060         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
10061         LIBC_SIGACTION was not yet defined.
10062         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
10063         [!defined LIBC_SIGACTION] (__sigaction): New function and
10064         libc_hidden_weak.
10065         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
10066         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
10068 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
10070         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
10072 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
10074         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10075         New, larger type definition.
10076         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
10077         implementation.
10078         * Versions [libpthread]: Add definitions for new pthread_cond_*
10079         interfaces for version GLIBC_2.3.2.
10080         * pthread_cond_init.c: Update initialization for new type definition.
10081         * Makefile (libpthread-routines): Remove pthread_cond_wait,
10082         pthread_cond_timedwait, pthread_cond_signal, and
10083         pthread_cond_broadcast.  Add old_pthread_cond_init,
10084         old_pthread_cond_destroy, old_pthread_cond_wait,
10085         old_pthread_cond_timedwait, old_pthread_cond_signal, and
10086         old_pthread_cond_broadcast.
10087         * old_pthread_cond_broadcast.c: New file.
10088         * old_pthread_cond_destroy.c: New file.
10089         * old_pthread_cond_init.c: New file.
10090         * old_pthread_cond_signal.c: New file.
10091         * old_pthread_cond_timedwait.c: New file.
10092         * old_pthread_cond_wait.c: New file.
10093         * pthreadP.h: Add prototypes for the compatibility interfaces.
10095         * pthread_cond_destroy.c: Don't include <errno.h>.
10097 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
10099         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
10100         unnecessary zero offset when addressing MUTEX.
10102 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10104         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
10105         __register_atfork.
10106         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
10107         for __register_atfork.
10109 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10111         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
10112         instead of ASSEMBLER test macro.
10114         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
10115         __libc_current_sigrtmax): Add libc_hidden_def.
10117         * sysdeps/pthread/list.h: Remove assert.h include.
10119 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
10121         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
10122         __pthread_initialize_minimal_internal not
10123         __pthread_initialize_minimal.
10125 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
10127         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
10128         __pthread_initialize_minimal as hidden.
10130         * init.c (__pthread_initialize_minimal_internal): Don't mark as
10131         constructor.
10133 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
10135         * Makefile ($(inst_libdir)/libpthread.so): Depend on
10136         $(common-objpfx)format.lds, include that into the output script.
10137         Fix comment.
10138         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
10140 2002-12-28  Andreas Jaeger  <aj@suse.de>
10142         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
10143         nsec resolution changes.
10144         (xstat64_conv): Likewise.
10145         (xstat32_conv): Likewise.
10146         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
10147         struct kernel_stat.
10148         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
10149         structs stat and stat64.
10150         * time/time.h (__timespec_defined): Define for __USE_MISC.
10151         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
10153 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
10155         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
10156         argument.
10157         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
10158         (pthread_exit): Use strong_alias to avoid warnings.
10159         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
10160         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
10161         ptr___pthread_attr_init_2_*.
10162         * init.c (pthread_functions): Adjust.
10164 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
10166         * forward.c: Make all functions available by default again.  It
10167         caused too much trouble.
10169         * pt-siglongjmp.c: Removed.
10171 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
10173         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
10174         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
10175         * sysdeps/i386/Makefile: New file.
10176         * sysdeps/i386/tcb-offsets.sym: New file.
10177         * sysdeps/pthread/tcb-offsets.h: New file.
10178         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10179         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
10181         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
10182         __register_atfork...
10183         (GLIBC_2.3.2): ...here.
10185 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10187         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
10188         pthread_attr_setstackaddr with __attribute_deprecated__.
10190 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10192         * pt-system.c (system): Remove cancellation handling.
10193         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
10194         cancellation routines.
10196 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
10198         * descr.h: Include <dl-sysdep.h>.
10199         (struct pthread): Move header.data.list to the back of the struct.
10200         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
10201         (MULTIPLE_THREADS_OFFSET): Adjust offset.
10202         (SYSINFO_OFFSEET): Likewise.
10204 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
10206         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
10207         Define.
10208         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
10209         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
10210         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
10211         (USE_DL_SYSINFO): Undef.
10213 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
10215         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10216         $(common-objpfx)libc.so.
10217         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10218         it is bigger than pipe buffer size even on arches with bigger
10219         page size.
10220         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10222 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10224         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10225         correct errno access for case that USE___THREAD is not defined.
10227 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10229         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10230         Patch by Marijn Ros <marijn@mad.scientist.com>.
10232 2002-12-22  Roland McGrath  <roland@redhat.com>
10234         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10236 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10238         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10240 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10242         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10243         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10244         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10246         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10247         of int $0x80.
10248         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10249         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10250         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10251         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10252         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10253         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10254         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10255         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10257         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10258         sysenter.
10259         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10261         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10263         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10264         in new TCB.
10265         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10266         that sysinfo is properly initialized.
10267         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10268         to 1 only for ld.so.
10270         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10271         RTLD_CORRECT_DYNAMIC_WEAK.
10273 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10275         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10276         Use return 0 as 6th argument to FORWARD4.
10277         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10279 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10281         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10282         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10283         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10284         (INIT_SYSINFO): New #define.
10285         (TLS_TP_INIT): Use INIT_SYSINFO.
10286         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10287         At test to make sure SYSINFO_OFFSET value is correct.
10288         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10290 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10292         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10293         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10294         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10295         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10296         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10297         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10298         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10300 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10302         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10303         macro instead of using int $0x80 directly.
10305         * sysdeps/pthread/bits/stdio-lock.h: New file.
10306         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10307         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10308         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10309         * Makefile (routines): Add libc-lowlevelmutex.
10311         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10312         __i686.get_pc_thunk.dx.
10314 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10316         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10317         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10318         ($(objpfx)tst-cancel-wrappers.out): New rule.
10319         * tst-cancel-wrappers.sh: New test.
10320         * tst-locale1.c: Include signal.h.
10321         (uselocale): Test static linking of __libc_current_sigrt*.
10323 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10325         * Makefile (tests): Add tst-cancel6.
10326         * tst-cancel6.c: New file
10328 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10330         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10331         Define meaningfully for assembler as well.
10332         * pthreadP.h (struct pthread_functions): Remove
10333         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10334         and ptr_pthread_attr_init_2_1 fields.
10335         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10336         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10337         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10338         (FORWARD3): Define using FORWARD4.
10339         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10340         versions.
10341         * pt-system.c: Remove duplicate stdlib.h include.
10343 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10345         * sem_init.c: Define sem_init@GLIBC_2.0.
10346         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10347         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10349         * flockfile.c: Moved to...
10350         * sysdeps/pthread/flockfile.c: ...here.  New file.
10351         * funlockfile.c: Moved to...
10352         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10353         * ftrylockfile.c: Moved to...
10354         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10356 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10358         * libc-cancellation.c: Guard both function with
10359         #if !defined NOT_IN_libc.
10360         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10361         automatically provided pthread wrappers.
10362         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10363         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10364         nor in libpthread.
10365         * pt-open.c: Removed.
10366         * pt-fcntl.c: Removed.
10367         * pt-fsync.c: Removed.
10368         * pt-lseek.c: Removed.
10369         * pt-msgrcv.c: Removed.
10370         * pt-msgsnd.c: Removed.
10371         * pt-msync.c: Removed.
10372         * pt-nanosleep.c: Removed.
10373         * pt-open64.c: Removed.
10374         * pt-pause.c: Removed.
10375         * pt-pread.c: Removed.
10376         * pt-pread64.c: Removed.
10377         * pt-pwrite.c: Removed.
10378         * pt-pwrite64.c: Removed.
10379         * pt-read.c: Removed.
10380         * pt-recv.c: Removed.
10381         * pt-recvfrom.c: Removed.
10382         * pt-recvmsg.c: Removed.
10383         * pt-send.c: Removed.
10384         * pt-sendto.c: Removed.
10385         * pt-sigtimedwait.c: Removed.
10386         * pt-sigwait.c: Removed.
10387         * pt-wait.c: Removed.
10388         * pt-waitpid.c: Removed.
10389         * pt-write.c: Removed.
10390         * pt-accept.c: Removed.
10391         * pt-close.c: Removed.
10392         * pt-connect.c: Removed.
10393         * pt-lseek64.c: Removed.
10394         * pt-sendmsg.c: Removed.
10395         * pt-tcdrain.c: Removed.
10397 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10399         * init.c (__pthread_initialize_minimal_internal): Renamed from
10400         __pthread_initialize_minimal.  Make old name an alias.  This
10401         converts a normal relocation into a relative relocation.
10403         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10405         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10406         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10407         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10408         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10409         pt-sigwaitinfo, pt-waitid, and pt-writev.
10410         * pt-creat.c: Removed.
10411         * pt-poll.c: Removed.
10412         * pt-pselect.c: Removed.
10413         * pt-readv.c: Removed.
10414         * pt-select.c: Removed.
10415         * pt-sigpause.c: Removed.
10416         * pt-sigsuspend.c: Removed.
10417         * pt-sigwaitinfo.c: Removed.
10418         * pt-waitid.c: Removed.
10419         * pt-writev.c: Removed.
10421         * init.c (pthread_functions): New variable.
10422         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10423         (or NULL) to __libc_pthread_init.
10424         * forward.c: Rewrite to use __libc:pthread_functions array to get
10425         function addresses.
10426         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10427         prototype.
10428         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10429         Take new parameter.  Copy content of variable pointed to by it
10430         to __libc_pthread_init.
10432         * pthreadP.h (struct pthread_functions): New type.
10433         (__libc_pthread_init): Declare.
10435         * pthread_attr_destroy.c: Add namespace protected alias.
10436         * pthread_attr_getdetachstate.c: Likewise.
10437         * pthread_attr_getinheritsched.c: Likewise.
10438         * pthread_attr_getschedparam.c: Likewise.
10439         * pthread_attr_getschedpolicy.c: Likewise.
10440         * pthread_attr_getscope.c: Likewise.
10441         * pthread_attr_setdetachstate.c: Likewise.
10442         * pthread_attr_setinheritsched.c: Likewise.
10443         * pthread_attr_setschedparam.c: Likewise.
10444         * pthread_attr_setschedpolicy.c: Likewise.
10445         * pthread_attr_setscope.c: Likewise.
10446         * pthread_cond_broadcast.c: Likewise.
10447         * pthread_cond_destroy.c: Likewise.
10448         * pthread_cond_init.c: Likewise.
10449         * pthread_cond_signal.c: Likewise.
10450         * pthread_cond_wait.c: Likewise.
10451         * pthread_condattr_destroy.c: Likewise.
10452         * pthread_condattr_init.c: Likewise.
10453         * pthread_equal.c: Likewise.
10454         * pthread_exit.c: Likewise.
10455         * pthread_getschedparam.c: Likewise.
10456         * pthread_self.c: Likewise.
10457         * pthread_setcancelstate.c: Likewise.
10458         * pthread_setschedparam.c: Likewise.
10459         * pthread_mutex_destroy.c: Likewise.
10460         * pthread_mutex_init.c: Likewise.
10461         * pthreadP.h: Add prototypes for the aliases.
10463         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10464         multiple_threads member in correct TCB to 1.
10466         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10467         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10468         member of thread decriptor, otherwise return unconditionally 1.
10470 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10472         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10473         regular Linux version.  Remove file.
10474         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10475         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10476         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10477         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10478         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10479         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10480         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10481         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10482         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10483         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10484         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10485         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10486         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10487         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10488         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10489         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10490         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10491         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10492         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10493         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10494         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10495         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10496         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10497         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10498         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10499         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10500         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10501         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10502         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10503         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10505 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10507         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10508         * sysdeps/unix/sysv/linux/open.c: Removed.
10509         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10510         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10511         * sysdeps/unix/sysv/linux/msync.c: Removed.
10512         * sysdeps/unix/sysv/linux/read.c: Removed.
10513         * sysdeps/unix/sysv/linux/close.c: Removed.
10514         * sysdeps/unix/sysv/linux/creat.c: Removed.
10515         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10516         * sysdeps/unix/sysv/linux/pause.c: Removed.
10517         * sysdeps/unix/sysv/linux/select.c: Removed.
10518         * sysdeps/unix/sysv/linux/write.c: Removed.
10520 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10522         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10523         element in TCB to see whether locking is needed.
10525         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10526         MULTIPLE_THREADS_OFFSET value is correct.
10528         * sysdeps/unix/sysv/linux/close.c: New file.
10529         * sysdeps/unix/sysv/linux/connect.S: New file.
10530         * sysdeps/unix/sysv/linux/creat.c: New file.
10531         * sysdeps/unix/sysv/linux/fsync.c: New file.
10532         * sysdeps/unix/sysv/linux/llseek.c: New file.
10533         * sysdeps/unix/sysv/linux/lseek.c: New file.
10534         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10535         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10536         * sysdeps/unix/sysv/linux/msync.c: New file.
10537         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10538         * sysdeps/unix/sysv/linux/open.c: New file.
10539         * sysdeps/unix/sysv/linux/open64.c: New file.
10540         * sysdeps/unix/sysv/linux/pause.c: New file.
10541         * sysdeps/unix/sysv/linux/poll.c: New file.
10542         * sysdeps/unix/sysv/linux/pread.c: New file.
10543         * sysdeps/unix/sysv/linux/pread64.c: New file.
10544         * sysdeps/unix/sysv/linux/pselect.c: New file.
10545         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10546         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10547         * sysdeps/unix/sysv/linux/readv.c: New file.
10548         * sysdeps/unix/sysv/linux/recv.S: New file.
10549         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10550         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10551         * sysdeps/unix/sysv/linux/select.c: New file.
10552         * sysdeps/unix/sysv/linux/send.S: New file.
10553         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10554         * sysdeps/unix/sysv/linux/sendto.S: New file.
10555         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10556         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10557         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10558         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10559         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10560         * sysdeps/unix/sysv/linux/system.c: New file.
10561         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10562         * sysdeps/unix/sysv/linux/wait.c: New file.
10563         * sysdeps/unix/sysv/linux/waitid.c: New file.
10564         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10565         * sysdeps/unix/sysv/linux/writev.c: New file.
10566         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10568         * pt-readv.c: Fix comment.
10570 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10572         * tst-cleanup1.c: Include stdlib.h.
10574         * tst-cancel5.c: New test.
10575         * Makefile (tests): Add tst-cancel5.
10576         (tst-cancel5): Link against libc.so libpthread.so in that order.
10578 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10580         * forward.c (test_loaded): Prevent recursive calls.
10582         * Makefile (routines): Add libc-cancellation.
10583         * libc-cancellation.c: New file.
10584         * descr.h (struct pthread): Add multiple_threads field.
10585         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10586         new thread descriptor to 1.
10587         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10588         Initialize multiple_thread field after successful thread creation.
10589         * cancellation.c (__do_cancel): Move to pthreadP.h.
10590         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10591         (__pthread_disable_asynccancel): Add internal_function attribute.
10592         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10593         * pthread_setcancelstate.c: Likewise.
10594         * pthread_setcanceltype.c: Likewise.
10595         * pthread_exit.c: Likewise.
10596         * pthreadP.h (CANCELLATION_P): Likewise.
10597         (__do_cancel): Define as static inline.
10598         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10599         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10600         declarations.
10601         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10602         fields.  Define MULTIPLE_THREADS_OFFSET.
10603         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10604         declaration.
10605         * sysdeps/unix/sysv/linux/accept.S: New file.
10606         * sysdeps/unix/sysv/linux/read.c: New file.
10607         * sysdeps/unix/sysv/linux/write.c: New file.
10608         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10609         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10610         initialization of __libc_locking_needed.
10611         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10612         __libc_locking_needed, use multiple_threads field in TCB.
10613         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10615 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10617         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10618         version.
10619         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10621         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10622         access to __libc_locking_needed for PIC.
10624 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10626         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10627         declare for libc.so.
10628         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10629         expression.
10630         (__libc_lock_lock): Put into statement expression.
10631         (__libc_lock_unlock): Remove trailing semicolon.
10632         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10634 2002-12-12  Roland McGrath  <roland@redhat.com>
10636         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10637         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10639 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10641         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10642         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10643         Initialize __libc_locking_needed.
10644         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10645         instead of __register_pthread_fork_handler.
10646         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10647         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10648         fork-gen with libc_pthread_init.
10649         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10650         of __register_pthread_fork_handler.
10651         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10652         of __register_pthread_fork_handler.
10653         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10654         __libc_locking_needed to determine whether lock prefix can be avoided.
10655         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10657 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10659         * Makefile (tests): Add tst-cleanup1.
10660         * tst-cleanup1.c: New file.
10661         * cancellation.c (__cleanup_thread): Removed.
10662         (__do_cancel): Remove call to __cleanup_thread.
10663         * pthreadP.h: Remove __cleanup_thread prorotype.
10665         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10666         Remember function and argument even if cancellation handler
10667         function is not available.
10668         (__libc_cleanup_region_end): Execute registered function directly if
10669         pthread functions are not available.
10670         (__libc_cleanup_end): Likewise.
10672         * init.c (__pthread_initialize_minimal): Fix initialization in
10673         static lib by preventing gcc from being too clever.
10675 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10677         * init.c (__pthread_initialize_minimal): Remove unneccesary
10678         sigaddset call.
10680         * Makefile (tests): We can run tst-locale2 now.
10682 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10684         * Versions: Remove duplicated sigwait entry.
10686 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10688         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10689         inside libpthread.
10691         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10693         * pthreadP.h: Declare __pthread_enable_asynccancel and
10694         __pthread_disable_asynccancel.
10695         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10696         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10697         * cancellation.c (__pthread_enable_asynccancel): New function.
10698         (__pthread_disable_asynccancel): New function.
10699         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10700         * pt-close.c: Likewise.
10701         * pt-connect.c: Likewise.
10702         * pt-creat.c: Likewise.
10703         * pt-fcntl.c: Likewise.
10704         * pt-fsync.c: Likewise.
10705         * pt-lseek.c: Likewise.
10706         * pt-lseek64.c: Likewise.
10707         * pt-msgrcv.c: Likewise.
10708         * pt-msgsnd.c: Likewise.
10709         * pt-msync.c: Likewise.
10710         * pt-nanosleep.c: Likewise.
10711         * pt-open.c: Likewise.
10712         * pt-open64.c: Likewise.
10713         * pt-pause.c: Likewise.
10714         * pt-poll.c: Likewise.
10715         * pt-pread.c: Likewise.
10716         * pt-pread64.c: Likewise.
10717         * pt-pselect.c: Likewise.
10718         * pt-pwrite.c: Likewise.
10719         * pt-pwrite64.c: Likewise.
10720         * pt-read.c: Likewise.
10721         * pt-readv.c: Likewise.
10722         * pt-recv.c: Likewise.
10723         * pt-recvfrom.c: Likewise.
10724         * pt-recvmsg.c: Likewise.
10725         * pt-select.c: Likewise.
10726         * pt-send.c: Likewise.
10727         * pt-sendmsg.c: Likewise.
10728         * pt-sendto.c: Likewise.
10729         * pt-sigpause.c: Likewise.
10730         * pt-sigsuspend.c: Likewise.
10731         * pt-sigtimedwait.c: Likewise.
10732         * pt-sigwait.c: Likewise.
10733         * pt-sigwaitinfo.c: Likewise.
10734         * pt-system.c: Likewise.
10735         * pt-tcdrain.c: Likewise.
10736         * pt-wait.c: Likewise.
10737         * pt-waitid.c: Likewise.
10738         * pt-waitpid.c: Likewise.
10739         * pt-write.c: Likewise.
10740         * pt-writev.c: Likewise.
10741         * pthread_join.c: Likewise.
10742         * pthread_timedjoin.c: Likewise.
10744         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10745         (__xpg_sigpause): New function.
10746         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10748 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10750         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10752         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10753         _GI_pthread_cleanup_pop to pthreadP.h.
10755         * ftrylockfile.c: Use _IO_lock_trylock instead of
10756         pthread_mutex_trylock.
10758         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10759         (CANCEL_RESET): Likewise.
10760         (__pthread_setcanceltype_): Declare.
10761         (__pthread_mutex_lock_internal): Declare.
10762         (__pthread_mutex_unlock_internal): Declare.
10763         (__pthread_once_internal): Declare.
10764         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10765         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10767         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10768         and pthread_mutex_unlock.
10769         * pthread_cond_wait.c: Likewise.
10770         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10771         * pthread_mutex_unlock.c: Likewise.
10773         * pthread_setcanceltype.c: Add additional alias
10774         __pthread_setcanceltype.
10776         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10777         * sem_open.c (sem_open): Likewise.
10778         Use __libc_open, __libc_write, and __libc_close instead of
10779         open, write, and close respectively.
10781         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10782         Rewrite as statement expression since it must return a value.
10784         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10785         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10786         __pthread_kill.
10788         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10789         alias __pthread_once_internal.
10791         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10793 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10795         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10796         * tst-stdio1.c: New file.
10797         * tst-stdio2.c: New file.
10799         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10801         * Makefile (tests): Comment out tst-locale2 for now.
10802         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10804         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10805         -D_IO_MTSAFE_IO.
10806         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10807         Use _IO_lock_init instead of explicit assignment.
10809         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10810         Define __libc_lock_* and __libc_lock_recursive macros with
10811         lowlevellock macros, not pthread mutexes.
10813         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10814         of pthread_mutex_lock.
10815         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10816         instead of pthread_mutex_unlock.
10818 2002-12-06  Roland McGrath  <roland@redhat.com>
10820         * allocatestack.c (__stack_user): Use uninitialized defn.
10821         * init.c (__pthread_initialize_minimal): Initialize it here.
10823 2002-12-05  Roland McGrath  <roland@redhat.com>
10825         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10826         string.
10827         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10829         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10830         missing & here too.
10832 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10834         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10835         lowlevellock.
10836         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10837         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10838         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10839         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10840         for __libc_lock_* macros.
10841         * Makefile (routines): Add libc-lowlevellock.
10843 2002-10-09  Roland McGrath  <roland@redhat.com>
10845         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10846         Under [__PIC__], call the function via the pointer fetched for
10847         comparison rather than a call by name that uses the PLT.
10848         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10849         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10850         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10851         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10852         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10854 2002-12-04  Roland McGrath  <roland@redhat.com>
10856         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10858         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10859         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10861         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10863 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10865         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10866         a completely opaque, non-integer type.
10867         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10869 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10871         * sysdeps/i386/tls.h: Include stdlib.h.
10872         * sysdeps/x86_64/tls.h: Likewise.
10874 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10876         * Makefile (tests): Add tst-locale2.
10877         (tests-static): Likewise.
10878         * tst-locale2.c: New file.
10880         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10881         volatile and add memory clobbers to lock operations.
10883 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10885         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10886         * sysdeps/i386/i486/bits/atomic.h: New file.
10887         * sysdeps/i386/i586/bits/atomic.h: New file.
10888         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10889         include i486 version.
10890         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10891         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10892         Patch by Marijn Ros <marijn@mad.scientist.com>.
10894         * allocatestack.c (get_cached_stack): Don't crash if we first
10895         found a stack with a larger size then needed.
10896         Reported by Hui Huang <hui.huang@sun.com>.
10898         * Makefile (tests): Add tst-sysconf.
10899         * tst-sysconf.c: New file.
10901         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10902         PTHREAD_THREADS_MAX.
10904 2002-12-02  Roland McGrath  <roland@redhat.com>
10906         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10907         Declare using hidden_proto instead of attribute_hidden, so there are
10908         non-.hidden static symbols for gdb to find.
10909         (__pthread_keys): Likewise.
10910         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10911         * allocatestack.c (__stack_user): Likewise.
10912         * pthread_create.c (__pthread_keys): Likewise.
10913         (__nptl_threads_events, __nptl_last_event): Make these static instead
10914         of hidden.
10915         * pthread_key_create.c (__pthread_pthread_keys_max,
10916         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10918 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10920         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10921         statically.
10922         * tst-locale1.c: New file.
10924         * pthread_cond_timedwait.c: Include <stdlib.h>.
10926         * Makefile (tests): Add tst-fork2 and tst-fork3.
10927         * tst-fork2.c: New file.
10928         * tst-fork3.c: New file.
10930 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10932         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10934         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10935         require it to 200112L.
10937         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10938         instruction only if HAVE_CMOV is defined.
10939         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10941         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10943         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10945         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10947         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10949 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10951         * sysdeps/x86_64/bits/atomic.h: New file.
10953         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10954         16-bit operations.
10956         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10957         possible since gettid cannot fail.
10959         * sysdeps/x86_64/pthreaddef.h: New file.
10961         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10963         * sysdeps/x86_64/pthread_spin_init.c: New file.
10964         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10965         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10966         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10968         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10969         Add missing lock prefix.  Minute optimization.
10971         * tst-spin2.c (main): Also check successful trylock call.
10973         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10974         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10976         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10977         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10979         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10980         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10981         value in case of an error.  Add support for INTERNAL_SYSCALL.
10983         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10984         value in case of an error.
10986         * sysdeps/x86_64/tls.h: New file.
10988 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10990         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10991         takes the array member name and the index as parameters.
10992         (THREAD_SETMEM_NC): Likewise.
10993         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10994         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10995         interfaces.
10997         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10998         to decide which code to use.
10999         (THREAD_SETMEM_NC): Likewise.
11001         * allocatestack.c (queue_stack): Don't remove stack from list here.
11002         Do it in the caller.  Correct condition to prematurely terminate
11003         loop to free stacks.
11004         (__deallocate_stack): Remove stack from list here.
11006 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
11008         * Makefile (tests): Add tst-stack1.
11009         * tst-stack1.c: New file.
11011         * allocatestack.c (allocate_stack): Initialize the TCB on a user
11012         provided stack.
11014         * pthread_attr_getstack.c: Return bottom of the thread area.
11016 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
11018         * Makefile (libpthread-routines): Add pt-allocrtsig and
11019         pthread_kill_other_threads.
11020         * pt-allocrtsig.c: New file.
11021         * pthread_kill_other_threads.c: New file.
11022         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
11023         all three functions.
11024         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
11025         allocrtsig.
11026         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
11027         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
11028         and __libc_allocate_rtsig_private.
11029         * Versions (libpthread): Export pthread_kill_other_threads_np,
11030         __libc_current_sigrtmin, and __libc_current_sigrtmax.
11032 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
11034         * allocatestack.c (allocate_stack): stackaddr in attribute points to
11035         the end of the stack.  Adjust computations.
11036         When mprotect call fails dequeue stack and free it.
11037         * pthread_attr_setstack.c: Store top of the stack in stackaddr
11038         attribute.
11039         * pthread_getattr_np.c: Likewise.
11041         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
11042         surprises.
11044 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
11046         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
11047         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11049 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
11051         * pthread_getspecific.c: Optimize access to first 2nd-level array.
11052         * pthread_setspecific.c: Likewise.
11054 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
11056         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
11057         definitions.  Get them from the official place.
11058         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
11060         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
11061         Use new CLONE_ flags in clone() calls.
11063         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
11064         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
11066         * Versions: Add pthread_* functions for libc.
11067         * forward.c: New file.
11069         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
11070         errno-loc.
11071         * herrno.c: New file.
11072         * res.c: New file.
11074         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
11075         sem_trywait, and sem_timedwait.  Add herrno and res.
11076         * sem_init.c: Don't initialize lock and waiters members.
11077         * sem_open.c: Likewise.
11078         * sem_post.c: Removed.
11079         * sem_wait.c: Removed.
11080         * sem_trywait.c: Removed.
11081         * sem_timedwait.c: Removed.
11082         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
11083         Includes full implementations of sem_post, sem_wait, sem_trywait,
11084         and sem_timedwait.
11085         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
11086         for new implementation.
11087         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
11088         and waiters fields.
11090         * tst-sem3.c: Improve error message.
11091         * tst-signal3.c: Likewise.
11093         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
11094         to tell the kernel about the termination futex and to initialize tid
11095         member.  Don't initialize main_thread.
11096         * descr.h (struct pthread): Remove main_thread member.
11097         * cancelllation.c (__do_cancel): Remove code handling main thread.
11098         The main thread is not special anymore.
11100         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
11101         size of the stacks to stack_cache_actsize.
11103         * pt-readv.c: Add missing "defined".
11104         * pt-sigwait.c: Likewise.
11105         * pt-writev.c: Likewise.
11107 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
11109         * Versions: Export __connect from libpthread.
11110         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11112         * Makefile (libpthread-routines): Add pt-raise.
11113         * sysdeps/unix/sysv/linux/raise.c: New file.
11114         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
11115         * sysdeps/generic/pt-raise.c: New file.
11117         * pthread_cond_init.c: Initialize all data elements of the condvar
11118         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
11120         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
11121         * pthread_create.c: Likewise.
11123         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
11124         * tst-key1.c: New file.
11125         * tst-key2.c: New file.
11126         * tst-key3.c: New file.
11128         * Versions: Export pthread_detach for version GLIBC_2.0.
11129         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
11131 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
11133         * pthread_key_create.c: Terminate search after an unused key was found.
11134         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11136         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
11137         Patch by Luca Barbieri <ldb@ldb.ods.org>.
11139 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
11141         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
11142         dynamic lookup for errno in PIC.
11144         * allocatestack.c (get_cached_stack): Rearrange code slightly to
11145         release the stack lock as soon as possible.
11146         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
11147         the static TLS block.
11148         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
11150         * cancellation.c: Renamed from cancelation.c.
11151         * Makefile: Adjust accordingly.
11152         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
11153         * cleanup_defer.c: Use CANCELLATION_P.
11154         * pthread_testcancel.c: Likewise.
11155         * descr.h: Fix spelling in comments.
11156         * init.c: Likewise.
11157         * pthread_getattr_np.c: Likewise.
11158         * pthread_getschedparam.c: Likewise.
11159         * pthread_setschedparam.c: Likewise.
11160         * Versions: Likewise.
11162         * pt-pselect.c: New file.
11163         * Makefile (libpthread-routines): Add pt-pselect.
11164         * Versions: Add pselect.
11166         * tst-cancel4.c: New file.
11167         * Makefile (tests): Add tst-cancel4.
11169 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
11171         * pthread_mutex_lock.c: Always record lock ownership.
11172         * pthread_mutex_timedlock.c: Likewise.
11173         * pthread_mutex_trylock.c: Likewise.
11175         * pt-readv.c: New file.
11176         * pt-writev.c: New file.
11177         * pt-creat.c: New file.
11178         * pt-msgrcv.c: New file.
11179         * pt-msgsnd.c: New file.
11180         * pt-poll.c: New file.
11181         * pt-select.c: New file.
11182         * pt-sigpause.c: New file.
11183         * pt-sigsuspend.c: New file.
11184         * pt-sigwait.c: New file.
11185         * pt-sigwaitinfo.c: New file.
11186         * pt-waitid.c: New file.
11187         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
11188         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
11189         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
11190         * Versions: Add all the new functions.
11192         * tst-exit1.c: New file.
11193         * Makefile (tests): Add tst-exit1.
11195         * sem_timedwait.c: Minor optimization for more optimal fastpath.
11197 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
11199         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
11201         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
11202         call.  pthread_join is an official cancellation point.
11203         * pthread_timedjoin.c: Likewise.
11205         * pthread_cond_wait.c: Revert order in which internal lock are dropped
11206         and the condvar's mutex are retrieved.
11207         * pthread_cond_timedwait.c: Likewise.
11208         Reported by dice@saros.East.Sun.COM.
11210 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
11212         * pthreadP.h: Cut out all type definitions and move them...
11213         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
11214         * pthreadP.h: Include <internaltypes.h>.
11216         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11217         performance tweaks.
11219         * sem_trywait.c: Shuffle #includes around to get right order.
11220         * sem_timedwait.c: Likewise.
11221         * sem_post.c: Likewise.
11222         * sem_wait.c: Likewise.
11224         * nptl 0.3 released.
11226         * Makefile (tests): Add tst-signal3.
11227         * tst-signal3.c: New file.
11229 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11231         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11232         the asms modify the sem object.
11233         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11235         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11236         the actual members.
11237         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11238         * semaphoreP.h: Include pthreadP.h.
11239         * sem_getvalue.c: Adjust to sem_t change.
11240         * sem_init.c: Likewise.
11241         * sem_open.c: Likewise.
11242         * sem_post.c: Likewise.
11243         * sem_timedwait.c: Likewise.
11244         * sem_trywait.c: Likewise.
11245         * sem_wait.c: Likewise.
11247 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11249         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11250         * tst-basic2.c: New file.
11251         * tst-exec1.c: New file.
11252         * tst-exec2.c: New file.
11253         * tst-exec3.c: New file.
11255         * tst-fork1.c: Remove extra */.
11257         * nptl 0.2 released.  The API for IA-32 is complete.