Redefine O_SYNC and O_DSYNC to match 2.6.33+ kernels.
[glibc.git] / nptl / ChangeLog
blob494b5904fbfc98aaca90b22fba4d4eefcc8f5514
1 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
3         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
4         __gmon_start__.
6 2009-11-27  Andreas Schwab  <schwab@redhat.com>
8         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
9         THREAD_SELF->cancelhandling after returning from futex call.
11 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
13         * tst-sem13.c: New file.
14         * Makefile (tests): Add tst-sem13.
16 2009-11-22  Roland McGrath  <roland@redhat.com>
18         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
19         instead of recapitulating its contents.
21 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
23         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
24         optimizations and cleanups.
26 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
28         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
29         Remove redundant code. Fix cfi offsets.
30         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
31         Fix cfi offsets.
33 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
35         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
36         reduce size of unwind info.
38         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
39         cfi directives.
40         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
41         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
43 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
45         [BZ #4457]
46         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
47         LIBGCC_S_SO.
48         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
50 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
52         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
54         [BZ #3270]
55         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
56         steps to avoid races with creation and terminations.
57         * nptl-init.c (sighandler_setxid): Adjust.
58         Patch by Daniel Jacobowitz.
60 2009-09-07  Andreas Schwab  <schwab@redhat.com>
62         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
64 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
65             Joseph Myers  <joseph@codesourcery.com>
67         [BZ #7094]
68         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
69         Initialize the sigev_notify field for newly created timer to make sure
70         the timer gets deleted from the active timer's list upon timer_delete.
72 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
74         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
75         Correct a logic error.
77 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
79         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
80         of the field in local variables.
81         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
82         variable and don't unconditionally clear it.
84 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
86         * pthread_create.c (start_thread): Hint to the kernel that memory for
87         the stack can be reused.  We do not mark all the memory.  The part
88         still in use and some reserve are kept.
90 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
92         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
94 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
96         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
97         directives.
99 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
101         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
102         directives.
103         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
105 2009-08-10  Andreas Schwab  <schwab@redhat.com>
107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
108         (__pthread_cond_signal): Don't clobber register used for syscall
109         number.
111 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
113         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
114         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
117         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
118         register.
120 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
122         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
123         enabled by the special *_asynccancel functions.
124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
127         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
129 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
131         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
132         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
133         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
134         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
135         since we can assume the special __*_{en,dis}able_asynccancel
136         functions.
137         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
138         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
139         and PTHREAD_CANCELED.
141 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
143         * descr.h: Better definition of *_BITMASK macros for cancellation.
145 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
147         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
149         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
150         dynamic linker might have to save.
151         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
152         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
153         printing.
155         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
157 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
159         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
160         New function.
161         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
162         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
164         requeue_pi for robust mutexes.
165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
167         Don't only skip __pthread_mutex_cond_lock.  Call instead
168         __pthread_mutex_cond_lock_adjust.
169         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
171         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
172         optimization of PI mutex handling.
174 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
176         [BZ #10418]
177         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
178         instead of of _acq variants of cmpxchg.
180 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
182         * sysdeps/x86_64/configure.in: New file.
184         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
185         path when not using absolute timeout futex.
187 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
189         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
190         optimizations of last changes.
191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
193 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
195         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
196         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
197         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
198         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
201         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
202         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
205         (__pthread_cond_timedwait): Make more robust.
207 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
209         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
210         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
211         directly use absolute timeout.
213         * tst-sem5.c (do_test): Add test for premature timeout.
214         * Makefile: Linu tst-sem5 with librt.
216         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
217         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
218         directly use absolute timeout.
219         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
220         (pthread_rwlock_timedrdlock): Likewise.
222         * tst-cond11.c (run_test): Add test to check that the timeout is
223         long enough.
225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
226         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
227         directly use absolute timeout.
229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
230         (__pthread_cond_wait): Convert to using exception handler instead of
231         registered unwind buffer.
232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
233         (__pthread_cond_timedwait): Likewise.
235 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
237         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
238         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
239         use absolute timeout.
241         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
242         handling of uncontested semaphore.
244         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
245         (__condvar_cleanup): Rewrite to use cfi directives instead of
246         hand-coded unwind tables.
247         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
248         Likewise.
249         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
250         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
251         Likewise.
253 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
255         * Makefile (libpthread-routines): Add pthread_sigqueue.
256         * Versions: Add pthread_sigqueue for GLIBC_2.11.
257         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
258         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
260 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
262         [BZ #10262]
263         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
264         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
265         cannot be assumed.
266         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
268 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
270         * libc-cancellation.c: Move __libc_cleanup_routine to...
271         * libc-cleanup.c: ...here.  New file.
272         * Makefile (routines): Add libc-cleanup.
274         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
275         test.
276         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
277         * sysdeps/pthread/librt-cancellation.c: Likewise.
279         [BZ #9924]
280         * nptl-init.c: Renamed from init.c.
281         * Makefile: Change all occurences of init.c to nptl-init.c.
283 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
285         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
286         to test when deciding on the delay.
287         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
288         * pthread_cancel.c: Close race between deciding on sending a signal
289         and setting the CANCELING_BIT bit.
291         * cancellation.c (__pthread_disable_asynccancel): Don't return if
292         thread is canceled.
293         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
295 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
297         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
298         is available.
299         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
300         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
301         * sysdeps/i386/tls.h: Likewise.
302         (tcbhead_t): Add __private_tm member.
304 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
306         * sem_open.c (sem_open): Rewrite initialization of initsem to
307         avoid warnings.
309         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
310         Avoid warning by using may_alias attribute on ptrhack.
312 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
314         [BZ #10090]
315         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
316         Check policy and priority for validity.
317         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
319 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
321         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
322         (__pthread_cond_timedwait): Change to use cfi directives instead of
323         hand-coded unwind sections.
325 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
327         * init.c (nptl_freeres): Compile only for SHARED.
329 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
331         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
332         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
333         FUTEX_BITSET_MATCH_ANY.
335 2009-02-27  Roland McGrath  <roland@redhat.com>
337         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
338         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
340 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
342         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
343         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
344         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
345         200112L to 200809L.
347 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
349         * sysdeps/pthread/pthread.h: The robust mutex functions are in
350         POSIX 2008.
352 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
354         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
355         Unify name of include protector macro.
357 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
359         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
360         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
362 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
364         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
365         pointer variables.
367         * allocatestack.c (__free_stacks): Renamed from free_stacks.
368         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
369         * init.c (nptl_freeres): New function.
370         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
371         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
372         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
373         variable.
374         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
375         load DSO.  Assign last.
376         (__unwind_freeres): New function.
378         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
379         for better debugging.  No need to use stack_list_add here.
381 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
383         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
384         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
385         instead of computing relative timeout.
386         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
387         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
389 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
391         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
393 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
395         * sysdeps/pthread/list.h (list_add): Initialize new element first.
396         (list_add_tail): Removed.
398 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
400         * (in_flight_stack): New variable.
401         (stack_list_del): New function.  Use instead of list_del.
402         (stack_list_add): New function.  Use instead of list_add when adding to
403         stack_cache and stack_used lists.
404         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
405         when the fork call interrupted another thread.
407 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
409         * init.c (__pthread_initialize_minimal_internal): Optimize test
410         FUTEX_CLOCK_REALTIME a bit.
412 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
414         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
415         only passing five parameters to FUTEX_WAIT_BITSET call.
417         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
418         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
419         instead of computing relative timeout.
421 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
423         * init.c (__pthread_initialize_minimal_internal): Check for
424         FUTEX_CLOCK_REALTIME flag.
425         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
426         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
427         relative timeout.
429         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
430         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
431         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
432         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
433         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
434         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
436 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
438         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
439         loop body instead of ; to avoid gcc warnings.
440         (pthread_cleanup_pop_restore_np): Likewise.
441         Patch by Caolán McNamara <caolanm@redhat.com>.
443 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
445         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
446         fast path here, for robust/PI/PP mutexes call
447         __pthread_mutex_lock_full.  Don't use switch, instead use a series
448         of ifs according to their probability.
449         (__pthread_mutex_lock_full): New function.
450         * pthread_mutex_unlock.c: Include assert.h.
451         (__pthread_mutex_unlock_usercnt): Handle only the
452         fast path here, for robust/PI/PP mutexes call
453         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
454         of ifs according to their probability.
455         (__pthread_mutex_unlock_full): New function.
456         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
457         (__pthread_mutex_lock_full): Define.
459 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
461         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
462         implementation.  Add necessary padding and.
463         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
464         words.
466 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
468         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
469         and FUTEX_WAKE_BITSET.
471 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
473         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
474         and FUTEX_WAKE_BITSET.
475         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
476         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
477         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
478         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
480 2008-11-25  Roland McGrath  <roland@redhat.com>
482         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
483         Subdirectories moved to ports repository as
484         sysdeps/.../nptl subdirectories.
486 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
488         [BZ #7008]
489         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
490         of old value.
491         * pthread_cond_init.c (__pthread_cond_init): Fix
492         cond->__data.__nwaiters initialization.
493         * Makefile (tests): Add tst-cond23.
494         * tst-cond23.c: New test.
496 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
498         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
499         arguments.
500         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
501         arguments.
503 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
505         [BZ #6955]
506         * pthread_mutex_lock.c: Add support for private PI mutexes.
507         * pthread_mutex_timedlock.c: Likewise.
508         * pthread_mutex_trylock.c: Likewise.
509         * pthread_mutex_unlock.c: Likewise.
510         Patch mostly by Ben Jackson <ben@ben.com>.
512 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
514         [BZ #6843]
515         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
516         Increase stack size for helper thread.
518 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
520         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
521         assembly with a clobber list for access registers a0 and a1.
523 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
525         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
526         to force runp->refcntr to be read from memory.
528 2008-09-08  Richard Guenther  <rguenther@suse.de>
530         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
531         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
532         lll_timedlock, lll_robust_timedlock, lll_unlock,
533         lll_robust_unlock): Promote private to int.
535 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
537         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
538         ARCH_RETRY_MMAP definitions.
539         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
540         Define MAP_STACK when not defined.
541         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
542         handling of ARCH_RETRY_MMAP.
544 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
546         * tst-align2.c (f): Print message that f is reached.
548 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
550         [BZ #6740]
551         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
552         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
554 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
556         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
557         SOCK_CLOEXEC if possible.
559 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
561         * Makefile (tests): Add tst-rwlock2a.
562         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
563         * tst-rwlock2a.c: New file.
565 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
567         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
569 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
571         * sysdeps/pthread/pthread.h: Fix typo in comment.
573 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
575         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
576         of CPU set to the kernel.
578 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
580         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
581         cfi directives.
582         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
583         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
584         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
585         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
586         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
587         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
589 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
591         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
592         cfi directives.
593         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
594         Likewise.
595         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
596         Likewise.
597         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
598         Likewise.
600 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
602         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
604 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
606         David S. Miller  <davem@davemloft.net>
608         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
610 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
612         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
613         __pshared correctly.
614         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
615         Likewise.
616         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
617         Likewise.
618         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
619         Likewise.
620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
621         Likewise.
622         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
624 2008-04-14  David S. Miller  <davem@davemloft.net>
626         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
627         (__old_sem_wait): Fix argument to lll_futex_wait().
629 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
631         * pthread_create.c: Require pthread_mutex_trylock and
632         pthread_key_delete for libgcc.
634 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
636         [BZ #6020]
637         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
638         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
639         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
641 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
643         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
644         <linux/limits.h> has defined it.
645         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
646         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
647         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
648         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
650 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
652         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
653         of ASSEMBLER.
654         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
655         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
657 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
659         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
660         HAVE_DL_DISCOVER_OSVERSION.
661         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
662         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
664 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
666         [BZ #5778]
667         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
668         _POSIX_CHOWN_RESTRICTED value to zero.
670 2008-01-31  Roland McGrath  <roland@redhat.com>
672         * Makefile (omit-deps): Variable removed.
674 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
676         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
677         unnecessary addr32 prefix.
679 2008-01-29  Roland McGrath  <roland@redhat.com>
681         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
683 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
685         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
687 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
689         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
690         a scratch register.
691         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
692         (__lll_lock_wait_private): Fix typo.
693         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
694         (pthread_barrier_wait): Likewise.  Adjust XADD use.
695         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
696         Adjust XADD use.
697         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
698         (pthread_rwlock_timedrdlock): Return correct return value.
699         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
700         (pthread_rwlock_timedwrlock): Likewise.
702 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
704         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
705         thread returns the program exits with an error code.
707 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
709         * pthread-errnos.sym: Add EOVERFLOW.
710         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
711         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
712         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
713         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
715 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
717         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
718         parameter.  Passed it as permission to mmap.
719         * allocatestack.c (allocate_stack): Pass prot as second parameter
720         to ARCH_RETRY_MMAP.
722 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
724         * tst-basic7.c: Allocate memory for the stack.
726         [BZ #5465]
727         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
728         (__pthread_cond_timedwait): Don't use VDSO.
729         Patch by Michal Januszewski.
731 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
733         [BZ #5455]
734         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
735         Allow label before pthread_cleanup_pop.
736         (pthread_cleanup_pop_restore_np): Likewise.
738 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
740         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
741         Store 2 before returning ETIMEDOUT.
743 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
745         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
746         Store 2 before returning ETIMEDOUT.
747         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
748         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
749         (__lll_lock_wait_private): Optimize.
750         (__lll_lock_wait): Likewise.
752 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
754         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
755         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
756         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
758 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
760         [BZ #5240]
761         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
762         If we time out, try one last time to lock the futex to avoid
763         losing a wakeup signal.
764         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
765         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
767         [BZ #5245]
768         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
769         if necessary.
771 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
773         [BZ #5245]
774         * allocatestack.c (allocate_stack): Change ENOMEM error in case
775         mmap failed to EAGAIN.
776         * Makefile (tests): Add tst-basic7.
777         * tst-basic7.c: New file.
779 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
781         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
782         Use __linkin_atfork.
784 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
786         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
787         missing line continuations.
788         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
789         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
791 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
793         [BZ #5220]
794         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
795         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
796         (struct timer): Add next element.
797         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
798         enqueue timer structure into __active_timer_sigev_thread list.
799         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
800         remove timer struct from __active_timer_sigev_thread.
801         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
802         Before using timer structure make sure it is still on the
803         __active_timer_sigev_thread list.  Keep lock until done.
804         Define __active_timer_sigev_thread and
805         __active_timer_sigev_thread_lock.
807 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
809         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
810         Redefine thread_atfork for use of ATFORK_MEM.
811         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
812         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
813         function.
814         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
815         Use atomic operation when removing first element of list.
817 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
819         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
820         routine instead of an alias to __new_sem_post.
822 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
824         * init.c (__pthread_initialize_minimal): Initialize word to appease
825         valgrind.
827 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
829         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
830         libc.so just clear NAME.
831         (__libc_rwlock_fini): Nop inside of libc.so.
832         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
833         all zeros.
835 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
837         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
838         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
839         unlocking failed.
840         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
842 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
844         [BZ #4938]
845         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
846         reclaimed stack if necessary.
847         * Makefile (tests): Add tst-tsd6.
848         * tst-tsd6.c: New file.
850 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
852         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
853         Add private argument.
855 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
858         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
860 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
862         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
863         (__lll_robust_timedlock): Pass private as last argument to
864         __lll_robust_timedlock_wait.
865         (__lll_unlock): Fix a pasto.
867 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
869         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
870         sparc_old_sem): New structs.
871         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
872         (__sem_wait_cleanup): New function.
873         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
874         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
875         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
876         lll_futex_wait.
877         (__old_sem_wait): New function.
878         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
879         nptl/sysdeps/unix/sysv/linux/sparc version.
880         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
881         Likewise.
882         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
883         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
884         (__new_sem_trywait): Use sparc_old_sem structure.
885         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
886         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
887         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
888         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
889         lll_futex_timed_wait.
890         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
891         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
892         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
893         lll_futex_wake.
894         (__old_sem_post): New function.
895         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
896         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
897         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
898         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
899         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
900         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
902 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
904         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
905         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
906         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
907         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
908         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
909         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
910         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
911         Use FUTEX_WAKE_OP.
912         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
913         kernel-features.h and tcb-offsets.h.
914         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
915         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
916         process private.
917         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
918         tcb-offsets.h.
919         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
920         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
921         process private.
922         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
923         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
924         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
925         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
926         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
927         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
928         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
930 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
932         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
933         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
934         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
935         lll_futex_timed_wait.
937         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
938         __lll_robust_unlock): Rewrite as macros instead of inline functions.
939         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
940         __lll_robust_unlock, __lll_wait_tid): Likewise.
942 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
944         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
945         Fix a pasto.
946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
947         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
948         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
949         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
950         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
951         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
952         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
954         kernel-features.h.
955         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
956         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
957         process private.  Switch DW_CFA_advance_loc1 and some
958         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
960         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
961         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
962         process private.  Switch DW_CFA_advance_loc{1,2} and some
963         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
964         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
965         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
966         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
967         Likewise.
968         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
969         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
970         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
971         Likewise.
972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
973         (__pthread_cond_broadcast): Compare %r8 instead of
974         dep_mutex-cond_*(%rdi) with $-1.
975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
976         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
977         of oring.
979 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
981         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
983 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
985         * allocatestack.c: Include kernel-features.h.
986         * pthread_create.c: Likewise.
987         * pthread_mutex_init.c: Likewise.
988         * init.c: Likewise.
989         * pthread_cond_timedwait.c: Likewise.
990         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
991         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
993         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
997         Likewise.
998         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
999         Likewise.
1000         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1001         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1002         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1003         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1005 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1007         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1008         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1009         byte elements.  One of them is the new __shared element.
1010         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1011         adjust names of other padding elements.
1012         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1013         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1014         byte elements.  One of them is the new __shared element.
1015         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1016         adjust names of other padding elements.
1017         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1018         Renamed __pad1 element to __shared, adjust names of other padding
1019         elements.
1020         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1021         (pthread_rwlock_t): Likewise.
1022         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1023         typo.
1025 2007-08-09  Anton Blanchard  <anton@samba.org>
1027         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1029 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1032         <kernel-features.h>.
1033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1035 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1037         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1038         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1039         dealing with robust mutexes.
1040         * pthread_mutex_timedlock.c: Likewise.
1041         * pthread_mutex_trylock.c: Likewise.
1042         * pthread_mutex_unlock.c: Likewise.
1043         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1045 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1047         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1048         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1049         (PTHREAD_MUTEX_PSHARED): Define.
1050         * pthread_mutex_init.c (__pthread_mutex_init): Set
1051         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1052         mutexes.
1053         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1054         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1055         as second argument to lll_lock.
1056         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1057         instead of its __data.__lock field.
1058         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1059         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1060         to lll_robust_lock.
1061         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1062         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1063         instead of mutex->__data.__kind directly, pass
1064         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1065         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1066         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1067         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1068         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1069         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1070         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1071         of mutex->__data.__kind directly.
1072         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1073         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1074         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1075         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1076         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1077         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1078         and lll_futex_wake.
1079         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1080         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1081         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1082         directly.
1083         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1084         Take mutex as argument instead of its __data.__lock field, pass
1085         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1086         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1087         __data.__lock field.
1088         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1089         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1090         to lll_robust_cond_lock.
1091         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1092         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1093         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1094         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1095         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1096         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1097         lll_futex_wait.
1098         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1099         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1100         lll_futex_wake.
1101         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1102         pshared variable, pass it to lll_lock, lll_unlock,
1103         lll_futex_timedwait and lll_futex_wake.
1104         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1105         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1106         and lll_futex_wake.
1107         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1108         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1109         macro.
1110         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1111         lll_futex_wake_unlock): Likewise.
1112         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1113         Likewise.
1114         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1115         lll_futex_wake_unlock): Likewise.
1116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1117         Likewise.
1118         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1119         lll_futex_wake_unlock): Likewise.
1120         (lll_futex_wake): Fix a typo.
1121         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1123         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1124         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1125         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1127         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1128         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1130         (__pthread_cond_timedwait): Likewise.
1131         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1132         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1134 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1136         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1137         Don't use CGOTSETUP and CGOTRESTORE macros.
1138         (CGOTSETUP, CGOTRESTORE): Remove.
1139         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1140         @local symbol.
1142 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1144         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1145         definitions for private futexes.
1146         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1147         kernel-features.h and lowlevellock.h.  Use private futexes if
1148         they are available.
1149         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1150         (__lll_mutex_lock_wait): Rename to
1151         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1152         (__lll_mutex_timedlock_wait): Rename to ...
1153         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1154         Don't compile in for libc.so.
1155         (__lll_mutex_unlock_wake): Rename to ...
1156         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1157         (__lll_timedwait_tid): Use __NR_gettimeofday.
1158         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1159         the header from assembler.  Renamed all lll_mutex_* resp.
1160         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1161         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1162         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1163         Define.
1164         (__lll_lock_wait_private): Add prototype.
1165         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1166         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1167         __lll_unlock_wake): Likewise.
1168         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1169         if private is constant LLL_PRIVATE.
1170         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1171         lll_timedlock, lll_robust_timedlock): Add private argument.
1172         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1173         if private is constant LLL_PRIVATE.
1174         (lll_robust_unlock, lll_robust_dead): Add private argument.
1175         (lll_lock_t): Remove.
1176         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1177         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1178         lll_cond_wake, lll_cond_broadcast): Remove.
1179         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1180         kernel-features.h and lowlevellock.h.
1181         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1182         (LOAD_FUTEX_WAIT): Define.
1183         (__lll_robust_mutex_lock_wait): Rename to ...
1184         (__lll_robust_lock_wait): ... this.  Add private argument.
1185         Use LOAD_FUTEX_WAIT macro.
1186         (__lll_robust_mutex_timedlock_wait): Rename to ...
1187         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1188         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1189         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1190         lowlevellock.h.
1191         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1192         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1193         __lll_mutex_{lock,unlock}_*.
1194         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1195         lowlevellock.h and pthread-errnos.h.
1196         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1197         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1198         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1199         __lll_mutex_{lock,unlock}_*.
1200         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1201         lowlevellock.h and pthread-errnos.h.
1202         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1203         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1204         __lll_mutex_{lock,unlock}_*.
1205         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1206         lowlevellock.h.
1207         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1208         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1209         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1210         (__condvar_tw_cleanup): Likewise.
1211         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1212         lowlevellock.h.
1213         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1214         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1215         __lll_mutex_{lock,unlock}_*.
1216         ( __condvar_w_cleanup): Likewise.
1217         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1218         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1219         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1220         lowlevellock.h.
1221         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1222         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1223         __lll_mutex_{lock,unlock}_*.
1224         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1225         lowlevellock.h.
1226         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1227         FUTEX_PRIVATE_FLAG): Remove.
1228         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1229         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1230         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1231         lowlevellock.h.
1232         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1233         FUTEX_PRIVATE_FLAG): Remove.
1234         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1235         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1236         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1237         lowlevellock.h.
1238         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1239         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1240         __lll_mutex_{lock,unlock}_*.
1241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1242         lowlevellock.h.
1243         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1244         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1245         __lll_mutex_{lock,unlock}_*.
1246         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1247         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1248         (__new_sem_post): Use standard initial exec code sequences.
1249         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1250         lowlevellock.h.
1251         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1252         FUTEX_PRIVATE_FLAG): Remove.
1253         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1254         exec code sequences.
1255         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1256         (__new_sem_trywait): Use standard initial exec code sequences.
1257         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1258         (__new_sem_wait): Use standard initial exec code sequences.
1260 2007-07-31  Anton Blanchard  <anton@samba.org>
1262         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1263         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1264         atomic_full_barrier.
1266 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1268         * allocatestack.c (stack_cache_lock): Change type to int.
1269         (get_cached_stack, allocate_stack, __deallocate_stack,
1270         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1271         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1272         as second argument to lll_lock and lll_unlock macros on
1273         stack_cache_lock.
1274         * pthread_create.c (__find_in_stack_list): Likewise.
1275         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1276         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1277         as second argument.
1278         * descr.h (struct pthread): Change lock and setxid_futex field
1279         type to int.
1280         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1281         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1282         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1283         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1284         Likewise.
1285         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1286         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1287         * pthreadP.h (__attr_list_lock): Change type to int.
1288         * pthread_attr_init.c (__attr_list_lock): Likewise.
1289         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1290         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1291         lll_{,un}lock.
1292         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1293         also for lll_futex_{wake,wait}.
1294         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1295         a pointer to const.
1296         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1297         LLL_SHARED as second argument to lll_{,un}lock.
1298         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1299         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1300         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1301         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1302         Likewise.
1303         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1304         as second argument to lll_{,un}lock macros on pd->lock.
1305         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1306         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1307         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1308         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1309         Likewise.
1310         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1311         Likewise.
1312         * pthread_once.c (once_lock): Change type to int.
1313         (__pthread_once): Pass LLL_PRIVATE as second argument to
1314         lll_{,un}lock macros on once_lock.
1315         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1316         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1317         rwlock->__data.__shared as second argument to them and similarly
1318         for lll_futex_w*.
1319         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1320         Likewise.
1321         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1322         Likewise.
1323         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1324         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1325         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1326         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1327         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1328         to lll_{,un}lock macros on __sem_mappings_lock.
1329         * sem_open.c (check_add_mapping): Likewise.
1330         (__sem_mappings_lock): Change type to int.
1331         * semaphoreP.h (__sem_mappings_lock): Likewise.
1332         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1333         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1334         instead of lll_*mutex_*, pass LLL_SHARED as last
1335         argument.
1336         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1337         pass LLL_SHARED as last argument.
1338         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1339         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1340         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1341         pass LLL_SHARED as last argument.
1342         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1343         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1344         LLL_SHARED as last argument.
1345         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1346         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1347         Similarly.
1348         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1349         __libc_lock_lock_recursive, __libc_lock_unlock,
1350         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1351         argument to lll_{,un}lock.
1352         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1353         _IO_lock_unlock): Likewise.
1354         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1355         compound literal.
1356         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1357         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1358         __fork_lock.
1359         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1360         free_mem): Likewise.
1361         (__fork_lock): Change type to int.
1362         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1363         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1364         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1365         lll_futex_wake.
1366         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1367         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1368         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1369         New function.
1370         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1371         pass it through to lll_futex_*wait, only compile in when
1372         IS_IN_libpthread.
1373         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1374         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1375         argument and pass it through to lll_futex_*wait.
1376         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1377         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1378         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1379         inline functions to __lll_* resp. __lll_robust_*.
1380         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1381         (lll_mutex_dead): Add private argument.
1382         (__lll_lock_wait_private): New prototype.
1383         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1384         __lll_robust_lock_timedwait): Add private argument to prototypes.
1385         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1386         call __lll_lock_wait_private, otherwise pass private to
1387         __lll_lock_wait.
1388         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1389         __lll_robust_timedlock): Add private argument, pass it to
1390         __lll_*wait functions.
1391         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1392         call __lll_unlock_wake_private, otherwise pass private to
1393         __lll_unlock_wake.
1394         (__lll_robust_unlock): Add private argument, pass it to
1395         __lll_robust_unlock_wake.
1396         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1397         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1398         argument, pass it through to __lll_* inline function.
1399         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1400         (lll_lock_t): Remove.
1401         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1402         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1403         lll_cond_wake, lll_cond_broadcast): Remove.
1404         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1405         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1406         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1407         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1408         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1409         the header from assembler.  Renamed all lll_mutex_* resp.
1410         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1411         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1412         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1413         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1414         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1415         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1416         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1417         Remove prototype.
1418         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1419         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1420         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1421         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1422         MULTIPLE_THREADS_OFFSET as another asm operand.
1423         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1424         MULTIPLE_THREADS_OFFSET as last asm operand, call
1425         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1426         otherwise pass private as another argument to __lll_lock_wait.
1427         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1428         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1429         private as another argument to __lll_*lock_wait call.
1430         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1431         MULTIPLE_THREADS_OFFSET as another asm operand, call
1432         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1433         otherwise pass private as another argument to __lll_unlock_wake.
1434         (lll_robust_unlock): Add private argument, pass private as another
1435         argument to __lll_unlock_wake.
1436         (lll_robust_dead): Add private argument, use __lll_private_flag
1437         macro.
1438         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1439         LLL_MUTEX_LOCK_INITIALIZER.
1440         (lll_lock_t): Remove.
1441         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1442         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1443         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1444         lll_cond_wake, lll_cond_broadcast): Remove.
1445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1446         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1447         2007-05-2{3,9} changes.
1448         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1449         kernel-features.h and lowlevellock.h.
1450         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1451         (LOAD_FUTEX_WAIT): Rewritten.
1452         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1453         define.
1454         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1455         (__lll_mutex_lock_wait): Rename to ...
1456         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1457         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1458         (__lll_mutex_timedlock_wait): Rename to ...
1459         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1460         contains private argument.  Don't compile in for libc.so.
1461         (__lll_mutex_unlock_wake): Rename to ...
1462         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1463         Don't compile in for libc.so.
1464         (__lll_timedwait_tid): Use __NR_gettimeofday.
1465         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1466         kernel-features.h and lowlevellock.h.
1467         (LOAD_FUTEX_WAIT): Define.
1468         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1469         define.
1470         (__lll_robust_mutex_lock_wait): Rename to ...
1471         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1472         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1473         macro.
1474         (__lll_robust_mutex_timedlock_wait): Rename to ...
1475         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1476         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1477         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1478         lowlevellock.h.
1479         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1480         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1481         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1482         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1483         to __lll_lock_wait in %edx.
1484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1485         Include lowlevellock.h and pthread-errnos.h.
1486         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1487         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1488         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1489         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1490         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1491         __lll_unlock_wake.
1492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1493         Include lowlevellock.h and pthread-errnos.h.
1494         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1495         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1496         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1497         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1498         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1499         __lll_unlock_wake.
1500         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1501         Include lowlevellock.h.
1502         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1503         Don't define.
1504         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1505         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1506         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1507         __lll_unlock_wake.  Use __NR_gettimeofday.
1508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1509         Include lowlevellock.h.
1510         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1511         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1512         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1513         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1514         and __lll_unlock_wake.
1515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1516         Include lowlevellock.h.
1517         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1518         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1519         MUTEX(%ebx) address in %edx rather than %ecx to
1520         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1521         and __lll_unlock_wake.  Move return value from %ecx to %edx
1522         register.
1523         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1524         Include lowlevellock.h.
1525         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1526         Don't define.
1527         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1528         MUTEX(%ebp) address in %edx rather than %ecx to
1529         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1530         and __lll_unlock_wake.  Move return value from %ecx to %edx
1531         register.  Use __NR_gettimeofday.
1532         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1533         Include lowlevellock.h.
1534         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1535         Don't define.
1536         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1537         MUTEX(%ebp) address in %edx rather than %ecx to
1538         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1539         and __lll_unlock_wake.  Move return value from %ecx to %edx
1540         register.  Use __NR_gettimeofday.
1541         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1542         Include lowlevellock.h.
1543         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1544         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1545         MUTEX(%edi) address in %edx rather than %ecx to
1546         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1547         and __lll_unlock_wake.
1548         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1549         Include lowlevellock.h.
1550         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1551         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1552         MUTEX(%ebx) address in %edx rather than %ecx to
1553         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1554         and __lll_unlock_wake.  Move return value from %ecx to %edx
1555         register.
1556         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1557         lowlevellock.h.
1558         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1559         define.
1560         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1561         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1562         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1563         lowlevellock.h.
1564         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1565         (sem_timedwait): Use __NR_gettimeofday.
1566         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1567         lowlevellock.h.
1568         (LOCK): Don't define.
1569         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1570         lowlevellock.h.
1571         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1572         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1573         are waiters.
1574         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1575         2007-05-2{3,9} changes.
1576         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1577         kernel-features.h and lowlevellock.h.
1578         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1579         (LOAD_FUTEX_WAIT): Rewritten.
1580         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1581         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1582         (__lll_mutex_lock_wait): Rename to ...
1583         (__lll_lock_wait): ... this.  %esi is now private argument.
1584         Don't compile in for libc.so.
1585         (__lll_mutex_timedlock_wait): Rename to ...
1586         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1587         Don't compile in for libc.so.
1588         (__lll_mutex_unlock_wake): Rename to ...
1589         (__lll_unlock_wake): ... this.  %esi contains private argument.
1590         Don't compile in for libc.so.
1591         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1592         kernel-features.h and lowlevellock.h.
1593         (LOAD_FUTEX_WAIT): Define.
1594         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1595         (__lll_robust_mutex_lock_wait): Rename to ...
1596         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1597         Use LOAD_FUTEX_WAIT macro.
1598         (__lll_robust_mutex_timedlock_wait): Rename to ...
1599         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1600         private, use LOAD_FUTEX_WAIT macro.
1601         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1602         lowlevellock.h.
1603         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1604         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1605         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1606         __lll_lock_wait and __lll_unlock_wake.
1607         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1608         Include lowlevellock.h and pthread-errnos.h.
1609         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1610         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1611         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1612         pass LLL_SHARED in %esi to both __lll_lock_wait and
1613         __lll_unlock_wake.
1614         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1615         Include lowlevellock.h and pthread-errnos.h.
1616         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1617         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1618         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1619         pass LLL_SHARED in %esi to both __lll_lock_wait and
1620         __lll_unlock_wake.
1621         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1622         Include lowlevellock.h.
1623         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1624         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1625         pass LLL_SHARED in %esi to both __lll_lock_wait and
1626         __lll_unlock_wake.
1627         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1628         Include lowlevellock.h.
1629         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1630         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1631         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1632         and __lll_unlock_wake.
1633         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1634         Include lowlevellock.h.
1635         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1636         Don't define.
1637         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1638         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1639         and __lll_unlock_wake.
1640         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1641         Include lowlevellock.h.
1642         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1643         Don't define.
1644         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1645         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1646         and __lll_unlock_wake.
1647         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1648         Include lowlevellock.h.
1649         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1650         Don't define.
1651         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1652         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1653         and __lll_unlock_wake.
1654         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1655         Include lowlevellock.h.
1656         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1657         Don't define.
1658         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1659         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1660         and __lll_unlock_wake.
1661         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1662         Include lowlevellock.h.
1663         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1664         Don't define.
1665         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1666         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1667         and __lll_unlock_wake.
1668         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1669         lowlevellock.h.
1670         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1671         define.
1672         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1673         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1674         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1675         lowlevellock.h.
1676         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1677         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1678         lowlevellock.h.
1679         (LOCK): Don't define.
1680         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1681         lowlevellock.h.
1682         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1683         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1684         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1685         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1686         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1687         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1688         (__lll_lock_wait_private): New function.
1689         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1690         it to lll_futex_*wait.  Don't compile in for libc.so.
1691         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1692         Remove.
1693         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1694         (struct sparc_pthread_barrier): Remove.
1695         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1696         struct sparc_pthread_barrier.  Pass
1697         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1698         and lll_futex_wait macros.
1699         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1700         Remove.
1701         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1702         Include sparc pthread_barrier_wait.c instead of generic one.
1704 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1706         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1708         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1709         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1710         %ecx.
1711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1712         (pthread_rwlock_timedwrlock): Likewise.
1713         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1714         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1716 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1718         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1720 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1722         * tst-locale2.c (useless): Add return statement.
1724 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1726         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1727         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1728         * pthread_create.c (start_thread): Likewise.
1729         * init.c (sighandler_setxid): Likewise.
1730         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1731         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1732         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1733         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1734         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1735         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1736         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1737         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1738         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1739         Likewise.
1740         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1741         Likewise.
1742         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1743         Likewise.
1744         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1745         __rtld_notify): Likewise.
1746         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1747         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1748         __pthread_once): Likewise.
1749         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1750         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1751         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1752         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1753         (lll_futex_wait): Add private argument, define as wrapper around
1754         lll_futex_timed_wait.
1755         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1756         use __lll_private_flag macro.
1757         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1758         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1759         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1760         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1761         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1762         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1763         (lll_futex_wait): Add private argument, define as wrapper around
1764         lll_futex_timed_wait.
1765         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1766         use __lll_private_flag macro.
1767         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1768         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1769         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1770         Define.
1771         (lll_futex_timed_wait, lll_futex_wake): Use it.
1772         (lll_private_futex_wait, lll_private_futex_timed_wait,
1773         lll_private_futex_wake): Removed.
1774         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1775         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1776         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1777         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1778         (lll_futex_wait): Add private argument, define as wrapper around
1779         lll_futex_timed_wait.
1780         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1781         use __lll_private_flag macro.
1782         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1783         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1784         to lll_futex_*.
1785         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1786         (lll_private_futex_wait, lll_private_futex_timed_wait,
1787         lll_private_futex_wake): Removed.
1788         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1789         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1790         (lll_private_futex_wait, lll_private_futex_timed_wait,
1791         lll_private_futex_wake): Removed.
1792         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1793         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1794         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1795         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1796         (lll_futex_wait): Add private argument, define as wrapper around
1797         lll_futex_timed_wait.
1798         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1799         use __lll_private_flag macro.
1800         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1801         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1802         to lll_futex_*.
1803         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1804         Define.
1805         (lll_futex_timed_wait, lll_futex_wake): Use it.
1806         (lll_private_futex_wait, lll_private_futex_timed_wait,
1807         lll_private_futex_wake): Removed.
1809 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1811         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1812         of the structure for sparc32.
1814 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1816         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1818 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1820         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1821         code used when private futexes are assumed.
1822         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1823         Likewise.
1825 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1827         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1828         (__lll_private_flag): Define.
1829         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1830         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1831         __lll_private_flag.
1832         (lll_private_futex_wait, lll_private_futex_timedwait,
1833         lll_private_futex_wake): Define as wrapper around non-_private
1834         macros.
1835         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1836         (__lll_private_flag): Define.
1837         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1838         (lll_private_futex_wait, lll_private_futex_timedwait,
1839         lll_private_futex_wake): Define as wrapper around non-_private
1840         macros.
1842 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1844         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1845         parameter to lll_futex_wait call.
1846         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1848         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1849         Replace lll_futex_wait with lll_private_futex_wait.
1850         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1851         Add LLL_SHARED parameter to lll_futex_wake().
1853         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1854         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1855         lll_private_futex_wake.
1856         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1857         bit from private parm before syscall.
1858         (lll_futex_timed_wait): Likewise.
1859         (lll_futex_wake): Likewise.
1860         (lll_futex_wake_unlock): Likewise.
1861         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1862         (lll_robust_mutex_unlock): Likewise.
1863         (lll_mutex_unlock_force): Likewise.
1864         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1866 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1868         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1869         compilation when unconditionally using private futexes.
1870         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1871         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1872         Likewise.
1873         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1874         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1876 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1878         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1879         Define.
1881 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1883         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1884         kernel-features.h.
1886 2007-05-16  Roland McGrath  <roland@redhat.com>
1888         * init.c (__nptl_initial_report_events): New variable.
1889         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1890         to that.
1892 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1894         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1895         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1897 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1899         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1900         implementation.
1902 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1904         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1905         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1906         * pthread_mutex_timedlock.c: Likewise.
1907         * pthread_mutex_trylock.c: Likewise.
1908         * pthread_mutex_unlock.c: Likewise.
1910 2007-06-17  Andreas Schwab  <schwab@suse.de>
1912         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1913         sections.
1915 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1917         * allocatestack.c (allocate_stack): Make code compile if
1918         __ASSUME_PRIVATE_FUTEX is set.
1920 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1922         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1923         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1924         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1925         (__pthread_rwlock_wrlock): Likewise.
1926         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1927         (pthread_rwlock_timedrdlock): Likewise.
1928         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1929         (pthread_rwlock_timedwrlock): Likewise.
1930         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1931         (__pthread_rwlock_unlock): Likewise.
1933 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1935         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1936         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1937         Split __flags into __flags, __shared, __pad1 and __pad2.
1938         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1939         futexes if they are available.
1940         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1941         in libc-lowlevellock.S allow using private futexes.
1942         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1943         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1944         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1945         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1946         lll_private_futex_timed_wait and lll_private_futex_wake.
1947         (lll_robust_mutex_unlock): Fix typo.
1948         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1949         field in futex command setup.
1950         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1951         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1952         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1953         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1954         if they are available.  Remove clear_once_control.
1955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1956         futexes if they are available.
1957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1959         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1961         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1962         Wake only when there are waiters.
1963         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1964         support.  Indicate that there are waiters.  Remove unnecessary
1965         extra cancellation test.
1966         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1967         left-over duplication of __sem_wait_cleanup.
1969 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1971         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1972         parameter to lll_futex_wait, lll_futex_timed_wait, and
1973         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1974         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1975         lll_private_futex_wake.
1976         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1977         * allocatestack.c: Adjust use of lll_futex_* macros.
1978         * init.c: Likewise.
1979         * lowlevellock.h: Likewise.
1980         * pthread_barrier_wait.c: Likewise.
1981         * pthread_cond_broadcast.c: Likewise.
1982         * pthread_cond_destroy.c: Likewise.
1983         * pthread_cond_signal.c: Likewise.
1984         * pthread_cond_timedwait.c: Likewise.
1985         * pthread_cond_wait.c: Likewise.
1986         * pthread_create.c: Likewise.
1987         * pthread_mutex_lock.c: Likewise.
1988         * pthread_mutex_setprioceiling.c: Likewise.
1989         * pthread_mutex_timedlock.c: Likewise.
1990         * pthread_mutex_unlock.c: Likewise.
1991         * pthread_rwlock_timedrdlock.c: Likewise.
1992         * pthread_rwlock_timedwrlock.c: Likewise.
1993         * pthread_rwlock_unlock.c: Likewise.
1994         * sysdeps/alpha/tls.h: Likewise.
1995         * sysdeps/i386/tls.h: Likewise.
1996         * sysdeps/ia64/tls.h: Likewise.
1997         * sysdeps/powerpc/tls.h: Likewise.
1998         * sysdeps/pthread/aio_misc.h: Likewise.
1999         * sysdeps/pthread/gai_misc.h: Likewise.
2000         * sysdeps/s390/tls.h: Likewise.
2001         * sysdeps/sh/tls.h: Likewise.
2002         * sysdeps/sparc/tls.h: Likewise.
2003         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2004         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2005         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2006         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2007         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2008         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2009         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2010         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2011         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2012         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2013         Likewise.
2014         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2015         * sysdeps/x86_64/tls.h: Likewise.
2017 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2019         * pthread_getattr_np.c: No need to install a cancellation handler,
2020         this is no cancellation point.
2021         * pthread_getschedparam.c: Likewise.
2022         * pthread_setschedparam.c: Likewise.
2023         * pthread_setschedprio.c: Likewise.
2024         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2025         lll_unlock_wake_cb.
2026         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2027         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2028         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2029         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2030         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2031         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2032         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2033         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2034         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2035         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2036         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2037         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2039         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2040         whether there are more than one thread makes no sense here since
2041         we only call the slow path if the locks are taken.
2042         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2044         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2045         COND_NWAITERS_SHIFT.
2046         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2047         COND_CLOCK_BITS.
2048         * pthread_cond_init.c: Likewise.
2049         * pthread_cond_timedwait.c: Likewise.
2050         * pthread_cond_wait.c: Likewise.
2051         * pthread_condattr_getclock.c: Likewise.
2052         * pthread_condattr_setclock.c: Likewise.
2053         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2054         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2056         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2059 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2061         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2062         unistd.h.
2064         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2065         insn suffix.
2066         (THREAD_GSCOPE_GET_FLAG): Remove.
2067         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2068         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2069         changes.
2070         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2071         (THREAD_GSCOPE_GET_FLAG): Remove.
2072         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2073         instead of THREAD_GSCOPE_GET_FLAG.
2074         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2075         it.
2076         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2077         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2078         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2079         THREAD_GSCOPE_WAIT): Define.
2080         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2081         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2082         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2083         THREAD_GSCOPE_WAIT): Define.
2084         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2085         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2086         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2087         THREAD_GSCOPE_WAIT): Define.
2088         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2089         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2090         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2091         THREAD_GSCOPE_WAIT): Define.
2093 2007-05-24  Richard Henderson  <rth@redhat.com>
2095         * descr.h (struct pthread): Add header.gscope_flag.
2096         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2097         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2098         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2099         THREAD_GSCOPE_WAIT): Define.
2101 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2103         * init.c: Make it compile with older kernel headers.
2105         * tst-initializers1.c: Show through exit code which test failed.
2107         * pthread_rwlock_init.c: Also initialize __shared field.
2108         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2109         element in rwlock structure into four byte elements.  One of them is
2110         the new __shared element.
2111         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2112         Likewise.
2113         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2114         __shared, adjust names of other padding elements.
2115         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2116         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2117         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2118         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2119         FUTEX_PRIVATE_FLAG.
2120         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2121         futex to use private operations if possible.
2122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2123         Likewise.
2124         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2125         Likewise.
2126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2127         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2128         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2129         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2130         Likewise.
2131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2132         Likewise.
2133         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2134         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2136 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2138         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2139         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2140         * pthread_rwlock_timedrdlock.c: Likewise.
2141         * pthread_rwlock_tryrdlock.c: Likewise.
2143         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2144         optimization.
2146         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2147         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2148         duplication of __sem_wait_cleanup.
2150         * allocatestack.c: Revert last change.
2151         * init.c: Likewise.
2152         * sysdeps/i386/tls.h: Likewise.
2153         * sysdeps/x86_64/tls.h: Likewise.
2154         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2155         header structure.
2156         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2158         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2159         Add private field.
2160         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2161         * pthread_barrier_init.c: Set private flag if pshared and private
2162         futexes are supported.
2163         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2164         private field in futex command setup.
2165         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2167 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2169         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2170         support.
2171         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2172         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2173         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2174         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2175         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2177         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2178         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2179         fields in the structure.
2180         (__old_sem_init): New function.
2181         * sem_open.c: Initialize all fields of the structure.
2182         * sem_getvalue.c: Adjust for renamed element.
2183         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2184         (gen-as-const-headers): Add structsem.sym.
2185         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2186         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2187         struct new_sem.  Add struct old_sem.
2188         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2189         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2190         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2191         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2192         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2193         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2194         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2195         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2196         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2197         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2198         * tst-sem10.c: New file.
2199         * tst-sem11.c: New file.
2200         * tst-sem12.c: New file.
2201         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2202         of struct sem.
2204 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2205             Jakub Jelinek  <jakub@redhat.com>
2207         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2208         Move __pthread_enable_asynccancel right before futex syscall.
2209         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2210         Likewise.
2212 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2214         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2215         THREAD_COPY_PRIVATE_FUTEX): Define.
2216         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2217         THREAD_COPY_PRIVATE_FUTEX): Define.
2218         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2219         * init.c (__pthread_initialize_minimal_internal): Use
2220         THREAD_SET_PRIVATE_FUTEX.
2222         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2223         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2224         THREAD_GSCOPE_FLAG_WAIT): Define.
2225         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2226         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2227         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2228         PTR_DEMANGLE.
2229         (THREAD_GSCOPE_GET_FLAG): Define.
2230         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2231         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2232         instead of ->header.gscope_flag directly.
2234 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2236         * init.c (__pthread_initialize_minimal_internal): Check whether
2237         private futexes are available.
2238         * allocatestack.c (allocate_stack): Copy private_futex field from
2239         current thread into the new stack.
2240         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2241         futexes if they are available.
2242         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2243         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2244         in libc-lowlevellock.S allow using private futexes.
2245         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2246         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2247         FUTEX_PRIVATE_FLAG.
2248         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2249         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2250         if they are available.
2251         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2252         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2253         * sysdeps/i386/tcb-offsets.sym: Likewise.
2254         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2255         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2257 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2259         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2260         Remove ptr_wait_lookup_done again.
2261         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2262         (__pthread_initialize_minimal_internal): Initialize
2263         _dl_wait_lookup_done pointer in _rtld_global directly.
2264         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2265         Remove code to code _dl_wait_lookup_done.
2266         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2267         encrypted for now.
2269 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2271         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2272         pthread_mutex_init failed with ENOTSUP.
2274 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2276         * allocatestack.c (__wait_lookup_done): New function.
2277         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2278         Add ptr_wait_lookup_done.
2279         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2280         * pthreadP.h: Declare __wait_lookup_done.
2281         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2282         Define macros to implement reference handling of global scope.
2283         * sysdeps/x86_64/tls.h: Likewise.
2284         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2285         Initialize GL(dl_wait_lookup_done).
2287 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2289         [BZ #4512]
2290         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2291         is detected.
2292         * pthread_mutex_timedlock.c: Likewise.
2293         * pthread_mutex_trylock.c: Likewise.
2294         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2296         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2297         * tst-robust9.c: New file.
2298         * tst-robustpi9.c: New file.
2300         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2301         unnecessary extra cancellation test.
2303 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2305         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2306         extra cancellation test.
2307         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2309 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2311         * descr.h (struct pthread): Rearrange members to fill hole in
2312         64-bit layout.
2314         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2315         (__pthread_setaffinity_new): If syscall was successful and
2316         RESET_VGETCPU_CACHE is defined, use it before returning.
2317         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2319 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2321         [BZ #4455]
2322         * tst-align2.c: Include stackinfo.h.
2323         * tst-getpid1.c: Likewise.
2325 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2327         [BZ #4455]
2328         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2329         * tst-getpid1.c (do_test): Likewise.
2331         [BZ #4456]
2332         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2333         (allocate_stack): Likewise.
2335 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2337         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2338         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2339         (__lll_robust_timedlock_wait): Likewise.
2340         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2342 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2344         [BZ #4465]
2345         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2346         * tst-cancel4.c (tf_fdatasync): New test.
2348 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2350         [BZ #4392]
2351         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2352         check mutexes like normal mutexes.
2354         [BZ #4306]
2355         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2356         Initialize the whole sigevent structure to appease valgrind.
2358 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2360         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2361         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2363 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2365         * tst-locale1.c: Avoid warnings.
2366         * tst-locale2.c: Likewise.
2368 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2370         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2371         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2373 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2375         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2376         __extern_always_inline where appropriate.
2377         * sysdeps/pthread/pthread.h: Likewise.
2379 2007-03-13  Richard Henderson  <rth@redhat.com>
2381         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2382         separate cfi regions for the two subsections.
2384 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2386         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2387         new thread, don't just decrement it.
2388         Patch by Suzuki K P <suzuki@in.ibm.com>.
2390 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2392         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2393         PTHFCT_CALL definition.
2395 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2397         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2398         available, don't use it.
2400 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2402         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2403         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2404         call into the kernel to delay.
2406 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2408         * tst-initializers1.c: We want to test the initializers as seen
2409         outside of libc, so undefined _LIBC.
2411         * pthread_join.c (cleanup): Avoid warning.
2413 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2415         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2416         (__lll_timedwait_tid): Add unwind info.
2418         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2419         function table, mangle the pointers.
2420         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2421         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2422         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2423         demangle pointers before use.
2424         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2425         demangle pointer.
2426         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2427         * sysdeps/pthread/setxid.h: Likewise.
2429 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2431         * tst-rwlock7.c: Show some more information in case of correct
2432         behavior.
2434 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2436         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2437         (lll_futex_timed_wait): Undo part of last change, don't negate
2438         return value.
2440 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2442         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2443         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2445 2006-12-28  David S. Miller  <davem@davemloft.net>
2447         * shlib-versions: Fix sparc64 linux target specification.
2449 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2451         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2452         Adjust include path for pthread_barrier_wait.c move.
2454 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2456         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2457         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2459 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2461         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2462         6 argument cancellable syscalls.
2463         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2464         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2465         6 argument cancellable syscalls.
2466         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2468 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2470         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2471         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2473 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2475         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2476         __sync_lock_release instead of __sync_lock_release_si.
2478 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2480         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2481         Define.
2482         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2483         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2484         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2485         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2486         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2487         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2488         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2489         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2490         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2491         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2492         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2494 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2496         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2497         * pthread_barrier_wait.c: ...here.
2498         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2499         * pthread_cond_broadcast.c: ...here.
2500         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2501         * pthread_cond_signal.c: ...here.
2502         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2503         * pthread_cond_timedwait.c: ...here.
2504         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2505         * pthread_cond_wait.c: ...here.
2506         * sysdeps/pthread/pthread_once.c: Move to...
2507         * pthread_once.c: ...here.
2508         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2509         * pthread_rwlock_rdlock.c: ...here.
2510         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2511         * pthread_rwlock_timedrdlock.c: ...here.
2512         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2513         * pthread_rwlock_timedwrlock.c: ...here.
2514         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2515         * pthread_rwlock_unlock.c: ...here.
2516         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2517         * pthread_rwlock_wrlock.c: ...here.
2518         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2519         * pthread_spin_destroy.c: ...here.
2520         * sysdeps/pthread/pthread_spin_init.c: Move to...
2521         * pthread_spin_init.c: ...here.
2522         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2523         * pthread_spin_unlock.c: ...here.
2524         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2525         * pthread_getcpuclockid.c: ...here.
2527         * init.c: USE_TLS support is now always enabled.
2528         * tst-tls5.h: Likewise.
2529         * sysdeps/alpha/tls.h: Likewise.
2530         * sysdeps/i386/tls.h: Likewise.
2531         * sysdeps/ia64/tls.h: Likewise.
2532         * sysdeps/powerpc/tls.h: Likewise.
2533         * sysdeps/s390/tls.h: Likewise.
2534         * sysdeps/sh/tls.h: Likewise.
2535         * sysdeps/sparc/tls.h: Likewise.
2536         * sysdeps/x86_64/tls.h: Likewise.
2538 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2540         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2541         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2542         failed.
2544         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2545         Define to THREAD_SELF->header.multiple_threads.
2546         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2547         Likewise.
2548         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2549         Likewise.
2550         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2551         (SINGLE_THREAD_P): Likewise.
2552         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2553         (SINGLE_THREAD_P): Likewise.
2554         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2555         (SINGLE_THREAD_P): Likewise.
2556         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2557         (SINGLE_THREAD_P): Likewise.
2558         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2559         Likewise.
2560         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2561         (SINGLE_THREAD_P): Likewise.
2562         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2563         (SINGLE_THREAD_P): Likewise.
2564         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2565         Likewise.
2567 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2569         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2570         by default rather than 2_3_3.
2572 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2574         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2575         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2576         atomic_* instead of catomic_* macros.
2578 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2580         [BZ #3285]
2581         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2582         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2583         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2584         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2585         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2586         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2587         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2588         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2589         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2590         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2591         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2592         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2593         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2595 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2597         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2598         cancelable syscalls with six parameters.
2600         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2601         operations instead of atomic_*.
2603 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2605         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2607 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2609         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2610         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2611         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2612         New file.
2613         * pthread_attr_setstack.c: Allow overwriting the version number of the
2614         new symbol.
2615         * pthread_attr_setstacksize.c: Likewise.
2616         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2617         it.
2618         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2619         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2621 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2623         [BZ #3251]
2624         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2625         Patch by Petr Baudis.
2627 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2629         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2631         * tst-cancel2.c (tf): Loop as long as something was written.
2633 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2635         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2636         mutexes wake all mutexes.
2637         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2638         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2639         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2641 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2643         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2644         to guarantee the thread is always canceled.
2646 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2648         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2649         Include stdlib.h.
2650         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2651         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2654         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2656 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2658         [BZ #3123]
2659         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2660         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2663         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2664         * Makefile (tests): Add tst-cond22.
2665         * tst-cond22.c: New file.
2667 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2669         [BZ #3124]
2670         * descr.h (struct pthread): Add parent_cancelhandling.
2671         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2672         cancelhandling value to child.
2673         * pthread_create.c (start_thread): If parent thread was canceled
2674         reset the SIGCANCEL mask.
2675         * Makefile (tests): Add tst-cancel25.
2676         * tst-cancel25.c: New file.
2678 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2679             Ulrich Drepper  <drepper@redhat.com>
2681         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2682         counterp if it is already zero.
2683         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2685 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2686             Roland McGrath  <roland@redhat.com>
2688         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2689         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2690         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2691         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2692         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2693         lll_robust_mutex_timedlock, lll_mutex_unlock,
2694         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2695         Add _L_*_ symbols around the subsection.
2696         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2697         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2699 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2700             Roland McGrath  <roland@redhat.com>
2702         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2703         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2704         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2705         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2706         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2707         lll_robust_mutex_timedlock, lll_mutex_unlock,
2708         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2709         Add _L_*_ symbols around the subsection.
2710         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2711         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2713 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2715         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2716         change because it can disturb too much existing code.  If real hard
2717         reader preference is needed we'll introduce another type.
2718         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2719         (pthread_rwlock_timedwrlock): Likewise.
2720         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2721         Likewise.
2723 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2725         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2726         reader preference.
2727         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2728         (pthread_rwlock_timedwrlock): Likewise.
2729         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2730         Likewise.
2732 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2734         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2735         Only define ifdef SHARED.
2737 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2739         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2740         (free_stacks): ...here.
2741         (__free_stack_cache): New function.
2742         * pthreadP.h: Declare __free_stack_cache.
2743         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2744         ptr_freeres.
2745         * init.c (pthread_functions): Initialize ptr_freeres.
2746         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2747         New freeres function.
2749 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2751         [BZ #3018]
2752         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2754 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2756         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2757         _XOPEN_REALTIME_THREADS.
2759 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2761         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2762         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2763         HAVE_CLOCK_GETTIME_VSYSCALL.
2764         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2766 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2768         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2769         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2770         * descr.h (struct priority_protection_data): New type.
2771         (struct pthread): Add tpp field.
2772         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2773         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2774         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2775         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2776         TPP mutexes.
2777         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2778         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2779         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2780         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2781         * tpp.c: New file.
2782         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2783         boosted by TPP.
2784         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2785         * pthread_mutexattr_getprioceiling.c
2786         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2787         in the SCHED_FIFO priority range.
2788         * pthread_mutexattr_setprioceiling.c
2789         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2790         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2791         if mutex is not TPP.  Ceiling is now in __data.__lock.
2792         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2793         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2794         is now in __data.__lock.  Add locking.
2795         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2796         * Makefile (libpthread-routines): Add tpp.
2797         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2798         * tst-tpp.h: New file.
2799         * tst-mutexpp1.c: New file.
2800         * tst-mutexpp6.c: New file.
2801         * tst-mutexpp10.c: New file.
2802         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2803         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2805 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2807         [BZ #2843]
2808         * pthread_join.c (pthread_join): Account for self being canceled
2809         when checking for deadlocks.
2810         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2811         (tf1): Don't print anything after pthread_join returns, this would be
2812         another cancellation point.
2813         (tf2): Likewise.
2814         * tst-join6.c: New file.
2815         * Makefile (tests): Add tst-join6.
2817 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2819         [BZ #2892]
2820         * pthread_setspecific.c (__pthread_setspecific): Check
2821         out-of-range index before checking for unused key.
2823         * sysdeps/pthread/gai_misc.h: New file.
2825 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2827         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2828         file.  Don't use sysctl.
2829         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2830         overwrite the file if this is likely not true.
2832 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2834         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2835         * Makefile (tests): Add tst-getpid3.
2836         * tst-getpid3.c: New file.
2838 2006-07-30  Roland McGrath  <roland@redhat.com>
2840         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2842         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2843         (pause_not_cancel): New macro.
2844         (nanosleep_not_cancel): New macro.
2845         (sigsuspend_not_cancel): New macro.
2846         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2847         nanosleep_not_cancel macro from <not-cancel.h>.
2848         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2849         macro from <not-cancel.h>.
2851 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2852             Jakub Jelinek  <jakub@redhat.com>
2854         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2855         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2856         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2857         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2858         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2859         * pthread_mutex_lock.c: Likewise.
2860         * pthread_mutex_timedlock.c: Likewise.
2861         * pthread_mutex_trylock.c: Likewise.
2862         * pthread_mutex_unlock.c: Likewise.
2863         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2864         all mutexes.
2865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2867         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2868         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2869         pthread-pi-defines.sym.
2870         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2871         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2872         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2873         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2874         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2875         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2876         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2877         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2878         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2879         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2880         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2881         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2882         * tst-mutex2.c: Likewise.
2883         * tst-mutex3.c: Likewise.
2884         * tst-mutex4.c: Likewise.
2885         * tst-mutex5.c: Likewise.
2886         * tst-mutex6.c: Likewise.
2887         * tst-mutex7.c: Likewise.
2888         * tst-mutex7a.c: Likewise.
2889         * tst-mutex8.c: Likewise.
2890         * tst-mutex9.c: Likewise.
2891         * tst-robust1.c: Likewise.
2892         * tst-robust7.c: Likewise.
2893         * tst-robust8.c: Likewise.
2894         * tst-mutexpi1.c: New file.
2895         * tst-mutexpi2.c: New file.
2896         * tst-mutexpi3.c: New file.
2897         * tst-mutexpi4.c: New file.
2898         * tst-mutexpi5.c: New file.
2899         * tst-mutexpi6.c: New file.
2900         * tst-mutexpi7.c: New file.
2901         * tst-mutexpi7a.c: New file.
2902         * tst-mutexpi8.c: New file.
2903         * tst-mutexpi9.c: New file.
2904         * tst-robust1.c: New file.
2905         * tst-robust2.c: New file.
2906         * tst-robust3.c: New file.
2907         * tst-robust4.c: New file.
2908         * tst-robust5.c: New file.
2909         * tst-robust6.c: New file.
2910         * tst-robust7.c: New file.
2911         * tst-robust8.c: New file.
2912         * Makefile (tests): Add the new tests.
2914         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2915         * pthread_mutex_destroy.c: Remove unneeded label.
2917 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2919         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2920         computations to compile time.
2922 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2924         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2926 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2928         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2930 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2932         * pthread_key_create.c (__pthread_key_create): Do away with
2933         __pthread_keys_lock.
2935         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2936         (__kernel_cpumask_size): Mark as hidden.
2937         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2939         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2940         * semaphoreP.h (__sem_mappings_lock): Likewise.
2942 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2944         * pthread_atfork.c: Mark __dso_handle as hidden.
2946 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2948         [BZ #2644]
2949         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2950         the reload problem.  Change the one path in pthread_cancel_init
2951         which causes the problem.  Force gcc to reload.  Simplify callers.
2952         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2953         (_Unwind_GetBSP): Undo last patch.
2955 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2957         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2958         function pointer is reloaded after pthread_cancel_init calls.
2960         [BZ #2644]
2961         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2962         pointers are reloaded after pthread_cancel_init calls.
2964 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2966         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2967         __always_inline.
2969 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2971         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2972         Allocate new object which is passed to timer_sigev_thread so that
2973         the timer can be deleted before the new thread is scheduled.
2975 2006-04-26  Roland McGrath  <roland@redhat.com>
2977         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2979 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2981         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2982         suffix for conditional jumps.
2983         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2984         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2985         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2986         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2987         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2988         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2990         * init.c (sigcancel_handler): Compare with correct PID even if the
2991         thread is in the middle of a fork call.
2992         (sighandler_setxid): Likewise.
2993         Reported by Suzuki K P <suzuki@in.ibm.com> .
2995 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2997         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2999 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
3001         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
3002         fails [Coverity CID 105].
3004 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3006         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3008 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3010         [BZ #2505]
3011         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3012         Define __lll_rel_instr using lwsync.
3014 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3016         * allocatestack.c (allocate_stack): Always initialize robust_head.
3017         * descr.h: Define struct robust_list_head.
3018         (struct pthread): Use robust_list_head in robust mutex list definition.
3019         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3020         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3021         (__pthread_initialize_minimal_internal): Register robust_list with
3022         the kernel.
3023         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3024         Declare __set_robust_list_avail.
3025         * pthread_create.c (start_thread): Register robust_list of new thread.
3026         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3027         waiters.
3028         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3029         number of users, it's unreliable.
3030         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3031         set_robust_list syscall is available.
3032         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3033         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3034         Set robust_head.list_op_pending before trying to lock a robust mutex.
3035         * pthread_mutex_timedlock.c: Likewise.
3036         * pthread_mutex_trylock.c: Likewise.
3037         * pthread_mutex_unlock.c: Likewise for unlocking.
3038         * Makefile (tests): Add tst-robust8.
3039         * tst-robust8.c: New file.
3041 2006-03-08  Andreas Schwab  <schwab@suse.de>
3043         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3044         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3046 2006-03-05  Roland McGrath  <roland@redhat.com>
3048         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3049         and $config_os doesn't match *linux*.
3051 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3053         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3054         Use __syscall_error.
3055         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3056         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3057         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3058         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3059         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3060         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3062 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3064         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3066 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3068         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3069         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3070         mutex.
3071         (__lll_robust_timedlock_wait): Likewise.
3072         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3073         (__lll_robust_lock_wait): Likewise.
3074         (__lll_robust_timedlock_wait): Likewise.
3075         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3076         (__lll_robust_lock_wait): Likewise.
3077         (__lll_robust_timedlock_wait): Likewise.
3079 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3081         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3082         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3083         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3084         lll_robust_mutex_unlock): Define.
3085         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3087 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3089         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3090         instead of <clone.S>.
3092 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3094         * Makefile (libpthread-routines): Add
3095         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3096         and pthread_mutex_[sg]etprioceiling.
3097         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3098         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3099         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3100         pthread_mutex_setprioceiling.
3101         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3102         PTHREAD_PRIO_PROTECT): New enum values.
3103         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3104         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3105         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3106         prototypes.
3107         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3108         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3109         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3110         Define.
3111         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3112         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3113         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3114         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3115         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3116         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3117         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3118         protocol mutexes.
3119         * pthread_mutex_getprioceiling.c: New file.
3120         * pthread_mutex_setprioceiling.c: New file.
3121         * pthread_mutexattr_getprioceiling.c: New file.
3122         * pthread_mutexattr_setprioceiling.c: New file.
3123         * pthread_mutexattr_getprotocol.c: New file.
3124         * pthread_mutexattr_setprotocol.c: New file.
3126 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3128         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3130 2006-02-27  Roland McGrath  <roland@redhat.com>
3132         * sysdeps/pthread/Subdirs: List nptl here too.
3133         * configure (libc_add_on_canonical): New variable.
3135         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3137         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3138         self to get main source tree's file.
3139         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3140         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3141         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3142         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3143         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3144         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3145         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3146         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3147         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3148         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3149         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3150         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3151         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3153         * Makefile: Use $(sysdirs) in vpath directive.
3155         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3156         (CPPFLAGS-timer_routines.c): Likewise.
3158         * Makeconfig (includes): Variable removed.
3160 2006-02-26  Roland McGrath  <roland@redhat.com>
3162         * sysdeps/generic/pt-raise.c: Moved to ...
3163         * pt-raise.c: ... here.
3164         * sysdeps/generic/lowlevellock.h: Moved to ...
3165         * lowlevellock.h: ... here.
3167 2006-02-23  Roland McGrath  <roland@redhat.com>
3169         * descr.h (struct pthread): Add final member `end_padding'.
3170         (PTHREAD_STRUCT_END_PADDING): Use it.
3172 2006-02-20  Roland McGrath  <roland@redhat.com>
3174         * sysdeps/mips: Directory removed, saved in ports repository.
3175         * sysdeps/unix/sysv/linux/mips: Likewise.
3177 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3179         * tst-robust1.c: Add second mutex to check that the mutex list is
3180         handled correctly.
3182 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3184         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3185         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3186         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3187         lll_robust_mutex_unlock): New macros.
3188         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3189         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3190         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3191         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3192         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3194 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3196         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3197         definitions.
3198         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3200 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3202         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3203         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3204         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3205         (lll_robust_mutex_unlock): Likewise.
3207 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3209         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3210         Set robust_list.__next rather than robust_list.
3211         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3212         (__pthread_list_t): New typedef.
3213         (pthread_mutex_t): Replace __next and __prev fields with __list.
3214         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3215         (__pthread_list_t): New typedef.
3216         (pthread_mutex_t): Replace __next and __prev fields with __list.
3217         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3218         (__pthread_list_t, __pthread_slist_t): New typedefs.
3219         (pthread_mutex_t): Replace __next and __prev fields with __list.
3220         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3221         (__pthread_list_t, __pthread_slist_t): New typedefs.
3222         (pthread_mutex_t): Replace __next and __prev fields with __list.
3223         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3224         (__pthread_list_t, __pthread_slist_t): New typedefs.
3225         (pthread_mutex_t): Replace __next and __prev fields with __list.
3226         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3227         (__pthread_slist_t): New typedef.
3228         (pthread_mutex_t): Replace __next field with __list.
3230 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3232         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3233         PTHREAD_MUTEX_OWNERDEAD.
3234         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3235         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3236         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3237         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3238         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3239         to PTHREAD_MUTEX_INCONSISTENT.
3240         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3241         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3242         * pthread_mutex_trylock.c: Likewise.
3243         * pthread_mutex_timedlock.c: Likewise.
3244         * pthread_mutex_unlock.c: Likewise.
3245         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3246         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3247         lowlevelrobustlock.sym.
3248         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3249         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3250         definitions.
3251         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3252         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3253         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3254         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3255         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3257 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3259         * allocatestack.c (allocate_stack): Initialize robust_list.
3260         * init.c (__pthread_initialize_minimal_internal): Likewise.
3261         * descr.h (struct xid_command): Pretty printing.
3262         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3263         robust_list.  Adjust macros.
3264         * pthread_create.c (start_thread): Adjust robust_list handling.
3265         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3266         but the owner for all robust mutex types.
3267         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3268         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3269         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3270         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3272         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3273         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3275 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3277         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3278         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3280 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3282         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3283         Return status.
3284         (lll_futex_timed_wait): Define.
3286 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3288         * tst-cancel4.c: Test ppoll.
3290 2006-01-18  Andreas Jaeger  <aj@suse.de>
3292         [BZ #2167]
3293         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3294         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3295         by Jim Gifford <patches@jg555.com>.
3297 2006-01-13  Richard Henderson  <rth@redhat.com>
3299         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3301 2006-01-10  Roland McGrath  <roland@redhat.com>
3303         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3304         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3305         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3306         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3307         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3308         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3309         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3310         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3311         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3312         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3314 2006-01-09  Roland McGrath  <roland@redhat.com>
3316         * tst-initializers1-c89.c: New file.
3317         * tst-initializers1-c99.c: New file.
3318         * tst-initializers1-gnu89.c: New file.
3319         * tst-initializers1-gnu99.c: New file.
3320         * Makefile (tests): Add them.
3321         (CFLAGS-tst-initializers1-c89.c): New variable.
3322         (CFLAGS-tst-initializers1-c99.c): New variable.
3323         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3324         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3326         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3327         Use __extension__ on anonymous union definition.
3328         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3329         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3330         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3331         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3332         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3334 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3336         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3337         Don't give the union a name because it changes the mangled name.
3338         Instead name the struct for __data.
3339         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3340         Likewise.
3341         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3342         Likewise.
3344 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3346         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3347         stack bias to mc_ftp field.
3349 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3351         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3352         being too clever and reloading the futex value where it shouldn't.
3354 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3356         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3357         correct type.
3359 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3361         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3362         Add cfi directives.
3364 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3366         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3367         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3368         rename in tcbhead_t.
3370         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3371         Don't give the union a name because it changes the mangled name.
3372         Instead name the struct for __data.
3373         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3374         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3375         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3376         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3377         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3378         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3380 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3382         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3383         Return status.
3384         (lll_futex_timed_wait): Define.
3385         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3386         * sysdeps/pthread/aio_misc.h: New file.
3388 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3390         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3392 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3394         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3395         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3396         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3398 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3400         * tst-cancel24.cc: Use C headers instead of C++ headers.
3402 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3404         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3405         sparc-linux configured glibc.
3406         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3407         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3408         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3409         atomic_compare_and_exchange_val_24_acq instead of
3410         atomic_compare_and_exchange_val_acq.
3411         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3412         instead of atomic_exchange_rel.
3413         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3414         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3415         file.
3416         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3417         file.
3418         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3419         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3420         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3421         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3422         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3423         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3424         New file.
3425         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3426         New file.
3427         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3428         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3429         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3430         file.
3431         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3432         file.
3433         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3435 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3437         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3438         mutex initializers.
3440 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3442         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3443         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3444         THREAD_COPY_POINTER_GUARD): Define.
3445         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3446         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3448 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3450         * version.c: Update copyright year.
3452 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3454         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3455         .eh_frame section, use cfi_* directives.
3456         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3458 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3460         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3461         now.
3463 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3465         * sysdeps/pthread/sigaction.c: Removed.
3466         * sigaction.c: New file.
3467         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3469 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3471         * Makefile (tests): Add tst-signal7.
3472         * tst-signal7.c: New file.
3474 2005-12-27  Roland McGrath  <roland@redhat.com>
3476         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3477         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3478         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3479         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3480         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3481         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3482         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3483         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3484         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3485         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3486         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3488 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3490         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3491         and __prev field to pthread_mutex_t.
3492         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3493         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3494         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3495         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3496         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3497         to pthread_mutex_t.
3499 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3501         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3502         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3503         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3504         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3505         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3506         and PTHREAD_MUTEXATTR_FLAG_BITS.
3507         * descr.h (struct pthread): Add robust_list field and define
3508         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3509         * pthread_mutexattr_getrobust.c: New file.
3510         * pthread_mutexattr_setrobust.c: New file.
3511         * pthread_mutex_consistent.c: New file.
3512         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3513         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3514         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3515         Adjust pthread_mutex_t initializers.
3516         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3517         field to pthread_mutex_t.
3518         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3519         and __prev field to pthread_mutex_t.
3520         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3521         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3522         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3523         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3524         * pthread_mutexattr_gettype.c: Likewise.
3525         * pthread_mutexattr_setpshared.c: Likewise.
3526         * pthread_mutexattr_settype.c: Likewise.
3527         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3528         Initialize mutex kind according to robust flag.
3529         * pthread_mutex_lock.c: Implement local robust mutex.
3530         * pthread_mutex_timedlock.c: Likewise.
3531         * pthread_mutex_trylock.c: Likewise.
3532         * pthread_mutex_unlock.c: Likewise.
3533         * pthread_create.c (start_thread): Mark robust mutexes which remained
3534         locked as dead.
3535         * tst-robust1.c: New file.
3536         * tst-robust2.c: New file.
3537         * tst-robust3.c: New file.
3538         * tst-robust4.c: New file.
3539         * tst-robust5.c: New file.
3540         * tst-robust6.c: New file.
3541         * tst-robust7.c: New file.
3542         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3543         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3544         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3545         tst-robust5, tst-robust6, and tst-robust7.
3547         * tst-typesizes.c: New file.
3548         * Makefile (tests): Add tst-typesizes.
3550         * tst-once3.c: More debug output.
3552 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3554         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3555         missing after last change.
3557         * version.c: Update copyright year.
3559 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3561         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3562         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3563         * pthread_mutex_trylock.c: Likewise.
3564         * pthread_mutex_timedlock.c: Likewise.
3565         * pthread_mutex_unlock.c: Likewise.
3567 2005-12-22  Roland McGrath  <roland@redhat.com>
3569         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3570         so that #include_next's search location is not reset to the -I..
3571         directory where <nptl/...> can be found.
3573 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3575         [BZ #1913]
3576         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3577         Fix unwind info.  Remove useless branch prediction prefix.
3578         * tst-cancel24.cc: New file.
3579         * Makefile: Add rules to build and run tst-cancel24.
3581 2005-12-21  Roland McGrath  <roland@redhat.com>
3583         * libc-cancellation.c: Use <> rather than "" #includes.
3584         * pt-cleanup.c: Likewise.
3585         * pthread_create.c: Likewise.
3586         * pthread_join.c: Likewise.
3587         * pthread_timedjoin.c: Likewise.
3588         * pthread_tryjoin.c: Likewise.
3589         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3590         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3591         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3592         * unwind.c: Likewise.
3594 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3596         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3597         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3598         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3599         THREAD_COPY_POINTER_GUARD): Define.
3601 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3603         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3604         rather than one.
3605         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3606         THREAD_COPY_POINTER_GUARD): Define.
3607         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3608         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3609         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3610         THREAD_COPY_POINTER_GUARD): Define.
3611         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3612         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3613         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3614         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3615         Use PTR_DEMANGLE for B0 if defined.
3617 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3619         * pthread_create.c (__pthread_create_2_1): Use
3620         THREAD_COPY_POINTER_GUARD if available.
3621         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3622         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3623         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3624         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3625         * sysdeps/x86_64/tls.h: Likewise.
3627 2005-12-15  Roland McGrath  <roland@redhat.com>
3629         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3631 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3633         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3634         sysdeps/generic.
3635         * errno-loc.c: New file.
3637 2005-12-12  Roland McGrath  <roland@redhat.com>
3639         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3640         adjustments before choosing stack size.  Update minimum stack size
3641         calculation to match allocate_stack change.
3643 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3645         * allocatestack.c (allocate_stack): Don't demand that there is an
3646         additional full page available on the stack beside guard, TLS, the
3647         minimum stack.
3649 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3651         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3652         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3654         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3655         compiling 32-bit code we must define __cleanup_fct_attribute.
3657 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3659         [BZ #1920]
3660         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3661         __attribute__ instead of __attribute.
3662         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3663         (__cleanup_fct_attribute): Likewise.
3665 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3667         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3668         a write barrier before writing libgcc_s_getcfa.
3670 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3672         * sysdeps/unix/sysv/linux/configure: Removed.
3674 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3676         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3677         optional init_array/fini_array support.
3679 2005-10-24  Roland McGrath  <roland@redhat.com>
3681         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3682         versioned_symbol use.
3684 2005-10-16  Roland McGrath  <roland@redhat.com>
3686         * init.c (__pthread_initialize_minimal_internal): Even when using a
3687         compile-time default stack size, apply the minimum that allocate_stack
3688         will require, and round up to page size.
3690 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3692         * Makefile ($(test-modules)): Remove static pattern rule.
3694 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3695             Ulrich Drepper  <drepper@redhat.com>
3697         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3698         alignment in callback function.
3699         * Makefile: Add rules to build and run tst-align3.
3700         * tst-align3.c: New file.
3702 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3704         * allocatestack.c (setxid_signal_thread): Add
3705         INTERNAL_SYSCALL_DECL (err).
3707 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3709         * allocatestack.c (setxid_signal_thread): Need to use
3710         atomic_compare_and_exchange_bool_acq.
3712 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3713             Jakub Jelinek  <jakub@redhat.com>
3715         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3716         CANCEL_RESTMASK.
3717         (struct pthread): Move specific_used field to avoid padding.
3718         Add setxid_futex field.
3719         * init.c (sighandler_setxid): Reset setxid flag and release the
3720         setxid futex.
3721         * allocatestack.c (setxid_signal_thread): New function.  Broken
3722         out of the bodies of the two loops in __nptl_setxid.  For undetached
3723         threads check whether they are exiting and if yes, don't send a signal.
3724         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3725         * pthread_create.c (start_thread): For undetached threads, check
3726         whether setxid bit is set.  If yes, wait until signal has been
3727         processed.
3729         * allocatestack.c (STACK_VARIABLES): Initialize them.
3730         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3732 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3734         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3735         waiters, awake all waiters on the associated mutex.
3737 2005-09-22  Roland McGrath  <roland@redhat.com>
3739         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3740         ../sysdeps/x86_64/hp-timing.h).
3742 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3744         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3745         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3746         (lll_futex_wake_unlock): Define.
3747         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3748         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3749         (lll_futex_wake_unlock): Define.
3750         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3751         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3752         (lll_futex_wake_unlock): Define.
3753         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3754         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3755         (lll_futex_wake_unlock): Define.
3756         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3757         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3758         (lll_futex_wake_unlock): Define.
3759         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3760         lll_futex_wake_unlock.
3761         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3762         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3763         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3765         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3766         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3768 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3770         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3771         Fix typo in register name.
3773 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3775         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3776         Use __sigfillset.  Document that sigfillset does the right thing wrt
3777         to SIGSETXID.
3779 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3781         [BZ #1102]
3782         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3783         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3784         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3785         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3786         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3787         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3788         in the structure.
3789         * Makefile (tests): Add tst-initializers1.
3790         (CFLAGS-tst-initializers1.c): Set.
3791         * tst-initializers1.c: New test.
3793 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3795         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3796         Make sure __flags are located at offset 48 from the start of the
3797         structure.
3799 2005-07-02  Roland McGrath  <roland@redhat.com>
3801         * Makeconfig: Comment fix.
3803 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3805         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3806         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3807         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3808         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3809         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3810         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3811         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3812         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3813         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3814         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3816 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3818         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3819         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3820         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3821         fields.
3822         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3823         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3824         field.  Put in sysinfo field unconditionally.
3825         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3826         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3827         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3828         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3829         fields.
3830         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3831         * pthread_create.c (__pthread_create_2_1): Use
3832         THREAD_COPY_STACK_GUARD macro.
3833         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3834         tests.
3835         * tst-stackguard1.c: New file.
3836         * tst-stackguard1-static.c: New file.
3838 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3840         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3841         Invoke CGOTSETUP and CGOTRESTORE.
3842         (CGOTSETUP, CGOTRESTORE): Define.
3844 2005-05-29  Richard Henderson  <rth@redhat.com>
3846         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3847         (tf_write, tf_writev): Use it.
3848         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3849         the system minimum.
3851 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3853         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3854         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3855         __librt_*_asynccancel@local.
3857 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3859         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3860         all occurrences of JUMPTARGET.  Instead append @local to labels.
3862 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3864         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3865         size/alignment of struct pthread rather than tcbhead_t.
3866         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3867         Likewise.
3868         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3869         Likewise.
3870         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3871         Likewise.
3873 2005-05-19  Richard Henderson  <rth@redhat.com>
3875         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3876         __sync_val_compare_and_swap, not explicit _si variant.
3877         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3879 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3881         [BZ #915]
3882         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3884 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3886         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3887         .eh_frame section, use cfi_* directives.
3889 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3891         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3892         of "" includes.
3894 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3896         [BZ #1075]
3897         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3898         aio_write blocks.
3900 2005-04-27  Roland McGrath  <roland@redhat.com>
3902         * Makefile (tests): Remove tst-clock2.
3904         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3905         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3906         translating to the kernel clockid_t for our own process/thread clock.
3908         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3910 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3912         * old_pthread_cond_init.c: Include <errno.h>.
3913         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3914         process shared or uses clock other than CLOCK_REALTIME.
3915         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3917 2005-04-13  David S. Miller  <davem@davemloft.net>
3919         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3920         * sysdeps/sparc/sparc64/clone.S: New file.
3922 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3924         [BZ #1102]
3925         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3926         __inline instead of inline.
3927         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3929 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3931         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3932         functionally equivalent, but shorter instructions.
3933         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3934         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3935         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3936         Likewise.
3937         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3938         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3939         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3940         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3941         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3942         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3943         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3944         Likewise.
3945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3946         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3947         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3948         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3949         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3951 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3953         * sysdeps/mips/Makefile: New file.
3954         * sysdeps/mips/nptl-sysdep.S: New file.
3955         * sysdeps/mips/tcb-offsets.sym: New file.
3956         * sysdeps/mips/pthread_spin_lock.S: New file.
3957         * sysdeps/mips/pthread_spin_trylock.S: New file.
3958         * sysdeps/mips/pthreaddef.h: New file.
3959         * sysdeps/mips/tls.h: New file.
3960         * sysdeps/mips/jmpbuf-unwind.h: New file.
3961         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3962         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3963         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3964         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3965         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3966         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3967         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3968         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3969         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3970         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3972 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3974         [BZ #1112]
3975         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3976         variable to scerr.
3978 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3980         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3982 2005-02-25  Roland McGrath  <roland@redhat.com>
3984         * alloca_cutoff.c: Correct license text.
3985         * tst-unload.c: Likewise.
3986         * sysdeps/pthread/allocalim.h: Likewise.
3987         * sysdeps/pthread/pt-initfini.c: Likewise.
3988         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3989         * sysdeps/pthread/bits/sigthread.h: Likewise.
3990         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3991         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3993 2005-02-16  Roland McGrath  <roland@redhat.com>
3995         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3996         Use unsigned int * for ptr_nthreads.
3998 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
4000         [BZ #721]
4001         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
4002         gcc4.
4004 2005-02-07  Richard Henderson  <rth@redhat.com>
4006         [BZ #787]
4007         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4008         argument.
4010 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4012         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4013         order of arguments in invocation of atomic_add_zero.
4015 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4017         [BZ #737]
4018         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4019         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4020         at least gotntpoff relocation and addition.
4021         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4022         Likewise.
4023         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4024         Likewise.
4025         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4026         Likewise.
4028 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4030         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4031         entry for static tls deallocation fix.
4032         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4033         also contains information whether the memory pointed to is static
4034         TLS or not.
4035         * sysdeps/i386/tls.h: Likewise.
4036         * sysdeps/ia64/tls.h: Likewise.
4037         * sysdeps/powerpc/tls.h: Likewise.
4038         * sysdeps/s390/tls.h: Likewise.
4039         * sysdeps/sh/tls.h: Likewise.
4040         * sysdeps/sparc/tls.h: Likewise.
4041         * sysdeps/x86_64/tls.h: Likewise.
4043 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4045         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4047 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4049         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4050         %esp.
4051         * Makefile (tests): Add tst-align2.
4052         * tst-align2.c: New test.
4053         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4054         -mpreferred-stack-boundary=4.
4056 2004-12-18  Roland McGrath  <roland@redhat.com>
4058         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4059         New file removed withdrawn for the moment.
4061 2004-12-17  Richard Henderson  <rth@redhat.com>
4063         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4064         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4066 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4068         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4069         Increased PTHREAD_STACK_MIN.
4071         * tst-context1.c (stacks): Use bigger stack size.
4073 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4075         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4076         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4078 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4080         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4081         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4082         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4084 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4086         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4088 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4090         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4091         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4093         * tst-getpid1.c: If child crashes, report this first.  Print which
4094         signal.
4096 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4098         * init.c (__pthread_initialize_minimal_internal): Also unblock
4099         SIGSETXID.
4101 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4103         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4104         _POSIX_THREAD_CPUTIME): Define to 0.
4105         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4106         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4107         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4108         __timer_signal_thread_tclk): Remove.
4109         (init_module): Remove their initialization.
4110         (thread_cleanup): Remove their cleanup assertions.
4111         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4112         __timer_signal_thread_tclk): Remove.
4113         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4114         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4115         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4117 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4119         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4120         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4122         * Makefile (tests): Add tst-getpid2.
4123         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4124         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4125         * tst-getpid2.c: New test.
4127 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4129         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4131 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4133         * Makefile (tests): Add tst-getpid1.
4134         * tst-getpid1.c: New file.
4135         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4136         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4138 2004-12-02  Roland McGrath  <roland@redhat.com>
4140         * Makefile (libpthread-nonshared): Variable removed.
4141         ($(objpfx)libpthread_nonshared.a): Target removed.
4142         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4143         These are now handled by generic magic from
4144         libpthread-static-only-routines being set.
4146 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4148         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4149         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4150         _POSIX_THREAD_PRIO_PROTECT): Define.
4151         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4152         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4153         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4155 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4157         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4158         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4159         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4160         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4161         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4162         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4163         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4165 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4167         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4169         * Makefile (libpthread-routines): Add pthread_setschedprio.
4170         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4171         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4172         * pthread_setschedprio.c: New file.
4174 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4176         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4177         * pthread_cancel.c (pthread_create): Likewise.
4179         * Makefile (libpthread-routines): Add vars.
4180         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4181         * init.c (__default_stacksize, __is_smp): Remove.
4182         * vars.c: New file.
4183         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4184         and define a wrapper macro.
4185         (PTHREAD_STATIC_FN_REQUIRE): Define.
4186         * allocatestack.c (__find_thread_by_id): Undefine.
4187         * pthread_create (__pthread_keys): Remove.
4188         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4189         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4190         PTHREAD_STATIC_FN_REQUIRE.
4192 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4194         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4195         parameter to REGISTER macro.
4197 2004-11-17  Roland McGrath  <roland@redhat.com>
4199         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4200         Make sure SIGCANCEL is blocked as well.
4202 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4204         * sysdeps/pthread/setxid.h: New file.
4205         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4206         (struct xid_command): Add forward decl.
4207         (struct pthread_functions): Change return type of __nptl_setxid hook
4208         to int.
4209         * pthreadP.h (__nptl_setxid): Change return type to int.
4210         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4211         calling thread, return its return value and set errno on failure.
4212         * descr.h (struct xid_command): Change id type to long array.
4214         * Makefile: Add rules to build and test tst-setuid1 and
4215         tst-setuid1-static.
4216         * tst-setuid1.c: New test.
4217         * tst-setuid1-static.c: New test.
4219 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4221         * Makefile (tests): Add tst-exit3.
4222         * tst-exit3.c: New test.
4224 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4226         * Makefile (tests): Add tst-exit2.
4227         * tst-exit2.c: New file.
4229 2004-11-09  Roland McGrath  <roland@redhat.com>
4231         [BZ #530]
4232         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4233         here, before calling clone.
4234         * pthread_create.c (start_thread): Don't do it here.
4236 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4238         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4240 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4242         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4243         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4244         assembler warning.
4246 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4248         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4249         if sched_priority is not between minprio and maxprio.
4251 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4253         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4254         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4256         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4257         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4259 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4261         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4262         not-cancelable I/O functions.
4264 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4266         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4267         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4268         make sure 2 is stored in the futex and we looked at the old value.
4269         Fix a few other problems to return the correct value.
4271 2004-10-14  Richard Henderson  <rth@redhat.com>
4273         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4274         make gcc4 happy.
4276 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4278         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4279         of pthread-functions.h and pthreaddef.h.
4280         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4282         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4283         Change __data.__nwaiters from int to unsigned int.
4285         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4286         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4288         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4289         before return type.
4291         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4292         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4294 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4296         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4297         test fails, remove message queue.
4298         (tf_msgsnd): Likewise.
4300 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4302         * tst-clock1.c: Change #ifdef to #if defined.
4303         * tst-clock2.c: Likewise.
4304         * tst-cond11.c: Likewise.
4306         * sysdeps/pthread/timer_create.c (timer_create): Use
4307         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4308         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4309         THREAD_CPUTIME.
4311 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4313         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4314         _POSIX_THREAD_CPUTIME): Define to 0.
4316 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4318         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4319         and _POSIX_THREAD_CPUTIME to zero.
4320         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4321         * tst-barrier2.c: Fix testing for POSIX feature.
4322         * tst-clock1.c: Likewise.
4323         * tst-clock2.c: Likewise.
4324         * tst-cond11.c: Likewise.
4325         * tst-cond4.c: Likewise.
4326         * tst-cond6.c: Likewise.
4327         * tst-flock2.c: Likewise.
4328         * tst-mutex4.c: Likewise.
4329         * tst-mutex9.c: Likewise.
4330         * tst-rwlock12.c: Likewise.
4331         * tst-rwlock4.c: Likewise.
4332         * tst-signal1.c: Likewise.
4333         * tst-spin2.c: Likewise.
4334         * sysdeps/pthread/posix-timer.h: Likewise.
4335         * sysdeps/pthread/timer_create.c: Likewise.
4336         * sysdeps/pthread/timer_routines.c: Likewise.
4338 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4340         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4341         (__lll_mutex_timedlock_wait): Address futex correctly.
4343         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4344         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4345         make sure 2 is stored in the futex and we looked at the old value.
4346         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4347         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4348         which might very well made the code not working at all before.
4349         [BZ #417]
4351 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4353         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4354         allow SIGSETXID to be sent.
4355         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4356         for SIGSETXID to be defined.
4357         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4358         SIGSETXID cannot be blocked.
4360         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4361         Add __extension__ to long long types.
4362         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4363         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4364         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4365         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4366         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4367         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4368         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4370 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4372         * descr.h (struct pthread): Add stopped_start field.
4373         * sysdeps/pthread/createthread.c (create_thread): Set
4374         start_stopped flag in descriptor for new thread appropriately.
4375         * pthread_create.c (start_thread): Only take lock to be stopped on
4376         startup if stopped_start flag says so.
4378 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4380         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4381         is created detached and if yes, do not try to free the stack in case
4382         the thread creation failed.
4383         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4384         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4385         case there has been no error.  [BZ #405]
4387         * pthread_create.c (start_thread): Don't wait for scheduler data
4388         etc to be set at the beginning of the function.  The cancellation
4389         infrastructure must have been set up.  And enable async
4390         cancellation before potentially going to sleep.  [BZ #401]
4392 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4394         * Versions: Remove exports for pthread_set*id_np functions.
4395         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4396         for now.
4397         * Makefile: Don't build pthread_set*id code for now.
4399 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4401         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4402         internal use.
4403         * allocatestack.c (__nptl_setxid): New function.
4404         * descr.h (struct xid_command): Define type.
4405         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4406         (sighandler_setxid): New function.
4407         (__pthread_initialize_minimal): Register sighandler_setxid for
4408         SIGCANCEL.
4409         * pt-allocrtsig.c: Update comment.
4410         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4411         Declare __nptl_setxid.
4412         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4413         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4414         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4415         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4416         and pthread_setresuid_np.
4417         * pthread_setgid_np.c: New file.
4418         * pthread_setuid_np.c: New file.
4419         * pthread_setegid_np.c: New file.
4420         * pthread_seteuid_np.c: New file.
4421         * pthread_setregid_np.c: New file.
4422         * pthread_setreuid_np.c: New file.
4423         * pthread_setresgid_np.c: New file.
4424         * pthread_setresuid_np.c: New file.
4425         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4426         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4427         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4428         and pthread_setresuid_np.
4429         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4430         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4431         pthread_setregid, and pthread_setresgid.
4433 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4435         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4436         ENOMEM when out of memory.
4438 2004-09-10  Roland McGrath  <roland@redhat.com>
4440         [BZ #379]
4441         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4442         code, since we don't try to use the broken CLONE_STOPPED any more.
4443         * pthread_create.c (start_thread): Likewise.
4445 2004-09-15  Richard Henderson  <rth@redhat.com>
4447         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4449 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4451         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4452         (__libc_unwind_longjmp): Delete macro and declare as function.
4453         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4454         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4455         nptl directory.
4456         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4457         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4458         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4460 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4462         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4463         for __USE_XOPEN2K.
4464         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4465         types also for __USE_XOPEN2K.
4466         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4467         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4468         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4469         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4470         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4471         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4472         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4473         [BZ #320]
4475 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4477         * sysdeps/pthread/pthread.h
4478         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4479         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4480         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4481         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4482         [BZ #375]
4484 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4486         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4487         PSEUDO to be used with . prefix.
4489         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4490         Use atomic_increment instead of atomic_exchange_and_add.
4491         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4492         Likewise.
4493         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4494         Likewise.
4495         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4496         Likewise.
4498         * allocatestack.c (allocate_stack): Use atomic_increment_val
4499         instead of atomic_exchange_and_add.
4500         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4501         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4502         Likewise.
4503         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4504         Likewise.
4506         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4507         the initialization function might throw.
4509 2005-09-05  Richard Henderson  <rth@redhat.com>
4511         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4512         Move definition inside libpthread, libc, librt check.  Provide
4513         definition for rtld.
4515 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4517         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4518         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4519         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4520         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4521         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4522         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4523         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4524         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4525         * unwind.c: Use it.
4527         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4528         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4529         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4530         Likewise.
4531         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4532         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4533         this is the last waiter, signal pthread_cond_destroy caller and
4534         avoid using the pthread_cond_t structure after unlock.
4535         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4537         Read clock type from the least significant bits of __nwaiters instead
4538         of __clock.
4539         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4540         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4542 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4544         [BZ #342]
4545         * Makefile (tests): Add tst-cond20 and tst-cond21.
4546         * tst-cond20.c: New test.
4547         * tst-cond21.c: New test.
4548         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4549         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4550         it unsigned int.
4551         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4552         Likewise.
4553         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4554         (pthread_cond_t): Likewise.
4555         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4556         Likewise.
4557         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4558         Likewise.
4559         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4560         Likewise.
4561         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4562         (cond_nwaiters): New.
4563         (clock_bits): New.
4564         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4565         if there are waiters not signalled yet.
4566         Wait until all already signalled waiters wake up.
4567         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4568         __nwaiters.  If pthread_cond_destroy has been called and this is the
4569         last waiter, signal pthread_cond_destroy caller and avoid using
4570         the pthread_cond_t structure after unlock.
4571         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4572         decrement it when leaving.  If pthread_cond_destroy has been called
4573         and this is the last waiter, signal pthread_cond_destroy caller.
4574         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4575         Likewise.  Read clock type from the least significant bits of
4576         __nwaiters instead of __clock.
4577         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4578         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4579         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4580         clock type just from the last COND_CLOCK_BITS bits of value.
4581         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4582         instead of __clock, just from second bit of condattr's value.
4584 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4586         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4587         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4588         != 64.
4589         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4591 2004-08-15  Roland McGrath  <roland@frob.com>
4593         * pthread_atfork.c: Update copyright terms including special exception
4594         for these trivial files, which are statically linked into executables
4595         that use dynamic linking for the significant library code.
4597 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4599         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4600         pthread_rwlock_rdlock.
4601         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4602         Decrease __nr_readers_queued after reacquiring lock.
4603         * sysdeps/pthread/pthread_rwlock_timedrdlock
4604         (pthread_rwlock_timedrdlock): Likewise.
4605         Reported by Bob Cook <bobcook47@hotmail.com>.
4607 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4609         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4610         before pthread_barrier_wait.
4612 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4614         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4615         Remove unnecessary exception handling data.
4617 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4619         [BZ #284]
4620         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4621         instead of clockid_t.
4623 2004-07-21  Roland McGrath  <roland@redhat.com>
4625         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4627 2004-07-19  Roland McGrath  <roland@redhat.com>
4629         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4631 2004-07-02  Roland McGrath  <roland@redhat.com>
4633         * configure: Don't exit.
4635 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4637         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4638         (__pthread_cond_timedwait): Check for invalid nanosecond in
4639         timeout value.
4641 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4643         * Makefile: Add rules to build and run tst-fini1.
4644         * tst-fini1.c: New file.
4645         * tst-fini1mod.c: New file.
4647 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4649         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4650         if no cancellation support is needed.
4651         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4652         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4653         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4654         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4655         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4656         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4657         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4658         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4659         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4661         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4662         only if not already defined.
4664 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4666         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4667         constraint "m" instead of "0" for futex.
4669         * shlib-versions: Add powerpc64-.*-linux.*.
4671 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4673         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4674         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4675         for valid tv_nsec.
4676         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4677         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4678         bits.
4680 2004-06-29  Roland McGrath  <roland@redhat.com>
4682         * Banner: NPTL no longer has its own version number.
4683         * Makefile (nptl-version): Variable removed.
4684         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4685         using $(version), the glibc version number.
4687 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4689         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4690         Fix branch offset for a PLT entry.
4691         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4692         Likewise.
4693         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4694         Likewise.
4695         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4696         Likewise.
4697         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4698         Likewise.
4700 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4702         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4703         unconditionally.
4705 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4707         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4708         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4709         instead of tv_sec.
4710         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4711         (pthread_rwlock_timedrdlock): Likewise.
4713 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4715         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4716         Set __r7 to val, not mutex.
4718 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4720         * Makefile: Add rules to build tst-rwlock14.
4721         * tst-rwlock14.c: New file.
4723 2004-06-24  Boris Hu  <boris.hu@intel.com>
4725         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4726         check.
4727         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4729 2004-06-19  Andreas Jaeger  <aj@suse.de>
4731         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4732         assembler in last patch.
4734 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4736         * sysdeps/pthread/pthread_cond_timedwait.c
4737         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4738         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4739         (__pthread_cond_timedwait): Check for invalid nanosecond in
4740         timeout value.
4741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4742         * tst-cond19.c: New file.
4743         * Makefile: Add rules to build and run tst-cond19.
4745 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4747         * tst-context1.c (GUARD_PATTERN): Defined.
4748         (tst_context_t): Define struct containing ucontext_t & guard words.
4749         (ctx): Declare as an array of tst_context_t.
4750         (fct): Verify uc_link & guard words are still valid.
4751         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4753 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4755         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4756         Add __data.__futex field, reshuffle __data.__clock.
4757         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4758         (__pthread_cond_signal): Increment __futex at the same time as
4759         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4760         address of low 32-bits of __wakeup_seq to futex syscall.
4761         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4762         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4763         releasing internal lock to FUTEX_WAIT.
4764         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4765         (__pthread_cond_timedwait): Likewise.
4766         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4767         (FUTEX_CMP_REQUEUE): Define.
4768         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4769         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4770         Pass __futex value from before the unlock and __futex address instead
4771         of address of low 32-bits of __wakeup_seq to futex syscall.
4772         Fallback to FUTEX_WAKE all on any errors.
4774 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4776         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4777         comment typo.
4778         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4779         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4780         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4781         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4782         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4784 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4786         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4787         Add memory clobber to inline assembly.
4788         (__lll_mutex_trylock): Likewise.
4789         (__lll_mutex_cond_trylock): Likewise.
4791 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4793         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4794         Pass val argument as 6th system call argument in %r7.
4796 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4798         * Makefile (tests): Add tst-cond16.
4799         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4800         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4801         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4802         Add __data.__futex field, reshuffle __data.__clock.
4803         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4804         (__pthread_cond_signal): Increment __futex at the same time as
4805         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4806         address of low 32-bits of __wakeup_seq to futex syscall.
4807         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4808         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4809         releasing internal lock to FUTEX_WAIT.
4810         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4811         (__pthread_cond_timedwait): Likewise.
4812         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4813         (FUTEX_CMP_REQUEUE): Define.
4814         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4815         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4816         Pass __futex value from before the unlock and __futex address instead
4817         of address of low 32-bits of __wakeup_seq to futex syscall.
4818         Fallback to FUTEX_WAKE all on any errors.
4819         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4820         Define.
4821         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4822         internally.  Return non-zero if error, zero if success.
4823         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4824         Add __data.__futex field, reshuffle __data.__clock.
4825         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4826         Define.
4827         (lll_futex_requeue): Add val argument, return 1 unconditionally
4828         for the time being.
4829         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4830         Add __data.__futex field, reshuffle __data.__clock.
4831         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4832         Define.
4833         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4834         internally.  Return non-zero if error, zero if success.
4835         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4836         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4837         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4838         Define.
4839         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4840         internally.  Return non-zero if error, zero if success.
4841         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4842         Add __data.__futex field, reshuffle __data.__clock.
4843         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4844         Define.
4845         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4846         internally.  Return non-zero if error, zero if success.
4847         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4848         Add __data.__futex field, reshuffle __data.__clock.
4849         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4850         Add __data.__futex field, reshuffle __data.__clock.
4851         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4852         Increment __futex at the same time as __wakeup_seq or __total_seq.
4853         Pass address of __futex instead of address of low 32-bits of
4854         __wakeup_seq to futex syscall.
4855         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4856         Pass __futex value from before releasing internal lock
4857         to FUTEX_WAIT.
4858         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4859         Likewise.  Avoid unnecessary shadowing of variables.
4860         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4861         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4862         unlock and __futex address instead of address of low 32-bits of
4863         __wakeup_seq to futex_requeue macro, adjust for new return value
4864         meaning.
4865         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4866         (__pthread_cond_signal): Increment __futex at the same time as
4867         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4868         address of low 32-bits of __wakeup_seq to futex syscall.
4869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4870         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4871         releasing internal lock to FUTEX_WAIT.
4872         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4873         (__pthread_cond_timedwait): Likewise.
4874         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4875         (FUTEX_CMP_REQUEUE): Define.
4876         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4877         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4878         Pass __futex value from before the unlock and __futex address instead
4879         of address of low 32-bits of __wakeup_seq to futex syscall.
4880         Fallback to FUTEX_WAKE all on any errors.
4882 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4884         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4885         Add nop to align the end of critical section.
4886         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4888 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4890         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4891         Add __broadcast_seq field.
4892         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4893         all waiters as woken with woken_seq and bump broadcast counter.
4894         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4895         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4896         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4897         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4899 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4902         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4903         Reported by Kaz Kojima.
4905 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4907         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4909 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4911         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4912         __broadcast_seq with bc_seq after acquiring internal lock instead of
4913         before it.
4915 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4917         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4918         compilation.
4919         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4920         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4921         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4922         (pthread_cond_t): Add __data.__broadcast_seq field.
4923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4924         (FRAME_SIZE): Define.
4925         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4926         Comment typo fixes.
4927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4928         Define.
4929         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4930         typo fixes.
4931         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4932         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4933         fixes.
4935 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4937         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4938         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4939         Add __broadcast_seq field.
4940         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4941         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4942         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4943         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4944         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4945         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4946         all waiters as woken with woken_seq and bump broadcast counter.
4947         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4949         __broadcast_seq field.
4950         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4951         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4952         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4953         * pthread_cond_init.c: Initialize __broadcast_seq field.
4954         * Makefile (tests): Add tst-cond17 and tst-cond18.
4955         Add .NOTPARALLEL goal.
4956         * tst-cond16.c: New file.  From Jakub.
4957         * tst-cond17.c: New file.  From Jakub.
4958         * tst-cond18.c: New file.  From Jakub.
4960 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4962         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4963         unwind info.
4965         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4966         Parametrize frame size.  Correct some unwind info.
4967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4969 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4971         * tst-stack3.c: Note testing functionality beyond POSIX.
4973 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4975         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4976         Change conditional from ifdef to if.
4978 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4980         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4981         SYSDEP_CANCEL_ERROR): Define.
4982         (PSEUDO): Use it.
4984 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4986         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4988 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4990         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4992 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4994         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4995         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4996         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4997         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4999 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
5001         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
5002         thread has all signals blocked.
5004 2004-04-18  Andreas Jaeger  <aj@suse.de>
5006         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5007         (SEM_VALUE_MAX): Add missing brace.
5009 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5011         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5012         in rt subdir.
5013         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5014         * sysdeps/pthread/tst-mqueue8x.c: New test.
5015         * tst-cancel4.c: Update comment about message queues.
5017         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5018         return it_value { 0, 0 }.
5019         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5020         like SIGEV_SIGNAL.
5021         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5022         assertion for SIGEV_NONE.
5023         (thread_attr_compare): Compare all attributes, not just a partial
5024         subset.
5026 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5028         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5030 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5032         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5033         Just use a plain number.
5034         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5035         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5036         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5037         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5038         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5039         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5040         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5042 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5044         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5045         frame info.
5046         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5048 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5050         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5051         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5052         of calling sigwaitinfo.
5054 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5056         * allocatestack.c (allocate_stack): Set reported_guardsize
5057         unconditionally.
5058         * pthread_getattr_np.c (pthread_getattr_np): Use
5059         reported_guardsize instead of guardsize.
5060         * descr.h (struct pthread): Add reported_guardsize field.
5062 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5064         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5066 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5068         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5070 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5072         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5073         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5074         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5075         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5076         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5077         Define.
5078         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5079         (_POSIX_MESSAGE_PASSING): Define.
5080         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5081         (_POSIX_MESSAGE_PASSING): Define.
5082         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5083         (_POSIX_MESSAGE_PASSING): Define.
5085 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5087         * tst-context1.c (fct): Check whether correct stack is used.
5089 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5091         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5092         matching constraints for asm mem parameters.
5094         * tst-clock2.c (tf): Don't define unless needed.
5096 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5098         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5099         $(gnulib).
5101 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5103         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5104         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5105         * pthreadP.h: Declare __nptl_deallocate_tsd.
5106         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5107         Adjust caller.
5109         * Makefile (tests): Add tst-tsd5.
5110         * tst-tsd5.c: New file.
5112 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5114         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5115         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5116         is SHLIB_COMPAT check.
5117         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5118         (__pthread_attr_getaffinity_old): Likewise.
5119         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5120         (__pthread_getaffinity_old): Likewise.
5121         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5122         (__pthread_setaffinity_old): Likewise.
5124 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5126         * allocatestack.c (_make_stacks_executable): Call
5127         _dl_make_stack_executable first.
5129 2004-03-24  Roland McGrath  <roland@redhat.com>
5131         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5132         constraint instead of "0".
5134 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5136         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5137         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5139         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5140         code to avoid warning.
5142 2004-03-24  Andreas Jaeger  <aj@suse.de>
5144         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5145         (__pthread_attr_setaffinity_old): Remove const.
5147 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5149         * sysdeps/unix/sysv/linux/smp.h: New file.
5150         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5151         * init.c: Define __is_smp.
5152         (__pthread_initialize_minimal_internal): Call is_smp_system to
5153         initialize __is_smp.
5154         * pthreadP.h: Declare __is_smp.
5155         Define MAX_ADAPTIVE_COUNT is necessary.
5156         * pthread_mutex_init.c: Add comment regarding __spins field.
5157         * pthread_mutex_lock.c: Implement adaptive mutex type.
5158         * pthread_mutex_timedlock.c: Likewise.
5159         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5160         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5161         Add __spins field.
5162         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5163         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5164         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5165         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5166         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5167         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5168         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5169         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5170         lll_mutex_cond_trylock.
5171         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5172         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5173         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5174         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5175         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5176         Define BUSY_WAIT_NOP.
5177         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5178         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5180         * tst-mutex5.c: Add support for testing adaptive mutexes.
5181         * tst-mutex7.c: Likewise.
5182         * tst-mutex5a.c: New file.
5183         * tst-mutex7a.c: New file.
5184         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5186         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5187         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5188         vgettimeofday call might destroy the content.
5190         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5191         @pause in the loop.
5193         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5194         No need to restrict type of ret.  Make it int.  Add comment.
5196         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5197         Remove unnecessary setne instruction.
5199 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5201         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5202         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5203         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5204         If realloc fails, break out of the loop.
5206 2004-03-20  Andreas Jaeger  <aj@suse.de>
5208         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5209         (__pthread_setaffinity_old): Fix interface.
5210         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5211         (__pthread_getaffinity_old): Likewise.
5213         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5214         (__pthread_setaffinity_new): Remove duplicate declaration.
5216 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5218         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5219         the return value to a safe register.
5220         (CDISABLE): Set the function argument correctly.
5222 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5224         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5225         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5226         Rewrite so that only one locked memory operation per round is needed.
5227         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5228         (pthread_barrier_wait): After wakeup, release lock only when the
5229         last thread stopped using the barrier object.
5230         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5231         (__pthread_cond_wait): Don't store mutex address if the current
5232         value is ~0l.  Add correct cleanup support and unwind info.
5233         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5234         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5235         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5236         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5237         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5238         Add correct cleanup support and unwind info.
5239         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5240         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5241         information for syscall wrappers.
5243 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5245         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5246         cpusetsize field, remove next.
5247         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5248         parameter for size of the CPU set.
5249         (pthread_setaffinity_np): Likewise.
5250         (pthread_attr_getaffinity_np): Likewise.
5251         (pthread_attr_setaffinity_np): Likewise.
5252         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5253         interface change, keep compatibility code.
5254         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5255         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5256         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5257         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5258         __pthread_getaffinity_np.
5259         * Versions: Add version for changed interfaces.
5260         * tst-attr3.c: Adjust test for interface change.
5261         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5262         increasing buffer sizes.
5263         * pthread_attr_destroy.c: Remove unused list handling.
5264         * pthread_attr_init.c: Likewise.
5266 2004-03-17  Roland McGrath  <roland@redhat.com>
5268         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5269         first argument to clock_getres so we ever enable kernel timers.
5271 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5273         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5275 2004-03-12  Richard Henderson  <rth@redhat.com>
5277         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5278         oldvalue from CENABLE to CDISABLE.
5280 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5282         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5283         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5284         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5285         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5287 2004-03-11  Richard Henderson  <rth@redhat.com>
5289         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5290         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5291         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5293 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5295         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5296         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5297         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5299 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5301         * forward.c (__pthread_cond_broadcast_2_0,
5302         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5303         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5304         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5306 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5308         * sysdeps/sh/tcb-offsets.sym: Add PID.
5309         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5310         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5312 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5314         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5315         include <sysdep-cancel.h>, vfork is no cancellation point.
5316         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5317         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5318         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5320 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5322         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5323         libc_hidden_def.
5324         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5325         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5326         Likewise.
5327         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5328         Likewise.
5329         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5330         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5331         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5332         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5333         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5335         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5336         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5337         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5338         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5339         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5340         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5342         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5343         a local register for saving old PID.  Negate PID in parent upon exit.
5345         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5346         tcb-offsets.h.
5347         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5348         before syscall, set to the old value in the parent afterwards.
5349         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5350         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5351         tcb-offsets.h.
5352         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5353         before syscall, set to the old value in the parent afterwards.
5354         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5355         * sysdeps/s390/tcb-offsets.sym: Add PID.
5357         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5358         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5359         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5360         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5361         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5362         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5364 2004-03-10  Andreas Schwab  <schwab@suse.de>
5366         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5367         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5368         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5370 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5372         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5373         * tst-cancel21.c (do_one_test): Likewise.
5374         Reported by Gordon Jin <gordon.jin@intel.com>.
5376 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5378         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5379         if non-zero and set to INT_MIN if zero.
5380         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5381         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5382         (SAVE_PID, RESTORE_PID): Define.
5383         (__vfork): Use it.
5384         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5385         Use relative path to avoid including NPTL i386/vfork.S.
5386         (SAVE_PID, RESTORE_PID): Define.
5387         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5388         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5389         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5390         tst-vfork2x.
5391         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5392         * tst-vfork1.c: New test.
5393         * tst-vfork2.c: New test.
5394         * tst-vfork1x.c: New test.
5395         * tst-vfork2x.c: New test.
5397 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5399         * sysdeps/i386/tcb-offsets.sym: Add PID.
5400         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5401         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5402         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5404 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5406         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5408 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5410         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5411         _rtld_global_ro.
5413 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5415         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5416         _rtld_global_ro.
5418         * tst-once4.c: Remove unnecessary macro definition.
5420         * tst-mutex7.c (do_test): Limit thread stack size.
5421         * tst-once2.c (do_test): Likewise.
5422         * tst-tls3.c (do_test): Likewise.
5423         * tst-tls1.c (do_test): Likewise.
5424         * tst-signal3.c (do_test): Likewise.
5425         * tst-kill6.c (do_test): Likewise.
5426         * tst-key4.c (do_test): Likewise.
5427         * tst-join4.c (do_test): Likewise.
5428         * tst-fork1.c (do_test): Likewise.
5429         * tst-context1.c (do_test): Likewise.
5430         * tst-cond2.c (do_test): Likewise.
5431         * tst-cond10.c (do_test): Likewise.
5432         * tst-clock2.c (do_test): Likewise.
5433         * tst-cancel10.c (do_test): Likewise.
5434         * tst-basic2.c (do_test): Likewise.
5435         * tst-barrier4.c (do_test): Likewise.
5437 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5439         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5441 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5443         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5444         (__pthread_cond_timedwait): Optimize wakeup test.
5445         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5446         (__pthread_cond_wait): Likewise.
5447         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5448         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5449         Likewise.
5451 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5453         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5454         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5455         the atomic instruction needed.
5456         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5457         (__lll_mutex_lock_wait): Likewise.
5459 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5461         * Makefile (tests): Add tst-cond14 and tst-cond15.
5462         * tst-cond14.c: New file.
5463         * tst-cond15.c: New file.
5465 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5467         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5468         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5469         needs to be implemented differently to be useful.
5471 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5473         * pthread_attr_setschedparam.c: Don't test priority against limits
5474         here.  Set ATTR_FLAG_SCHED_SET flag.
5475         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5476         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5477         from parent thread to child.  If attribute is used and scheduling
5478         parameters are not inherited, copy parameters from attribute or
5479         compute them.  Check priority value.
5480         * pthread_getschedparam.c: If the parameters aren't known yet get
5481         them from the kernel.
5482         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5483         ATTR_FLAG_POLICY_SET flag for thread.
5484         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5485         and ATTR_FLAG_POLICY_SET.
5487         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5489         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5490         fail if stack address hasn't been set.  Just return 0.
5492 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5494         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5495         libpthread for the files in this list.
5496         (CFLAGS-tst-unload): Removed.
5497         * tst-unload.c (do_test): Don't use complete path for
5498         LIBPHREAD_SO.
5500         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5501         tst-_res1mod2.
5503 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5505         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5506         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5507         operation per round is needed.
5508         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5509         (__lll_mutex_lock_wait): Likewise.
5511 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5513         * tst-cancel9.c (cleanup): Don't print to stderr.
5515 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5517         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5519 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5521         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5522         (__syscall_error_handler2): Call CDISABLE.
5523         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5524         (__syscall_error_handler2): Call CDISABLE.
5526         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5527         Release lock before the loop, don't reacquire it.
5529         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5531 2004-02-19  Andreas Schwab  <schwab@suse.de>
5533         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5534         Fix last change.
5536 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5538         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5539         (pthread_barrier_wait): After wakeup, release lock only when the
5540         last thread stopped using the barrier object.
5541         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5542         (pthread_barrier_wait): Likewise.
5543         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5544         Likewise.
5545         * Makefile (tests): Add tst-barrier4.
5546         * tst-barrier4.c: New file.
5548         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5549         (__pthread_cond_timedwait): Perform timeout test while holding
5550         internal lock to prevent wakeup race.
5551         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5552         * sysdeps/pthread/pthread_cond_timedwait.c
5553         (__pthread_cond_timedwait): Likewise.
5554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5555         (__pthread_cond_timedwait): Likewise.
5557 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5559         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5560         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5561         * Makefile (tests): Add tst-rwlock13.
5562         * tst-rwlock13.c: New test.
5564 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5567         (__condvar_tw_cleanup): Little optimization.
5568         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5570 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5572         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5573         libpthread as "lib" parameter to SHLIB_COMPAT.
5574         (__novmx_siglongjmp): Fix typo in function name.
5575         (__novmx_longjmp): Fix typo in function name.
5577 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5579         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5580         __builtin_expect.
5582         * sysdeps/generic/pt-longjmp.c: Moved to...
5583         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5585 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5587         * Makefile (libpthread-routines): Add pt-cleanup.
5588         * pt-longjmp.c: Removed.
5589         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5590         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5591         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5592         Version longjmp, siglongjmp for GLIBC_2.3.4.
5593         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5595 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5597         * sysdeps/pthread/pthread_cond_timedwait.c
5598         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5599         Reuse code.  Add __builtin_expects.
5601         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5602         (__pthread_cond_timedwait): Get internal lock in case timeout has
5603         passed before the futex syscall.
5604         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5606 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5608         * allocatestack.c: Pretty printing.
5610         * sysdeps/pthread/createthread.c (create_thread): Don't add
5611         CLONE_DETACHED bit if it is not necessary.
5613 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5615         * pthread_getattr_np.c: Include ldsodefs.h.
5617 2004-01-16  Richard Henderson  <rth@redhat.com>
5619         * allocatestack.c: Don't declare __libc_stack_end.
5620         * init.c (__pthread_initialize_minimal_internal): Likewise.
5621         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5623 2004-01-15  Richard Henderson  <rth@redhat.com>
5625         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5626         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5627         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5628         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5629         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5630         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5631         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5632         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5634 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5636         * init.c (pthread_functions): Make array const.
5638 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5640         * allocatestack.c (__make_stacks_executable): Change interface.
5641         Check parameters.  Pass parameter on to libc counterpart.
5642         * pthreadP.h: Change declaration.
5644 2004-01-13  Richard Henderson  <rth@redhat.com>
5646         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5647         prototype form.
5648         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5649         Likewise.
5651         * sysdeps/alpha/Makefile: New file.
5652         * sysdeps/alpha/tcb-offsets.sym: New file.
5653         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5654         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5656         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5657         on powerpc version.
5659 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5661         * Makefile (tests): Add tst-backtrace1.
5662         * tst-backtrace1.c: New test.
5664 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5666         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5667         register as second parameter to the REGISTER macro.
5668         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5669         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5670         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5671         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5672         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5673         of thread register as second parameter to REGISTER macro in 64 case.
5675 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5677         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5678         (CFLAGS-getpid.o): Defined.
5679         (CFLAGS-getpid.os): Defined.
5681 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5683         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5684         returned for main thread does not overlap with any other VMA.
5685         Patch by Jakub Jelinek.
5687 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5689         * tst-raise1.c: Include stdio.h.
5691 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5693         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5694         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5695         If pid is 0, set it to selftid.
5696         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5697         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5698         != 0, return self->tid without doing a syscall.
5699         * descr.h (struct pthread): Move pid field after tid.
5701         * Makefile (tests): Add tst-raise1.
5702         * tst-raise1.c: New file.
5704 2003-12-23  Roland McGrath  <roland@redhat.com>
5706         * tst-oddstacklimit.c: New file.
5707         * Makefile (tests): Add it.
5708         (tst-oddstacklimit-ENV): New variable.
5710         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5711         value up to page size for __default_stacksize.
5713 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5715         * Makefile (tests): Add tst-eintr5.
5716         * tst-eintr5.c: New file.
5718         * eintr.c (eintr_source): Prevent sending signal to self.
5720         * tst-eintr2.c (tf1): Improve error message.
5722 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5724         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5725         * sysdeps/unix/sysv/linux/getpid.c: New file.
5726         * pthread_cancel.c: Add comment explaining use of PID field.
5727         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5728         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5729         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5730         temporarily to signal the field must not be relied on and updated
5731         by getpid().
5732         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5733         temporarily negative.
5734         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5736 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5738         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5739         (eintr_source): If ARG != NULL, use pthread_kill.
5740         * tst-eintr1.c: Adjust for this change.
5741         * tst-eintr2.c: Likewise.
5742         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5743         * tst-eintr3.c: New file.
5744         * tst-eintr4.c: New file.
5746 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5748         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5749         if CANCELSTATE_BITMASK is set.
5750         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5751         Likewise.
5753         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5754         (tests-reverse): Add tst-cancel23.
5755         * tst-cancel22.c: New test.
5756         * tst-cancel23.c: New test.
5758 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5760         * tst-eintr1.c: Better error messages.
5762         * Makefile (tests): Add tst-eintr2.
5763         * tst-eintr2.c: New file.
5765 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5767         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5768         (CFLAGS-tst-cancelx21.c): Set.
5769         * tst-cancel21.c: New test.
5770         * tst-cancelx21.c: New test.
5772         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5773         comparison operand.
5774         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5775         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5776         * pt-longjmp.c: Include jmpbuf-unwind.h.
5777         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5778         _JMPBUF_UNWINDS.  Adjust compared pointers.
5779         * init.c (__pthread_initialize_minimal_internal): Initialize
5780         pd->stackblock_size.
5781         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5782         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5783         * sysdeps/i386/jmpbuf-unwind.h: New file.
5784         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5785         * sysdeps/s390/jmpbuf-unwind.h: New file.
5786         * sysdeps/sh/jmpbuf-unwind.h: New file.
5787         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5788         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5789         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5790         (_JMPBUF_CFA_UNWINDS): Remove.
5791         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5793 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5795         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5796         (CFLAGS-tst-cancelx20.c): Set.
5797         * tst-cancel20.c: New test.
5798         * tst-cancelx20.c: New test.
5800 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5802         * init.c (__pthread_initialize_minimal_internal): Don't treat
5803         architectures with separate register stack special here when
5804         computing default stack size.
5806 2003-12-17  Roland McGrath  <roland@redhat.com>
5808         * Makefile (tst-cancelx7-ARGS): New variable.
5809         Reportd by Greg Schafer <gschafer@zip.com.au>.
5811 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5813         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5814         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5815         (tst-stack3-ENV): Set.
5816         ($(objpfx)tst-stack3-mem): New.
5817         * tst-stack3.c: New test.
5819 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5821         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5822         Add unwind directives.  Drop unused .regstk directive.
5823         (_fini_EPILOG_BEGINS): Add unwind directives.
5825 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5827         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5828         Assume parameter is a pointer.
5829         (lll_futex_wake): Likewise.
5830         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5831         Likewise.
5832         (lll_futex_wake): Likewise.
5833         Reported by Boris Hu.
5834         * sysdeps/unix/sysv/linux/unregister-atfork.c
5835         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5837         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5839 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5841         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5842         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5843         __rtld_lock_initialize for ld.so lock.
5844         Patch in part by Adam Li <adam.li@intel.com>.
5846 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5848         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5849         in $(gnulib).  Also, remove stale comment.
5851 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5853         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5854         advantage of new syscall stub and optimize accordingly.
5856         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5857         from SYS_futex, to match expectations of
5858         sysdep.h:DO_INLINE_SYSCALL.
5859         (lll_futex_clobbers): Remove.
5860         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5861         (lll_futex_wake): Likewise.
5862         (lll_futex_requeue): Likewise.
5863         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5864         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5865         Jelinek).
5866         (__lll_mutex_lock): Likewise.
5867         (__lll_mutex_cond_lock): Likewise.
5868         (__lll_mutex_timed_lock): Likewise.
5869         (__lll_mutex_unlock): Likewise.
5870         (__lll_mutex_unlock_force): Likewise.
5872         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5873         comes before the include of <sysdep.h>.
5874         (THREAD_SELF_SYSINFO): New macro.
5875         (THREAD_SYSINFO): Likewise.
5876         (INIT_SYSINFO): New macro.
5877         (TLS_INIT_TP): Call INIT_SYSINFO.
5879         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5881         * sysdeps/pthread/createthread.c (create_thread): Use
5882         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5883         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5884         THREAD_SELF_SYSINFO instead of open code.
5885         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5886         (THREAD_SYSINFO): Likewise.
5888         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5890         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5892 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5894         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5895         instead of .init.  Patch by David Mosberger.
5897 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5899         * sysdeps/pthread/configure.in: Remove broken declaration in C
5900         cleanup handling check.
5902 2003-11-30  Andreas Jaeger  <aj@suse.de>
5904         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5905         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5906         Likewise.
5908 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5910         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5911         * pthread_attr_destroy.c: Include shlib-compat.h.
5912         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5913         is set in iattr->flags.
5914         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5916 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5918         * Makefile (distribute): Add tst-cleanup4aux.c.
5920         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5921         include.
5923 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5925         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5926         pthread_cond_signal.
5928         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5929         store mutex address if the current value is ~0l.
5930         * sysdeps/pthread/pthread_cond_timedwait.c
5931         (__pthread_cond_timedwait): Likewise.
5932         * sysdeps/pthread/pthread_cond_broadcast.c
5933         (__pthread_cond_broadcast): Don't use requeue for pshared
5934         condvars.
5936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5937         (__pthread_cond_wait): Don't store mutex address if the current
5938         value is ~0l.
5939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5940         (__pthread_cond_timedwait): Likewise.
5941         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5942         (__pthread_cond_broadcast): Don't use requeue for pshared
5943         condvars.
5945         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5946         element with ~0l for pshared condvars, with NULL otherwise.
5948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5949         (__pthread_cond_wait): Don't store mutex address if the current
5950         value is ~0l.
5951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5952         (__pthread_cond_timedwait): Likewise.
5953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5954         (__pthread_cond_broadcast): Don't use requeue for pshared
5955         condvars.
5957         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5958         * tst-cond12.c: New file.
5959         * tst-cond13.c: New file.
5961 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5963         * sysdeps/pthread/configure.in: Make missing forced unwind support
5964         fatal.
5966 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5968         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5970 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5972         * Makefile: Add magic to clean up correctly.
5974 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5976         * unwind.c (FRAME_LEFT): Define.
5977         (unwind_stop): Handle old style cleanups here.
5978         (__pthread_unwind): Handle old style cleanups only if
5979         !HAVE_FORCED_UNWIND.
5980         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5981         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5982         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5983         ($(objpfx)tst-cleanupx4): Likewise.
5984         * tst-cleanup4.c: New test.
5985         * tst-cleanup4aux.c: New.
5986         * tst-cleanupx4.c: New test.
5988 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5990         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5991         lll_mutex_*lock macros to skip atomic operations on some archs.
5993 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5995         * sysdeps/pthread/tst-timer.c (main): Initialize
5996         sigev2.sigev_value as well.
5998 2003-10-15  Roland McGrath  <roland@redhat.com>
6000         * sysdeps/pthread/configure.in: Barf if visibility attribute support
6001         is missing.
6002         * sysdeps/pthread/configure: Regenerated.
6004 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6006         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6007         locking macros.  No distinction between normal and mutex locking
6008         anymore.
6009         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6010         Merge bits from lowlevelmutex.S we still need.
6011         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6012         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6013         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6014         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6015         new mutex implementation.
6016         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6017         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6018         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6019         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6020         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6021         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6022         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6023         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6024         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6025         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6026         symbol for entry point to avoid cancellation.
6028 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6030         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6031         changes.
6032         (SAVE_OLDTYPE_0): Fix a typo.
6034 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6036         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6037         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6039 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6041         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6042         correct offset.
6044 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6046         * Makefile (tests): Add tst-cancel19.
6047         * tst-cancel19.c: New test.
6049 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6051         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6052         restoring of the old cancellation type.
6054 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6056         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6058 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6060         * sysdeps/pthread/malloc-machine.h: New file
6062 2003-09-24  Roland McGrath  <roland@redhat.com>
6064         * allocatestack.c (__make_stacks_executable): Don't ignore return
6065         value from _dl_make_stack_executable.
6067 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6069         * allocatestack.c (__make_stacks_executable): Also change
6070         permission of the currently unused stacks.
6072         * allocatestack.c (change_stack_perm): Split out from
6073         __make_stacks_executable.
6074         (allocate_stack): If the required permission changed between the time
6075         we started preparing the stack and queueing it, change the permission.
6076         (__make_stacks_executable): Call change_stack_perm.
6078         * Makefile: Build tst-execstack-mod locally.
6079         * tst-execstack-mod.c: New file.
6081 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6083         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6085 2003-09-23  Roland McGrath  <roland@redhat.com>
6087         * tst-execstack.c: New file.
6088         * Makefile (tests): Add it.
6089         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6090         (LDFLAGS-tst-execstack): New variable.
6092         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6093         whether to use PROT_EXEC for stack mmap.
6094         (__make_stacks_executable): New function.
6095         * pthreadP.h: Declare it.
6096         * init.c (__pthread_initialize_minimal_internal): Set
6097         GL(dl_make_stack_executable_hook) to that.
6099 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6101         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6102         recommendation from AMD re avoidance of lock prefix.
6104 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6106         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6107         lll_futex_timed_wait instead of lll_futex_wait.
6108         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6109         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6110         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6111         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6112         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6113         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6114         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6115         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6116         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6117         Completely revamp the locking macros.  No distinction between
6118         normal and mutex locking anymore.
6119         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6120         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6121         __lll_lock_timedwait): Fix prototypes.
6122         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6123         __lll_lock_timedwait): Likewise.
6124         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6125         macros, add __builtin_expect.
6126         (lll_mutex_timedlock): Likewise.  Fix return value.
6127         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6128         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6129         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6130         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6131         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6132         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6133         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6134         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6136 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6138         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6139         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6140         operation if possible.
6142         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6143         like jumping over the lock prefix.
6145 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6147         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6148         locking macros.  No distinction between normal and mutex locking
6149         anymore.
6150         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6151         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6152         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6153         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6154         locking.  Merge bits from lowlevelmutex.S we still need.
6155         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6156         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6157         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6158         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6159         * Makefile (routines): Remove libc-lowlevelmutex.
6160         (libpthread-rountines): Remove lowlevelmutex.
6161         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6162         for new mutex implementation.
6163         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6166         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6168         Likewise.
6169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6170         Likewise.
6171         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6173         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6174         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6175         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6176         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6177         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6178         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6179         Likewise.
6180         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6181         Likewise.
6182         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6183         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6184         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6185         Don't use requeue.
6186         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6187         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6189 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6191         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6192         in parameters of asm with output parameters.
6194         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6195         type of DECR parameter to int.
6196         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6198 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6200         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6201         guardsize for each thread.
6203 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6205         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6206         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6207         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6209         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6210         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6211         NULL.
6212         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6213         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6214         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6215         (pthread_getaffinity_np): Add hidden_def.
6217         * Makefile (tests): Add tst-attr3.
6218         * tst-attr3.c: New test.
6220         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6222 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6224         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6225         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6227 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6229         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6230         * tst-align.c: Include tst-stack-align.h.
6231         (tf, do_test): Use TEST_STACK_ALIGN macro.
6233 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6235         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6236         variable.
6238 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6240         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6241         stack-related values for the initial thread.
6243 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6245         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6247 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6249         * pthread_mutex_lock.c: Minor code rearrangements.
6251 2003-09-05  Roland McGrath  <roland@redhat.com>
6253         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6254         Instead, include ../nptl_db/db_info.c to do its magic.
6255         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6256         (__pthread_pthread_key_2ndlevel_size): Likewise.
6257         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6258         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6259         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6260         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6261         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6262         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6263         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6264         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6265         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6266         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6267         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6268         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6269         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6270         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6271         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6272         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6273         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6275 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6277         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6278         of pthread_t to be compatible with LT.
6279         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6280         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6281         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6282         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6283         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6284         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6285         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6287 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6289         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6291 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6293         * unwind-forcedunwind.c: Move to...
6294         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6295         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6296         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6297         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6298         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6299         * unwind.c: Include jmpbuf-unwind.h.
6300         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6302 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6304         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6305         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6306         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6307         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6308         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6309         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6310         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6311         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6312         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6313         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6314         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6315         function.
6316         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6317         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6318         * Makefile (tests): Add tst-stack2.
6319         * tst-stack2.c: New test.
6320         * tst-stack1.c: Include limits.h and sys/param.h.
6321         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6323         * pthread_condattr_setpshared.c: Include errno.h.
6324         (pthread_condattr_setpshared): Return EINVAL if pshared
6325         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6327         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6328         defined symbol for entry point to avoid cancellation.
6329         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6330         Likewise.
6331         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6332         Likewise.
6333         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6334         Likewise.
6335         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6336         Likewise.
6337         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6338         Likewise.
6339         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6340         __close_nocancel, __read_nocancel, __write_nocancel,
6341         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6342         libpthread.so or librt.so, define to corresponding function
6343         without _nocancel suffix.
6344         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6345         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6346         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6348         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6350 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6352         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6353         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6355         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6356         in subsections has a symbol associated with it.
6358         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6359         defined symbol for entry point to avoid cancellation.
6360         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6362 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6364         * Makefile (tests): Add tst-tls5.
6365         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6366         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6367         ($(objpfx)tst-tls5): New.
6368         ($(objpfx)tst-tls6.out): Likewise.
6369         (tests): Depend on $(objpfx)tst-tls6.out.
6370         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6371         (do_test): Check pthread_self () return value alignment.
6372         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6373         (tf): Check pthread_self () return value alignment.
6374         * tst-tls5.c: New test.
6375         * tst-tls5.h: New.
6376         * tst-tls5mod.c: New.
6377         * tst-tls5moda.c: New.
6378         * tst-tls5modb.c: New.
6379         * tst-tls5modc.c: New.
6380         * tst-tls5modd.c: New.
6381         * tst-tls5mode.c: New.
6382         * tst-tls5modf.c: New.
6383         * tst-tls6.sh: New test.
6385         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6386         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6387         * init.c (pthread_functions): Initialize them.
6388         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6389         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6390         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6391         pthread_cond_timedwait@@GLIBC_2.3.2.
6393 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6395         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6396         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6397         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6398         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6399         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6400         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6402         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6404         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6405         _POSIX_THREAD_PRIORITY_SCHEDULING.
6406         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6408 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6410         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6411         nested function, use static inline function from libio.h.
6412         Code by Richard Henderson.
6414         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6415         weak.
6417 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6419         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6420         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6421         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6422         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6423         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6424         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6425         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6426         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6427         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6428         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6429         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6430         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6431         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6432         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6433         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6434         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6435         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6436         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6437         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6438         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6439         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6440         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6441         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6442         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6443         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6444         * sysdeps/sparc/tls.h: New file.
6445         * sysdeps/sparc/tcb-offsets.sym: New file.
6446         * sysdeps/sparc/Makefile: New file.
6447         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6448         * init.c [__sparc__] (__NR_set_tid_address): Define.
6450 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6452         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6453         _IO_release_lock): Define.
6455 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6457         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6458         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6460 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6462         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6463         (__pthread_cleanup_class): Add missing return types of member
6464         functions.
6466 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6468         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6469         (lll_mutex_unlock_force): Add memory barrier between store and futex
6470         syscall.
6472 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6474         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6475         tempmsg in first loop.
6477 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6479         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6480         _POSIX_THREAD_PRIORITY_SCHEDULING.
6481         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6483 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6485         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6486         (__rtld_lock_default_lock_recursive,
6487         __rtld_lock_default_unlock_recursive): Define.
6488         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6489         __rtld_lock_unlock_recursive): Define using
6490         GL(_dl_rtld_*lock_recursive).
6491         * init.c (__pthread_initialize_minimal_internal): Initialize
6492         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6493         Lock GL(_dl_load_lock) the same number of times as
6494         GL(_dl_load_lock) using non-mt implementation was nested.
6496         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6497         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6499 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6501         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6502         PIPE_BUF.
6504 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6506         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6508 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6510         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6511         to first syscall error check.  Move syscall error check for tkill
6512         into __ASSUME_CLONE_STOPPED #ifdef.
6514 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6516         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6517         is not defined, do explicit synchronization.
6518         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6519         is not defined also unlock pd->lock for non-debugging case in case
6520         it is necessary.
6521         * pthread_create.c (start_thread): Always get and release pd->lock
6522         if __ASSUME_CLONE_STOPPED is not defined.
6523         (start_thread_debug): Removed.  Adjust users.
6524         * allocatestack.c (allocate_stack): Always initialize lock if
6525         __ASSUME_CLONE_STOPPED is not defined.
6526         * Makefile (tests): Add tst-sched1.
6527         * tst-sched1.c: New file.
6529         * sysdeps/pthread/createthread.c (do_clone): Only use
6530         sched_setschduler and pass correct parameters.
6532 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6534         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6535         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6536         PTHREAD_STACK_MIN in comments.
6538 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6540         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6541         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6542         argument.
6543         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6544         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6545         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6546         (__pthread_cleanup_upto): Fix prototype.
6547         (_longjmp_unwind): Adjust caller.
6548         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6549         Change second argument to const struct pointer.
6550         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6551         * tst-sem9.c (main): Likewise.
6552         * unwind.c: Include string.h for strlen prototype.
6554 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6556         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6557         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6558         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6559         Define HAVE_CMOV.
6560         Patch by Nicholas Miell <nmiell@attbi.com>.
6562 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6564         * init.c (__pthread_initialize_minimal_internal): Initialize
6565         GL(dl_init_static_tls).
6566         * pthreadP.h (__pthread_init_static_tls): New prototype.
6567         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6568         New functions.
6569         * Makefile (tests): Add tst-tls4.
6570         (modules-names): Add tst-tls4moda and tst-tls4modb.
6571         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6572         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6573         tst-tls4modb.so.
6574         * tst-tls4.c: New file.
6575         * tst-tls4moda.c: New file.
6576         * tst-tls4modb.c: New file.
6578 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6580         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6581         before __timer_dealloc.
6582         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6583         Don't call list_unlink.
6585 2003-07-29  Roland McGrath  <roland@redhat.com>
6587         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6589 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6591         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6592         Don't reuse struct aiocb A if it failed.
6593         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6594         not just one byte, as that does not block.
6596 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6598         * sysdeps/pthread/unwind-resume.c: New file.
6599         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6600         unwind-resume in csu subdir.
6601         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6602         exceptions.
6603         (librt-sysdep_routines, librt-shared-only-routines): Add
6604         rt-unwind-resume.
6605         * sysdeps/pthread/rt-unwind-resume.c: New file.
6606         * unwind-forcedunwind.c: New file.
6607         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6608         (libpthread-shared-only-routines): Likewise.
6609         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6610         * pthreadP.h (pthread_cancel_init): New prototype.
6611         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6613         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6614         attr argument const struct pthread_attr *.
6616         * res.c (__res_state): Return __resp.
6617         * descr.h: Include resolv.h.
6618         (struct pthread): Add res field.
6619         * pthread_create.c: Include resolv.h.
6620         (start_thread): Initialize __resp.
6621         * Makefile (tests): Add tst-_res1.
6622         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6623         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6624         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6625         libpthread.
6626         * tst-_res1.c: New file.
6627         * tst-_res1mod1.c: New file.
6628         * tst-_res1mod2.c: New file.
6630 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6632         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6634         * Makefile: Define various *-no-z-defs variables for test DSOs
6635         which has undefined symbols.
6637 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6639         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6640         Retry if the stwcx fails to store once_control.
6642 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6644         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6645         pthread_attr_setaffinity.
6646         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6647         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6648         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6649         * pthread_attr_destroy.c: Free cpuset element if allocated.
6650         * pthread_create.c: Pass iattr as additional parameter to
6651         create_thread.
6652         * sysdeps/pthread/createthread.c: If attribute is provided and
6653         a new thread is created with affinity set or scheduling parameters,
6654         start thread with CLONE_STOPPED.
6655         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6656         pthread_attr_setaffinity.
6657         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6658         cpuset element.
6660 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6662         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6664 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6666         * sysdeps/pthread/configure.in: Require CFI directives also for
6667         ppc and s390.
6669 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6671         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6672         Add cfi directives.
6674 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6676         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6677         CLEANUP_JMP_BUF.
6678         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6679         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6680         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6682         not self pointer in __writer.  Compare with TID to determine
6683         deadlocks.
6684         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6685         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6686         Likewise.
6687         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6688         Likewise.
6689         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6690         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6691         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6692         macros also when compiling librt.
6694 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6696         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6697         -fasynchronous-unwind-tables.
6698         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6699         (PSEUDO): Add cfi directives.
6700         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6701         Likewise.
6702         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6703         Likewise.
6705 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6707         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6708         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6709         * unwind.c (__pthread_unwind_next): Add hidden_def.
6710         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6711         Likewise.
6712         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6713         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6714         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6715         Likewise.
6716         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6717         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6718         Likewise.
6719         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6720         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6721         __pthread_unregister_cancel and __pthread_unwind_next.
6723 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6725         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6726         different symbol for the cancellation syscall wrapper and
6727         non-cancellation syscall wrapper.
6728         (PSEUDO_END): Define.
6730 2003-07-05  Richard Henderson  <rth@redhat.com>
6732         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6733         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6734         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6735         return actual return value from the syscall, not 0.
6737 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6739         * descr.h (struct pthread): Add pid field.
6740         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6741         (__reclaim_stacks): Likewise.
6742         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6743         also check for PID of the signal source.
6744         (__pthread_initialize_minimal_internal): Also initialize pid field
6745         of initial thread's descriptor.
6746         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6747         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6748         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6749         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6750         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6752 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6754         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6755         Fix use of parameter.
6756         (__libc_cleanup_pop): Likewise.
6758 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6760         * init.c (sigcancel_handler): Change parameters to match handler
6761         for SA_SIGACTION.  Check signal number and code to recognize
6762         invalid invocations.
6764 2003-07-03  Roland McGrath  <roland@redhat.com>
6766         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6767         Apply sizeof (struct pthread) bias to r13 value.
6769 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6771         * sysdeps/pthread/configure.in: Require CFI directives.
6773         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6774         definition.
6775         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6776         libpthread compilation.
6777         * unwind.c (__pthread_unwind): Add hidden_def.
6778         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6780 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6782         * libc-cancellation.c (__libc_cleanup_routine): Define.
6783         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6784         (__pthread_cleanup_pop): Define.
6786 2003-07-01  Richard Henderson  <rth@redhat.com>
6788         * sysdeps/alpha/elf/pt-initfini.c: New file.
6789         * sysdeps/alpha/pthread_spin_lock.S: New file.
6790         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6791         * sysdeps/alpha/pthreaddef.h: New file.
6792         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6793         * sysdeps/alpha/tls.h: New file.
6794         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6795         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6796         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6797         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6798         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6799         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6800         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6801         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6802         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6803         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6805 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6807         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6808         cleanup support and unwind info.
6810 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6812         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6813         Use correct cleanup handler registration.  Add unwind info.
6814         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6815         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6816         * tst-once3.c: Add cleanup handler and check it is called.
6817         * tst-once4.c: Likewise.
6818         * tst-oncex3.c: New file.
6819         * tst-oncex4.c: New file.
6820         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6822 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6824         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6826 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6828         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6829         (tf_msgsnd): Likewise.
6831         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6832         premature returns a bit more.
6834 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6836         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6837         definition to the front.
6839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6840         the cleanup functions to make the names unique.  Fix dwarf opcode
6841         un unwind table.
6842         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6843         functions to make the names unique.  Fix CFA offset for two blocks.
6845 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6847         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6848         missing closing braces.
6849         Patch by Christophe Saout <christophe@saout.de>.
6851 2003-06-24  Roland McGrath  <roland@redhat.com>
6853         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6855 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6857         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6858         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6860         * pthreadP.h: Declare __find_thread_by_id.
6861         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6862         * pthread_clock_gettime.c: Allow using other thread's clock.
6863         * pthread_clock_settime.c: Likewise.
6864         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6865         * Makefile: Add rules to build and run tst-clock2.
6866         * tst-clock2.c: New file.
6868 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6870         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6871         to use exception-based cleanup handler.
6872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6874         * tst-cond8.c (ch): Announce that we are done.
6876         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6878         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6879         Also test aio_suspend with timeout value.
6881 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6883         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6884         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6885         attribute_hidden.
6887         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6888         (__pthread_mutex_lock_internal): Likewise.
6889         (__pthread_mutex_unlock_internal): Likewise.
6890         (__pthread_mutex_unlock_usercnt): Declare.
6891         * pthread_mutex_destroy.c: Always fail if used in any way.
6892         * pthread_mutex_init.c: Update comment.
6893         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6894         * pthread_mutex_timedlock.c: Adjust __nusers.
6895         * pthread_mutex_trylock.c: Adjust __nusers.
6896         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6897         and public interfaces are wrapper with pass additional parameter.
6898         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6899         parameter zero.
6900         * tst-mutex8.c: New file.
6901         * Makefile (tests): Add tst-mutex8.
6902         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6903         __pthread_mutex_unlock_usercnt.
6904         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6905         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6906         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6907         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6908         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6909         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6910         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6911         Add __nusers.
6912         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6913         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6914         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6915         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6916         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6918         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6919         * pthread_mutex_timedlock.c: Likewise.
6920         * pthread_mutex_trylock.c: Adjust __nusers.
6921         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6922         * tst-mutex9.c: New file.
6923         * Makefile (tests): Add tst-mutex9.
6924         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6925         * sysdeps/ia64/tls.h: Likewise.
6926         * sysdeps/powerpc/tls.h: Likewise.
6927         * sysdeps/s390/tls.h: Likewise.
6928         * sysdeps/sh/tls.h: Likewise.
6929         * sysdeps/x86_64/tls.h: Likewise.
6930         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6931         Change type of __owner.
6932         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6933         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6934         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6935         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6936         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6938 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6940         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6941         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6943         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6944         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6945         instead of nr to lll_futex_wake.  Only set errno and return -1
6946         if err < 0.
6948         * sysdeps/unix/sysv/linux/powerpc/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-06-18  Ulrich Drepper  <drepper@redhat.com>
6954         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6955         find a random value.
6956         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6957         errno==EIDRM.
6959         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6960         compat_timer_settime.
6961         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6962         compat_timer_gettime.
6963         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6964         compat_timer_getoverrun.
6965         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6966         compat_timer_delete.
6968         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6969         error-checking mutex detect busy mutexes.
6971 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6973         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6974         Add ax to clobber list.
6975         (lll_mutex_cond_lock): Likewise.
6976         (lll_mutex_unlock): Likewise.
6977         (lll_lock): Likewise.
6978         (lll_unlock): Likewise.
6980         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6981         * tst-cancel18.c: New file.
6982         * tst-cancelx18.c: New file.
6984         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6985         and tcdrain.
6987         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6988         * tst-cancel17.c: New file.
6989         * tst-cancelx17.c: New file.
6991         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6992         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6993         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6995         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6997 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6999         * sysdeps/pthread/createthread.c (create_thread): Set
7000         header.multiple_threads unconditionally.
7001         * allocatestack.c (allocate_stack): Likewise.
7002         * descr.h (struct pthread): Add header.multiple_threads
7003         unconditionally.
7004         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7005         Define for librt.  #error if neither libpthread, libc nor librt.
7006         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7007         Likewise.
7008         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7009         CDISABLE): Likewise.
7010         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7011         CDISABLE): Likewise.
7012         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7013         CDISABLE): Likewise.
7014         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7015         CDISABLE): Likewise.  Access header.multiple_threads outside of
7016         libc and libpthread.
7017         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7018         Likewise.
7019         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7020         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7022 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7024         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7025         Also test early cancellation before the thread reaches the cancellation
7026         point.
7028         * Makefile: Compile forward.c with exceptions.
7030         * sysdeps/unix/sysv/linux/sleep.c: New file.
7032 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7034         * Makefile: Add CFLAGS definition to compile function wrappers
7035         duplicated from libc with exceptions.
7036         * tst-cancel4.c: Also check cancellation handlers.
7038         * Makefile: Add rules to build and run tst-cancel16 and
7039         tst-cancelx16.  Add missing CFLAGS definitions.
7040         * tst-cancel16.c: New file.
7041         * tst-cancelx16.c: New file.
7043 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7045         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7046         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7047         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7048         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7050         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7051         (LIBC_CANCEL_RESET): Likewise.
7052         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7053         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7054         librt-cancellation.
7055         (CFLAGS-libcrt-cancellation.c): Define.
7056         * sysdeps/pthread/librt-cancellation.c: New file.
7057         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7058         macros also when compiling librt.
7059         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7060         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7061         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7062         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7063         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7064         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7065         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7067         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7068         compat_timer_create.
7070 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7072         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7074         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7075         __register_atfork.
7076         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7077         Add libc_hidden_def.
7079 2003-06-13  Roland McGrath  <roland@redhat.com>
7081         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7082         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7084 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7086         * allocatestack.c (queue_stack): Always inline.
7087         * ptreadhP.h (__do_cancel): Likewise.
7089 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7091         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7092         a typo.
7094 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7097         (__pthread_cond_signal): Remove incorrect second addition for
7098         cond_lock!=0.
7100 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7103         (__pthread_cond_signal): Use correct futex pointer in
7104         __lll_mutex_lock_wait call.
7106         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7107         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7109 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7111         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7112         cancelable.
7113         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7114         Likewise.
7116         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7117         hand-written CFI generation code.  Since ENTRY/END also initiated
7118         CFI frames this caused two CFI sets to be generated.
7120 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7122         * cleanup_routine.c: New file.
7123         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7124         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7125         cleanup handling.
7126         * Makefile (libpthread-routines): Add cleanup_routine.
7127         Add more CFLAGS variables to compile with exceptions.  Add comments
7128         why which file needs unwind tables.
7129         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7130         tests.
7131         * tst-cancelx1.c: New file.
7132         * tst-cancelx2.c: New file.
7133         * tst-cancelx3.c: New file.
7134         * tst-cancelx4.c: New file.
7135         * tst-cancelx5.c: New file.
7136         * tst-cancelx6.c: New file.
7137         * tst-cancelx7.c: New file.
7138         * tst-cancelx8.c: New file.
7139         * tst-cancelx9.c: New file.
7140         * tst-cancelx10.c: New file.
7141         * tst-cancelx11.c: New file.
7142         * tst-cancelx12.c: New file.
7143         * tst-cancelx13.c: New file.
7144         * tst-cancelx14.c: New file.
7145         * tst-cancelx15.c: New file.
7146         * tst-cleanupx0.c: New file.
7147         * tst-cleanupx0.expect: New file.
7148         * tst-cleanupx1.c: New file.
7149         * tst-cleanupx2.c: New file.
7150         * tst-cleanupx3.c: New file.
7152         * tst-cleanup0.c: Make standard compliant.
7153         * tst-cleanup1.c: Likewise.
7155         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7156         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7157         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7158         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7159         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7160         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7161         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7162         CLEANUP_JMP_BUF.
7163         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7164         * tst-cancel12.c: New file.
7165         * tst-cancel13.c: New file.
7166         * tst-cancel14.c: New file.
7167         * tst-cancel15.c: New file.
7168         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7169         and tst-cancel15.
7171         * tst-cancel1.c: Add some comments.
7173         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7174         timeout correctly.
7176 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7178         * Makefile (CFLAGS-pthread_cancel.c): Define.
7180 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7182         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7183         Change type of __writer element to int.
7184         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7185         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7186         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7187         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7188         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7189         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7190         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7191         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7192         Compare with TID to determine deadlocks.
7193         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7194         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7195         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7196         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7197         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7199         Likewise.
7200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7201         Likewise.
7202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7203         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7204         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7205         Likewise.
7206         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7207         Likewise.
7208         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7209         * Makefile (tests): Add tst-rwlock12.
7210         * tst-rwlock12.c: New file.
7212 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7214         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7215         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7216         Remove bogus hidden_proto.
7217         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7218         Likewise.
7219         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7220         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7221         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7222         ___lll_mutex_timedlock): Likewise.
7224 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7227         (__pthread_cond_signal): Add some code to eventually handle
7228         cond_lock!=0.
7230 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7232         * Makefile (tests): Add tst-exec4.
7233         (tst-exec4-ARGS): Define.
7234         * tst-exec4.c: New file.
7236 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7238         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7239         Also fail if tv_nsec < 0.
7240         (__lll_timedwait_tid): Likewise.
7241         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7242         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7243         Likewise.
7244         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7245         Likewise.
7246         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7247         Likewise.
7248         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7249         Likewise.
7250         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7251         Likewise.
7252         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7253         Likewise.
7255         * Makefile (tests): Add tst-sem8 and tst-sem9.
7256         * tst-sem8.c: New file.
7257         * tst-sem9.c: New file.
7258         * sem_open.c: Fix creation of in_use record if the file exists but
7259         no internal record.
7261         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7262         definitions.
7264         * sysdeps/pthread/timer_create.c (timer_create): In case
7265         evp==NULL, assign timer ID to sival_ptr.
7267         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7268         struct pthread_unwind_buf *.
7269         (struct pthread): Likewise for cleanup_jmp_buf element.
7271         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7272         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7273         * unwind.c (__pthread_unwind_next): Likewise.
7275 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7277         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7278         (lll_futex_timed_wait): Use int for futex value parameter.
7279         (lll_futex_wake): Likewise.
7280         (lll_futex_requeue): Likewise.
7282         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7283         Replace one memory operation with one register operation.
7285         * tst-join4.c (do_test): Fix error message.
7287         * tst-rwlock6.c (do_test): Use correct format specifier.
7289         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7290         (__lll_mutex_lock_wait): Replace one memory operation with one
7291         register operation.
7292         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7293         (__lll_mutex_lock_wait): Likewise.
7295         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7296         (__lll_mutex_cond_lock): Add one to value parameter of
7297         __lll_lock_wait to reflect reality in the futex syscall.
7298         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7299         (lll_mutex_cond_lock): Likewise.
7301 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7303         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7304         New function.
7305         (lll_mutex_cond_lock): Define.
7307 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7309         * Makefile (tests): Add tst-signal6.
7310         * tst-signal6.c: New file.
7312         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7313         (__lll_mutex_unlock_force): New function
7314         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7316         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7317         (__lll_mutex_unlock_force): New function.
7318         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7320         * tst-rwlock7.c (do_test): Use correct format specifier.
7322         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7323         Find break parameter in correct asm argument.
7325 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7327         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7328         Remove out4.
7329         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7330         error occured.
7331         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7332         Add __mutex.
7333         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7334         lll_futex_requeue, lll_mutex_unlock_force): Define.
7336 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7338         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7339         (pthread_cond_t): Add __mutex.
7340         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7341         lll_futex_requeue, lll_mutex_unlock_force): Define.
7343 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7345         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7346         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7347         Add __mutex field.
7348         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7349         Define.
7350         (lll_futex_wait, lll_futex_wake): Define.
7351         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7352         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7353         FUTEX_REQUEUE instead of FUTEX_WAIT.
7354         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7355         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7356         mutex which was used in condvar structure.  Call
7357         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7358         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7360         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7361         include tcb-offsets.h.  Read wakeup value in locked region.
7362         Use the value of gbr register as THREAD_ID.
7363         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7364         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7365         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7367         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7368         macros.
7370 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7372         * sysdeps/pthread/pthread_cond_broadcast.c
7373         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7375 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7378         typo in register name.
7379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7380         correctly.  Actually use requeue.  Little optimization.
7381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7382         mutex address early.  Handle cancellation state as 32-bit value.
7383         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7384         Remove unnecessary label.
7386 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7388         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7389         instead of FUTEX_WAIT.
7390         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7393         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7394         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7395         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7396         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7397         of __pthread_mutex_lock_internal.
7398         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7400         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7401         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7403         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7404         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7405         Add pthread_mutex_cond_lock.
7406         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7407         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7408         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7409         lll_mutex_cond_lock.
7410         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7411         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7412         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7413         Add __mutex field.
7414         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7415         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7417         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7418         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7420         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7421         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7422         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7423         macro don't define aliases.
7425         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7426         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7427         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7428         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7430         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7431         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7435 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7437         * sem_open.c: Fix one endless loop.  Implement correct semantics
7438         wrt opening the same semaphore more then once.
7439         * sem_close.c: Adjust for sem_open change.
7440         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7441         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7442         * Makefile (tests): Add tst-sem7.
7443         * tst-sem7.c: New file.
7445 2003-05-16  Roland McGrath  <roland@redhat.com>
7447         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7448         uninitialized variable braino.
7450 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7452         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7453         test for syscall availability.
7455         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7456         __no_posix_timers to -1 if the syscalls don't exist.
7458         * pthread_join.c (pthread_join): Set tid field of the joined
7459         thread to -1.  This isn't necessary but helps to recognize some
7460         error conditions with almost no cost.
7462         * allocatestack.c (FREE_P): Also negative values indicate an
7463         unused stack.
7465         * unwind.c: Include <unistd.h>.
7467 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7469         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7471 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7473         * Makefile (crti-objs, crtn-objs): New variables.
7474         (omit-deps, extra-objs): Add crtn.
7475         ($(objpfx)libpthread.so): Depend on both crti and crtn
7476         and links to them in multidir.
7477         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7479 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7481         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7482         (lll_mutex_unlock): Use atomic_exchange_rel.
7484 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7486         * cond-perf.c (cons): Add missing locking around setting of alldone.
7488 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7490         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7491         related macros.
7492         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7494 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7496         * tst-sem6.c: New file.
7497         * Makefile (tests): Add tst-sem6.
7499         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7500         Use atomic_exchange_rel instead of atomic_exchange.
7501         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7502         Likewise.
7504         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7505         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7506         vsyscall is possible.
7508         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7509         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7510         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7511         pthread_setaffinity_np.
7512         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7513         and pthread_setaffinity_np.
7514         * Makefile (libpthread-routines): Add pthread_getaffinity and
7515         pthread_setaffinity.
7517         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7518         use it in case mmap to allocate the stack fails.
7519         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7520         ARCH_MAP_FLAGS here.
7521         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7522         ARCH_RETRY_MMAP.
7524 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7526         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7527         handler implementation.  It is now lockless in fork().
7528         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7529         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7530         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7531         declare the __fork_*_lists.
7532         (struct fork_handler): Include pointers to all three functions.
7533         Add next, refcntr and need_signal elements.
7534         (__fork_handlers): New declaration.
7535         (__register_atfork_malloc): Remove declaration.
7536         (HAVE_register_atfork_malloc): Remove definition.
7537         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7538         __pthread_child_handler variable.
7539         (__libc_pthread_init): Use __register_atfork instead of explicitly
7540         adding to the list.
7541         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7542         and lll_futex_wake.
7543         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7545         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7546         function must never be reached.
7548         * cond-perf.c: New file.
7550 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7552         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7554 2003-05-04  Roland McGrath  <roland@redhat.com>
7556         * Makefile ($(objpfx)../libc.so): New target.
7558 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7560         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7561         (pthread_condattr_t): Size is only an int, don't use long for
7562         alignment.
7563         (pthread_mutexattr_t): Likewise.
7564         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7565         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7566         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7568 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7570         * sysdeps/i386/tls.h: Define THREAD_ID.
7571         * sysdeps/ia64/tls.h: Likewise.
7572         * sysdeps/powerpc/tls.h: Likewise.
7573         * sysdeps/s390/tls.h: Likewise.
7574         * sysdeps/sh/tls.h: Likewise.
7575         * sysdeps/x86_64/tls.h: Likewise.
7576         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7577         record ownership.
7578         * pthread_mutex_timedlock.c: Likewise.
7579         * pthread_mutex_trylock.c: Likewise.
7580         * pthread_mutex_unlock.c: Likewise.
7581         * pthread_rwlock_trywrlock.c: Likewise.
7582         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7583         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7584         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7585         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7587         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7588         flag.
7590 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7592         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7593         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7594         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7595         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7596         Make __align long long instead of long.
7597         (pthread_rwlock_t): Formatting.
7598         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7599         (pthread_rwlock_t): Formatting.
7600         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7601         (pthread_cond_t): Make __align long long instead of long.
7602         (pthread_rwlock_t): Move __flags field to the same position as in
7603         linuxthreads.
7605 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7607         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7608         * tst-rwlock7.c (do_test): Likewise.
7610 2003-04-26  Roland McGrath  <roland@redhat.com>
7612         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7614 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7616         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7617         sizeof (struct pthread).
7618         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7619         1 struct pthread.
7620         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7621         to 0.
7622         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7623         struct pthread.
7624         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7625         to 32-bit bytes.
7626         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7627         tcbp.
7628         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7629         unneccessarily.
7630         (NO_TLS_OFFSET): Define.
7631         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7632         add TLS_TCB_SIZE unnecessarily.
7634 2003-04-22  Roland McGrath  <roland@redhat.com>
7636         * Makeconfig (shared-thread-library): Reverse link order to work
7637         around linker bug.
7639 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7641         * semaphore.h: Fix typo in comment.
7643 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7645         * sysdeps/pthread/sigfillset.c: New file.
7647         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7648         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7649         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7650         * sysdeps/pthread/sigaction.c: Likewise.
7651         * sysdeps/pthread/sigprocmask.c: New file.
7652         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7653         __SIGRTMIN+1.
7654         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7655         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7656         in this case.
7658 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7660         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7661         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7663         * sysdeps/unix/sysv/linux/unregister-atfork.c
7664         (__unregister_atfork): Don't free memory not allocated dynamically.
7666         * semaphore.h: Remove __THROW marker from cancellation points.
7667         * nptl/sysdeps/pthread/pthread.h: Likewise.
7669 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7671         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7672         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7673         __THROW.
7675 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7677         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7679 2003-04-15  Roland McGrath  <roland@redhat.com>
7681         * forward.c (__pthread_unwind): Tweak to avoid warning.
7683 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7685         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7687 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7689         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7690         overflow CFA advance instructions.
7691         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7693 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7695         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7696         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7697         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7698         defined.
7700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7701         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7703         DW_CFA_advance_loc for .Laddl-.Lsubl.
7705 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7707         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7708         position-independent unwind data for static libraries.
7709         Add missing unwind info.  Add comments.
7711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7712         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7713         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7714         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7716 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7718         * Makefile: Make sure all cancellation points are compiled with
7719         exception and asynchronous unwind tables.
7721         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7722         which mishandles loading of global object addresses in PIC.
7723         (THREAD_SETMEM_NC): Likewise.
7725 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7727         * pthread.h: Define new data structure for cleanup buffer.  Declare
7728         new cleanup handler interfaces.
7729         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7730         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7731         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7732         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7733         it.  Declare old cleanup handler installation functions.
7734         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7735         handling.
7736         * cleanup_defer.c: Likewise.
7737         * cleanup_compat.c: New file.  Old cleanup code.
7738         * cleanup_def_compat.c: New file.  Old cleanup code.
7739         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7740         if own thread descriptor.
7741         * unwind.c: New file.
7742         * forward.c: Add __pthread_unwind.
7743         * init.c (pthread_functions): Add __pthread_unwind.
7744         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7745         Add ptr___pthread_unwind.
7746         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7747         and unwind function.
7748         * Makefile (libpthread-routines): Add cleanup_compat,
7749         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7750         table generation if necessary.
7751         * version.c: Record whether unwind support is compiled in.
7752         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7753         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7754         handler interfaces.
7755         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7756         complication to generate unwind information for syscall wrappers.
7757         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7758         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7759         __cleanup_fct_attribute.
7761         * Makefile: Add rules to build and run tst-cleanup0.
7762         * tst-cleanup0.c: New file.
7763         * tst-cleanup0.expect: New file.
7765         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7766         caller.  Optimize to avoid often unecessary local variable.
7768 2003-04-11  Roland McGrath  <roland@redhat.com>
7770         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7771         sets variable `multidir'; include that.
7772         (generated): Add it.
7773         ($(objpfx)$(multidir)/crti.o): New target.
7774         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7776 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7778         * tst-attr2.c (do_test): Add cast to avoid warning.
7779         * tst-mutex4.c (do_test): Likewise.
7781 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7783         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7784         in child.
7786 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7788         * Makefile (tests): Add tst-detach1.
7789         * tst-detach1.c: New file.
7791 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7793         * sysdeps/pthread/pthread.h: Remove duplicate
7794         pthread_cleanup_{push,pop} definitions.
7796         * tst-barrier2.c: Eliminate warnings.
7797         * tst-cancel4.c: Likewise.
7798         * tst-cond4.c: Likewise.
7799         * tst-cond6.c: Likewise.
7800         * tst-detach1.c: Likewise.
7801         * tst-rwlock4.c: Likewise.
7802         * tst-rwlock6.c: Likewise.
7803         * tst-rwlock7.c: Likewise.
7804         * tst-sem3.c: Likewise.
7805         * tst-spin2.c: Likewise.
7806         * tst-umask1.c: Likewise.
7808 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7810         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7812 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7814         * descr.h (struct pthread): Move cancelhandling member to the front.
7816 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7818         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7819         malloc_parent, and malloc_child statically.
7820         (__register_atfork_malloc): New function.
7821         (free_mem): Don't free any of the malloc_* variables on the list.
7822         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7823         Define HAVE_register_atfork_malloc.
7825 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7827         * sysdeps/pthread/createthread.c (create_thread): Add some more
7828         comments explaining when to set multiple_threads and when not.
7830         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7831         THREAD_ATOMIC_BIT_SET if not already defined.
7832         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7833         THREAD_ATOMIC_BIT_SET:
7834         * sysdeps/x86_64/tls.h: Likewise.
7835         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7836         THREAD_ATOMIC_CMPXCHG_VAL.
7837         (_pthread_cleanup_pop_restore): Likewise.
7838         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7839         (__pthread_enable_asynccancel_2): Likewise.
7840         (__pthread_disable_asynccancel): Likewise.
7841         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7842         (__libc_disable_asynccancel): Likewise.
7843         * init.c (sigcancel_handler): Likewise.
7844         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7845         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7847 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7849         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7850         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7851         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7852         * Makefile (tests): Add tst-cancel11.
7853         * tst-cancel11.c: New file.
7855 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7857         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7858         round, not the first.  Use specific_used flag instead of local
7859         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7860         (__free_tcb): Don't call deallocate_tsd here.
7861         (start_thread): Call deallocate_tsd here.
7862         * pthread_setspecific.c: Set specific_used flag really only when
7863         needed.
7864         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7865         * tst-tsd3.c: New file.
7866         * tst-tsd4.c: New file.
7868 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7870         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7871         Use atomic_exchange_and_add instead of __lll_add.
7872         (__lll_mutex_timedlock): Likewise.
7873         Patch by Ian Wienand.
7875 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7877         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7878         (SINGLE_THREAD_P): Fix typo.
7879         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7881 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7883         * Makefile (tests): Add tst-align.
7884         * tst-align.c: New file.
7885         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7887         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7888         function correctly.
7890         * tst-tsd2.c: Add casts to avoid warnings.
7892 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7894         * descr.h (struct pthread): Move most often used elements to the front.
7896 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7898         * Makefile (libpthread-routines): Add pthread_atfork.
7899         (libpthread-static-only-routines): Add pthread_atfork.
7901 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7903         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7904         of TLS_DTV_AT_TP.
7905         (INSTALL_DTV): Add parens.
7906         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7907         Use passed descr instead of THREAD_SELF.
7908         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7909         (__lll_mutex_timedlock_wait): Correct expected value after
7910         spurious wakeup.
7911         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7912         Release lock before waking up the waiters.
7913         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7914         criteria.  Reorderstruct passed to cleanup handler.  Fix
7915         handling of cancellation and failung pthread_mutex_unlock call.
7916         Use __pthread_enable_asynccancel_2 instead of
7917         __pthread_enable_asynccancel.
7918         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7919         Return result of lock re-get if it fails.
7920         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7921         for __pthread_cleanup_push.
7922         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7923         completely broken rwlock implementation.
7924         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7925         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7926         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7927         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7928         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7929         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7930         versioned_symbol macro.
7931         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7932         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7934 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7936         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7937         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7938         and __helper_tid.
7939         (struct timer): Remove th and bar field.
7940         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7941         debugging code.  Create only one helper thread.
7942         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7943         helper thread.
7944         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7945         Renamed.  Define statically.  Use thread info from siginfo.
7946         (__helper_once): New variable.
7947         (__helper_tid): New variable.
7948         (__reset_helper_control): New function.
7949         (__start_helper_thread): New function.
7951         * pthread_create.c (start_thread): Don't use setjmp inside
7952         __builtin_expect to work around gcc bug.
7954         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7955         timer_delete syscall fails, but not with ENOSYS, set
7956         __no_posix_timers.
7958         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7959         (timer_settime): Fix typo.
7960         * sysdeps/unix/sysv/linux/timer_getoverr.c
7961         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7963 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7965         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7966         offset of cleanupbuf.__prev.
7968 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7970         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7971         of included file.
7973 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7975         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7976         NULL provide default definition to syscall.
7978 2003-03-25  Roland McGrath  <roland@redhat.com>
7980         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7981         (timer_id2ptr): Fix typo.
7983 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7985         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7986         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7987         * sysdeps/ia64/pthreaddef.h: Likewise.
7988         * sysdeps/powerpc/pthreaddef.h: Likewise.
7989         * sysdeps/s390/pthreaddef.h: Likewise.
7990         * sysdeps/sh/pthreaddef.h: Likewise.
7991         * sysdeps/x86_64/pthreaddef.h: Likewise.
7992         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7993         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7994         being changed.
7995         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7996         SIGTIMER is not unblocked.
7997         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7998         RT signal taken.
7999         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
8000         be send.
8001         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
8002         pass pointer through as ID.
8003         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8004         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8005         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8006         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8007         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8008         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8009         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8010         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8011         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8012         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8013         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8014         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8015         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8016         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8017         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8018         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8019         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8020         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8021         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8022         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8023         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8024         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8025         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8026         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8027         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8028         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8029         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8030         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8031         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8032         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8033         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8034         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8035         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8037         * pthreadP.h: Remove FRAME_LEFT definition.
8038         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8039         already left frame.  Programs which have this problem are not POSIX
8040         compliant.
8041         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8043 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8045         * sysdeps/pthread/tst-timer.c: Check return values of the
8046         functions we test.
8048 2003-03-23  Roland McGrath  <roland@redhat.com>
8050         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8051         * tst-tls3mod.c: Likewise.
8052         * tst-tls1.c: Likewise.
8053         * tst-tls2.c: Likewise.
8055         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8056         undefined behavior.
8058         * tst-join5.c (tf1, tf2): Add a cast.
8060         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8062         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8063         Don't test anything.
8064         * tst-cond4.c: Likewise.
8065         * tst-cond6.c: Likewise.
8066         * tst-flock2.c: Likewise.
8067         * tst-mutex4.c: Likewise.
8068         * tst-rwlock4.c: Likewise.
8069         * tst-signal1.c: Likewise.
8070         * tst-spin2.c: Likewise.
8071         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8073         * tst-mutex4.c: Use test-skeleton.c.
8074         * tst-spin2.c: Likewise.
8075         * tst-sysconf.c: Likewise.
8076         * tst-barrier2.c: Likewise.
8077         * tst-cond4.c: Likewise.
8078         * tst-cond6.c: Likewise.
8079         * tst-rwlock4.c: Likewise.
8080         * tst-unload.c: Likewise.
8081         * tst-flock2.c (do_test): Use return instead of exit.
8083 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8085         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8087 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8089         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8090         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8091         instead of __lll_compare_and_swap.
8092         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8093         Likewise.
8094         Removed definition if __lll_compare_and_swap.
8096         * cancellation.c: Adjust for new form of compare&exchange macros.
8097         * cleanup_defer.c: Likewise.
8098         * init.c: Likewise.
8099         * libc-cancellation.c: Likewise.
8100         * old_pthread_cond_broadcast.c: Likewise.
8101         * old_pthread_cond_signal.c: Likewise.
8102         * old_pthread_cond_timedwait.c: Likewise.
8103         * old_pthread_cond_wait.c: Likewise.
8104         * pthread_cancel.c: Likewise.
8105         * pthread_create.c: Likewise.
8106         * pthread_detach.c: Likewise.
8107         * pthread_join.c: Likewise.
8108         * pthread_key_delete.c: Likewise.
8109         * pthread_setcancelstate.c: Likewise.
8110         * pthread_setcanceltype.c: Likewise.
8111         * pthread_timedjoin.c: Likewise.
8112         * pthread_tryjoin.c: Likewise.
8113         * sysdeps/pthread/createthread.c: Likewise.
8115 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8117         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8118         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8119         definitions.  Replace uses with calls to atomic_* functions.
8120         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8121         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8122         __lll_test_and_set calls with atomic_exchange_and_add and
8123         atomic_exchange calls respectively.
8124         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8125         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8126         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8127         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8128         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8129         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8130         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8132         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8133         returns the old value.
8135 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8137         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8138         int for variable OLDVAL and correct inline assembler contraint.
8139         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8140         type int for variable OLD.
8142         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8143         only for s390-32.
8144         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8145         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8146         instead of multiple_threads field in the TCB.
8148 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8150         * sysdeps/i386/i686/bits/atomic.h: Removed.
8151         * sysdeps/i386/i586/bits/atomic.h: Removed.
8152         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8153         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8154         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8155         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8156         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8157         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8158         * atomic.h: Removed.  Moved to glibc.
8160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8161         support for clock selection.
8163         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8164         signalling waiters.
8166 2003-03-18  Roland McGrath  <roland@redhat.com>
8168         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8169         Add __lll_rel_instr first.  Add memory clobber.
8170         (lll_mutex_unlock): Use __lll_test_and_set.
8171         From Paul Mackerras <paulus@samba.org>.
8173         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8174         unconditionally.
8175         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8176         (SINGLE_THREAD_P):  Add `header.' prefix.
8177         From Paul Mackerras <paulus@samba.org>.
8179         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8180         pthread_timedjoin_np to ...
8181         (libpthread: GLIBC_2.3.3): ... here.
8182         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8184         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8185         Avoid shadowing VAL variable.
8187         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8188         New macro.
8190 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8192         * Makefile (tests): Add tst-cond11.
8193         * tst-cond11.c: New file.
8195         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8196         struct passed to cleanup handler to eliminate one more
8197         instruction.
8198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8200         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8201         (pthrad_cond_t): Replace __unused field with __clock.
8203         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8204         waken all waiters in cleanup handler.
8205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8208         * pthread_condattr_getclock.c: New file.
8209         * pthread_condattr_setclock.c: New file.
8210         * sysdeps/pthread/pthread.h: Declare these new functions.
8211         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8212         * Makefile (libpthread-routines): Add the new functions.
8213         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8214         Renamed field to value.  Document use of the bits.
8215         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8216         change.
8217         * pthread_condattr_setpshared.c: Likewise.
8218         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8219         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8220         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8221         Add __clock field.
8222         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8223         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8224         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8225         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8227         Implement clock selection.
8228         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8229         * pthread-errnos.sym: Add ENOSYS.
8230         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8231         _POSIX_CLOCK_SELECTION.
8232         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8235         invalid .size directive.
8237 2003-03-17  Roland McGrath  <roland@redhat.com>
8239         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8240         Formatting tweaks.
8242 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8244         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8245         Use __lll_add instead of spelling it out.  Use protected symbol names.
8246         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8247         Use __lll_add.
8248         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8249         Renamed from lll_compare_and_swap.  Use new name where necessary.
8250         (__lll_add): Defined.
8251         (__lll_dec_if_positive): Defined.
8252         (__lll_test_and_set): Defined.
8253         * sysdeps/ia64/pthread_spin_init.c: Removed.
8254         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8255         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8256         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8257         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8258         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8259         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8260         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8261         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8262         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8263         __sync_lock_release_si.
8264         Patch by Jakub Jelinek.
8266         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8267         Fix timeout handling.
8268         (__lll_timedwait_tid): Likewise.
8269         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8270         Patch by Jakub Jelinek.
8272         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8274 2003-03-17  Roland McGrath  <roland@redhat.com>
8276         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8277         * sysdeps/pthread/pthread_spin_init.c: New file.
8278         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8279         * sysdeps/powerpc/Makefile: New file.
8280         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8281         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8282         * sysdeps/powerpc/pthreaddef.h: New file.
8283         * sysdeps/powerpc/tcb-offsets.sym: New file.
8284         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8285         * sysdeps/powerpc/tls.h: New file.
8286         * sysdeps/powerpc/bits/atomic.h: New file.
8287         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8288         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8289         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8291         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8292         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8293         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8294         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8295         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8296         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8297         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8298         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8299         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8300         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8301         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8302         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8303         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8304         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8305         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8307         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8308         not gettimeofday.
8309         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8310         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8311         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8312         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8313         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8315 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8317         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8318         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8319         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8320         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8321         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8323 2003-03-16  Roland McGrath  <roland@redhat.com>
8325         * tst-fork4.c: Include <string.h>.
8326         * tst-signal2.c: Likewise.
8327         * tst-mutex5.c (do_test): exit -> return.
8328         * tst-mutex2.c: Include <stdlib.h>.
8330 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8332         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8333         (__lll_mutex_timedlock_wait): Correct expected value after
8334         spurious wakeup.  Otherwise we would never wait again.
8336         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8337         zone versus inline asm stupidity.  Use correct instructions.
8339         * tst-rwlock6.c: Add some more status output.
8341 2003-03-15  Roland McGrath  <roland@redhat.com>
8343         * sysdeps/pthread/configure.in: New file.
8344         * sysdeps/pthread/configure: New file (generated).
8346 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8348         * allocatestack.c (allocate_stack): Store the exact stack size of
8349         user allocated stacks.
8351 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8353         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8354         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8355         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8356         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8357         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8358         Use `header.' prefix.
8359         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8361 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8363         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8364         __builtin_frame_address, use stack pointer.
8366         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8367         instead of __builtin_frame_pointer.
8369 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8371         * tst-basic1.c (do_test): Add cast to avoid warning.
8372         * tst-basic2.c (do_test): Likewise.
8374         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8375         amount of stack correction.
8377         * tst-fork4.c: Use test-skeleton.c.
8379 2003-03-14  Roland McGrath  <roland@redhat.com>
8381         * init.c: Fix typo "#eli" for "#else".
8383 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8385         * allocatestack.c (__stack_user): Use hidden_data_def.
8386         * pthread_create.c (__pthread_keys): Likewise.
8388         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8390 2003-03-14  Roland McGrath  <roland@redhat.com>
8392         * tst-fork4.c: New file.
8393         * Makefile (tests): Add it.
8395         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8396         we always define the padding space.
8397         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8398         stopped supporting its own extensions fully.
8399         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8400         struct also called `header', so `header.multiple_threads' is the field
8401         name to use on all machines.
8402         * allocatestack.c (allocate_stack): Use `header.' prefix.
8403         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8404         * pthread_create.c (__pthread_create_2_1): Likewise.
8405         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8406         (THREAD_SELF): Likewise.
8407         * sysdeps/x86_64/tls.h: Likewise.
8408         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8409         (SINGLE_THREAD_P): Likewise.
8410         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8411         (SINGLE_THREAD_P): Likewise.
8412         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8413         (SINGLE_THREAD_P): Likewise.
8415         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8416         value directly.
8418 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8420         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8421         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8423         * pthread_create.c (start_thread): setjmp is expected to return 0.
8425         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8426         (THREAD_GETMEM_NC): Likewise.
8428 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8430         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8431         and the size of the stack which must be allocated is a multiple,
8432         allocate one more page.
8433         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8434         MULTI_PAGE_ALIASING.
8436 2003-03-13  Roland McGrath  <roland@redhat.com>
8438         * pthread_create.c (start_thread): Set EXITING_BIT after the
8439         event-reporting (and destructors), not before.
8441 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8443         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8444         lll_futex_wake): Declare register variables as long int instead of
8445         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8446         Make syscall arguments clobbered by the syscall.
8447         (lll_futex_wait): Define using lll_futex_timed_wait.
8449         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8450         to void *.
8452         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8453         PPID if [! NDEBUG].
8455         * allocatestack.c (nptl_ncreated): Only declare if
8456         COLORING_INCREMENT != 0.
8458         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8459         (__libc_enable_asynccancel_2): Remove prototype.
8461         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8462         ctid to match kernel.
8464 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8466         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8467         libc_multiple_threads.
8468         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8469         __libc_multiple_threads to...
8470         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8472         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8473         versioning.
8474         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8475         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8477         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8478         (__pthread_once_internal): Define.
8480         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8481         macros instead of .symver directly.
8482         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8483         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8485         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8486         * sysdeps/x86_64/tcb-offsets.sym: New file.
8487         * sysdeps/x86_64/Makefile: New file.
8489         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8491         to access own pthread_t in TCB.
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8493         Likewise.
8494         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8495         Likewise.
8496         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8498 2003-03-12  Roland McGrath  <roland@redhat.com>
8500         * pthread-errnos.sym: New file.
8501         * Makefile (gen-as-const-headers): New variable, list that file.
8502         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8503         header <pthread-errnos.h> instead of defining errno values here.
8504         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8505         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8506         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8507         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8509         Likewise.
8510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8511         Likewise.
8512         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8513         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8514         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8515         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8516         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8517         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8518         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8519         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8520         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8521         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8522         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8523         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8524         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8525         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8526         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8527         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8528         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8529         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8530         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8531         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8532         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8533         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8534         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8535         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8536         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8537         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8538         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8540         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8541         CLONE_CHILD_SETTID worked.
8543 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8545         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8546         file.
8547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8548         file.
8550         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8551         (pthread_cond_t): Add padding.
8553         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8554         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8555         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8557         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8558         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8559         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8560         (__pthread_rwlock_timedrdlock): Likewise.
8561         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8562         (__pthread_rwlock_wrlock): Likewise.
8563         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8564         (__pthread_rwlock_rdlock): Likewise.
8566         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8568         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8569         result of lock re-get if it fails.
8571 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8573         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8574         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8575         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8577         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8578         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8579         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8580         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8581         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8582         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8584         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8585         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8587         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8588         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8589         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8590         (create_thread): Likewise.
8591         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8592         * init.c (__pthread_initialize_minimal_internal): Initialize
8593         __libc_multiple_threads_ptr if necessary.
8594         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8595         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8596         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8597         __libc_multiple_threads.
8598         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8599         necessary.
8601         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8602         (THREAD_SETMEM_NC): Likewise.
8604         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8605         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8606         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8607         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8609         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8610         Eliminate one entire instruction.
8612         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8613         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8614         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8615         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8616         instead of __pthread_enable_asynccancel.
8617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8618         (__pthread_cond_wait): Likewise.
8619         * sysdeps/pthread/pthread_cond_timedwait.c
8620         (__pthread_cond_timedwait): Likewise.
8621         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8623         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8624         (__condvar_cleanup): Wake up all waiters in case we got signaled
8625         after being woken up but before disabling asynchronous
8626         cancellation.
8627         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8629         (__condvar_cleanup): Likewise.
8631         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8632         Make it an error if architecture has no #if case.  Add x86-64.
8634         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8635         pt-initfini.s generation.
8637         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8638         (TLS_INIT_TP): Fix typo.
8640 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8642         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8643         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8645         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8646         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8647         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8648         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8649         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8650         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8651         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8652         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8654 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8656         * sysdeps/pthread/pthread_cond_timedwait.c
8657         (__pthread_cond_timedwait): Return the result of the final
8658         locking.  If it succeeds, the regular function return value.
8660         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8661         Return result of the final locking.
8662         * version.c (__nptl_main): Work around problems with the strange
8663         INTERNAL_SYSCALL macro on ppc32.
8664         * init.c (__pthread_initialize_minimal_internal): Unblock
8665         SIGCANCEL in case the parent blocked it.
8666         Reported by Paul Mackerras <paulus@samba.org>.
8668         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8672 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8674         * sysdeps/pthread/pthread_cond_timedwait.c
8675         (__pthread_cond_timedwait): Unlock and fail if
8676         __pthread_mutex_unlock_internal failed.
8678         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8679         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8680         Use ARCH_CLONE.
8681         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8682         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8683         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8684         ALLOCATE_STACK): New macros.
8685         (TLS_TPADJ): New macro.
8686         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8687         (allocate_stack): Handle TLS_DTV_AT_TP and
8688         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8689         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8690         Don't set PD->self.
8691         * init.c [__ia64__] (__NR_set_tid_address): Define.
8693         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8694         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8695         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8696         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8697         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8698         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8699         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8700         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8701         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8702         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8703         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8704         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8705         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8706         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8707         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8708         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8709         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8710         * sysdeps/ia64/bits/atomic.h: New file.
8711         * sysdeps/ia64/Makefile: New file.
8712         * sysdeps/ia64/pthread_spin_init.c: New file.
8713         * sysdeps/ia64/pthread_spin_lock.c: New file.
8714         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8715         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8716         * sysdeps/ia64/pthreaddef.h: New file.
8717         * sysdeps/ia64/tcb-offsets.sym: New file.
8718         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8719         * sysdeps/ia64/tls.h: New file.
8721         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8722         to syscall instead of no arguments.
8724 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8726         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8727         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8728         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8729         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8731         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8732         unused code.
8734         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8736         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8737         lowlevelbarrier.sym.
8738         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8740         Include lowlevelbarrier.h and don't define offsets locally.
8741         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8743         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8744         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8745         (__lll_mutex_timedlock_wait): Likewise.
8746         (lll_mutex_lock): Adjust asm for that.
8747         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8748         (lll_lock): Adjust asm for operand order change.
8749         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8750         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8752         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8753         Reverse order of parameters.
8754         (__lll_timedwait_tid): Remove regparms attribute.
8755         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8756         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8758         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8759         (__lll_timedwait_tid): Remove one unnecessary instruction.
8761         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8762         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8763         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8764         lowlevelmutex.S.
8766         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8767         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8768         for NOT_IN_libc.
8769         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8770         lowlevellock.S.
8772         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8773         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8774         for libc.so.
8775         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8776         define LOCK here (if UP is not defined).  The actual code is in
8777         lowlevelmutex.S.
8779         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8780         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8781         __lll_timedwait_tid for libc.so.
8782         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8783         define LOCK here (if UP is not defined).  The actual code is in
8784         lowlevellock.S.
8786         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8787         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8788         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8789         instead of lowlevelsem.h.
8790         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8791         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8792         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8794         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8795         lowlevelrwlock.sym.
8796         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8797         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8798         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8800         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8801         register loading.
8802         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8803         last changed.  D'oh.
8805         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8807         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8808         of __libc_locking_needed.
8809         (lll_trylock): Initialize %eax to zero.
8811         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8812         pthread_cond_t definition.
8814 2003-03-10  Roland McGrath  <roland@redhat.com>
8816         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8817         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8818         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8819         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8820         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8822         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8823         Instead of setting PD->multiple_threads, set globals
8824         __pthread_multiple_threads and __libc_multiple_threads.
8825         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8826         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8827         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8829         * descr.h (struct pthread): Conditionalize first member on
8830         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8831         containing an anonymous tcbhead_t.  Move `list' member out.
8832         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8833         * allocatestack.c: Remove use of `header.data.' prefix.
8834         * pthread_create.c: Likewise.
8835         * init.c (__pthread_initialize_minimal_internal): Likewise.
8836         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8837         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8838         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8839         * sysdeps/x86_64/tls.h: Likewise.
8840         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8841         (SINGLE_THREAD_P): Likewise.
8842         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8843         (SINGLE_THREAD_P): Likewise.
8844         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8845         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8847 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8849         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8851         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8852         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8854         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8855         leftovers from the ia32 code.
8857         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8858         memory load.
8859         (clear_once_control): Don't load %esi.
8861         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8862         handling.
8864         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8866         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8867         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8869         * Makefile (tests): Add tst-cond10.
8870         * tst-cond10.c: New file.
8872 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8874         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8875         * tst-signal3.c (do_test): Likewise.
8876         * tst-sem5.c (do_test): Likewise.
8877         * tst-kill6.c (do_test): Likewise.
8878         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8880         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8881         of inc/dec.
8882         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8883         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8884         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8885         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8886         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8888         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8889         Likewise.
8890         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8891         Likewise.
8892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8894         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8897         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8898         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8899         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8901         * allocatestack.c (allocate_stack): If mprotect() fails free the
8902         TLS memory.
8904 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8906         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8908         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8909         lll_wake_tid.  This was used only to work around kernel limits in
8910         the early days.
8911         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8912         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8913         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8914         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8916         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8917         (__pthread_initialize_minimal_internal): Change initialization of
8918         __static_tls_align_m1 appropriately.
8919         * pthreadP.h (__static_tls_align_m1): Renamed from
8920         __static_tls_align.
8921         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8922         instead of __static_tls_align-1.
8924 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8926         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8928         * pthread_create.c: Define __pthread_keys using nocommon
8929         attribute, not by placing it explicitly in bss.
8930         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8932         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8933         Use it in mmap call to allocate stacks.
8935         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8937         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8938         result of the thread function.
8940 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8942         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8943         version is just fine.
8945         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8946         (__pthread_child_handler): Renamed from pthread_child_handler,
8947         exported, and marked hidden.  Change all users.
8948         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8949         free __pthread_child_handler from child list.
8951 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8953         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8955         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8956         Fix handling of cancellation and failing pthread_mutex_unlock call.
8957         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8958         (__pthread_cond_wait): Likewise.
8960         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8961         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8962         lll_futex_timed_wait call.
8963         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8964         (pthread_rwlock_timedwrlock): Likewise.
8966         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8967         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8968         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8970         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8971         check of lll_futex_wake return value.
8973 2003-03-03  Roland McGrath  <roland@redhat.com>
8975         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8977         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8978         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8979         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8981 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8983         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8984         error for CPU clocks.
8986         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8987         _POSIX_MONOTONIC_CLOCK.
8988         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8990         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8991         recent kernels.
8993 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8995         * descr.h (struct pthread): Move cleanup field to the front.
8997 2003-03-01  Roland McGrath  <roland@redhat.com>
8999         * sem_open.c (sem_open): Braino fix.
9001 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
9003         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9005         __pthread_cleanup_pop functionality.
9006         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9008         * descr.h (struct pthread): Move tid field to the front now that
9009         it is often used.
9011         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9012         (__lll_mutex_timedlock_wait): Remove.
9013         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9014         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9015         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9016         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9017         (lll_unlock_wake_cb): Don't save and restore %esi.
9018         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9019         %esi.
9020         (__lll_timedwait_tid): Add alignment.
9021         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9022         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9023         %esi.
9024         (__lll_timedwait_tid): Removed.
9025         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9026         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9027         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9028         (pthread_barrier_wait): Don't save, load, and restore %esi for
9029         last thread.
9030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9031         (__pthread_cond_signal): Don't save, load, and restore %esi.
9032         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9033         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9034         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9035         Don't save, load, and restore %esi.
9037 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9039         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9040         Release lock before waking up the waiters.
9042         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9044         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9045         (reader_thread): Likewise.
9047         * sysdeps/pthread/pthread_rwlock_unlock.c
9048         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9049         to wake up readers if there are none.
9051         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9052         Release internal lock before wake threads.
9054 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9056         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9057         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9058         predefined.
9059         * tst-rwlock9.c: Likewise.
9060         * tst-rwlock10.c: New file.
9061         * tst-rwlock11.c: New file.
9063         * Makefile (tests): Add tst-dlsym1.
9064         * tst-dlsym1.c: New file.
9066         * init.c (__pthread_initialize_minimal_internal): Set
9067         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9068         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9070 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9072         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9074         * tst-cond2.c: Fix sychronization with child.
9076         * tst-rwlock8.c (reader_thread): Remove unused variable.
9078         * Makefile: Add rules to build and run tst-tls3.
9079         * tst-tls3.c: New file.
9080         * tst-tls3mod.c: New file.
9082         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9083         * tst-rwlock8.c: New file.
9084         * tst-rwlock9.c: New file.
9085         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9086         complete broken rwlock implementation.
9087         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9088         Likewise.
9089         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9090         Likewise.
9091         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9092         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9093         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9094         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9095         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9096         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9097         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9099 2003-02-23  Roland McGrath  <roland@redhat.com>
9101         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9103 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9105         * Makefile (tests): Add tst-context1.
9106         * tst-context1.c: New file.
9108         * Makefile (tests): Add tst-tls1 and tst-tls2.
9109         * tst-tls1.c: New file.
9110         * tst-tls2.c: New file.
9112         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9113         for failed cmpxchg.
9115         * pthread_create.c (start_thread): Set EXITING_BIT early.
9117         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9118         (THREAD_GETMEM_NC): Likewise.
9120 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9122         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9123         off 3 more bytes by using offset-less instructions when possible.
9125         * Makefile: Add dependency for $(objpfx)version.d.
9127         * eintr.c (eintr_source): Add unnecessary return but the compiler
9128         insists.
9130         * tst-kill3.c: Include <unistd.h>.
9132 2003-02-21  Roland McGrath  <roland@redhat.com>
9134         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9136 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9138         * Makefile (tests): Add tst-eintr1.
9139         (distribute): Add eintr.c.
9140         * tst-eintr1.c: New file.
9141         * eintr.c: New file.
9143         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9145         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9146         Disallow sending SIGCANCEL.
9148         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9149         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9150         * tst-kill1.c: New file.
9151         * tst-kill2.c: New file.
9152         * tst-kill3.c: New file.
9153         * tst-kill5.c: New file.
9154         * tst-kill6.c: New file.
9155         * tst-basic7.c: Renamed to...
9156         * tst-kill4.c: ...this.
9158 2003-02-21  Roland McGrath  <roland@redhat.com>
9160         * Makefile (install-lib-ldscripts): New variable.
9162 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9164         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9165         * pthread_cancel.c: Use INVALID_TD_P.
9166         * pthread_detach.c: Likewise.
9167         * pthread_getschedparam.c: Likewise.
9168         * pthread_setschedparam.c: Likewise.
9169         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9170         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9171         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9172         * pthread_timedjoin.c: Likewise.
9174         * tst-basic7.c: Include <signal.h>.
9176         * pthread_join.c (pthread_join): Limited checking for invalid
9177         descriptors.
9178         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9180 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9182         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9183         beginning of the loop.  Clear the entire first block of TSD.
9184         * Makefile (tests): Add tst-key4.
9185         * tst-key4.c: New file.
9187 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9189         * Makefile (tests): Add tst-basic7.
9190         * tst-basic7.c: New file.
9192         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9193         Add some more __builtin_expect.
9195         * pthreadP.h: Define dummy version of DEBUGGING_P.
9197 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9199         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9200         _POSIX_THREAD_PRIORITY_SCHEDULING.
9201         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9202         _XOPEN_REALTIME_THREADS.
9203         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9205         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9206         kernel returns EINVAL for PID <= 0, work around it.
9208         * Makefile (tests): Add tst-signal5.
9209         * tst-signal5.c: New file.
9211         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9212         and LOGIN_NAME_MAX.
9214         * tst-cancel1.c (tf): Block all signals.
9216         * Makefile (tests): Add tst-basic6.
9217         * tst-basic6.c: New file.
9219         * tst-basic1.c: Add test for process ID.
9221         * Makefile (tests): Add tst-cancel10.
9222         * tst-cancel10.c: New file.
9224         * Makefile (tests): Add tst-signal4.
9225         * tst-signal4.c: New file.
9227         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9228         __sigismember instead of sigismember.  Add __builtin_expect.
9230 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9232         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9233         pthread_setcancelstate, and pthread_rwlock_setpshared.
9235         * tst-cancel7.c (do_test): Make sure the pid file exists before
9236         canceling the thread.
9238         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9239         pthread_rwlock_timedrdlock tests.
9240         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9241         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9242         Check for invalid tv_nsec field.
9243         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9244         Likewise.
9246         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9247         recursive mutex of overflow.
9249         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9251         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9252         going into an endless loop.
9253         * Makefile (tests): Add tst-cancel9.
9254         * tst-cancel9.c: New file.
9256         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9258 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9260         * tst-mutex5.c (do_test): Add more timedlock tests.
9262         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9263         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9265         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9266         use INLINE_SYSCALL.  Error number is returned, not -1.
9268         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9269         and __deallocate_stack with internal_function.
9270         * pthread_create.c: Adjust definitions appropriately.
9271         * allocatestack.c: Likewise.
9273         * pthread_join.c: Add one more __builtin_expect.
9274         * pthread_timedjoin.c: Likewise.
9276         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9277         not data of sequence number does not match.
9278         Add one __builtin_expect.
9280         * Makefile (tests): Add tst-clock1.
9281         * tst-clock1.c: New file.
9283         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9284         negative arguments.
9285         * Makefile (tests): Add tst-basic5.
9286         * tst-basic5.c: New file.
9288 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9290         * Makefile (tests): Add tst-basic4.
9291         * tst-basic4.c: New file.
9293         * pthreadP.h: Add declaraction for __nptl_nthreads.
9294         * pthread_create.c: Define __nptl_nthreads
9295         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9296         after thread is done.  If then zero, call exit(0).
9297         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9298         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9299         * init.c (pthread_functions): Initialize ptr_nthreads.
9300         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9301         (__reclaim_stacks): Decrement __nptl_nthreads.
9302         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9303         Define.
9304         * Makefile (tests): Add tst-basic3.
9305         * tst-basic3.c: New file.
9307         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9308         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9309         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9310         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9311         if asynchronous canceling is enabled.
9312         * pthread_join.c (pthread_join): When recognizing circular joins,
9313         take into account the other thread might be already canceled.
9314         * Makefile (tests): Add tst-join5.
9315         * tst-join5.c: New file.
9317         * Makefile (tests): Add tst-join4.
9318         * tst-join4.c: New file.
9320 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9322         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9324 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9326         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9327         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9328         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9329         warning.
9330         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9331         to avoid warning.
9332         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9333         error if lll_futex_wake failed.
9335 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9338         handling of cancellation and failung pthread_mutex_unlock call.
9339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9340         * Makefile (tests): Add tst-cond8 and tst-cond9.
9341         * tst-cond8.c: New file.
9342         * tst-cond9.c: New file.
9344         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9346         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9347         non-standard initializers with __USE_GNU.
9349         * Makefile (tests): Add tst-cleanup3.
9350         * tst-cleanup3.c: New file.
9352 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9354         * Makefile (tests): Add tst-attr1 and tst-attr2.
9355         * tst-attr1.c: New file.
9356         * tst-attr2.c: New file.
9358         * Makefile: Add rules to build and run tst-atfork2 test.
9359         * tst-atfork2.c: New file.
9360         * tst-atfork2mod.c: New file.
9362         * sysdeps/unix/sysv/linux/unregister-atfork.c
9363         (__unregister_atfork): Free the memory allocated for the handlers
9364         after removing them from the lists.
9366         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9367         cleanup function.
9369         * tst-atfork1.c (do_test): Wait for the child we forked.
9370         Report error in child.
9372         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9374         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9376 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9378         * Makefile (tests): Add tst-cancel8.
9379         * tst-cancel8.c: New file.
9381         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9382         clearing of control variable.
9383         * Makefile (tests): Add tst-once3 and tst-once4.
9384         * tst-once3.c: New file.
9385         * tst-once4.c: New file.
9387 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9389         * sysdeps/sh/Makefile: New file.
9390         * sysdeps/sh/bits/atomic.h: New file.
9391         * sysdeps/sh/pthread_spin_init.c: New file.
9392         * sysdeps/sh/pthread_spin_lock.c: New file.
9393         * sysdeps/sh/pthread_spin_trylock.S: New file.
9394         * sysdeps/sh/pthread_spin_unlock.S: New file.
9395         * sysdeps/sh/pthreaddef.h: New file.
9396         * sysdeps/sh/tcb-offsets.sym: New file.
9397         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9398         * sysdeps/sh/tls.h: New file.
9399         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9400         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9401         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9402         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9403         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9404         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9405         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9406         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9407         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9408         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9409         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9410         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9411         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9412         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9413         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9414         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9415         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9416         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9417         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9418         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9419         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9420         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9421         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9423         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9424         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9425         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9426         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9427         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9428         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9430 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9432         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9433         according to POSIX.
9435         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9437 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9439         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9440         (TLS_GET_FS): New #define.
9441         (TLS_SET_FS): New #define.
9442         Correct value of __NR_set_thread_area.
9444         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9446 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9448         * Makefile (tests): Add tst-popen1.
9449         * tst-popen1.c: New file.
9451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9452         but inactive generalization.
9453         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9455         Minor optimization, remove one instruction.
9456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9458 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9460         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9462 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9464         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9465         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9466         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9467         * sysdeps/pthread/pthread_cond_signal.c: New file.
9468         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9469         * sysdeps/pthread/pthread_cond_wait.c: New file.
9470         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9471         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9472         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9473         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9474         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9475         * sysdeps/s390/Makefile: New file.
9476         * sysdeps/s390/bits/atomic.h: New file.
9477         * sysdeps/s390/pthread_spin_init.c: New file.
9478         * sysdeps/s390/pthread_spin_lock.c: New file.
9479         * sysdeps/s390/pthread_spin_trylock.c: New file.
9480         * sysdeps/s390/pthread_spin_unlock.c: New file.
9481         * sysdeps/s390/pthreaddef.h: New file.
9482         * sysdeps/s390/tcb-offsets.sym: New file.
9483         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9484         * sysdeps/s390/tls.h: New file.
9485         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9486         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9487         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9488         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9489         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9490         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9491         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9492         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9493         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9494         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9495         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9496         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9497         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9498         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9499         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9500         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9501         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9502         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9503         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9504         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9505         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9506         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9507         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9509 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9511         * atomic.h: Add a couple more default implementations.
9512         (atomic_compare_and_exchange_acq): Use
9513         __arch_compare_and_exchange_32_acq in return value definition.  It
9514         always exists.
9515         (atomic_bit_set): Renamed from atomic_set_bit.
9516         Add missing atomic_ prefixes.
9518         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9519         thread library is available, use correct value to mark initialized
9520         once variable.
9522 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9524         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9525         __sysconf to determine pagesize.
9527         * pthread_create.c: Include <atomic.h>.
9528         * allocatestack.c (allocate_stack): Implement coloring of the
9529         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9530         size minus one.  Adjust users.
9531         * sysdeps/i386/i686/Makefile: New file.
9533 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9535         * allocatestack.c: Improve comment throughout the file.
9537         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9538         (__lll_lock_wait): Add branch prediction.
9539         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9540         (__lll_lock_wait): Likewise.
9541         (lll_unlock_wake_cb): Removed.
9543 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9545         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9546         _POSIX_THREAD_PRIORITY_SCHEDULING.
9548 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9550         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9551         Fix return type of ptr___pthread_getspecific.
9553 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9555         * Makefile (tests): Add tst-umask1.
9556         (tst-umask1-ARGS): Define.
9557         * tst-umask1.c: New file.
9559 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9561         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9562         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9563         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9564         pthread_rwlock_unlock.
9565         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9566         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9567         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9568         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9569         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9570         New file.
9571         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9572         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9573         New file.
9574         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9575         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9576         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9577         New file.
9578         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9579         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9580         New file.
9581         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9582         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9583         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9584         New file.
9585         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9586         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9587         New file.
9588         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9590         * Makefile (libpthread-routines): Remove lowlevelcond and
9591         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9592         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9593         and pthread_cond_broadcast.
9594         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9595         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9596         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9597         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9598         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9599         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9600         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9601         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9602         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9603         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9608         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9609         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9610         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9611         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9612         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9613         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9614         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9615         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9616         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9617         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9618         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9619         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9620         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9621         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9622         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9623         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9624         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9626         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9627         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9628         of the code is moved to ...
9629         * sysdeps/pthread/createthread.c: ...here.  New file.
9631 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9633         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9634         (__new_sem_post): Clear %eax before returning.
9635         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9637         * Makefile (tests): Add tst-cleanup2.
9638         * tst-cleanup2.c: New file.
9640         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9641         Interpret first parameter correctly.
9643 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9645         * Makefile (headers): Add bits/semaphore.h.
9647 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9649         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9650         if not SHARED.
9652 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9654         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9655         must be used and mapping failed.
9656         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9658         * Makefile (CFLAGS-pthread_self.os): Define this, not
9659         CFLAGS-pthread_self.c.
9661 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9663         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9664         lll_unlock_wake_cb.
9666         * Makefile (libpthread-routines): Add version.  Add rules to build
9667         version.os and banner.h.
9668         * version.c: New file.
9670 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9672         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9673         the alias unconditional.
9674         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9676 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9678         * Makefile (CFLAGS-pthread_self.c): New definition.
9680 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9682         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9683         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9684         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9685         * init.c (__pthread_initialize_minimal_internal): Likewise.
9687 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9689         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9691         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9692         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9693         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9694         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9695         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9696         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9698 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9700         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9701         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9702         * tst-cancel-wrappers.sh: Remove all exceptions.
9704 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9706         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9707         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9709         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9710         Use __libc_pthread_functions array if SHARED.
9712         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9713         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9715         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9716         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9717         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9718         __libc_ptf_call instead of __libc_maybe_call.
9719         (PTF): New #define.
9720         (__libc_cleanup_region_start): Wrap function name with PTF call.
9721         (__libc_cleanup_region_end): Likewise.
9722         (__libc_cleanup_end): Likewise.
9724         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9725         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9726         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9727         * pthreadP.h: Add prototypes.
9729         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9730         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9731         __pthread_rwlock_unlock aliases.
9732         * pthreadP.h: Add prototypes for new aliases.
9734         * pthreadP.h (struct pthead_functions): Moved to...
9735         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9736         * init.c (pthread_functions): Add initializers for new elements.
9738         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9739         __pthread_cleanup_pop_restore aliases.
9740         * pthreadP.h: Add prototypes.
9742         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9743         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9744         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9745         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9746         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9747         * pthreadP.h: Adjust prototypes and callers.
9749 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9751         * Makefile (tests): Add tst-cancel7.
9752         (tst-cancel7-ARGS): New variable.
9753         * tst-cancel7.c: New file.
9755         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9756         around gcc defficiencies.
9757         * old_pthread_cond_signal.c: Likewise.
9758         * old_pthread_cond_timedwait.c: Likewise.
9759         * old_pthread_cond_wait.c: Likewise.
9761         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9763 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9765         * Makefile (tests): Add tst-cond7.
9766         * tst-cond7.c: New file.
9768         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9769         (condvar_cleanup): Get condvar address from the right place.
9771         * atomic.h: Correct definitions of atomic_full_barrier,
9772         atomic_read_barrier, atomic_write_barrier.
9774         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9775         race-free.
9776         * old_pthread_cond_signal.c: Likewise.
9777         * old_pthread_cond_timedwait.c: Likewise.
9778         * old_pthread_cond_wait.c: Likewise.
9780 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9782         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9784 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9786         * pthreadP.h (pthread_cond_2_0_t): New type.
9787         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9788         Use new type for the 2.0 condvar function prototypes.
9789         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9790         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9791         parameter.
9792         * old_pthread_cond_destroy.c: Likewise.
9793         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9794         * old_pthread_cond_signal.c: Likewise.
9795         * old_pthread_cond_timedwait.c: Likewise.
9796         * old_pthread_cond_wait.c: Likewise.
9798         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9799         (__pthread_cond_wait): Don't save cancellation mode and seq value
9800         in same location.
9802         * herrno.c (__h_errno_location): Don't define as weak.
9804 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9806         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9807         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9808         and pthread_cond_wait.
9809         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9810         Renamed to...
9811         (__pthread_cond_broadcast_2_0): ... this.
9812         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9813         Renamed to...
9814         (__pthread_cond_destroy_2_0): ... this.
9815         * old_pthread_cond_init.c (__old_pthread_cond_init):
9816         Renamed to...
9817         (__pthread_cond_init_2_0): ... this.
9818         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9819         Renamed to...
9820         (__pthread_cond_signal_2_0): ... this.
9821         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9822         Renamed to...
9823         (__pthread_cond_wait_2_0): ... this.
9824         * pthread_cond_destroy.c: Include shlib-compat.h.
9825         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9826         * pthread_cond_init.c: Include shlib-compat.h.
9827         (pthread_cond_init): Change strong_alias into versioned_symbol.
9828         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9829         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9830         fields.
9831         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9832         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9833         __pthread_cond_wait_2_0): New prototypes.
9834         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9835         __old_pthread_cond_init, __old_pthread_cond_signal,
9836         __old_pthread_cond_wait): Removed.
9837         * init.c: Include shlib-compat.h.
9838         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9839         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9840         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9841         ptr___pthread_cond_*_2_0 fields.
9842         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9843         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9845         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9846         LIBC_SIGACTION was not yet defined.
9847         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9848         [!defined LIBC_SIGACTION] (__sigaction): New function and
9849         libc_hidden_weak.
9850         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9851         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9853 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9855         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9857 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9859         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9860         New, larger type definition.
9861         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9862         implementation.
9863         * Versions [libpthread]: Add definitions for new pthread_cond_*
9864         interfaces for version GLIBC_2.3.2.
9865         * pthread_cond_init.c: Update initialization for new type definition.
9866         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9867         pthread_cond_timedwait, pthread_cond_signal, and
9868         pthread_cond_broadcast.  Add old_pthread_cond_init,
9869         old_pthread_cond_destroy, old_pthread_cond_wait,
9870         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9871         old_pthread_cond_broadcast.
9872         * old_pthread_cond_broadcast.c: New file.
9873         * old_pthread_cond_destroy.c: New file.
9874         * old_pthread_cond_init.c: New file.
9875         * old_pthread_cond_signal.c: New file.
9876         * old_pthread_cond_timedwait.c: New file.
9877         * old_pthread_cond_wait.c: New file.
9878         * pthreadP.h: Add prototypes for the compatibility interfaces.
9880         * pthread_cond_destroy.c: Don't include <errno.h>.
9882 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9884         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9885         unnecessary zero offset when addressing MUTEX.
9887 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9889         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9890         __register_atfork.
9891         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9892         for __register_atfork.
9894 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9896         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9897         instead of ASSEMBLER test macro.
9899         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9900         __libc_current_sigrtmax): Add libc_hidden_def.
9902         * sysdeps/pthread/list.h: Remove assert.h include.
9904 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9906         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9907         __pthread_initialize_minimal_internal not
9908         __pthread_initialize_minimal.
9910 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9912         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9913         __pthread_initialize_minimal as hidden.
9915         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9916         constructor.
9918 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9920         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9921         $(common-objpfx)format.lds, include that into the output script.
9922         Fix comment.
9923         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9925 2002-12-28  Andreas Jaeger  <aj@suse.de>
9927         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9928         nsec resolution changes.
9929         (xstat64_conv): Likewise.
9930         (xstat32_conv): Likewise.
9931         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9932         struct kernel_stat.
9933         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9934         structs stat and stat64.
9935         * time/time.h (__timespec_defined): Define for __USE_MISC.
9936         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9938 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9940         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9941         argument.
9942         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9943         (pthread_exit): Use strong_alias to avoid warnings.
9944         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9945         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9946         ptr___pthread_attr_init_2_*.
9947         * init.c (pthread_functions): Adjust.
9949 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9951         * forward.c: Make all functions available by default again.  It
9952         caused too much trouble.
9954         * pt-siglongjmp.c: Removed.
9956 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9958         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9959         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9960         * sysdeps/i386/Makefile: New file.
9961         * sysdeps/i386/tcb-offsets.sym: New file.
9962         * sysdeps/pthread/tcb-offsets.h: New file.
9963         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9964         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9966         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9967         __register_atfork...
9968         (GLIBC_2.3.2): ...here.
9970 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9972         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9973         pthread_attr_setstackaddr with __attribute_deprecated__.
9975 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9977         * pt-system.c (system): Remove cancellation handling.
9978         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9979         cancellation routines.
9981 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9983         * descr.h: Include <dl-sysdep.h>.
9984         (struct pthread): Move header.data.list to the back of the struct.
9985         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9986         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9987         (SYSINFO_OFFSEET): Likewise.
9989 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9991         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9992         Define.
9993         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9994         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9995         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9996         (USE_DL_SYSINFO): Undef.
9998 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
10000         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
10001         $(common-objpfx)libc.so.
10002         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
10003         it is bigger than pipe buffer size even on arches with bigger
10004         page size.
10005         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10007 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10009         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10010         correct errno access for case that USE___THREAD is not defined.
10012 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10014         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10015         Patch by Marijn Ros <marijn@mad.scientist.com>.
10017 2002-12-22  Roland McGrath  <roland@redhat.com>
10019         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10021 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10023         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10025 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10027         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10028         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10029         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10031         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10032         of int $0x80.
10033         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10034         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10035         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10036         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10037         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10038         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10039         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10040         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10042         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10043         sysenter.
10044         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10046         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10048         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10049         in new TCB.
10050         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10051         that sysinfo is properly initialized.
10052         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10053         to 1 only for ld.so.
10055         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10056         RTLD_CORRECT_DYNAMIC_WEAK.
10058 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10060         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10061         Use return 0 as 6th argument to FORWARD4.
10062         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10064 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10066         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10067         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10068         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10069         (INIT_SYSINFO): New #define.
10070         (TLS_TP_INIT): Use INIT_SYSINFO.
10071         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10072         At test to make sure SYSINFO_OFFSET value is correct.
10073         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10075 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10077         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10078         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10079         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10080         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10081         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10082         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10083         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10085 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10087         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10088         macro instead of using int $0x80 directly.
10090         * sysdeps/pthread/bits/stdio-lock.h: New file.
10091         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10092         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10093         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10094         * Makefile (routines): Add libc-lowlevelmutex.
10096         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10097         __i686.get_pc_thunk.dx.
10099 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10101         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10102         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10103         ($(objpfx)tst-cancel-wrappers.out): New rule.
10104         * tst-cancel-wrappers.sh: New test.
10105         * tst-locale1.c: Include signal.h.
10106         (uselocale): Test static linking of __libc_current_sigrt*.
10108 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10110         * Makefile (tests): Add tst-cancel6.
10111         * tst-cancel6.c: New file
10113 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10115         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10116         Define meaningfully for assembler as well.
10117         * pthreadP.h (struct pthread_functions): Remove
10118         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10119         and ptr_pthread_attr_init_2_1 fields.
10120         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10121         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10122         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10123         (FORWARD3): Define using FORWARD4.
10124         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10125         versions.
10126         * pt-system.c: Remove duplicate stdlib.h include.
10128 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10130         * sem_init.c: Define sem_init@GLIBC_2.0.
10131         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10132         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10134         * flockfile.c: Moved to...
10135         * sysdeps/pthread/flockfile.c: ...here.  New file.
10136         * funlockfile.c: Moved to...
10137         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10138         * ftrylockfile.c: Moved to...
10139         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10141 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10143         * libc-cancellation.c: Guard both function with
10144         #if !defined NOT_IN_libc.
10145         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10146         automatically provided pthread wrappers.
10147         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10148         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10149         nor in libpthread.
10150         * pt-open.c: Removed.
10151         * pt-fcntl.c: Removed.
10152         * pt-fsync.c: Removed.
10153         * pt-lseek.c: Removed.
10154         * pt-msgrcv.c: Removed.
10155         * pt-msgsnd.c: Removed.
10156         * pt-msync.c: Removed.
10157         * pt-nanosleep.c: Removed.
10158         * pt-open64.c: Removed.
10159         * pt-pause.c: Removed.
10160         * pt-pread.c: Removed.
10161         * pt-pread64.c: Removed.
10162         * pt-pwrite.c: Removed.
10163         * pt-pwrite64.c: Removed.
10164         * pt-read.c: Removed.
10165         * pt-recv.c: Removed.
10166         * pt-recvfrom.c: Removed.
10167         * pt-recvmsg.c: Removed.
10168         * pt-send.c: Removed.
10169         * pt-sendto.c: Removed.
10170         * pt-sigtimedwait.c: Removed.
10171         * pt-sigwait.c: Removed.
10172         * pt-wait.c: Removed.
10173         * pt-waitpid.c: Removed.
10174         * pt-write.c: Removed.
10175         * pt-accept.c: Removed.
10176         * pt-close.c: Removed.
10177         * pt-connect.c: Removed.
10178         * pt-lseek64.c: Removed.
10179         * pt-sendmsg.c: Removed.
10180         * pt-tcdrain.c: Removed.
10182 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10184         * init.c (__pthread_initialize_minimal_internal): Renamed from
10185         __pthread_initialize_minimal.  Make old name an alias.  This
10186         converts a normal relocation into a relative relocation.
10188         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10190         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10191         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10192         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10193         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10194         pt-sigwaitinfo, pt-waitid, and pt-writev.
10195         * pt-creat.c: Removed.
10196         * pt-poll.c: Removed.
10197         * pt-pselect.c: Removed.
10198         * pt-readv.c: Removed.
10199         * pt-select.c: Removed.
10200         * pt-sigpause.c: Removed.
10201         * pt-sigsuspend.c: Removed.
10202         * pt-sigwaitinfo.c: Removed.
10203         * pt-waitid.c: Removed.
10204         * pt-writev.c: Removed.
10206         * init.c (pthread_functions): New variable.
10207         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10208         (or NULL) to __libc_pthread_init.
10209         * forward.c: Rewrite to use __libc:pthread_functions array to get
10210         function addresses.
10211         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10212         prototype.
10213         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10214         Take new parameter.  Copy content of variable pointed to by it
10215         to __libc_pthread_init.
10217         * pthreadP.h (struct pthread_functions): New type.
10218         (__libc_pthread_init): Declare.
10220         * pthread_attr_destroy.c: Add namespace protected alias.
10221         * pthread_attr_getdetachstate.c: Likewise.
10222         * pthread_attr_getinheritsched.c: Likewise.
10223         * pthread_attr_getschedparam.c: Likewise.
10224         * pthread_attr_getschedpolicy.c: Likewise.
10225         * pthread_attr_getscope.c: Likewise.
10226         * pthread_attr_setdetachstate.c: Likewise.
10227         * pthread_attr_setinheritsched.c: Likewise.
10228         * pthread_attr_setschedparam.c: Likewise.
10229         * pthread_attr_setschedpolicy.c: Likewise.
10230         * pthread_attr_setscope.c: Likewise.
10231         * pthread_cond_broadcast.c: Likewise.
10232         * pthread_cond_destroy.c: Likewise.
10233         * pthread_cond_init.c: Likewise.
10234         * pthread_cond_signal.c: Likewise.
10235         * pthread_cond_wait.c: Likewise.
10236         * pthread_condattr_destroy.c: Likewise.
10237         * pthread_condattr_init.c: Likewise.
10238         * pthread_equal.c: Likewise.
10239         * pthread_exit.c: Likewise.
10240         * pthread_getschedparam.c: Likewise.
10241         * pthread_self.c: Likewise.
10242         * pthread_setcancelstate.c: Likewise.
10243         * pthread_setschedparam.c: Likewise.
10244         * pthread_mutex_destroy.c: Likewise.
10245         * pthread_mutex_init.c: Likewise.
10246         * pthreadP.h: Add prototypes for the aliases.
10248         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10249         multiple_threads member in correct TCB to 1.
10251         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10252         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10253         member of thread decriptor, otherwise return unconditionally 1.
10255 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10257         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10258         regular Linux version.  Remove file.
10259         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10260         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10261         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10262         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10263         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10264         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10265         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10266         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10267         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10268         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10269         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10270         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10271         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10272         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10273         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10274         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10275         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10276         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10277         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10278         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10279         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10280         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10281         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10282         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10283         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10284         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10285         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10286         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10287         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10288         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10290 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10292         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10293         * sysdeps/unix/sysv/linux/open.c: Removed.
10294         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10295         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10296         * sysdeps/unix/sysv/linux/msync.c: Removed.
10297         * sysdeps/unix/sysv/linux/read.c: Removed.
10298         * sysdeps/unix/sysv/linux/close.c: Removed.
10299         * sysdeps/unix/sysv/linux/creat.c: Removed.
10300         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10301         * sysdeps/unix/sysv/linux/pause.c: Removed.
10302         * sysdeps/unix/sysv/linux/select.c: Removed.
10303         * sysdeps/unix/sysv/linux/write.c: Removed.
10305 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10307         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10308         element in TCB to see whether locking is needed.
10310         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10311         MULTIPLE_THREADS_OFFSET value is correct.
10313         * sysdeps/unix/sysv/linux/close.c: New file.
10314         * sysdeps/unix/sysv/linux/connect.S: New file.
10315         * sysdeps/unix/sysv/linux/creat.c: New file.
10316         * sysdeps/unix/sysv/linux/fsync.c: New file.
10317         * sysdeps/unix/sysv/linux/llseek.c: New file.
10318         * sysdeps/unix/sysv/linux/lseek.c: New file.
10319         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10320         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10321         * sysdeps/unix/sysv/linux/msync.c: New file.
10322         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10323         * sysdeps/unix/sysv/linux/open.c: New file.
10324         * sysdeps/unix/sysv/linux/open64.c: New file.
10325         * sysdeps/unix/sysv/linux/pause.c: New file.
10326         * sysdeps/unix/sysv/linux/poll.c: New file.
10327         * sysdeps/unix/sysv/linux/pread.c: New file.
10328         * sysdeps/unix/sysv/linux/pread64.c: New file.
10329         * sysdeps/unix/sysv/linux/pselect.c: New file.
10330         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10331         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10332         * sysdeps/unix/sysv/linux/readv.c: New file.
10333         * sysdeps/unix/sysv/linux/recv.S: New file.
10334         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10335         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10336         * sysdeps/unix/sysv/linux/select.c: New file.
10337         * sysdeps/unix/sysv/linux/send.S: New file.
10338         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10339         * sysdeps/unix/sysv/linux/sendto.S: New file.
10340         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10341         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10342         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10343         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10344         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10345         * sysdeps/unix/sysv/linux/system.c: New file.
10346         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10347         * sysdeps/unix/sysv/linux/wait.c: New file.
10348         * sysdeps/unix/sysv/linux/waitid.c: New file.
10349         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10350         * sysdeps/unix/sysv/linux/writev.c: New file.
10351         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10353         * pt-readv.c: Fix comment.
10355 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10357         * tst-cleanup1.c: Include stdlib.h.
10359         * tst-cancel5.c: New test.
10360         * Makefile (tests): Add tst-cancel5.
10361         (tst-cancel5): Link against libc.so libpthread.so in that order.
10363 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10365         * forward.c (test_loaded): Prevent recursive calls.
10367         * Makefile (routines): Add libc-cancellation.
10368         * libc-cancellation.c: New file.
10369         * descr.h (struct pthread): Add multiple_threads field.
10370         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10371         new thread descriptor to 1.
10372         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10373         Initialize multiple_thread field after successful thread creation.
10374         * cancellation.c (__do_cancel): Move to pthreadP.h.
10375         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10376         (__pthread_disable_asynccancel): Add internal_function attribute.
10377         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10378         * pthread_setcancelstate.c: Likewise.
10379         * pthread_setcanceltype.c: Likewise.
10380         * pthread_exit.c: Likewise.
10381         * pthreadP.h (CANCELLATION_P): Likewise.
10382         (__do_cancel): Define as static inline.
10383         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10384         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10385         declarations.
10386         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10387         fields.  Define MULTIPLE_THREADS_OFFSET.
10388         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10389         declaration.
10390         * sysdeps/unix/sysv/linux/accept.S: New file.
10391         * sysdeps/unix/sysv/linux/read.c: New file.
10392         * sysdeps/unix/sysv/linux/write.c: New file.
10393         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10394         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10395         initialization of __libc_locking_needed.
10396         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10397         __libc_locking_needed, use multiple_threads field in TCB.
10398         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10400 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10402         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10403         version.
10404         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10406         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10407         access to __libc_locking_needed for PIC.
10409 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10411         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10412         declare for libc.so.
10413         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10414         expression.
10415         (__libc_lock_lock): Put into statement expression.
10416         (__libc_lock_unlock): Remove trailing semicolon.
10417         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10419 2002-12-12  Roland McGrath  <roland@redhat.com>
10421         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10422         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10424 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10426         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10427         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10428         Initialize __libc_locking_needed.
10429         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10430         instead of __register_pthread_fork_handler.
10431         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10432         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10433         fork-gen with libc_pthread_init.
10434         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10435         of __register_pthread_fork_handler.
10436         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10437         of __register_pthread_fork_handler.
10438         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10439         __libc_locking_needed to determine whether lock prefix can be avoided.
10440         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10442 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10444         * Makefile (tests): Add tst-cleanup1.
10445         * tst-cleanup1.c: New file.
10446         * cancellation.c (__cleanup_thread): Removed.
10447         (__do_cancel): Remove call to __cleanup_thread.
10448         * pthreadP.h: Remove __cleanup_thread prorotype.
10450         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10451         Remember function and argument even if cancellation handler
10452         function is not available.
10453         (__libc_cleanup_region_end): Execute registered function directly if
10454         pthread functions are not available.
10455         (__libc_cleanup_end): Likewise.
10457         * init.c (__pthread_initialize_minimal): Fix initialization in
10458         static lib by preventing gcc from being too clever.
10460 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10462         * init.c (__pthread_initialize_minimal): Remove unneccesary
10463         sigaddset call.
10465         * Makefile (tests): We can run tst-locale2 now.
10467 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10469         * Versions: Remove duplicated sigwait entry.
10471 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10473         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10474         inside libpthread.
10476         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10478         * pthreadP.h: Declare __pthread_enable_asynccancel and
10479         __pthread_disable_asynccancel.
10480         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10481         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10482         * cancellation.c (__pthread_enable_asynccancel): New function.
10483         (__pthread_disable_asynccancel): New function.
10484         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10485         * pt-close.c: Likewise.
10486         * pt-connect.c: Likewise.
10487         * pt-creat.c: Likewise.
10488         * pt-fcntl.c: Likewise.
10489         * pt-fsync.c: Likewise.
10490         * pt-lseek.c: Likewise.
10491         * pt-lseek64.c: Likewise.
10492         * pt-msgrcv.c: Likewise.
10493         * pt-msgsnd.c: Likewise.
10494         * pt-msync.c: Likewise.
10495         * pt-nanosleep.c: Likewise.
10496         * pt-open.c: Likewise.
10497         * pt-open64.c: Likewise.
10498         * pt-pause.c: Likewise.
10499         * pt-poll.c: Likewise.
10500         * pt-pread.c: Likewise.
10501         * pt-pread64.c: Likewise.
10502         * pt-pselect.c: Likewise.
10503         * pt-pwrite.c: Likewise.
10504         * pt-pwrite64.c: Likewise.
10505         * pt-read.c: Likewise.
10506         * pt-readv.c: Likewise.
10507         * pt-recv.c: Likewise.
10508         * pt-recvfrom.c: Likewise.
10509         * pt-recvmsg.c: Likewise.
10510         * pt-select.c: Likewise.
10511         * pt-send.c: Likewise.
10512         * pt-sendmsg.c: Likewise.
10513         * pt-sendto.c: Likewise.
10514         * pt-sigpause.c: Likewise.
10515         * pt-sigsuspend.c: Likewise.
10516         * pt-sigtimedwait.c: Likewise.
10517         * pt-sigwait.c: Likewise.
10518         * pt-sigwaitinfo.c: Likewise.
10519         * pt-system.c: Likewise.
10520         * pt-tcdrain.c: Likewise.
10521         * pt-wait.c: Likewise.
10522         * pt-waitid.c: Likewise.
10523         * pt-waitpid.c: Likewise.
10524         * pt-write.c: Likewise.
10525         * pt-writev.c: Likewise.
10526         * pthread_join.c: Likewise.
10527         * pthread_timedjoin.c: Likewise.
10529         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10530         (__xpg_sigpause): New function.
10531         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10533 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10535         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10537         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10538         _GI_pthread_cleanup_pop to pthreadP.h.
10540         * ftrylockfile.c: Use _IO_lock_trylock instead of
10541         pthread_mutex_trylock.
10543         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10544         (CANCEL_RESET): Likewise.
10545         (__pthread_setcanceltype_): Declare.
10546         (__pthread_mutex_lock_internal): Declare.
10547         (__pthread_mutex_unlock_internal): Declare.
10548         (__pthread_once_internal): Declare.
10549         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10550         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10552         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10553         and pthread_mutex_unlock.
10554         * pthread_cond_wait.c: Likewise.
10555         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10556         * pthread_mutex_unlock.c: Likewise.
10558         * pthread_setcanceltype.c: Add additional alias
10559         __pthread_setcanceltype.
10561         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10562         * sem_open.c (sem_open): Likewise.
10563         Use __libc_open, __libc_write, and __libc_close instead of
10564         open, write, and close respectively.
10566         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10567         Rewrite as statement expression since it must return a value.
10569         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10570         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10571         __pthread_kill.
10573         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10574         alias __pthread_once_internal.
10576         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10578 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10580         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10581         * tst-stdio1.c: New file.
10582         * tst-stdio2.c: New file.
10584         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10586         * Makefile (tests): Comment out tst-locale2 for now.
10587         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10589         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10590         -D_IO_MTSAFE_IO.
10591         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10592         Use _IO_lock_init instead of explicit assignment.
10594         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10595         Define __libc_lock_* and __libc_lock_recursive macros with
10596         lowlevellock macros, not pthread mutexes.
10598         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10599         of pthread_mutex_lock.
10600         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10601         instead of pthread_mutex_unlock.
10603 2002-12-06  Roland McGrath  <roland@redhat.com>
10605         * allocatestack.c (__stack_user): Use uninitialized defn.
10606         * init.c (__pthread_initialize_minimal): Initialize it here.
10608 2002-12-05  Roland McGrath  <roland@redhat.com>
10610         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10611         string.
10612         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10614         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10615         missing & here too.
10617 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10619         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10620         lowlevellock.
10621         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10622         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10623         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10624         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10625         for __libc_lock_* macros.
10626         * Makefile (routines): Add libc-lowlevellock.
10628 2002-10-09  Roland McGrath  <roland@redhat.com>
10630         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10631         Under [__PIC__], call the function via the pointer fetched for
10632         comparison rather than a call by name that uses the PLT.
10633         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10634         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10635         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10636         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10637         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10639 2002-12-04  Roland McGrath  <roland@redhat.com>
10641         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10643         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10644         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10646         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10648 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10650         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10651         a completely opaque, non-integer type.
10652         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10654 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10656         * sysdeps/i386/tls.h: Include stdlib.h.
10657         * sysdeps/x86_64/tls.h: Likewise.
10659 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10661         * Makefile (tests): Add tst-locale2.
10662         (tests-static): Likewise.
10663         * tst-locale2.c: New file.
10665         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10666         volatile and add memory clobbers to lock operations.
10668 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10670         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10671         * sysdeps/i386/i486/bits/atomic.h: New file.
10672         * sysdeps/i386/i586/bits/atomic.h: New file.
10673         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10674         include i486 version.
10675         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10676         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10677         Patch by Marijn Ros <marijn@mad.scientist.com>.
10679         * allocatestack.c (get_cached_stack): Don't crash if we first
10680         found a stack with a larger size then needed.
10681         Reported by Hui Huang <hui.huang@sun.com>.
10683         * Makefile (tests): Add tst-sysconf.
10684         * tst-sysconf.c: New file.
10686         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10687         PTHREAD_THREADS_MAX.
10689 2002-12-02  Roland McGrath  <roland@redhat.com>
10691         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10692         Declare using hidden_proto instead of attribute_hidden, so there are
10693         non-.hidden static symbols for gdb to find.
10694         (__pthread_keys): Likewise.
10695         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10696         * allocatestack.c (__stack_user): Likewise.
10697         * pthread_create.c (__pthread_keys): Likewise.
10698         (__nptl_threads_events, __nptl_last_event): Make these static instead
10699         of hidden.
10700         * pthread_key_create.c (__pthread_pthread_keys_max,
10701         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10703 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10705         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10706         statically.
10707         * tst-locale1.c: New file.
10709         * pthread_cond_timedwait.c: Include <stdlib.h>.
10711         * Makefile (tests): Add tst-fork2 and tst-fork3.
10712         * tst-fork2.c: New file.
10713         * tst-fork3.c: New file.
10715 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10717         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10719         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10720         require it to 200112L.
10722         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10723         instruction only if HAVE_CMOV is defined.
10724         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10726         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10728         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10730         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10732         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10734 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10736         * sysdeps/x86_64/bits/atomic.h: New file.
10738         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10739         16-bit operations.
10741         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10742         possible since gettid cannot fail.
10744         * sysdeps/x86_64/pthreaddef.h: New file.
10746         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10748         * sysdeps/x86_64/pthread_spin_init.c: New file.
10749         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10750         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10751         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10753         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10754         Add missing lock prefix.  Minute optimization.
10756         * tst-spin2.c (main): Also check successful trylock call.
10758         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10759         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10761         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10762         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10764         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10765         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10766         value in case of an error.  Add support for INTERNAL_SYSCALL.
10768         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10769         value in case of an error.
10771         * sysdeps/x86_64/tls.h: New file.
10773 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10775         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10776         takes the array member name and the index as parameters.
10777         (THREAD_SETMEM_NC): Likewise.
10778         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10779         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10780         interfaces.
10782         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10783         to decide which code to use.
10784         (THREAD_SETMEM_NC): Likewise.
10786         * allocatestack.c (queue_stack): Don't remove stack from list here.
10787         Do it in the caller.  Correct condition to prematurely terminate
10788         loop to free stacks.
10789         (__deallocate_stack): Remove stack from list here.
10791 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10793         * Makefile (tests): Add tst-stack1.
10794         * tst-stack1.c: New file.
10796         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10797         provided stack.
10799         * pthread_attr_getstack.c: Return bottom of the thread area.
10801 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10803         * Makefile (libpthread-routines): Add pt-allocrtsig and
10804         pthread_kill_other_threads.
10805         * pt-allocrtsig.c: New file.
10806         * pthread_kill_other_threads.c: New file.
10807         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10808         all three functions.
10809         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10810         allocrtsig.
10811         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10812         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10813         and __libc_allocate_rtsig_private.
10814         * Versions (libpthread): Export pthread_kill_other_threads_np,
10815         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10817 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10819         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10820         the end of the stack.  Adjust computations.
10821         When mprotect call fails dequeue stack and free it.
10822         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10823         attribute.
10824         * pthread_getattr_np.c: Likewise.
10826         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10827         surprises.
10829 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10831         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10832         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10834 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10836         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10837         * pthread_setspecific.c: Likewise.
10839 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10841         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10842         definitions.  Get them from the official place.
10843         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10845         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10846         Use new CLONE_ flags in clone() calls.
10848         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10849         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10851         * Versions: Add pthread_* functions for libc.
10852         * forward.c: New file.
10854         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10855         errno-loc.
10856         * herrno.c: New file.
10857         * res.c: New file.
10859         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10860         sem_trywait, and sem_timedwait.  Add herrno and res.
10861         * sem_init.c: Don't initialize lock and waiters members.
10862         * sem_open.c: Likewise.
10863         * sem_post.c: Removed.
10864         * sem_wait.c: Removed.
10865         * sem_trywait.c: Removed.
10866         * sem_timedwait.c: Removed.
10867         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10868         Includes full implementations of sem_post, sem_wait, sem_trywait,
10869         and sem_timedwait.
10870         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10871         for new implementation.
10872         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10873         and waiters fields.
10875         * tst-sem3.c: Improve error message.
10876         * tst-signal3.c: Likewise.
10878         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10879         to tell the kernel about the termination futex and to initialize tid
10880         member.  Don't initialize main_thread.
10881         * descr.h (struct pthread): Remove main_thread member.
10882         * cancelllation.c (__do_cancel): Remove code handling main thread.
10883         The main thread is not special anymore.
10885         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10886         size of the stacks to stack_cache_actsize.
10888         * pt-readv.c: Add missing "defined".
10889         * pt-sigwait.c: Likewise.
10890         * pt-writev.c: Likewise.
10892 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10894         * Versions: Export __connect from libpthread.
10895         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10897         * Makefile (libpthread-routines): Add pt-raise.
10898         * sysdeps/unix/sysv/linux/raise.c: New file.
10899         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10900         * sysdeps/generic/pt-raise.c: New file.
10902         * pthread_cond_init.c: Initialize all data elements of the condvar
10903         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10905         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10906         * pthread_create.c: Likewise.
10908         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10909         * tst-key1.c: New file.
10910         * tst-key2.c: New file.
10911         * tst-key3.c: New file.
10913         * Versions: Export pthread_detach for version GLIBC_2.0.
10914         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10916 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10918         * pthread_key_create.c: Terminate search after an unused key was found.
10919         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10921         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10922         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10924 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10926         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10927         dynamic lookup for errno in PIC.
10929         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10930         release the stack lock as soon as possible.
10931         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10932         the static TLS block.
10933         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10935         * cancellation.c: Renamed from cancelation.c.
10936         * Makefile: Adjust accordingly.
10937         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10938         * cleanup_defer.c: Use CANCELLATION_P.
10939         * pthread_testcancel.c: Likewise.
10940         * descr.h: Fix spelling in comments.
10941         * init.c: Likewise.
10942         * pthread_getattr_np.c: Likewise.
10943         * pthread_getschedparam.c: Likewise.
10944         * pthread_setschedparam.c: Likewise.
10945         * Versions: Likewise.
10947         * pt-pselect.c: New file.
10948         * Makefile (libpthread-routines): Add pt-pselect.
10949         * Versions: Add pselect.
10951         * tst-cancel4.c: New file.
10952         * Makefile (tests): Add tst-cancel4.
10954 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10956         * pthread_mutex_lock.c: Always record lock ownership.
10957         * pthread_mutex_timedlock.c: Likewise.
10958         * pthread_mutex_trylock.c: Likewise.
10960         * pt-readv.c: New file.
10961         * pt-writev.c: New file.
10962         * pt-creat.c: New file.
10963         * pt-msgrcv.c: New file.
10964         * pt-msgsnd.c: New file.
10965         * pt-poll.c: New file.
10966         * pt-select.c: New file.
10967         * pt-sigpause.c: New file.
10968         * pt-sigsuspend.c: New file.
10969         * pt-sigwait.c: New file.
10970         * pt-sigwaitinfo.c: New file.
10971         * pt-waitid.c: New file.
10972         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10973         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10974         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10975         * Versions: Add all the new functions.
10977         * tst-exit1.c: New file.
10978         * Makefile (tests): Add tst-exit1.
10980         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10982 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10984         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10986         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10987         call.  pthread_join is an official cancellation point.
10988         * pthread_timedjoin.c: Likewise.
10990         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10991         and the condvar's mutex are retrieved.
10992         * pthread_cond_timedwait.c: Likewise.
10993         Reported by dice@saros.East.Sun.COM.
10995 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10997         * pthreadP.h: Cut out all type definitions and move them...
10998         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10999         * pthreadP.h: Include <internaltypes.h>.
11001         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
11002         performance tweaks.
11004         * sem_trywait.c: Shuffle #includes around to get right order.
11005         * sem_timedwait.c: Likewise.
11006         * sem_post.c: Likewise.
11007         * sem_wait.c: Likewise.
11009         * nptl 0.3 released.
11011         * Makefile (tests): Add tst-signal3.
11012         * tst-signal3.c: New file.
11014 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11016         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11017         the asms modify the sem object.
11018         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11020         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11021         the actual members.
11022         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11023         * semaphoreP.h: Include pthreadP.h.
11024         * sem_getvalue.c: Adjust to sem_t change.
11025         * sem_init.c: Likewise.
11026         * sem_open.c: Likewise.
11027         * sem_post.c: Likewise.
11028         * sem_timedwait.c: Likewise.
11029         * sem_trywait.c: Likewise.
11030         * sem_wait.c: Likewise.
11032 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11034         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11035         * tst-basic2.c: New file.
11036         * tst-exec1.c: New file.
11037         * tst-exec2.c: New file.
11038         * tst-exec3.c: New file.
11040         * tst-fork1.c: Remove extra */.
11042         * nptl 0.2 released.  The API for IA-32 is complete.