Fix memory leak in TLS of loaded objects.
[glibc.git] / nptl / ChangeLog
blobd7dc113832aa8b46fcdc3805c0f6e765fbf07811
1 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
3         [BZ #12650]
4         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
5         clearing memory.
6         Patch partly by Robert Rex <robert.rex@exasol.com>.
8 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
10         [BZ #10484]
11         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
12         * alloca_cutoff.c: Add libc_hidden_def.
14 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
16         * nptl/sysdeps/unix/sysv/linux/i386/Makefile: New file.
18 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
20         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
22 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
24         [BZ #12113]
25         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
26         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
27         of "struct pthread".
29 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
31         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
32         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
34 2009-11-27  Andreas Schwab  <schwab@redhat.com>
36         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
37         THREAD_SELF->cancelhandling after returning from futex call.
39 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
41         [BZ #4457]
42         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
43         LIBGCC_S_SO.
44         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
46 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
48         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
50         [BZ #3270]
51         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
52         steps to avoid races with creation and terminations.
53         * nptl-init.c (sighandler_setxid): Adjust.
54         Patch by Daniel Jacobowitz.
56 2009-09-07  Andreas Schwab  <schwab@redhat.com>
58         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
60 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
61             Joseph Myers  <joseph@codesourcery.com>
63         [BZ #7094]
64         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
65         Initialize the sigev_notify field for newly created timer to make sure
66         the timer gets deleted from the active timer's list upon timer_delete.
68 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
70         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
71         Correct a logic error.
73 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
75         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
76         of the field in local variables.
77         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
78         variable and don't unconditionally clear it.
80 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
82         * pthread_create.c (start_thread): Hint to the kernel that memory for
83         the stack can be reused.  We do not mark all the memory.  The part
84         still in use and some reserve are kept.
86 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
88         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
90 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
92         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
93         directives.
95 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
97         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
98         directives.
99         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
101 2009-08-10  Andreas Schwab  <schwab@redhat.com>
103         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
104         (__pthread_cond_signal): Don't clobber register used for syscall
105         number.
107 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
109         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
110         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
113         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
114         register.
116 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
118         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
119         enabled by the special *_asynccancel functions.
120         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
123         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
125 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
127         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
128         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
129         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
130         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
131         since we can assume the special __*_{en,dis}able_asynccancel
132         functions.
133         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
134         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
135         and PTHREAD_CANCELED.
137 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
139         * descr.h: Better definition of *_BITMASK macros for cancellation.
141 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
143         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
145         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
146         dynamic linker might have to save.
147         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
148         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
149         printing.
151         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
153 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
155         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
156         New function.
157         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
158         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
159         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
160         requeue_pi for robust mutexes.
161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
162         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
163         Don't only skip __pthread_mutex_cond_lock.  Call instead
164         __pthread_mutex_cond_lock_adjust.
165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
167         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
168         optimization of PI mutex handling.
170 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
172         [BZ #10418]
173         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
174         instead of of _acq variants of cmpxchg.
176 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
178         * sysdeps/x86_64/configure.in: New file.
180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
181         path when not using absolute timeout futex.
183 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
185         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
186         optimizations of last changes.
187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
189 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
191         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
192         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
193         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
194         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
195         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
197         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
198         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
201         (__pthread_cond_timedwait): Make more robust.
203 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
205         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
206         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
207         directly use absolute timeout.
209         * tst-sem5.c (do_test): Add test for premature timeout.
210         * Makefile: Linu tst-sem5 with librt.
212         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
213         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
214         directly use absolute timeout.
215         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
216         (pthread_rwlock_timedrdlock): Likewise.
218         * tst-cond11.c (run_test): Add test to check that the timeout is
219         long enough.
221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
222         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
223         directly use absolute timeout.
225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
226         (__pthread_cond_wait): Convert to using exception handler instead of
227         registered unwind buffer.
228         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
229         (__pthread_cond_timedwait): Likewise.
231 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
233         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
234         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
235         use absolute timeout.
237         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
238         handling of uncontested semaphore.
240         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
241         (__condvar_cleanup): Rewrite to use cfi directives instead of
242         hand-coded unwind tables.
243         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
244         Likewise.
245         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
246         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
247         Likewise.
249 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
251         * Makefile (libpthread-routines): Add pthread_sigqueue.
252         * Versions: Add pthread_sigqueue for GLIBC_2.11.
253         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
254         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
256 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
258         [BZ #10262]
259         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
260         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
261         cannot be assumed.
262         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
264 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
266         * libc-cancellation.c: Move __libc_cleanup_routine to...
267         * libc-cleanup.c: ...here.  New file.
268         * Makefile (routines): Add libc-cleanup.
270         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
271         test.
272         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
273         * sysdeps/pthread/librt-cancellation.c: Likewise.
275         [BZ #9924]
276         * nptl-init.c: Renamed from init.c.
277         * Makefile: Change all occurences of init.c to nptl-init.c.
279 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
281         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
282         to test when deciding on the delay.
283         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
284         * pthread_cancel.c: Close race between deciding on sending a signal
285         and setting the CANCELING_BIT bit.
287         * cancellation.c (__pthread_disable_asynccancel): Don't return if
288         thread is canceled.
289         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
291 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
293         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
294         is available.
295         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
296         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
297         * sysdeps/i386/tls.h: Likewise.
298         (tcbhead_t): Add __private_tm member.
300 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
302         * sem_open.c (sem_open): Rewrite initialization of initsem to
303         avoid warnings.
305         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
306         Avoid warning by using may_alias attribute on ptrhack.
308 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
310         [BZ #10090]
311         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
312         Check policy and priority for validity.
313         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
315 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
317         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
318         (__pthread_cond_timedwait): Change to use cfi directives instead of
319         hand-coded unwind sections.
321 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
323         * init.c (nptl_freeres): Compile only for SHARED.
325 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
327         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
328         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
329         FUTEX_BITSET_MATCH_ANY.
331 2009-02-27  Roland McGrath  <roland@redhat.com>
333         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
334         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
336 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
338         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
339         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
340         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
341         200112L to 200809L.
343 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
345         * sysdeps/pthread/pthread.h: The robust mutex functions are in
346         POSIX 2008.
348 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
350         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
351         Unify name of include protector macro.
353 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
355         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
356         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
358 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
360         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
361         pointer variables.
363         * allocatestack.c (__free_stacks): Renamed from free_stacks.
364         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
365         * init.c (nptl_freeres): New function.
366         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
367         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
368         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
369         variable.
370         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
371         load DSO.  Assign last.
372         (__unwind_freeres): New function.
374         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
375         for better debugging.  No need to use stack_list_add here.
377 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
379         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
380         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
381         instead of computing relative timeout.
382         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
383         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
385 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
387         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
389 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
391         * sysdeps/pthread/list.h (list_add): Initialize new element first.
392         (list_add_tail): Removed.
394 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
396         * (in_flight_stack): New variable.
397         (stack_list_del): New function.  Use instead of list_del.
398         (stack_list_add): New function.  Use instead of list_add when adding to
399         stack_cache and stack_used lists.
400         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
401         when the fork call interrupted another thread.
403 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
405         * init.c (__pthread_initialize_minimal_internal): Optimize test
406         FUTEX_CLOCK_REALTIME a bit.
408 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
410         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
411         only passing five parameters to FUTEX_WAIT_BITSET call.
413         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
414         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
415         instead of computing relative timeout.
417 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
419         * init.c (__pthread_initialize_minimal_internal): Check for
420         FUTEX_CLOCK_REALTIME flag.
421         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
422         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
423         relative timeout.
425         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
426         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
427         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
428         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
429         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
430         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
432 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
434         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
435         loop body instead of ; to avoid gcc warnings.
436         (pthread_cleanup_pop_restore_np): Likewise.
437         Patch by Caolán McNamara <caolanm@redhat.com>.
439 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
441         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
442         fast path here, for robust/PI/PP mutexes call
443         __pthread_mutex_lock_full.  Don't use switch, instead use a series
444         of ifs according to their probability.
445         (__pthread_mutex_lock_full): New function.
446         * pthread_mutex_unlock.c: Include assert.h.
447         (__pthread_mutex_unlock_usercnt): Handle only the
448         fast path here, for robust/PI/PP mutexes call
449         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
450         of ifs according to their probability.
451         (__pthread_mutex_unlock_full): New function.
452         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
453         (__pthread_mutex_lock_full): Define.
455 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
457         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
458         implementation.  Add necessary padding and.
459         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
460         words.
462 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
464         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
465         and FUTEX_WAKE_BITSET.
467 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
469         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
470         and FUTEX_WAKE_BITSET.
471         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
472         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
473         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
474         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
476 2008-11-25  Roland McGrath  <roland@redhat.com>
478         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
479         Subdirectories moved to ports repository as
480         sysdeps/.../nptl subdirectories.
482 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
484         [BZ #7008]
485         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
486         of old value.
487         * pthread_cond_init.c (__pthread_cond_init): Fix
488         cond->__data.__nwaiters initialization.
489         * Makefile (tests): Add tst-cond23.
490         * tst-cond23.c: New test.
492 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
494         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
495         arguments.
496         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
497         arguments.
499 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
501         [BZ #6955]
502         * pthread_mutex_lock.c: Add support for private PI mutexes.
503         * pthread_mutex_timedlock.c: Likewise.
504         * pthread_mutex_trylock.c: Likewise.
505         * pthread_mutex_unlock.c: Likewise.
506         Patch mostly by Ben Jackson <ben@ben.com>.
508 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
510         [BZ #6843]
511         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
512         Increase stack size for helper thread.
514 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
516         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
517         assembly with a clobber list for access registers a0 and a1.
519 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
521         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
522         to force runp->refcntr to be read from memory.
524 2008-09-08  Richard Guenther  <rguenther@suse.de>
526         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
527         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
528         lll_timedlock, lll_robust_timedlock, lll_unlock,
529         lll_robust_unlock): Promote private to int.
531 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
533         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
534         ARCH_RETRY_MMAP definitions.
535         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
536         Define MAP_STACK when not defined.
537         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
538         handling of ARCH_RETRY_MMAP.
540 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
542         * tst-align2.c (f): Print message that f is reached.
544 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
546         [BZ #6740]
547         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
548         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
550 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
552         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
553         SOCK_CLOEXEC if possible.
555 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
557         * Makefile (tests): Add tst-rwlock2a.
558         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
559         * tst-rwlock2a.c: New file.
561 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
563         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
565 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
567         * sysdeps/pthread/pthread.h: Fix typo in comment.
569 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
571         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
572         of CPU set to the kernel.
574 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
576         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
577         cfi directives.
578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
580         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
581         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
582         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
583         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
585 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
587         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
588         cfi directives.
589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
590         Likewise.
591         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
592         Likewise.
593         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
594         Likewise.
596 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
598         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
600 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
602         David S. Miller  <davem@davemloft.net>
604         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
606 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
608         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
609         __pshared correctly.
610         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
611         Likewise.
612         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
613         Likewise.
614         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
615         Likewise.
616         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
617         Likewise.
618         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
620 2008-04-14  David S. Miller  <davem@davemloft.net>
622         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
623         (__old_sem_wait): Fix argument to lll_futex_wait().
625 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
627         * pthread_create.c: Require pthread_mutex_trylock and
628         pthread_key_delete for libgcc.
630 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
632         [BZ #6020]
633         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
634         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
635         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
637 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
639         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
640         <linux/limits.h> has defined it.
641         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
642         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
643         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
644         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
646 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
648         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
649         of ASSEMBLER.
650         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
651         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
653 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
655         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
656         HAVE_DL_DISCOVER_OSVERSION.
657         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
658         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
660 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
662         [BZ #5778]
663         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
664         _POSIX_CHOWN_RESTRICTED value to zero.
666 2008-01-31  Roland McGrath  <roland@redhat.com>
668         * Makefile (omit-deps): Variable removed.
670 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
672         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
673         unnecessary addr32 prefix.
675 2008-01-29  Roland McGrath  <roland@redhat.com>
677         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
679 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
681         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
683 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
685         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
686         a scratch register.
687         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
688         (__lll_lock_wait_private): Fix typo.
689         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
690         (pthread_barrier_wait): Likewise.  Adjust XADD use.
691         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
692         Adjust XADD use.
693         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
694         (pthread_rwlock_timedrdlock): Return correct return value.
695         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
696         (pthread_rwlock_timedwrlock): Likewise.
698 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
700         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
701         thread returns the program exits with an error code.
703 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
705         * pthread-errnos.sym: Add EOVERFLOW.
706         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
707         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
708         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
709         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
711 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
713         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
714         parameter.  Passed it as permission to mmap.
715         * allocatestack.c (allocate_stack): Pass prot as second parameter
716         to ARCH_RETRY_MMAP.
718 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
720         * tst-basic7.c: Allocate memory for the stack.
722         [BZ #5465]
723         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
724         (__pthread_cond_timedwait): Don't use VDSO.
725         Patch by Michal Januszewski.
727 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
729         [BZ #5455]
730         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
731         Allow label before pthread_cleanup_pop.
732         (pthread_cleanup_pop_restore_np): Likewise.
734 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
736         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
737         Store 2 before returning ETIMEDOUT.
739 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
741         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
742         Store 2 before returning ETIMEDOUT.
743         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
744         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
745         (__lll_lock_wait_private): Optimize.
746         (__lll_lock_wait): Likewise.
748 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
750         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
751         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
752         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
754 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
756         [BZ #5240]
757         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
758         If we time out, try one last time to lock the futex to avoid
759         losing a wakeup signal.
760         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
761         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
763         [BZ #5245]
764         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
765         if necessary.
767 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
769         [BZ #5245]
770         * allocatestack.c (allocate_stack): Change ENOMEM error in case
771         mmap failed to EAGAIN.
772         * Makefile (tests): Add tst-basic7.
773         * tst-basic7.c: New file.
775 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
777         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
778         Use __linkin_atfork.
780 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
782         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
783         missing line continuations.
784         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
785         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
787 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
789         [BZ #5220]
790         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
791         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
792         (struct timer): Add next element.
793         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
794         enqueue timer structure into __active_timer_sigev_thread list.
795         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
796         remove timer struct from __active_timer_sigev_thread.
797         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
798         Before using timer structure make sure it is still on the
799         __active_timer_sigev_thread list.  Keep lock until done.
800         Define __active_timer_sigev_thread and
801         __active_timer_sigev_thread_lock.
803 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
805         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
806         Redefine thread_atfork for use of ATFORK_MEM.
807         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
808         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
809         function.
810         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
811         Use atomic operation when removing first element of list.
813 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
815         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
816         routine instead of an alias to __new_sem_post.
818 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
820         * init.c (__pthread_initialize_minimal): Initialize word to appease
821         valgrind.
823 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
825         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
826         libc.so just clear NAME.
827         (__libc_rwlock_fini): Nop inside of libc.so.
828         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
829         all zeros.
831 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
833         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
834         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
835         unlocking failed.
836         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
838 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
840         [BZ #4938]
841         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
842         reclaimed stack if necessary.
843         * Makefile (tests): Add tst-tsd6.
844         * tst-tsd6.c: New file.
846 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
848         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
849         Add private argument.
851 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
853         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
854         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
856 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
858         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
859         (__lll_robust_timedlock): Pass private as last argument to
860         __lll_robust_timedlock_wait.
861         (__lll_unlock): Fix a pasto.
863 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
865         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
866         sparc_old_sem): New structs.
867         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
868         (__sem_wait_cleanup): New function.
869         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
870         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
871         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
872         lll_futex_wait.
873         (__old_sem_wait): New function.
874         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
875         nptl/sysdeps/unix/sysv/linux/sparc version.
876         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
877         Likewise.
878         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
879         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
880         (__new_sem_trywait): Use sparc_old_sem structure.
881         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
882         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
883         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
884         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
885         lll_futex_timed_wait.
886         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
887         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
888         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
889         lll_futex_wake.
890         (__old_sem_post): New function.
891         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
892         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
893         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
894         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
895         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
896         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
898 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
900         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
901         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
902         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
903         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
904         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
905         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
906         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
907         Use FUTEX_WAKE_OP.
908         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
909         kernel-features.h and tcb-offsets.h.
910         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
911         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
912         process private.
913         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
914         tcb-offsets.h.
915         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
916         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
917         process private.
918         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
919         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
920         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
921         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
922         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
923         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
924         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
926 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
928         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
929         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
930         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
931         lll_futex_timed_wait.
933         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
934         __lll_robust_unlock): Rewrite as macros instead of inline functions.
935         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
936         __lll_robust_unlock, __lll_wait_tid): Likewise.
938 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
940         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
941         Fix a pasto.
942         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
943         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
944         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
945         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
947         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
948         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
950         kernel-features.h.
951         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
952         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
953         process private.  Switch DW_CFA_advance_loc1 and some
954         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
955         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
956         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
957         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
958         process private.  Switch DW_CFA_advance_loc{1,2} and some
959         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
960         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
961         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
962         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
963         Likewise.
964         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
965         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
966         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
967         Likewise.
968         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
969         (__pthread_cond_broadcast): Compare %r8 instead of
970         dep_mutex-cond_*(%rdi) with $-1.
971         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
972         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
973         of oring.
975 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
977         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
979 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
981         * allocatestack.c: Include kernel-features.h.
982         * pthread_create.c: Likewise.
983         * pthread_mutex_init.c: Likewise.
984         * init.c: Likewise.
985         * pthread_cond_timedwait.c: Likewise.
986         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
987         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
988         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
989         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
993         Likewise.
994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
995         Likewise.
996         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
997         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
998         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
999         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1001 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
1003         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1004         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1005         byte elements.  One of them is the new __shared element.
1006         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1007         adjust names of other padding elements.
1008         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1009         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
1010         byte elements.  One of them is the new __shared element.
1011         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
1012         adjust names of other padding elements.
1013         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
1014         Renamed __pad1 element to __shared, adjust names of other padding
1015         elements.
1016         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1017         (pthread_rwlock_t): Likewise.
1018         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
1019         typo.
1021 2007-08-09  Anton Blanchard  <anton@samba.org>
1023         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
1025 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
1027         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
1028         <kernel-features.h>.
1029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1031 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
1033         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
1034         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
1035         dealing with robust mutexes.
1036         * pthread_mutex_timedlock.c: Likewise.
1037         * pthread_mutex_trylock.c: Likewise.
1038         * pthread_mutex_unlock.c: Likewise.
1039         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1041 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
1043         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
1044         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
1045         (PTHREAD_MUTEX_PSHARED): Define.
1046         * pthread_mutex_init.c (__pthread_mutex_init): Set
1047         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
1048         mutexes.
1049         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
1050         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
1051         as second argument to lll_lock.
1052         (LLL_MUTEX_TRYLOCK): Take mutex as argument
1053         instead of its __data.__lock field.
1054         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1055         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1056         to lll_robust_lock.
1057         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1058         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
1059         instead of mutex->__data.__kind directly, pass
1060         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
1061         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
1062         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1063         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
1064         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
1065         to lll_timedlock, lll_robust_timedlock, lll_unlock and
1066         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1067         of mutex->__data.__kind directly.
1068         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1069         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1070         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1071         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1072         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1073         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1074         and lll_futex_wake.
1075         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1076         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1077         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1078         directly.
1079         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1080         Take mutex as argument instead of its __data.__lock field, pass
1081         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1082         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1083         __data.__lock field.
1084         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1085         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1086         to lll_robust_cond_lock.
1087         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1088         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1089         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1090         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1091         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1092         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1093         lll_futex_wait.
1094         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1095         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1096         lll_futex_wake.
1097         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1098         pshared variable, pass it to lll_lock, lll_unlock,
1099         lll_futex_timedwait and lll_futex_wake.
1100         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1101         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1102         and lll_futex_wake.
1103         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1104         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1105         macro.
1106         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1107         lll_futex_wake_unlock): Likewise.
1108         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1109         Likewise.
1110         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1111         lll_futex_wake_unlock): Likewise.
1112         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1113         Likewise.
1114         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1115         lll_futex_wake_unlock): Likewise.
1116         (lll_futex_wake): Fix a typo.
1117         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1119         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1120         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1121         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1123         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1124         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1126         (__pthread_cond_timedwait): Likewise.
1127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1128         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1130 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1132         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1133         Don't use CGOTSETUP and CGOTRESTORE macros.
1134         (CGOTSETUP, CGOTRESTORE): Remove.
1135         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1136         @local symbol.
1138 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1140         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1141         definitions for private futexes.
1142         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1143         kernel-features.h and lowlevellock.h.  Use private futexes if
1144         they are available.
1145         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1146         (__lll_mutex_lock_wait): Rename to
1147         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1148         (__lll_mutex_timedlock_wait): Rename to ...
1149         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1150         Don't compile in for libc.so.
1151         (__lll_mutex_unlock_wake): Rename to ...
1152         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1153         (__lll_timedwait_tid): Use __NR_gettimeofday.
1154         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1155         the header from assembler.  Renamed all lll_mutex_* resp.
1156         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1157         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1158         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1159         Define.
1160         (__lll_lock_wait_private): Add prototype.
1161         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1162         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1163         __lll_unlock_wake): Likewise.
1164         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1165         if private is constant LLL_PRIVATE.
1166         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1167         lll_timedlock, lll_robust_timedlock): Add private argument.
1168         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1169         if private is constant LLL_PRIVATE.
1170         (lll_robust_unlock, lll_robust_dead): Add private argument.
1171         (lll_lock_t): Remove.
1172         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1173         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1174         lll_cond_wake, lll_cond_broadcast): Remove.
1175         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1176         kernel-features.h and lowlevellock.h.
1177         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1178         (LOAD_FUTEX_WAIT): Define.
1179         (__lll_robust_mutex_lock_wait): Rename to ...
1180         (__lll_robust_lock_wait): ... this.  Add private argument.
1181         Use LOAD_FUTEX_WAIT macro.
1182         (__lll_robust_mutex_timedlock_wait): Rename to ...
1183         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1184         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1185         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1186         lowlevellock.h.
1187         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1188         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1189         __lll_mutex_{lock,unlock}_*.
1190         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1191         lowlevellock.h and pthread-errnos.h.
1192         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1193         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1194         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1195         __lll_mutex_{lock,unlock}_*.
1196         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1197         lowlevellock.h and pthread-errnos.h.
1198         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1199         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1200         __lll_mutex_{lock,unlock}_*.
1201         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1202         lowlevellock.h.
1203         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1204         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1205         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1206         (__condvar_tw_cleanup): Likewise.
1207         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1208         lowlevellock.h.
1209         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1210         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1211         __lll_mutex_{lock,unlock}_*.
1212         ( __condvar_w_cleanup): Likewise.
1213         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1214         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1215         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1216         lowlevellock.h.
1217         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1218         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1219         __lll_mutex_{lock,unlock}_*.
1220         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1221         lowlevellock.h.
1222         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1223         FUTEX_PRIVATE_FLAG): Remove.
1224         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1225         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1226         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1227         lowlevellock.h.
1228         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1229         FUTEX_PRIVATE_FLAG): Remove.
1230         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1231         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1232         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1233         lowlevellock.h.
1234         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1235         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1236         __lll_mutex_{lock,unlock}_*.
1237         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1238         lowlevellock.h.
1239         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1240         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1241         __lll_mutex_{lock,unlock}_*.
1242         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1243         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1244         (__new_sem_post): Use standard initial exec code sequences.
1245         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1246         lowlevellock.h.
1247         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1248         FUTEX_PRIVATE_FLAG): Remove.
1249         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1250         exec code sequences.
1251         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1252         (__new_sem_trywait): Use standard initial exec code sequences.
1253         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1254         (__new_sem_wait): Use standard initial exec code sequences.
1256 2007-07-31  Anton Blanchard  <anton@samba.org>
1258         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1259         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1260         atomic_full_barrier.
1262 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1264         * allocatestack.c (stack_cache_lock): Change type to int.
1265         (get_cached_stack, allocate_stack, __deallocate_stack,
1266         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1267         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1268         as second argument to lll_lock and lll_unlock macros on
1269         stack_cache_lock.
1270         * pthread_create.c (__find_in_stack_list): Likewise.
1271         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1272         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1273         as second argument.
1274         * descr.h (struct pthread): Change lock and setxid_futex field
1275         type to int.
1276         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1277         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1278         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1279         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1280         Likewise.
1281         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1282         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1283         * pthreadP.h (__attr_list_lock): Change type to int.
1284         * pthread_attr_init.c (__attr_list_lock): Likewise.
1285         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1286         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1287         lll_{,un}lock.
1288         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1289         also for lll_futex_{wake,wait}.
1290         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1291         a pointer to const.
1292         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1293         LLL_SHARED as second argument to lll_{,un}lock.
1294         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1295         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1296         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1297         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1298         Likewise.
1299         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1300         as second argument to lll_{,un}lock macros on pd->lock.
1301         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1302         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1303         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1304         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1305         Likewise.
1306         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1307         Likewise.
1308         * pthread_once.c (once_lock): Change type to int.
1309         (__pthread_once): Pass LLL_PRIVATE as second argument to
1310         lll_{,un}lock macros on once_lock.
1311         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1312         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1313         rwlock->__data.__shared as second argument to them and similarly
1314         for lll_futex_w*.
1315         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1316         Likewise.
1317         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1318         Likewise.
1319         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1320         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1321         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1322         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1323         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1324         to lll_{,un}lock macros on __sem_mappings_lock.
1325         * sem_open.c (check_add_mapping): Likewise.
1326         (__sem_mappings_lock): Change type to int.
1327         * semaphoreP.h (__sem_mappings_lock): Likewise.
1328         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1329         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1330         instead of lll_*mutex_*, pass LLL_SHARED as last
1331         argument.
1332         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1333         pass LLL_SHARED as last argument.
1334         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1335         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1336         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1337         pass LLL_SHARED as last argument.
1338         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1339         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1340         LLL_SHARED as last argument.
1341         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1342         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1343         Similarly.
1344         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1345         __libc_lock_lock_recursive, __libc_lock_unlock,
1346         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1347         argument to lll_{,un}lock.
1348         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1349         _IO_lock_unlock): Likewise.
1350         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1351         compound literal.
1352         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1353         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1354         __fork_lock.
1355         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1356         free_mem): Likewise.
1357         (__fork_lock): Change type to int.
1358         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1359         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1360         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1361         lll_futex_wake.
1362         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1363         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1364         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1365         New function.
1366         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1367         pass it through to lll_futex_*wait, only compile in when
1368         IS_IN_libpthread.
1369         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1370         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1371         argument and pass it through to lll_futex_*wait.
1372         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1373         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1374         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1375         inline functions to __lll_* resp. __lll_robust_*.
1376         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1377         (lll_mutex_dead): Add private argument.
1378         (__lll_lock_wait_private): New prototype.
1379         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1380         __lll_robust_lock_timedwait): Add private argument to prototypes.
1381         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1382         call __lll_lock_wait_private, otherwise pass private to
1383         __lll_lock_wait.
1384         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1385         __lll_robust_timedlock): Add private argument, pass it to
1386         __lll_*wait functions.
1387         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1388         call __lll_unlock_wake_private, otherwise pass private to
1389         __lll_unlock_wake.
1390         (__lll_robust_unlock): Add private argument, pass it to
1391         __lll_robust_unlock_wake.
1392         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1393         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1394         argument, pass it through to __lll_* inline function.
1395         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1396         (lll_lock_t): Remove.
1397         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1398         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1399         lll_cond_wake, lll_cond_broadcast): Remove.
1400         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1401         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1402         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1403         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1404         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1405         the header from assembler.  Renamed all lll_mutex_* resp.
1406         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1407         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1408         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1409         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1410         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1411         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1412         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1413         Remove prototype.
1414         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1415         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1416         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1417         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1418         MULTIPLE_THREADS_OFFSET as another asm operand.
1419         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1420         MULTIPLE_THREADS_OFFSET as last asm operand, call
1421         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1422         otherwise pass private as another argument to __lll_lock_wait.
1423         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1424         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1425         private as another argument to __lll_*lock_wait call.
1426         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1427         MULTIPLE_THREADS_OFFSET as another asm operand, call
1428         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1429         otherwise pass private as another argument to __lll_unlock_wake.
1430         (lll_robust_unlock): Add private argument, pass private as another
1431         argument to __lll_unlock_wake.
1432         (lll_robust_dead): Add private argument, use __lll_private_flag
1433         macro.
1434         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1435         LLL_MUTEX_LOCK_INITIALIZER.
1436         (lll_lock_t): Remove.
1437         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1438         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1439         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1440         lll_cond_wake, lll_cond_broadcast): Remove.
1441         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1442         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1443         2007-05-2{3,9} changes.
1444         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1445         kernel-features.h and lowlevellock.h.
1446         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1447         (LOAD_FUTEX_WAIT): Rewritten.
1448         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1449         define.
1450         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1451         (__lll_mutex_lock_wait): Rename to ...
1452         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1453         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1454         (__lll_mutex_timedlock_wait): Rename to ...
1455         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1456         contains private argument.  Don't compile in for libc.so.
1457         (__lll_mutex_unlock_wake): Rename to ...
1458         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1459         Don't compile in for libc.so.
1460         (__lll_timedwait_tid): Use __NR_gettimeofday.
1461         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1462         kernel-features.h and lowlevellock.h.
1463         (LOAD_FUTEX_WAIT): Define.
1464         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1465         define.
1466         (__lll_robust_mutex_lock_wait): Rename to ...
1467         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1468         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1469         macro.
1470         (__lll_robust_mutex_timedlock_wait): Rename to ...
1471         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1472         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1473         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1474         lowlevellock.h.
1475         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1476         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1477         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1478         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1479         to __lll_lock_wait in %edx.
1480         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1481         Include lowlevellock.h and pthread-errnos.h.
1482         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1483         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1484         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1485         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1486         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1487         __lll_unlock_wake.
1488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1489         Include lowlevellock.h and pthread-errnos.h.
1490         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1491         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1492         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1493         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1494         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1495         __lll_unlock_wake.
1496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1497         Include lowlevellock.h.
1498         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1499         Don't define.
1500         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1501         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1502         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1503         __lll_unlock_wake.  Use __NR_gettimeofday.
1504         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1505         Include lowlevellock.h.
1506         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1507         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1508         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1509         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1510         and __lll_unlock_wake.
1511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1512         Include lowlevellock.h.
1513         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1514         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1515         MUTEX(%ebx) address in %edx rather than %ecx to
1516         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1517         and __lll_unlock_wake.  Move return value from %ecx to %edx
1518         register.
1519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1520         Include lowlevellock.h.
1521         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1522         Don't define.
1523         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1524         MUTEX(%ebp) address in %edx rather than %ecx to
1525         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1526         and __lll_unlock_wake.  Move return value from %ecx to %edx
1527         register.  Use __NR_gettimeofday.
1528         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1529         Include lowlevellock.h.
1530         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1531         Don't define.
1532         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1533         MUTEX(%ebp) address in %edx rather than %ecx to
1534         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1535         and __lll_unlock_wake.  Move return value from %ecx to %edx
1536         register.  Use __NR_gettimeofday.
1537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1538         Include lowlevellock.h.
1539         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1540         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1541         MUTEX(%edi) address in %edx rather than %ecx to
1542         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1543         and __lll_unlock_wake.
1544         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1545         Include lowlevellock.h.
1546         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1547         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1548         MUTEX(%ebx) address in %edx rather than %ecx to
1549         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1550         and __lll_unlock_wake.  Move return value from %ecx to %edx
1551         register.
1552         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1553         lowlevellock.h.
1554         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1555         define.
1556         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1557         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1558         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1559         lowlevellock.h.
1560         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1561         (sem_timedwait): Use __NR_gettimeofday.
1562         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1563         lowlevellock.h.
1564         (LOCK): Don't define.
1565         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1566         lowlevellock.h.
1567         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1568         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1569         are waiters.
1570         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1571         2007-05-2{3,9} changes.
1572         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1573         kernel-features.h and lowlevellock.h.
1574         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1575         (LOAD_FUTEX_WAIT): Rewritten.
1576         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1577         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1578         (__lll_mutex_lock_wait): Rename to ...
1579         (__lll_lock_wait): ... this.  %esi is now private argument.
1580         Don't compile in for libc.so.
1581         (__lll_mutex_timedlock_wait): Rename to ...
1582         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1583         Don't compile in for libc.so.
1584         (__lll_mutex_unlock_wake): Rename to ...
1585         (__lll_unlock_wake): ... this.  %esi contains private argument.
1586         Don't compile in for libc.so.
1587         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1588         kernel-features.h and lowlevellock.h.
1589         (LOAD_FUTEX_WAIT): Define.
1590         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1591         (__lll_robust_mutex_lock_wait): Rename to ...
1592         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1593         Use LOAD_FUTEX_WAIT macro.
1594         (__lll_robust_mutex_timedlock_wait): Rename to ...
1595         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1596         private, use LOAD_FUTEX_WAIT macro.
1597         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1598         lowlevellock.h.
1599         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1600         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1601         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1602         __lll_lock_wait and __lll_unlock_wake.
1603         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1604         Include lowlevellock.h and pthread-errnos.h.
1605         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1606         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1607         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1608         pass LLL_SHARED in %esi to both __lll_lock_wait and
1609         __lll_unlock_wake.
1610         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1611         Include lowlevellock.h and pthread-errnos.h.
1612         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1613         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1614         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1615         pass LLL_SHARED in %esi to both __lll_lock_wait and
1616         __lll_unlock_wake.
1617         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1618         Include lowlevellock.h.
1619         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1620         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1621         pass LLL_SHARED in %esi to both __lll_lock_wait and
1622         __lll_unlock_wake.
1623         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1624         Include lowlevellock.h.
1625         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1626         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1627         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1628         and __lll_unlock_wake.
1629         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1630         Include lowlevellock.h.
1631         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1632         Don't define.
1633         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1634         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1635         and __lll_unlock_wake.
1636         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1637         Include lowlevellock.h.
1638         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1639         Don't define.
1640         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1641         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1642         and __lll_unlock_wake.
1643         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1644         Include lowlevellock.h.
1645         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1646         Don't define.
1647         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1648         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1649         and __lll_unlock_wake.
1650         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1651         Include lowlevellock.h.
1652         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1653         Don't define.
1654         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1655         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1656         and __lll_unlock_wake.
1657         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1658         Include lowlevellock.h.
1659         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1660         Don't define.
1661         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1662         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1663         and __lll_unlock_wake.
1664         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1665         lowlevellock.h.
1666         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1667         define.
1668         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1669         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1670         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1671         lowlevellock.h.
1672         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1673         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1674         lowlevellock.h.
1675         (LOCK): Don't define.
1676         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1677         lowlevellock.h.
1678         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1679         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1680         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1681         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1682         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1683         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1684         (__lll_lock_wait_private): New function.
1685         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1686         it to lll_futex_*wait.  Don't compile in for libc.so.
1687         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1688         Remove.
1689         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1690         (struct sparc_pthread_barrier): Remove.
1691         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1692         struct sparc_pthread_barrier.  Pass
1693         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1694         and lll_futex_wait macros.
1695         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1696         Remove.
1697         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1698         Include sparc pthread_barrier_wait.c instead of generic one.
1700 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1702         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1704         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1705         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1706         %ecx.
1707         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1708         (pthread_rwlock_timedwrlock): Likewise.
1709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1710         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1712 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1714         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1716 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1718         * tst-locale2.c (useless): Add return statement.
1720 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1722         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1723         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1724         * pthread_create.c (start_thread): Likewise.
1725         * init.c (sighandler_setxid): Likewise.
1726         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1727         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1728         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1729         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1730         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1731         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1732         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1733         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1734         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1735         Likewise.
1736         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1737         Likewise.
1738         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1739         Likewise.
1740         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1741         __rtld_notify): Likewise.
1742         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1743         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1744         __pthread_once): Likewise.
1745         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1746         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1747         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1748         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1749         (lll_futex_wait): Add private argument, define as wrapper around
1750         lll_futex_timed_wait.
1751         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1752         use __lll_private_flag macro.
1753         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1754         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1755         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1756         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1757         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1758         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1759         (lll_futex_wait): Add private argument, define as wrapper around
1760         lll_futex_timed_wait.
1761         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1762         use __lll_private_flag macro.
1763         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1764         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1765         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1766         Define.
1767         (lll_futex_timed_wait, lll_futex_wake): Use it.
1768         (lll_private_futex_wait, lll_private_futex_timed_wait,
1769         lll_private_futex_wake): Removed.
1770         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1771         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1772         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1773         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1774         (lll_futex_wait): Add private argument, define as wrapper around
1775         lll_futex_timed_wait.
1776         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1777         use __lll_private_flag macro.
1778         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1779         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1780         to lll_futex_*.
1781         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1782         (lll_private_futex_wait, lll_private_futex_timed_wait,
1783         lll_private_futex_wake): Removed.
1784         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1785         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1786         (lll_private_futex_wait, lll_private_futex_timed_wait,
1787         lll_private_futex_wake): Removed.
1788         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1789         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1790         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1791         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1792         (lll_futex_wait): Add private argument, define as wrapper around
1793         lll_futex_timed_wait.
1794         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1795         use __lll_private_flag macro.
1796         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1797         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1798         to lll_futex_*.
1799         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1800         Define.
1801         (lll_futex_timed_wait, lll_futex_wake): Use it.
1802         (lll_private_futex_wait, lll_private_futex_timed_wait,
1803         lll_private_futex_wake): Removed.
1805 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1807         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1808         of the structure for sparc32.
1810 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1812         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1814 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1816         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1817         code used when private futexes are assumed.
1818         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1819         Likewise.
1821 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1823         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1824         (__lll_private_flag): Define.
1825         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1826         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1827         __lll_private_flag.
1828         (lll_private_futex_wait, lll_private_futex_timedwait,
1829         lll_private_futex_wake): Define as wrapper around non-_private
1830         macros.
1831         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1832         (__lll_private_flag): Define.
1833         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1834         (lll_private_futex_wait, lll_private_futex_timedwait,
1835         lll_private_futex_wake): Define as wrapper around non-_private
1836         macros.
1838 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1840         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1841         parameter to lll_futex_wait call.
1842         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1844         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1845         Replace lll_futex_wait with lll_private_futex_wait.
1846         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1847         Add LLL_SHARED parameter to lll_futex_wake().
1849         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1850         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1851         lll_private_futex_wake.
1852         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1853         bit from private parm before syscall.
1854         (lll_futex_timed_wait): Likewise.
1855         (lll_futex_wake): Likewise.
1856         (lll_futex_wake_unlock): Likewise.
1857         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1858         (lll_robust_mutex_unlock): Likewise.
1859         (lll_mutex_unlock_force): Likewise.
1860         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1862 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1864         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1865         compilation when unconditionally using private futexes.
1866         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1867         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1868         Likewise.
1869         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1870         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1872 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1874         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1875         Define.
1877 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1879         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1880         kernel-features.h.
1882 2007-05-16  Roland McGrath  <roland@redhat.com>
1884         * init.c (__nptl_initial_report_events): New variable.
1885         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1886         to that.
1888 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1890         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1891         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1893 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1895         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1896         implementation.
1898 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1900         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1901         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1902         * pthread_mutex_timedlock.c: Likewise.
1903         * pthread_mutex_trylock.c: Likewise.
1904         * pthread_mutex_unlock.c: Likewise.
1906 2007-06-17  Andreas Schwab  <schwab@suse.de>
1908         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1909         sections.
1911 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1913         * allocatestack.c (allocate_stack): Make code compile if
1914         __ASSUME_PRIVATE_FUTEX is set.
1916 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1918         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1919         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1920         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1921         (__pthread_rwlock_wrlock): Likewise.
1922         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1923         (pthread_rwlock_timedrdlock): Likewise.
1924         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1925         (pthread_rwlock_timedwrlock): Likewise.
1926         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1927         (__pthread_rwlock_unlock): Likewise.
1929 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1931         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1932         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1933         Split __flags into __flags, __shared, __pad1 and __pad2.
1934         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1935         futexes if they are available.
1936         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1937         in libc-lowlevellock.S allow using private futexes.
1938         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1939         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1940         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1941         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1942         lll_private_futex_timed_wait and lll_private_futex_wake.
1943         (lll_robust_mutex_unlock): Fix typo.
1944         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1945         field in futex command setup.
1946         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1947         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1948         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1949         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1950         if they are available.  Remove clear_once_control.
1951         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1952         futexes if they are available.
1953         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1957         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1958         Wake only when there are waiters.
1959         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1960         support.  Indicate that there are waiters.  Remove unnecessary
1961         extra cancellation test.
1962         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1963         left-over duplication of __sem_wait_cleanup.
1965 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1967         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1968         parameter to lll_futex_wait, lll_futex_timed_wait, and
1969         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1970         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1971         lll_private_futex_wake.
1972         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1973         * allocatestack.c: Adjust use of lll_futex_* macros.
1974         * init.c: Likewise.
1975         * lowlevellock.h: Likewise.
1976         * pthread_barrier_wait.c: Likewise.
1977         * pthread_cond_broadcast.c: Likewise.
1978         * pthread_cond_destroy.c: Likewise.
1979         * pthread_cond_signal.c: Likewise.
1980         * pthread_cond_timedwait.c: Likewise.
1981         * pthread_cond_wait.c: Likewise.
1982         * pthread_create.c: Likewise.
1983         * pthread_mutex_lock.c: Likewise.
1984         * pthread_mutex_setprioceiling.c: Likewise.
1985         * pthread_mutex_timedlock.c: Likewise.
1986         * pthread_mutex_unlock.c: Likewise.
1987         * pthread_rwlock_timedrdlock.c: Likewise.
1988         * pthread_rwlock_timedwrlock.c: Likewise.
1989         * pthread_rwlock_unlock.c: Likewise.
1990         * sysdeps/alpha/tls.h: Likewise.
1991         * sysdeps/i386/tls.h: Likewise.
1992         * sysdeps/ia64/tls.h: Likewise.
1993         * sysdeps/powerpc/tls.h: Likewise.
1994         * sysdeps/pthread/aio_misc.h: Likewise.
1995         * sysdeps/pthread/gai_misc.h: Likewise.
1996         * sysdeps/s390/tls.h: Likewise.
1997         * sysdeps/sh/tls.h: Likewise.
1998         * sysdeps/sparc/tls.h: Likewise.
1999         * sysdeps/unix/sysv/linux/fork.c: Likewise.
2000         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2001         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
2002         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
2003         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
2004         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2005         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
2006         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2007         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
2008         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
2009         Likewise.
2010         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
2011         * sysdeps/x86_64/tls.h: Likewise.
2013 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
2015         * pthread_getattr_np.c: No need to install a cancellation handler,
2016         this is no cancellation point.
2017         * pthread_getschedparam.c: Likewise.
2018         * pthread_setschedparam.c: Likewise.
2019         * pthread_setschedprio.c: Likewise.
2020         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
2021         lll_unlock_wake_cb.
2022         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2023         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2024         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2025         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2026         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2027         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2028         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
2029         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2030         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2031         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
2032         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2033         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2035         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
2036         whether there are more than one thread makes no sense here since
2037         we only call the slow path if the locks are taken.
2038         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
2040         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
2041         COND_NWAITERS_SHIFT.
2042         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
2043         COND_CLOCK_BITS.
2044         * pthread_cond_init.c: Likewise.
2045         * pthread_cond_timedwait.c: Likewise.
2046         * pthread_cond_wait.c: Likewise.
2047         * pthread_condattr_getclock.c: Likewise.
2048         * pthread_condattr_setclock.c: Likewise.
2049         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
2050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2052         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2053         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2055 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
2057         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
2058         unistd.h.
2060         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
2061         insn suffix.
2062         (THREAD_GSCOPE_GET_FLAG): Remove.
2063         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
2064         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
2065         changes.
2066         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2067         (THREAD_GSCOPE_GET_FLAG): Remove.
2068         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2069         instead of THREAD_GSCOPE_GET_FLAG.
2070         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2071         it.
2072         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2073         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2074         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2075         THREAD_GSCOPE_WAIT): Define.
2076         * sysdeps/sparc/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/sh/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/ia64/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.
2089 2007-05-24  Richard Henderson  <rth@redhat.com>
2091         * descr.h (struct pthread): Add header.gscope_flag.
2092         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2093         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2094         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2095         THREAD_GSCOPE_WAIT): Define.
2097 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2099         * init.c: Make it compile with older kernel headers.
2101         * tst-initializers1.c: Show through exit code which test failed.
2103         * pthread_rwlock_init.c: Also initialize __shared field.
2104         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2105         element in rwlock structure into four byte elements.  One of them is
2106         the new __shared element.
2107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2108         Likewise.
2109         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2110         __shared, adjust names of other padding elements.
2111         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2112         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2113         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2114         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2115         FUTEX_PRIVATE_FLAG.
2116         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2117         futex to use private operations if possible.
2118         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2119         Likewise.
2120         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2121         Likewise.
2122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2124         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2125         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2126         Likewise.
2127         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2128         Likewise.
2129         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2130         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2132 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2134         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2135         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2136         * pthread_rwlock_timedrdlock.c: Likewise.
2137         * pthread_rwlock_tryrdlock.c: Likewise.
2139         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2140         optimization.
2142         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2143         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2144         duplication of __sem_wait_cleanup.
2146         * allocatestack.c: Revert last change.
2147         * init.c: Likewise.
2148         * sysdeps/i386/tls.h: Likewise.
2149         * sysdeps/x86_64/tls.h: Likewise.
2150         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2151         header structure.
2152         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2154         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2155         Add private field.
2156         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2157         * pthread_barrier_init.c: Set private flag if pshared and private
2158         futexes are supported.
2159         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2160         private field in futex command setup.
2161         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2163 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2165         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2166         support.
2167         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2168         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2169         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2170         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2171         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2173         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2174         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2175         fields in the structure.
2176         (__old_sem_init): New function.
2177         * sem_open.c: Initialize all fields of the structure.
2178         * sem_getvalue.c: Adjust for renamed element.
2179         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2180         (gen-as-const-headers): Add structsem.sym.
2181         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2182         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2183         struct new_sem.  Add struct old_sem.
2184         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2185         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2186         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2187         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2188         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2189         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2190         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2191         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2192         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2193         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2194         * tst-sem10.c: New file.
2195         * tst-sem11.c: New file.
2196         * tst-sem12.c: New file.
2197         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2198         of struct sem.
2200 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2201             Jakub Jelinek  <jakub@redhat.com>
2203         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2204         Move __pthread_enable_asynccancel right before futex syscall.
2205         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2206         Likewise.
2208 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2210         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2211         THREAD_COPY_PRIVATE_FUTEX): Define.
2212         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2213         THREAD_COPY_PRIVATE_FUTEX): Define.
2214         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2215         * init.c (__pthread_initialize_minimal_internal): Use
2216         THREAD_SET_PRIVATE_FUTEX.
2218         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2219         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2220         THREAD_GSCOPE_FLAG_WAIT): Define.
2221         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2222         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2223         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2224         PTR_DEMANGLE.
2225         (THREAD_GSCOPE_GET_FLAG): Define.
2226         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2227         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2228         instead of ->header.gscope_flag directly.
2230 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2232         * init.c (__pthread_initialize_minimal_internal): Check whether
2233         private futexes are available.
2234         * allocatestack.c (allocate_stack): Copy private_futex field from
2235         current thread into the new stack.
2236         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2237         futexes if they are available.
2238         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2239         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2240         in libc-lowlevellock.S allow using private futexes.
2241         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2242         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2243         FUTEX_PRIVATE_FLAG.
2244         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2245         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2246         if they are available.
2247         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2248         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2249         * sysdeps/i386/tcb-offsets.sym: Likewise.
2250         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2251         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2253 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2255         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2256         Remove ptr_wait_lookup_done again.
2257         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2258         (__pthread_initialize_minimal_internal): Initialize
2259         _dl_wait_lookup_done pointer in _rtld_global directly.
2260         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2261         Remove code to code _dl_wait_lookup_done.
2262         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2263         encrypted for now.
2265 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2267         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2268         pthread_mutex_init failed with ENOTSUP.
2270 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2272         * allocatestack.c (__wait_lookup_done): New function.
2273         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2274         Add ptr_wait_lookup_done.
2275         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2276         * pthreadP.h: Declare __wait_lookup_done.
2277         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2278         Define macros to implement reference handling of global scope.
2279         * sysdeps/x86_64/tls.h: Likewise.
2280         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2281         Initialize GL(dl_wait_lookup_done).
2283 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2285         [BZ #4512]
2286         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2287         is detected.
2288         * pthread_mutex_timedlock.c: Likewise.
2289         * pthread_mutex_trylock.c: Likewise.
2290         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2292         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2293         * tst-robust9.c: New file.
2294         * tst-robustpi9.c: New file.
2296         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2297         unnecessary extra cancellation test.
2299 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2301         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2302         extra cancellation test.
2303         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2305 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2307         * descr.h (struct pthread): Rearrange members to fill hole in
2308         64-bit layout.
2310         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2311         (__pthread_setaffinity_new): If syscall was successful and
2312         RESET_VGETCPU_CACHE is defined, use it before returning.
2313         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2315 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2317         [BZ #4455]
2318         * tst-align2.c: Include stackinfo.h.
2319         * tst-getpid1.c: Likewise.
2321 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2323         [BZ #4455]
2324         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2325         * tst-getpid1.c (do_test): Likewise.
2327         [BZ #4456]
2328         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2329         (allocate_stack): Likewise.
2331 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2333         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2334         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2335         (__lll_robust_timedlock_wait): Likewise.
2336         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2338 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2340         [BZ #4465]
2341         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2342         * tst-cancel4.c (tf_fdatasync): New test.
2344 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2346         [BZ #4392]
2347         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2348         check mutexes like normal mutexes.
2350         [BZ #4306]
2351         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2352         Initialize the whole sigevent structure to appease valgrind.
2354 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2356         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2357         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2359 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2361         * tst-locale1.c: Avoid warnings.
2362         * tst-locale2.c: Likewise.
2364 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2366         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2367         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2369 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2371         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2372         __extern_always_inline where appropriate.
2373         * sysdeps/pthread/pthread.h: Likewise.
2375 2007-03-13  Richard Henderson  <rth@redhat.com>
2377         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2378         separate cfi regions for the two subsections.
2380 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2382         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2383         new thread, don't just decrement it.
2384         Patch by Suzuki K P <suzuki@in.ibm.com>.
2386 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2388         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2389         PTHFCT_CALL definition.
2391 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2393         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2394         available, don't use it.
2396 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2398         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2399         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2400         call into the kernel to delay.
2402 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2404         * tst-initializers1.c: We want to test the initializers as seen
2405         outside of libc, so undefined _LIBC.
2407         * pthread_join.c (cleanup): Avoid warning.
2409 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2411         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2412         (__lll_timedwait_tid): Add unwind info.
2414         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2415         function table, mangle the pointers.
2416         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2417         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2418         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2419         demangle pointers before use.
2420         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2421         demangle pointer.
2422         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2423         * sysdeps/pthread/setxid.h: Likewise.
2425 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2427         * tst-rwlock7.c: Show some more information in case of correct
2428         behavior.
2430 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2432         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2433         (lll_futex_timed_wait): Undo part of last change, don't negate
2434         return value.
2436 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2438         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2439         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2441 2006-12-28  David S. Miller  <davem@davemloft.net>
2443         * shlib-versions: Fix sparc64 linux target specification.
2445 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2447         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2448         Adjust include path for pthread_barrier_wait.c move.
2450 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2452         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2453         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2455 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2457         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2458         6 argument cancellable syscalls.
2459         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2460         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2461         6 argument cancellable syscalls.
2462         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2464 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2466         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2467         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2469 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2471         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2472         __sync_lock_release instead of __sync_lock_release_si.
2474 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2476         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2477         Define.
2478         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2479         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2480         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2481         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2482         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2483         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2484         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2485         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2486         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2487         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2488         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2490 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2492         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2493         * pthread_barrier_wait.c: ...here.
2494         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2495         * pthread_cond_broadcast.c: ...here.
2496         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2497         * pthread_cond_signal.c: ...here.
2498         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2499         * pthread_cond_timedwait.c: ...here.
2500         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2501         * pthread_cond_wait.c: ...here.
2502         * sysdeps/pthread/pthread_once.c: Move to...
2503         * pthread_once.c: ...here.
2504         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2505         * pthread_rwlock_rdlock.c: ...here.
2506         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2507         * pthread_rwlock_timedrdlock.c: ...here.
2508         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2509         * pthread_rwlock_timedwrlock.c: ...here.
2510         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2511         * pthread_rwlock_unlock.c: ...here.
2512         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2513         * pthread_rwlock_wrlock.c: ...here.
2514         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2515         * pthread_spin_destroy.c: ...here.
2516         * sysdeps/pthread/pthread_spin_init.c: Move to...
2517         * pthread_spin_init.c: ...here.
2518         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2519         * pthread_spin_unlock.c: ...here.
2520         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2521         * pthread_getcpuclockid.c: ...here.
2523         * init.c: USE_TLS support is now always enabled.
2524         * tst-tls5.h: Likewise.
2525         * sysdeps/alpha/tls.h: Likewise.
2526         * sysdeps/i386/tls.h: Likewise.
2527         * sysdeps/ia64/tls.h: Likewise.
2528         * sysdeps/powerpc/tls.h: Likewise.
2529         * sysdeps/s390/tls.h: Likewise.
2530         * sysdeps/sh/tls.h: Likewise.
2531         * sysdeps/sparc/tls.h: Likewise.
2532         * sysdeps/x86_64/tls.h: Likewise.
2534 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2536         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2537         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2538         failed.
2540         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2541         Define to THREAD_SELF->header.multiple_threads.
2542         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2543         Likewise.
2544         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2545         Likewise.
2546         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2547         (SINGLE_THREAD_P): Likewise.
2548         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2549         (SINGLE_THREAD_P): Likewise.
2550         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2551         (SINGLE_THREAD_P): Likewise.
2552         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2553         (SINGLE_THREAD_P): Likewise.
2554         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2555         Likewise.
2556         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2557         (SINGLE_THREAD_P): Likewise.
2558         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2559         (SINGLE_THREAD_P): Likewise.
2560         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2561         Likewise.
2563 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2565         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2566         by default rather than 2_3_3.
2568 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2570         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2571         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2572         atomic_* instead of catomic_* macros.
2574 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2576         [BZ #3285]
2577         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2578         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2579         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2580         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2581         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2582         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2583         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2584         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2585         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2586         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2587         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2588         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2589         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2591 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2593         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2594         cancelable syscalls with six parameters.
2596         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2597         operations instead of atomic_*.
2599 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2601         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2603 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2605         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2606         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2607         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2608         New file.
2609         * pthread_attr_setstack.c: Allow overwriting the version number of the
2610         new symbol.
2611         * pthread_attr_setstacksize.c: Likewise.
2612         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2613         it.
2614         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2615         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2617 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2619         [BZ #3251]
2620         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2621         Patch by Petr Baudis.
2623 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2625         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2627         * tst-cancel2.c (tf): Loop as long as something was written.
2629 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2631         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2632         mutexes wake all mutexes.
2633         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2634         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2635         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2637 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2639         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2640         to guarantee the thread is always canceled.
2642 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2644         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2645         Include stdlib.h.
2646         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2647         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2648         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2649         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2650         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2652 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2654         [BZ #3123]
2655         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2656         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2657         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2658         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2659         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2660         * Makefile (tests): Add tst-cond22.
2661         * tst-cond22.c: New file.
2663 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2665         [BZ #3124]
2666         * descr.h (struct pthread): Add parent_cancelhandling.
2667         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2668         cancelhandling value to child.
2669         * pthread_create.c (start_thread): If parent thread was canceled
2670         reset the SIGCANCEL mask.
2671         * Makefile (tests): Add tst-cancel25.
2672         * tst-cancel25.c: New file.
2674 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2675             Ulrich Drepper  <drepper@redhat.com>
2677         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2678         counterp if it is already zero.
2679         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2681 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2682             Roland McGrath  <roland@redhat.com>
2684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2685         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2686         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2687         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2688         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2689         lll_robust_mutex_timedlock, lll_mutex_unlock,
2690         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2691         Add _L_*_ symbols around the subsection.
2692         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2693         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2695 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2696             Roland McGrath  <roland@redhat.com>
2698         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2699         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2700         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2701         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2702         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2703         lll_robust_mutex_timedlock, lll_mutex_unlock,
2704         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2705         Add _L_*_ symbols around the subsection.
2706         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2707         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2709 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2711         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2712         change because it can disturb too much existing code.  If real hard
2713         reader preference is needed we'll introduce another type.
2714         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2715         (pthread_rwlock_timedwrlock): Likewise.
2716         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2717         Likewise.
2719 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2721         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2722         reader preference.
2723         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2724         (pthread_rwlock_timedwrlock): Likewise.
2725         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2726         Likewise.
2728 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2730         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2731         Only define ifdef SHARED.
2733 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2735         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2736         (free_stacks): ...here.
2737         (__free_stack_cache): New function.
2738         * pthreadP.h: Declare __free_stack_cache.
2739         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2740         ptr_freeres.
2741         * init.c (pthread_functions): Initialize ptr_freeres.
2742         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2743         New freeres function.
2745 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2747         [BZ #3018]
2748         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2750 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2752         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2753         _XOPEN_REALTIME_THREADS.
2755 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2757         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2758         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2759         HAVE_CLOCK_GETTIME_VSYSCALL.
2760         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2762 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2764         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2765         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2766         * descr.h (struct priority_protection_data): New type.
2767         (struct pthread): Add tpp field.
2768         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2769         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2770         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2771         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2772         TPP mutexes.
2773         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2774         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2775         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2776         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2777         * tpp.c: New file.
2778         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2779         boosted by TPP.
2780         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2781         * pthread_mutexattr_getprioceiling.c
2782         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2783         in the SCHED_FIFO priority range.
2784         * pthread_mutexattr_setprioceiling.c
2785         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2786         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2787         if mutex is not TPP.  Ceiling is now in __data.__lock.
2788         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2789         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2790         is now in __data.__lock.  Add locking.
2791         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2792         * Makefile (libpthread-routines): Add tpp.
2793         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2794         * tst-tpp.h: New file.
2795         * tst-mutexpp1.c: New file.
2796         * tst-mutexpp6.c: New file.
2797         * tst-mutexpp10.c: New file.
2798         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2799         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2801 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2803         [BZ #2843]
2804         * pthread_join.c (pthread_join): Account for self being canceled
2805         when checking for deadlocks.
2806         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2807         (tf1): Don't print anything after pthread_join returns, this would be
2808         another cancellation point.
2809         (tf2): Likewise.
2810         * tst-join6.c: New file.
2811         * Makefile (tests): Add tst-join6.
2813 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2815         [BZ #2892]
2816         * pthread_setspecific.c (__pthread_setspecific): Check
2817         out-of-range index before checking for unused key.
2819         * sysdeps/pthread/gai_misc.h: New file.
2821 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2823         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2824         file.  Don't use sysctl.
2825         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2826         overwrite the file if this is likely not true.
2828 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2830         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2831         * Makefile (tests): Add tst-getpid3.
2832         * tst-getpid3.c: New file.
2834 2006-07-30  Roland McGrath  <roland@redhat.com>
2836         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2838         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2839         (pause_not_cancel): New macro.
2840         (nanosleep_not_cancel): New macro.
2841         (sigsuspend_not_cancel): New macro.
2842         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2843         nanosleep_not_cancel macro from <not-cancel.h>.
2844         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2845         macro from <not-cancel.h>.
2847 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2848             Jakub Jelinek  <jakub@redhat.com>
2850         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2851         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2852         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2853         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2854         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2855         * pthread_mutex_lock.c: Likewise.
2856         * pthread_mutex_timedlock.c: Likewise.
2857         * pthread_mutex_trylock.c: Likewise.
2858         * pthread_mutex_unlock.c: Likewise.
2859         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2860         all mutexes.
2861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2863         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2864         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2865         pthread-pi-defines.sym.
2866         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2867         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2868         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2869         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2870         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2871         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2872         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2873         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2874         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2875         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2876         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2877         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2878         * tst-mutex2.c: Likewise.
2879         * tst-mutex3.c: Likewise.
2880         * tst-mutex4.c: Likewise.
2881         * tst-mutex5.c: Likewise.
2882         * tst-mutex6.c: Likewise.
2883         * tst-mutex7.c: Likewise.
2884         * tst-mutex7a.c: Likewise.
2885         * tst-mutex8.c: Likewise.
2886         * tst-mutex9.c: Likewise.
2887         * tst-robust1.c: Likewise.
2888         * tst-robust7.c: Likewise.
2889         * tst-robust8.c: Likewise.
2890         * tst-mutexpi1.c: New file.
2891         * tst-mutexpi2.c: New file.
2892         * tst-mutexpi3.c: New file.
2893         * tst-mutexpi4.c: New file.
2894         * tst-mutexpi5.c: New file.
2895         * tst-mutexpi6.c: New file.
2896         * tst-mutexpi7.c: New file.
2897         * tst-mutexpi7a.c: New file.
2898         * tst-mutexpi8.c: New file.
2899         * tst-mutexpi9.c: New file.
2900         * tst-robust1.c: New file.
2901         * tst-robust2.c: New file.
2902         * tst-robust3.c: New file.
2903         * tst-robust4.c: New file.
2904         * tst-robust5.c: New file.
2905         * tst-robust6.c: New file.
2906         * tst-robust7.c: New file.
2907         * tst-robust8.c: New file.
2908         * Makefile (tests): Add the new tests.
2910         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2911         * pthread_mutex_destroy.c: Remove unneeded label.
2913 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2915         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2916         computations to compile time.
2918 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2920         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2922 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2924         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2926 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2928         * pthread_key_create.c (__pthread_key_create): Do away with
2929         __pthread_keys_lock.
2931         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2932         (__kernel_cpumask_size): Mark as hidden.
2933         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2935         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2936         * semaphoreP.h (__sem_mappings_lock): Likewise.
2938 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2940         * pthread_atfork.c: Mark __dso_handle as hidden.
2942 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2944         [BZ #2644]
2945         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2946         the reload problem.  Change the one path in pthread_cancel_init
2947         which causes the problem.  Force gcc to reload.  Simplify callers.
2948         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2949         (_Unwind_GetBSP): Undo last patch.
2951 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2953         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2954         function pointer is reloaded after pthread_cancel_init calls.
2956         [BZ #2644]
2957         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2958         pointers are reloaded after pthread_cancel_init calls.
2960 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2962         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2963         __always_inline.
2965 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2967         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2968         Allocate new object which is passed to timer_sigev_thread so that
2969         the timer can be deleted before the new thread is scheduled.
2971 2006-04-26  Roland McGrath  <roland@redhat.com>
2973         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2975 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2977         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2978         suffix for conditional jumps.
2979         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2980         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2981         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2982         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2983         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2984         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2986         * init.c (sigcancel_handler): Compare with correct PID even if the
2987         thread is in the middle of a fork call.
2988         (sighandler_setxid): Likewise.
2989         Reported by Suzuki K P <suzuki@in.ibm.com> .
2991 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2993         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2995 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2997         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2998         fails [Coverity CID 105].
3000 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
3002         * sysdeps/pthread/pthread.h: Add nonnull attributes.
3004 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
3006         [BZ #2505]
3007         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
3008         Define __lll_rel_instr using lwsync.
3010 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
3012         * allocatestack.c (allocate_stack): Always initialize robust_head.
3013         * descr.h: Define struct robust_list_head.
3014         (struct pthread): Use robust_list_head in robust mutex list definition.
3015         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
3016         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
3017         (__pthread_initialize_minimal_internal): Register robust_list with
3018         the kernel.
3019         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
3020         Declare __set_robust_list_avail.
3021         * pthread_create.c (start_thread): Register robust_list of new thread.
3022         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
3023         waiters.
3024         * pthread_mutex_destroy.c: For robust mutexes don't look at the
3025         number of users, it's unreliable.
3026         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
3027         set_robust_list syscall is available.
3028         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
3029         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
3030         Set robust_head.list_op_pending before trying to lock a robust mutex.
3031         * pthread_mutex_timedlock.c: Likewise.
3032         * pthread_mutex_trylock.c: Likewise.
3033         * pthread_mutex_unlock.c: Likewise for unlocking.
3034         * Makefile (tests): Add tst-robust8.
3035         * tst-robust8.c: New file.
3037 2006-03-08  Andreas Schwab  <schwab@suse.de>
3039         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
3040         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
3042 2006-03-05  Roland McGrath  <roland@redhat.com>
3044         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
3045         and $config_os doesn't match *linux*.
3047 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
3049         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
3050         Use __syscall_error.
3051         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3052         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
3053         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
3054         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3055         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
3056         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
3058 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
3060         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
3062 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
3064         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
3065         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
3066         mutex.
3067         (__lll_robust_timedlock_wait): Likewise.
3068         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3069         (__lll_robust_lock_wait): Likewise.
3070         (__lll_robust_timedlock_wait): Likewise.
3071         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3072         (__lll_robust_lock_wait): Likewise.
3073         (__lll_robust_timedlock_wait): Likewise.
3075 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3077         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3078         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3079         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3080         lll_robust_mutex_unlock): Define.
3081         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3083 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3085         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3086         instead of <clone.S>.
3088 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3090         * Makefile (libpthread-routines): Add
3091         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3092         and pthread_mutex_[sg]etprioceiling.
3093         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3094         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3095         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3096         pthread_mutex_setprioceiling.
3097         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3098         PTHREAD_PRIO_PROTECT): New enum values.
3099         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3100         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3101         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3102         prototypes.
3103         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3104         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3105         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3106         Define.
3107         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3108         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3109         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3110         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3111         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3112         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3113         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3114         protocol mutexes.
3115         * pthread_mutex_getprioceiling.c: New file.
3116         * pthread_mutex_setprioceiling.c: New file.
3117         * pthread_mutexattr_getprioceiling.c: New file.
3118         * pthread_mutexattr_setprioceiling.c: New file.
3119         * pthread_mutexattr_getprotocol.c: New file.
3120         * pthread_mutexattr_setprotocol.c: New file.
3122 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3124         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3126 2006-02-27  Roland McGrath  <roland@redhat.com>
3128         * sysdeps/pthread/Subdirs: List nptl here too.
3129         * configure (libc_add_on_canonical): New variable.
3131         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3133         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3134         self to get main source tree's file.
3135         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3136         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3137         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3138         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3140         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3141         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3142         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3143         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3144         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3145         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3146         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3147         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3149         * Makefile: Use $(sysdirs) in vpath directive.
3151         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3152         (CPPFLAGS-timer_routines.c): Likewise.
3154         * Makeconfig (includes): Variable removed.
3156 2006-02-26  Roland McGrath  <roland@redhat.com>
3158         * sysdeps/generic/pt-raise.c: Moved to ...
3159         * pt-raise.c: ... here.
3160         * sysdeps/generic/lowlevellock.h: Moved to ...
3161         * lowlevellock.h: ... here.
3163 2006-02-23  Roland McGrath  <roland@redhat.com>
3165         * descr.h (struct pthread): Add final member `end_padding'.
3166         (PTHREAD_STRUCT_END_PADDING): Use it.
3168 2006-02-20  Roland McGrath  <roland@redhat.com>
3170         * sysdeps/mips: Directory removed, saved in ports repository.
3171         * sysdeps/unix/sysv/linux/mips: Likewise.
3173 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3175         * tst-robust1.c: Add second mutex to check that the mutex list is
3176         handled correctly.
3178 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3180         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3181         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3182         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3183         lll_robust_mutex_unlock): New macros.
3184         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3185         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3186         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3187         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3188         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3190 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3192         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3193         definitions.
3194         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3196 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3199         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3200         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3201         (lll_robust_mutex_unlock): Likewise.
3203 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3205         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3206         Set robust_list.__next rather than robust_list.
3207         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3208         (__pthread_list_t): New typedef.
3209         (pthread_mutex_t): Replace __next and __prev fields with __list.
3210         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3211         (__pthread_list_t): New typedef.
3212         (pthread_mutex_t): Replace __next and __prev fields with __list.
3213         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3214         (__pthread_list_t, __pthread_slist_t): New typedefs.
3215         (pthread_mutex_t): Replace __next and __prev fields with __list.
3216         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3217         (__pthread_list_t, __pthread_slist_t): New typedefs.
3218         (pthread_mutex_t): Replace __next and __prev fields with __list.
3219         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3220         (__pthread_list_t, __pthread_slist_t): New typedefs.
3221         (pthread_mutex_t): Replace __next and __prev fields with __list.
3222         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3223         (__pthread_slist_t): New typedef.
3224         (pthread_mutex_t): Replace __next field with __list.
3226 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3228         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3229         PTHREAD_MUTEX_OWNERDEAD.
3230         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3231         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3232         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3233         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3234         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3235         to PTHREAD_MUTEX_INCONSISTENT.
3236         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3237         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3238         * pthread_mutex_trylock.c: Likewise.
3239         * pthread_mutex_timedlock.c: Likewise.
3240         * pthread_mutex_unlock.c: Likewise.
3241         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3242         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3243         lowlevelrobustlock.sym.
3244         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3245         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3246         definitions.
3247         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3248         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3249         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3250         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3251         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3253 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3255         * allocatestack.c (allocate_stack): Initialize robust_list.
3256         * init.c (__pthread_initialize_minimal_internal): Likewise.
3257         * descr.h (struct xid_command): Pretty printing.
3258         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3259         robust_list.  Adjust macros.
3260         * pthread_create.c (start_thread): Adjust robust_list handling.
3261         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3262         but the owner for all robust mutex types.
3263         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3264         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3265         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3266         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3268         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3269         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3271 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3273         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3274         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3276 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3278         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3279         Return status.
3280         (lll_futex_timed_wait): Define.
3282 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3284         * tst-cancel4.c: Test ppoll.
3286 2006-01-18  Andreas Jaeger  <aj@suse.de>
3288         [BZ #2167]
3289         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3290         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3291         by Jim Gifford <patches@jg555.com>.
3293 2006-01-13  Richard Henderson  <rth@redhat.com>
3295         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3297 2006-01-10  Roland McGrath  <roland@redhat.com>
3299         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3300         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3301         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3302         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3303         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3304         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3305         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3306         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3307         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3308         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3310 2006-01-09  Roland McGrath  <roland@redhat.com>
3312         * tst-initializers1-c89.c: New file.
3313         * tst-initializers1-c99.c: New file.
3314         * tst-initializers1-gnu89.c: New file.
3315         * tst-initializers1-gnu99.c: New file.
3316         * Makefile (tests): Add them.
3317         (CFLAGS-tst-initializers1-c89.c): New variable.
3318         (CFLAGS-tst-initializers1-c99.c): New variable.
3319         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3320         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3322         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3323         Use __extension__ on anonymous union definition.
3324         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3325         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3326         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3327         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3328         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3330 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3332         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3333         Don't give the union a name because it changes the mangled name.
3334         Instead name the struct for __data.
3335         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3336         Likewise.
3337         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3338         Likewise.
3340 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3342         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3343         stack bias to mc_ftp field.
3345 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3347         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3348         being too clever and reloading the futex value where it shouldn't.
3350 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3352         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3353         correct type.
3355 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3357         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3358         Add cfi directives.
3360 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3362         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3363         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3364         rename in tcbhead_t.
3366         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3367         Don't give the union a name because it changes the mangled name.
3368         Instead name the struct for __data.
3369         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3370         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3371         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3372         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3373         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3374         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3376 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3378         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3379         Return status.
3380         (lll_futex_timed_wait): Define.
3381         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3382         * sysdeps/pthread/aio_misc.h: New file.
3384 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3386         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3388 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3390         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3391         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3392         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3394 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3396         * tst-cancel24.cc: Use C headers instead of C++ headers.
3398 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3400         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3401         sparc-linux configured glibc.
3402         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3403         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3404         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3405         atomic_compare_and_exchange_val_24_acq instead of
3406         atomic_compare_and_exchange_val_acq.
3407         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3408         instead of atomic_exchange_rel.
3409         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3410         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3411         file.
3412         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3413         file.
3414         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3415         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3416         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3417         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3418         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3419         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3420         New file.
3421         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3422         New file.
3423         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3424         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3425         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3426         file.
3427         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3428         file.
3429         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3431 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3433         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3434         mutex initializers.
3436 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3438         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3439         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3440         THREAD_COPY_POINTER_GUARD): Define.
3441         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3442         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3444 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3446         * version.c: Update copyright year.
3448 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3450         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3451         .eh_frame section, use cfi_* directives.
3452         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3454 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3456         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3457         now.
3459 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3461         * sysdeps/pthread/sigaction.c: Removed.
3462         * sigaction.c: New file.
3463         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3465 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3467         * Makefile (tests): Add tst-signal7.
3468         * tst-signal7.c: New file.
3470 2005-12-27  Roland McGrath  <roland@redhat.com>
3472         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3473         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3474         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3475         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3476         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3477         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3478         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3479         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3480         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3481         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3482         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3484 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3486         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3487         and __prev field to pthread_mutex_t.
3488         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3489         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3490         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3491         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3492         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3493         to pthread_mutex_t.
3495 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3497         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3498         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3499         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3500         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3501         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3502         and PTHREAD_MUTEXATTR_FLAG_BITS.
3503         * descr.h (struct pthread): Add robust_list field and define
3504         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3505         * pthread_mutexattr_getrobust.c: New file.
3506         * pthread_mutexattr_setrobust.c: New file.
3507         * pthread_mutex_consistent.c: New file.
3508         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3509         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3510         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3511         Adjust pthread_mutex_t initializers.
3512         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3513         field to pthread_mutex_t.
3514         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3515         and __prev field to pthread_mutex_t.
3516         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3517         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3518         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3519         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3520         * pthread_mutexattr_gettype.c: Likewise.
3521         * pthread_mutexattr_setpshared.c: Likewise.
3522         * pthread_mutexattr_settype.c: Likewise.
3523         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3524         Initialize mutex kind according to robust flag.
3525         * pthread_mutex_lock.c: Implement local robust mutex.
3526         * pthread_mutex_timedlock.c: Likewise.
3527         * pthread_mutex_trylock.c: Likewise.
3528         * pthread_mutex_unlock.c: Likewise.
3529         * pthread_create.c (start_thread): Mark robust mutexes which remained
3530         locked as dead.
3531         * tst-robust1.c: New file.
3532         * tst-robust2.c: New file.
3533         * tst-robust3.c: New file.
3534         * tst-robust4.c: New file.
3535         * tst-robust5.c: New file.
3536         * tst-robust6.c: New file.
3537         * tst-robust7.c: New file.
3538         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3539         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3540         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3541         tst-robust5, tst-robust6, and tst-robust7.
3543         * tst-typesizes.c: New file.
3544         * Makefile (tests): Add tst-typesizes.
3546         * tst-once3.c: More debug output.
3548 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3550         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3551         missing after last change.
3553         * version.c: Update copyright year.
3555 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3557         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3558         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3559         * pthread_mutex_trylock.c: Likewise.
3560         * pthread_mutex_timedlock.c: Likewise.
3561         * pthread_mutex_unlock.c: Likewise.
3563 2005-12-22  Roland McGrath  <roland@redhat.com>
3565         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3566         so that #include_next's search location is not reset to the -I..
3567         directory where <nptl/...> can be found.
3569 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3571         [BZ #1913]
3572         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3573         Fix unwind info.  Remove useless branch prediction prefix.
3574         * tst-cancel24.cc: New file.
3575         * Makefile: Add rules to build and run tst-cancel24.
3577 2005-12-21  Roland McGrath  <roland@redhat.com>
3579         * libc-cancellation.c: Use <> rather than "" #includes.
3580         * pt-cleanup.c: Likewise.
3581         * pthread_create.c: Likewise.
3582         * pthread_join.c: Likewise.
3583         * pthread_timedjoin.c: Likewise.
3584         * pthread_tryjoin.c: Likewise.
3585         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3586         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3587         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3588         * unwind.c: Likewise.
3590 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3592         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3593         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3594         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3595         THREAD_COPY_POINTER_GUARD): Define.
3597 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3599         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3600         rather than one.
3601         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3602         THREAD_COPY_POINTER_GUARD): Define.
3603         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3604         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3605         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3606         THREAD_COPY_POINTER_GUARD): Define.
3607         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3608         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3609         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3610         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3611         Use PTR_DEMANGLE for B0 if defined.
3613 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3615         * pthread_create.c (__pthread_create_2_1): Use
3616         THREAD_COPY_POINTER_GUARD if available.
3617         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3618         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3619         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3620         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3621         * sysdeps/x86_64/tls.h: Likewise.
3623 2005-12-15  Roland McGrath  <roland@redhat.com>
3625         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3627 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3629         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3630         sysdeps/generic.
3631         * errno-loc.c: New file.
3633 2005-12-12  Roland McGrath  <roland@redhat.com>
3635         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3636         adjustments before choosing stack size.  Update minimum stack size
3637         calculation to match allocate_stack change.
3639 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3641         * allocatestack.c (allocate_stack): Don't demand that there is an
3642         additional full page available on the stack beside guard, TLS, the
3643         minimum stack.
3645 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3647         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3648         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3650         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3651         compiling 32-bit code we must define __cleanup_fct_attribute.
3653 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3655         [BZ #1920]
3656         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3657         __attribute__ instead of __attribute.
3658         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3659         (__cleanup_fct_attribute): Likewise.
3661 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3663         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3664         a write barrier before writing libgcc_s_getcfa.
3666 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3668         * sysdeps/unix/sysv/linux/configure: Removed.
3670 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3672         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3673         optional init_array/fini_array support.
3675 2005-10-24  Roland McGrath  <roland@redhat.com>
3677         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3678         versioned_symbol use.
3680 2005-10-16  Roland McGrath  <roland@redhat.com>
3682         * init.c (__pthread_initialize_minimal_internal): Even when using a
3683         compile-time default stack size, apply the minimum that allocate_stack
3684         will require, and round up to page size.
3686 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3688         * Makefile ($(test-modules)): Remove static pattern rule.
3690 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3691             Ulrich Drepper  <drepper@redhat.com>
3693         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3694         alignment in callback function.
3695         * Makefile: Add rules to build and run tst-align3.
3696         * tst-align3.c: New file.
3698 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3700         * allocatestack.c (setxid_signal_thread): Add
3701         INTERNAL_SYSCALL_DECL (err).
3703 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3705         * allocatestack.c (setxid_signal_thread): Need to use
3706         atomic_compare_and_exchange_bool_acq.
3708 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3709             Jakub Jelinek  <jakub@redhat.com>
3711         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3712         CANCEL_RESTMASK.
3713         (struct pthread): Move specific_used field to avoid padding.
3714         Add setxid_futex field.
3715         * init.c (sighandler_setxid): Reset setxid flag and release the
3716         setxid futex.
3717         * allocatestack.c (setxid_signal_thread): New function.  Broken
3718         out of the bodies of the two loops in __nptl_setxid.  For undetached
3719         threads check whether they are exiting and if yes, don't send a signal.
3720         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3721         * pthread_create.c (start_thread): For undetached threads, check
3722         whether setxid bit is set.  If yes, wait until signal has been
3723         processed.
3725         * allocatestack.c (STACK_VARIABLES): Initialize them.
3726         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3728 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3730         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3731         waiters, awake all waiters on the associated mutex.
3733 2005-09-22  Roland McGrath  <roland@redhat.com>
3735         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3736         ../sysdeps/x86_64/hp-timing.h).
3738 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3740         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3741         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3742         (lll_futex_wake_unlock): Define.
3743         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3744         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3745         (lll_futex_wake_unlock): Define.
3746         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3747         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3748         (lll_futex_wake_unlock): Define.
3749         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3750         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3751         (lll_futex_wake_unlock): Define.
3752         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3753         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3754         (lll_futex_wake_unlock): Define.
3755         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3756         lll_futex_wake_unlock.
3757         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3758         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3759         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3760         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3761         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3762         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3764 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3766         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3767         Fix typo in register name.
3769 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3771         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3772         Use __sigfillset.  Document that sigfillset does the right thing wrt
3773         to SIGSETXID.
3775 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3777         [BZ #1102]
3778         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3779         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3780         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3781         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3782         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3783         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3784         in the structure.
3785         * Makefile (tests): Add tst-initializers1.
3786         (CFLAGS-tst-initializers1.c): Set.
3787         * tst-initializers1.c: New test.
3789 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3791         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3792         Make sure __flags are located at offset 48 from the start of the
3793         structure.
3795 2005-07-02  Roland McGrath  <roland@redhat.com>
3797         * Makeconfig: Comment fix.
3799 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3801         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3802         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3803         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3804         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3805         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3806         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3807         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3808         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3809         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3810         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3812 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3814         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3815         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3816         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3817         fields.
3818         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3819         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3820         field.  Put in sysinfo field unconditionally.
3821         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3822         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3823         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3824         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3825         fields.
3826         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3827         * pthread_create.c (__pthread_create_2_1): Use
3828         THREAD_COPY_STACK_GUARD macro.
3829         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3830         tests.
3831         * tst-stackguard1.c: New file.
3832         * tst-stackguard1-static.c: New file.
3834 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3836         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3837         Invoke CGOTSETUP and CGOTRESTORE.
3838         (CGOTSETUP, CGOTRESTORE): Define.
3840 2005-05-29  Richard Henderson  <rth@redhat.com>
3842         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3843         (tf_write, tf_writev): Use it.
3844         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3845         the system minimum.
3847 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3849         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3850         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3851         __librt_*_asynccancel@local.
3853 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3855         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3856         all occurrences of JUMPTARGET.  Instead append @local to labels.
3858 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3860         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3861         size/alignment of struct pthread rather than tcbhead_t.
3862         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3863         Likewise.
3864         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3865         Likewise.
3866         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3867         Likewise.
3869 2005-05-19  Richard Henderson  <rth@redhat.com>
3871         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3872         __sync_val_compare_and_swap, not explicit _si variant.
3873         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3875 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3877         [BZ #915]
3878         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3880 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3882         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3883         .eh_frame section, use cfi_* directives.
3885 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3887         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3888         of "" includes.
3890 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3892         [BZ #1075]
3893         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3894         aio_write blocks.
3896 2005-04-27  Roland McGrath  <roland@redhat.com>
3898         * Makefile (tests): Remove tst-clock2.
3900         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3901         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3902         translating to the kernel clockid_t for our own process/thread clock.
3904         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3906 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3908         * old_pthread_cond_init.c: Include <errno.h>.
3909         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3910         process shared or uses clock other than CLOCK_REALTIME.
3911         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3913 2005-04-13  David S. Miller  <davem@davemloft.net>
3915         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3916         * sysdeps/sparc/sparc64/clone.S: New file.
3918 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3920         [BZ #1102]
3921         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3922         __inline instead of inline.
3923         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3925 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3927         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3928         functionally equivalent, but shorter instructions.
3929         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3930         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3931         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3932         Likewise.
3933         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3934         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3935         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3936         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3937         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3938         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3939         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3940         Likewise.
3941         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3942         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3944         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3945         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3947 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3949         * sysdeps/mips/Makefile: New file.
3950         * sysdeps/mips/nptl-sysdep.S: New file.
3951         * sysdeps/mips/tcb-offsets.sym: New file.
3952         * sysdeps/mips/pthread_spin_lock.S: New file.
3953         * sysdeps/mips/pthread_spin_trylock.S: New file.
3954         * sysdeps/mips/pthreaddef.h: New file.
3955         * sysdeps/mips/tls.h: New file.
3956         * sysdeps/mips/jmpbuf-unwind.h: New file.
3957         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3958         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3959         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3960         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3961         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3962         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3963         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3964         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3965         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3966         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3968 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3970         [BZ #1112]
3971         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3972         variable to scerr.
3974 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3976         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3978 2005-02-25  Roland McGrath  <roland@redhat.com>
3980         * alloca_cutoff.c: Correct license text.
3981         * tst-unload.c: Likewise.
3982         * sysdeps/pthread/allocalim.h: Likewise.
3983         * sysdeps/pthread/pt-initfini.c: Likewise.
3984         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3985         * sysdeps/pthread/bits/sigthread.h: Likewise.
3986         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3987         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3989 2005-02-16  Roland McGrath  <roland@redhat.com>
3991         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3992         Use unsigned int * for ptr_nthreads.
3994 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3996         [BZ #721]
3997         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3998         gcc4.
4000 2005-02-07  Richard Henderson  <rth@redhat.com>
4002         [BZ #787]
4003         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
4004         argument.
4006 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
4008         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
4009         order of arguments in invocation of atomic_add_zero.
4011 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
4013         [BZ #737]
4014         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
4015         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
4016         at least gotntpoff relocation and addition.
4017         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4018         Likewise.
4019         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
4020         Likewise.
4021         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
4022         Likewise.
4024 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
4026         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
4027         entry for static tls deallocation fix.
4028         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
4029         also contains information whether the memory pointed to is static
4030         TLS or not.
4031         * sysdeps/i386/tls.h: Likewise.
4032         * sysdeps/ia64/tls.h: Likewise.
4033         * sysdeps/powerpc/tls.h: Likewise.
4034         * sysdeps/s390/tls.h: Likewise.
4035         * sysdeps/sh/tls.h: Likewise.
4036         * sysdeps/sparc/tls.h: Likewise.
4037         * sysdeps/x86_64/tls.h: Likewise.
4039 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
4041         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
4043 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
4045         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
4046         %esp.
4047         * Makefile (tests): Add tst-align2.
4048         * tst-align2.c: New test.
4049         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
4050         -mpreferred-stack-boundary=4.
4052 2004-12-18  Roland McGrath  <roland@redhat.com>
4054         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
4055         New file removed withdrawn for the moment.
4057 2004-12-17  Richard Henderson  <rth@redhat.com>
4059         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4060         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4062 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4064         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4065         Increased PTHREAD_STACK_MIN.
4067         * tst-context1.c (stacks): Use bigger stack size.
4069 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4071         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4072         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4074 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4076         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4077         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4078         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4080 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4082         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4084 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4086         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4087         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4089         * tst-getpid1.c: If child crashes, report this first.  Print which
4090         signal.
4092 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4094         * init.c (__pthread_initialize_minimal_internal): Also unblock
4095         SIGSETXID.
4097 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4099         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4100         _POSIX_THREAD_CPUTIME): Define to 0.
4101         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4102         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4103         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4104         __timer_signal_thread_tclk): Remove.
4105         (init_module): Remove their initialization.
4106         (thread_cleanup): Remove their cleanup assertions.
4107         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4108         __timer_signal_thread_tclk): Remove.
4109         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4110         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4111         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4113 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4115         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4116         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4118         * Makefile (tests): Add tst-getpid2.
4119         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4120         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4121         * tst-getpid2.c: New test.
4123 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4125         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4127 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4129         * Makefile (tests): Add tst-getpid1.
4130         * tst-getpid1.c: New file.
4131         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4132         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4134 2004-12-02  Roland McGrath  <roland@redhat.com>
4136         * Makefile (libpthread-nonshared): Variable removed.
4137         ($(objpfx)libpthread_nonshared.a): Target removed.
4138         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4139         These are now handled by generic magic from
4140         libpthread-static-only-routines being set.
4142 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4144         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4145         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4146         _POSIX_THREAD_PRIO_PROTECT): Define.
4147         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4148         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4149         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4151 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4153         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4154         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4155         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4156         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4157         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4158         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4159         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4161 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4163         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4165         * Makefile (libpthread-routines): Add pthread_setschedprio.
4166         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4167         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4168         * pthread_setschedprio.c: New file.
4170 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4172         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4173         * pthread_cancel.c (pthread_create): Likewise.
4175         * Makefile (libpthread-routines): Add vars.
4176         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4177         * init.c (__default_stacksize, __is_smp): Remove.
4178         * vars.c: New file.
4179         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4180         and define a wrapper macro.
4181         (PTHREAD_STATIC_FN_REQUIRE): Define.
4182         * allocatestack.c (__find_thread_by_id): Undefine.
4183         * pthread_create (__pthread_keys): Remove.
4184         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4185         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4186         PTHREAD_STATIC_FN_REQUIRE.
4188 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4190         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4191         parameter to REGISTER macro.
4193 2004-11-17  Roland McGrath  <roland@redhat.com>
4195         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4196         Make sure SIGCANCEL is blocked as well.
4198 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4200         * sysdeps/pthread/setxid.h: New file.
4201         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4202         (struct xid_command): Add forward decl.
4203         (struct pthread_functions): Change return type of __nptl_setxid hook
4204         to int.
4205         * pthreadP.h (__nptl_setxid): Change return type to int.
4206         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4207         calling thread, return its return value and set errno on failure.
4208         * descr.h (struct xid_command): Change id type to long array.
4210         * Makefile: Add rules to build and test tst-setuid1 and
4211         tst-setuid1-static.
4212         * tst-setuid1.c: New test.
4213         * tst-setuid1-static.c: New test.
4215 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4217         * Makefile (tests): Add tst-exit3.
4218         * tst-exit3.c: New test.
4220 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4222         * Makefile (tests): Add tst-exit2.
4223         * tst-exit2.c: New file.
4225 2004-11-09  Roland McGrath  <roland@redhat.com>
4227         [BZ #530]
4228         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4229         here, before calling clone.
4230         * pthread_create.c (start_thread): Don't do it here.
4232 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4234         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4236 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4238         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4239         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4240         assembler warning.
4242 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4244         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4245         if sched_priority is not between minprio and maxprio.
4247 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4249         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4250         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4252         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4253         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4255 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4257         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4258         not-cancelable I/O functions.
4260 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4262         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4263         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4264         make sure 2 is stored in the futex and we looked at the old value.
4265         Fix a few other problems to return the correct value.
4267 2004-10-14  Richard Henderson  <rth@redhat.com>
4269         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4270         make gcc4 happy.
4272 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4274         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4275         of pthread-functions.h and pthreaddef.h.
4276         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4278         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4279         Change __data.__nwaiters from int to unsigned int.
4281         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4282         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4284         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4285         before return type.
4287         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4288         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4290 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4292         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4293         test fails, remove message queue.
4294         (tf_msgsnd): Likewise.
4296 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4298         * tst-clock1.c: Change #ifdef to #if defined.
4299         * tst-clock2.c: Likewise.
4300         * tst-cond11.c: Likewise.
4302         * sysdeps/pthread/timer_create.c (timer_create): Use
4303         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4304         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4305         THREAD_CPUTIME.
4307 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4309         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4310         _POSIX_THREAD_CPUTIME): Define to 0.
4312 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4314         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4315         and _POSIX_THREAD_CPUTIME to zero.
4316         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4317         * tst-barrier2.c: Fix testing for POSIX feature.
4318         * tst-clock1.c: Likewise.
4319         * tst-clock2.c: Likewise.
4320         * tst-cond11.c: Likewise.
4321         * tst-cond4.c: Likewise.
4322         * tst-cond6.c: Likewise.
4323         * tst-flock2.c: Likewise.
4324         * tst-mutex4.c: Likewise.
4325         * tst-mutex9.c: Likewise.
4326         * tst-rwlock12.c: Likewise.
4327         * tst-rwlock4.c: Likewise.
4328         * tst-signal1.c: Likewise.
4329         * tst-spin2.c: Likewise.
4330         * sysdeps/pthread/posix-timer.h: Likewise.
4331         * sysdeps/pthread/timer_create.c: Likewise.
4332         * sysdeps/pthread/timer_routines.c: Likewise.
4334 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4336         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4337         (__lll_mutex_timedlock_wait): Address futex correctly.
4339         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4340         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4341         make sure 2 is stored in the futex and we looked at the old value.
4342         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4343         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4344         which might very well made the code not working at all before.
4345         [BZ #417]
4347 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4349         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4350         allow SIGSETXID to be sent.
4351         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4352         for SIGSETXID to be defined.
4353         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4354         SIGSETXID cannot be blocked.
4356         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4357         Add __extension__ to long long types.
4358         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4359         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4360         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4361         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4362         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4363         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4364         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4366 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4368         * descr.h (struct pthread): Add stopped_start field.
4369         * sysdeps/pthread/createthread.c (create_thread): Set
4370         start_stopped flag in descriptor for new thread appropriately.
4371         * pthread_create.c (start_thread): Only take lock to be stopped on
4372         startup if stopped_start flag says so.
4374 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4376         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4377         is created detached and if yes, do not try to free the stack in case
4378         the thread creation failed.
4379         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4380         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4381         case there has been no error.  [BZ #405]
4383         * pthread_create.c (start_thread): Don't wait for scheduler data
4384         etc to be set at the beginning of the function.  The cancellation
4385         infrastructure must have been set up.  And enable async
4386         cancellation before potentially going to sleep.  [BZ #401]
4388 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4390         * Versions: Remove exports for pthread_set*id_np functions.
4391         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4392         for now.
4393         * Makefile: Don't build pthread_set*id code for now.
4395 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4397         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4398         internal use.
4399         * allocatestack.c (__nptl_setxid): New function.
4400         * descr.h (struct xid_command): Define type.
4401         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4402         (sighandler_setxid): New function.
4403         (__pthread_initialize_minimal): Register sighandler_setxid for
4404         SIGCANCEL.
4405         * pt-allocrtsig.c: Update comment.
4406         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4407         Declare __nptl_setxid.
4408         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4409         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4410         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4411         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4412         and pthread_setresuid_np.
4413         * pthread_setgid_np.c: New file.
4414         * pthread_setuid_np.c: New file.
4415         * pthread_setegid_np.c: New file.
4416         * pthread_seteuid_np.c: New file.
4417         * pthread_setregid_np.c: New file.
4418         * pthread_setreuid_np.c: New file.
4419         * pthread_setresgid_np.c: New file.
4420         * pthread_setresuid_np.c: New file.
4421         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4422         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4423         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4424         and pthread_setresuid_np.
4425         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4426         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4427         pthread_setregid, and pthread_setresgid.
4429 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4431         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4432         ENOMEM when out of memory.
4434 2004-09-10  Roland McGrath  <roland@redhat.com>
4436         [BZ #379]
4437         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4438         code, since we don't try to use the broken CLONE_STOPPED any more.
4439         * pthread_create.c (start_thread): Likewise.
4441 2004-09-15  Richard Henderson  <rth@redhat.com>
4443         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4445 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4447         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4448         (__libc_unwind_longjmp): Delete macro and declare as function.
4449         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4450         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4451         nptl directory.
4452         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4453         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4454         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4456 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4458         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4459         for __USE_XOPEN2K.
4460         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4461         types also for __USE_XOPEN2K.
4462         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4463         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4464         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4465         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4466         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4467         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4468         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4469         [BZ #320]
4471 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4473         * sysdeps/pthread/pthread.h
4474         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4475         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4476         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4477         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4478         [BZ #375]
4480 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4482         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4483         PSEUDO to be used with . prefix.
4485         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4486         Use atomic_increment instead of atomic_exchange_and_add.
4487         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4488         Likewise.
4489         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4490         Likewise.
4491         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4492         Likewise.
4494         * allocatestack.c (allocate_stack): Use atomic_increment_val
4495         instead of atomic_exchange_and_add.
4496         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4497         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4498         Likewise.
4499         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4500         Likewise.
4502         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4503         the initialization function might throw.
4505 2005-09-05  Richard Henderson  <rth@redhat.com>
4507         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4508         Move definition inside libpthread, libc, librt check.  Provide
4509         definition for rtld.
4511 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4513         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4514         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4515         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4516         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4517         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4518         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4519         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4520         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4521         * unwind.c: Use it.
4523         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4524         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4525         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4526         Likewise.
4527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4528         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4529         this is the last waiter, signal pthread_cond_destroy caller and
4530         avoid using the pthread_cond_t structure after unlock.
4531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4532         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4533         Read clock type from the least significant bits of __nwaiters instead
4534         of __clock.
4535         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4536         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4538 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4540         [BZ #342]
4541         * Makefile (tests): Add tst-cond20 and tst-cond21.
4542         * tst-cond20.c: New test.
4543         * tst-cond21.c: New test.
4544         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4545         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4546         it unsigned int.
4547         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4548         Likewise.
4549         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4550         (pthread_cond_t): Likewise.
4551         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4552         Likewise.
4553         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4554         Likewise.
4555         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4556         Likewise.
4557         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4558         (cond_nwaiters): New.
4559         (clock_bits): New.
4560         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4561         if there are waiters not signalled yet.
4562         Wait until all already signalled waiters wake up.
4563         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4564         __nwaiters.  If pthread_cond_destroy has been called and this is the
4565         last waiter, signal pthread_cond_destroy caller and avoid using
4566         the pthread_cond_t structure after unlock.
4567         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4568         decrement it when leaving.  If pthread_cond_destroy has been called
4569         and this is the last waiter, signal pthread_cond_destroy caller.
4570         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4571         Likewise.  Read clock type from the least significant bits of
4572         __nwaiters instead of __clock.
4573         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4574         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4575         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4576         clock type just from the last COND_CLOCK_BITS bits of value.
4577         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4578         instead of __clock, just from second bit of condattr's value.
4580 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4582         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4583         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4584         != 64.
4585         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4587 2004-08-15  Roland McGrath  <roland@frob.com>
4589         * pthread_atfork.c: Update copyright terms including special exception
4590         for these trivial files, which are statically linked into executables
4591         that use dynamic linking for the significant library code.
4593 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4595         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4596         pthread_rwlock_rdlock.
4597         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4598         Decrease __nr_readers_queued after reacquiring lock.
4599         * sysdeps/pthread/pthread_rwlock_timedrdlock
4600         (pthread_rwlock_timedrdlock): Likewise.
4601         Reported by Bob Cook <bobcook47@hotmail.com>.
4603 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4605         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4606         before pthread_barrier_wait.
4608 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4611         Remove unnecessary exception handling data.
4613 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4615         [BZ #284]
4616         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4617         instead of clockid_t.
4619 2004-07-21  Roland McGrath  <roland@redhat.com>
4621         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4623 2004-07-19  Roland McGrath  <roland@redhat.com>
4625         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4627 2004-07-02  Roland McGrath  <roland@redhat.com>
4629         * configure: Don't exit.
4631 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4633         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4634         (__pthread_cond_timedwait): Check for invalid nanosecond in
4635         timeout value.
4637 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4639         * Makefile: Add rules to build and run tst-fini1.
4640         * tst-fini1.c: New file.
4641         * tst-fini1mod.c: New file.
4643 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4645         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4646         if no cancellation support is needed.
4647         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4648         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4649         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4650         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4651         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4652         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4653         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4654         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4655         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4657         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4658         only if not already defined.
4660 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4662         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4663         constraint "m" instead of "0" for futex.
4665         * shlib-versions: Add powerpc64-.*-linux.*.
4667 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4669         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4670         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4671         for valid tv_nsec.
4672         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4673         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4674         bits.
4676 2004-06-29  Roland McGrath  <roland@redhat.com>
4678         * Banner: NPTL no longer has its own version number.
4679         * Makefile (nptl-version): Variable removed.
4680         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4681         using $(version), the glibc version number.
4683 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4685         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4686         Fix branch offset for a PLT entry.
4687         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4688         Likewise.
4689         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4690         Likewise.
4691         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4692         Likewise.
4693         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4694         Likewise.
4696 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4698         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4699         unconditionally.
4701 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4703         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4704         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4705         instead of tv_sec.
4706         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4707         (pthread_rwlock_timedrdlock): Likewise.
4709 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4711         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4712         Set __r7 to val, not mutex.
4714 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4716         * Makefile: Add rules to build tst-rwlock14.
4717         * tst-rwlock14.c: New file.
4719 2004-06-24  Boris Hu  <boris.hu@intel.com>
4721         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4722         check.
4723         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4725 2004-06-19  Andreas Jaeger  <aj@suse.de>
4727         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4728         assembler in last patch.
4730 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4732         * sysdeps/pthread/pthread_cond_timedwait.c
4733         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4734         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4735         (__pthread_cond_timedwait): Check for invalid nanosecond in
4736         timeout value.
4737         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4738         * tst-cond19.c: New file.
4739         * Makefile: Add rules to build and run tst-cond19.
4741 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4743         * tst-context1.c (GUARD_PATTERN): Defined.
4744         (tst_context_t): Define struct containing ucontext_t & guard words.
4745         (ctx): Declare as an array of tst_context_t.
4746         (fct): Verify uc_link & guard words are still valid.
4747         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4749 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4751         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4752         Add __data.__futex field, reshuffle __data.__clock.
4753         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4754         (__pthread_cond_signal): Increment __futex at the same time as
4755         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4756         address of low 32-bits of __wakeup_seq to futex syscall.
4757         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4758         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4759         releasing internal lock to FUTEX_WAIT.
4760         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4761         (__pthread_cond_timedwait): Likewise.
4762         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4763         (FUTEX_CMP_REQUEUE): Define.
4764         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4765         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4766         Pass __futex value from before the unlock and __futex address instead
4767         of address of low 32-bits of __wakeup_seq to futex syscall.
4768         Fallback to FUTEX_WAKE all on any errors.
4770 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4772         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4773         comment typo.
4774         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4775         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4776         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4777         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4778         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4780 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4782         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4783         Add memory clobber to inline assembly.
4784         (__lll_mutex_trylock): Likewise.
4785         (__lll_mutex_cond_trylock): Likewise.
4787 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4789         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4790         Pass val argument as 6th system call argument in %r7.
4792 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4794         * Makefile (tests): Add tst-cond16.
4795         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4796         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4797         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4798         Add __data.__futex field, reshuffle __data.__clock.
4799         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4800         (__pthread_cond_signal): Increment __futex at the same time as
4801         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4802         address of low 32-bits of __wakeup_seq to futex syscall.
4803         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4804         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4805         releasing internal lock to FUTEX_WAIT.
4806         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4807         (__pthread_cond_timedwait): Likewise.
4808         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4809         (FUTEX_CMP_REQUEUE): Define.
4810         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4811         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4812         Pass __futex value from before the unlock and __futex address instead
4813         of address of low 32-bits of __wakeup_seq to futex syscall.
4814         Fallback to FUTEX_WAKE all on any errors.
4815         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4816         Define.
4817         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4818         internally.  Return non-zero if error, zero if success.
4819         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4820         Add __data.__futex field, reshuffle __data.__clock.
4821         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4822         Define.
4823         (lll_futex_requeue): Add val argument, return 1 unconditionally
4824         for the time being.
4825         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4826         Add __data.__futex field, reshuffle __data.__clock.
4827         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4828         Define.
4829         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4830         internally.  Return non-zero if error, zero if success.
4831         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4832         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4833         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4834         Define.
4835         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4836         internally.  Return non-zero if error, zero if success.
4837         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4838         Add __data.__futex field, reshuffle __data.__clock.
4839         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4840         Define.
4841         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4842         internally.  Return non-zero if error, zero if success.
4843         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4844         Add __data.__futex field, reshuffle __data.__clock.
4845         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4846         Add __data.__futex field, reshuffle __data.__clock.
4847         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4848         Increment __futex at the same time as __wakeup_seq or __total_seq.
4849         Pass address of __futex instead of address of low 32-bits of
4850         __wakeup_seq to futex syscall.
4851         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4852         Pass __futex value from before releasing internal lock
4853         to FUTEX_WAIT.
4854         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4855         Likewise.  Avoid unnecessary shadowing of variables.
4856         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4857         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4858         unlock and __futex address instead of address of low 32-bits of
4859         __wakeup_seq to futex_requeue macro, adjust for new return value
4860         meaning.
4861         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4862         (__pthread_cond_signal): Increment __futex at the same time as
4863         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4864         address of low 32-bits of __wakeup_seq to futex syscall.
4865         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4866         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4867         releasing internal lock to FUTEX_WAIT.
4868         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4869         (__pthread_cond_timedwait): Likewise.
4870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4871         (FUTEX_CMP_REQUEUE): Define.
4872         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4873         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4874         Pass __futex value from before the unlock and __futex address instead
4875         of address of low 32-bits of __wakeup_seq to futex syscall.
4876         Fallback to FUTEX_WAKE all on any errors.
4878 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4880         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4881         Add nop to align the end of critical section.
4882         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4884 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4886         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4887         Add __broadcast_seq field.
4888         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4889         all waiters as woken with woken_seq and bump broadcast counter.
4890         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4891         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4892         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4893         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4895 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4897         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4898         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4899         Reported by Kaz Kojima.
4901 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4903         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4905 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4907         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4908         __broadcast_seq with bc_seq after acquiring internal lock instead of
4909         before it.
4911 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4913         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4914         compilation.
4915         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4916         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4917         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4918         (pthread_cond_t): Add __data.__broadcast_seq field.
4919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4920         (FRAME_SIZE): Define.
4921         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4922         Comment typo fixes.
4923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4924         Define.
4925         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4926         typo fixes.
4927         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4928         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4929         fixes.
4931 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4933         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4934         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4935         Add __broadcast_seq field.
4936         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4937         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4938         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4939         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4940         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4941         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4942         all waiters as woken with woken_seq and bump broadcast counter.
4943         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4944         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4945         __broadcast_seq field.
4946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4947         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4948         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4949         * pthread_cond_init.c: Initialize __broadcast_seq field.
4950         * Makefile (tests): Add tst-cond17 and tst-cond18.
4951         Add .NOTPARALLEL goal.
4952         * tst-cond16.c: New file.  From Jakub.
4953         * tst-cond17.c: New file.  From Jakub.
4954         * tst-cond18.c: New file.  From Jakub.
4956 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4958         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4959         unwind info.
4961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4962         Parametrize frame size.  Correct some unwind info.
4963         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4965 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4967         * tst-stack3.c: Note testing functionality beyond POSIX.
4969 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4971         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4972         Change conditional from ifdef to if.
4974 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4976         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4977         SYSDEP_CANCEL_ERROR): Define.
4978         (PSEUDO): Use it.
4980 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4982         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4984 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4986         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4988 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4990         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4991         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4992         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4993         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4995 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4997         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4998         thread has all signals blocked.
5000 2004-04-18  Andreas Jaeger  <aj@suse.de>
5002         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
5003         (SEM_VALUE_MAX): Add missing brace.
5005 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5007         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
5008         in rt subdir.
5009         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
5010         * sysdeps/pthread/tst-mqueue8x.c: New test.
5011         * tst-cancel4.c: Update comment about message queues.
5013         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
5014         return it_value { 0, 0 }.
5015         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
5016         like SIGEV_SIGNAL.
5017         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
5018         assertion for SIGEV_NONE.
5019         (thread_attr_compare): Compare all attributes, not just a partial
5020         subset.
5022 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
5024         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
5026 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
5028         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
5029         Just use a plain number.
5030         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
5031         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
5032         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
5033         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
5034         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
5035         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
5036         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
5038 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5040         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
5041         frame info.
5042         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5044 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
5046         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
5047         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
5048         of calling sigwaitinfo.
5050 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
5052         * allocatestack.c (allocate_stack): Set reported_guardsize
5053         unconditionally.
5054         * pthread_getattr_np.c (pthread_getattr_np): Use
5055         reported_guardsize instead of guardsize.
5056         * descr.h (struct pthread): Add reported_guardsize field.
5058 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5060         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5062 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5064         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5066 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5068         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5069         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5070         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5071         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5072         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5073         Define.
5074         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5075         (_POSIX_MESSAGE_PASSING): Define.
5076         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5077         (_POSIX_MESSAGE_PASSING): Define.
5078         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5079         (_POSIX_MESSAGE_PASSING): Define.
5081 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5083         * tst-context1.c (fct): Check whether correct stack is used.
5085 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5087         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5088         matching constraints for asm mem parameters.
5090         * tst-clock2.c (tf): Don't define unless needed.
5092 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5094         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5095         $(gnulib).
5097 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5099         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5100         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5101         * pthreadP.h: Declare __nptl_deallocate_tsd.
5102         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5103         Adjust caller.
5105         * Makefile (tests): Add tst-tsd5.
5106         * tst-tsd5.c: New file.
5108 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5110         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5111         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5112         is SHLIB_COMPAT check.
5113         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5114         (__pthread_attr_getaffinity_old): Likewise.
5115         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5116         (__pthread_getaffinity_old): Likewise.
5117         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5118         (__pthread_setaffinity_old): Likewise.
5120 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5122         * allocatestack.c (_make_stacks_executable): Call
5123         _dl_make_stack_executable first.
5125 2004-03-24  Roland McGrath  <roland@redhat.com>
5127         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5128         constraint instead of "0".
5130 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5132         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5133         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5135         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5136         code to avoid warning.
5138 2004-03-24  Andreas Jaeger  <aj@suse.de>
5140         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5141         (__pthread_attr_setaffinity_old): Remove const.
5143 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5145         * sysdeps/unix/sysv/linux/smp.h: New file.
5146         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5147         * init.c: Define __is_smp.
5148         (__pthread_initialize_minimal_internal): Call is_smp_system to
5149         initialize __is_smp.
5150         * pthreadP.h: Declare __is_smp.
5151         Define MAX_ADAPTIVE_COUNT is necessary.
5152         * pthread_mutex_init.c: Add comment regarding __spins field.
5153         * pthread_mutex_lock.c: Implement adaptive mutex type.
5154         * pthread_mutex_timedlock.c: Likewise.
5155         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5156         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5157         Add __spins field.
5158         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5159         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5160         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5161         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5162         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5163         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5164         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5165         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5166         lll_mutex_cond_trylock.
5167         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5168         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5169         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5170         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5171         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5172         Define BUSY_WAIT_NOP.
5173         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5174         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5176         * tst-mutex5.c: Add support for testing adaptive mutexes.
5177         * tst-mutex7.c: Likewise.
5178         * tst-mutex5a.c: New file.
5179         * tst-mutex7a.c: New file.
5180         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5182         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5183         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5184         vgettimeofday call might destroy the content.
5186         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5187         @pause in the loop.
5189         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5190         No need to restrict type of ret.  Make it int.  Add comment.
5192         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5193         Remove unnecessary setne instruction.
5195 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5197         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5198         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5199         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5200         If realloc fails, break out of the loop.
5202 2004-03-20  Andreas Jaeger  <aj@suse.de>
5204         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5205         (__pthread_setaffinity_old): Fix interface.
5206         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5207         (__pthread_getaffinity_old): Likewise.
5209         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5210         (__pthread_setaffinity_new): Remove duplicate declaration.
5212 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5214         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5215         the return value to a safe register.
5216         (CDISABLE): Set the function argument correctly.
5218 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5220         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5221         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5222         Rewrite so that only one locked memory operation per round is needed.
5223         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5224         (pthread_barrier_wait): After wakeup, release lock only when the
5225         last thread stopped using the barrier object.
5226         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5227         (__pthread_cond_wait): Don't store mutex address if the current
5228         value is ~0l.  Add correct cleanup support and unwind info.
5229         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5230         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5231         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5232         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5233         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5234         Add correct cleanup support and unwind info.
5235         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5236         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5237         information for syscall wrappers.
5239 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5241         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5242         cpusetsize field, remove next.
5243         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5244         parameter for size of the CPU set.
5245         (pthread_setaffinity_np): Likewise.
5246         (pthread_attr_getaffinity_np): Likewise.
5247         (pthread_attr_setaffinity_np): Likewise.
5248         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5249         interface change, keep compatibility code.
5250         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5251         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5252         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5253         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5254         __pthread_getaffinity_np.
5255         * Versions: Add version for changed interfaces.
5256         * tst-attr3.c: Adjust test for interface change.
5257         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5258         increasing buffer sizes.
5259         * pthread_attr_destroy.c: Remove unused list handling.
5260         * pthread_attr_init.c: Likewise.
5262 2004-03-17  Roland McGrath  <roland@redhat.com>
5264         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5265         first argument to clock_getres so we ever enable kernel timers.
5267 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5269         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5271 2004-03-12  Richard Henderson  <rth@redhat.com>
5273         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5274         oldvalue from CENABLE to CDISABLE.
5276 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5278         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5279         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5280         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5281         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5283 2004-03-11  Richard Henderson  <rth@redhat.com>
5285         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5286         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5287         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5289 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5291         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5292         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5293         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5295 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5297         * forward.c (__pthread_cond_broadcast_2_0,
5298         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5299         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5300         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5302 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5304         * sysdeps/sh/tcb-offsets.sym: Add PID.
5305         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5306         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5308 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5310         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5311         include <sysdep-cancel.h>, vfork is no cancellation point.
5312         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5313         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5314         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5316 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5318         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5319         libc_hidden_def.
5320         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5321         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5322         Likewise.
5323         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5324         Likewise.
5325         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5326         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5327         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5328         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5329         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5331         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5332         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5333         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5334         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5335         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5336         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5338         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5339         a local register for saving old PID.  Negate PID in parent upon exit.
5341         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5342         tcb-offsets.h.
5343         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5344         before syscall, set to the old value in the parent afterwards.
5345         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5346         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5347         tcb-offsets.h.
5348         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5349         before syscall, set to the old value in the parent afterwards.
5350         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5351         * sysdeps/s390/tcb-offsets.sym: Add PID.
5353         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5354         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5355         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5356         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5357         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5358         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5360 2004-03-10  Andreas Schwab  <schwab@suse.de>
5362         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5363         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5364         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5366 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5368         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5369         * tst-cancel21.c (do_one_test): Likewise.
5370         Reported by Gordon Jin <gordon.jin@intel.com>.
5372 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5374         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5375         if non-zero and set to INT_MIN if zero.
5376         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5377         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5378         (SAVE_PID, RESTORE_PID): Define.
5379         (__vfork): Use it.
5380         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5381         Use relative path to avoid including NPTL i386/vfork.S.
5382         (SAVE_PID, RESTORE_PID): Define.
5383         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5384         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5385         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5386         tst-vfork2x.
5387         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5388         * tst-vfork1.c: New test.
5389         * tst-vfork2.c: New test.
5390         * tst-vfork1x.c: New test.
5391         * tst-vfork2x.c: New test.
5393 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5395         * sysdeps/i386/tcb-offsets.sym: Add PID.
5396         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5397         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5398         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5400 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5402         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5404 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5406         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5407         _rtld_global_ro.
5409 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5411         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5412         _rtld_global_ro.
5414         * tst-once4.c: Remove unnecessary macro definition.
5416         * tst-mutex7.c (do_test): Limit thread stack size.
5417         * tst-once2.c (do_test): Likewise.
5418         * tst-tls3.c (do_test): Likewise.
5419         * tst-tls1.c (do_test): Likewise.
5420         * tst-signal3.c (do_test): Likewise.
5421         * tst-kill6.c (do_test): Likewise.
5422         * tst-key4.c (do_test): Likewise.
5423         * tst-join4.c (do_test): Likewise.
5424         * tst-fork1.c (do_test): Likewise.
5425         * tst-context1.c (do_test): Likewise.
5426         * tst-cond2.c (do_test): Likewise.
5427         * tst-cond10.c (do_test): Likewise.
5428         * tst-clock2.c (do_test): Likewise.
5429         * tst-cancel10.c (do_test): Likewise.
5430         * tst-basic2.c (do_test): Likewise.
5431         * tst-barrier4.c (do_test): Likewise.
5433 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5435         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5437 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5440         (__pthread_cond_timedwait): Optimize wakeup test.
5441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5442         (__pthread_cond_wait): Likewise.
5443         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5444         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5445         Likewise.
5447 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5449         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5450         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5451         the atomic instruction needed.
5452         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5453         (__lll_mutex_lock_wait): Likewise.
5455 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5457         * Makefile (tests): Add tst-cond14 and tst-cond15.
5458         * tst-cond14.c: New file.
5459         * tst-cond15.c: New file.
5461 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5463         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5464         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5465         needs to be implemented differently to be useful.
5467 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5469         * pthread_attr_setschedparam.c: Don't test priority against limits
5470         here.  Set ATTR_FLAG_SCHED_SET flag.
5471         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5472         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5473         from parent thread to child.  If attribute is used and scheduling
5474         parameters are not inherited, copy parameters from attribute or
5475         compute them.  Check priority value.
5476         * pthread_getschedparam.c: If the parameters aren't known yet get
5477         them from the kernel.
5478         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5479         ATTR_FLAG_POLICY_SET flag for thread.
5480         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5481         and ATTR_FLAG_POLICY_SET.
5483         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5485         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5486         fail if stack address hasn't been set.  Just return 0.
5488 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5490         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5491         libpthread for the files in this list.
5492         (CFLAGS-tst-unload): Removed.
5493         * tst-unload.c (do_test): Don't use complete path for
5494         LIBPHREAD_SO.
5496         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5497         tst-_res1mod2.
5499 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5501         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5502         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5503         operation per round is needed.
5504         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5505         (__lll_mutex_lock_wait): Likewise.
5507 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5509         * tst-cancel9.c (cleanup): Don't print to stderr.
5511 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5513         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5515 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5517         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5518         (__syscall_error_handler2): Call CDISABLE.
5519         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5520         (__syscall_error_handler2): Call CDISABLE.
5522         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5523         Release lock before the loop, don't reacquire it.
5525         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5527 2004-02-19  Andreas Schwab  <schwab@suse.de>
5529         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5530         Fix last change.
5532 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5534         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5535         (pthread_barrier_wait): After wakeup, release lock only when the
5536         last thread stopped using the barrier object.
5537         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5538         (pthread_barrier_wait): Likewise.
5539         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5540         Likewise.
5541         * Makefile (tests): Add tst-barrier4.
5542         * tst-barrier4.c: New file.
5544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5545         (__pthread_cond_timedwait): Perform timeout test while holding
5546         internal lock to prevent wakeup race.
5547         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5548         * sysdeps/pthread/pthread_cond_timedwait.c
5549         (__pthread_cond_timedwait): Likewise.
5550         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5551         (__pthread_cond_timedwait): Likewise.
5553 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5555         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5556         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5557         * Makefile (tests): Add tst-rwlock13.
5558         * tst-rwlock13.c: New test.
5560 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5562         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5563         (__condvar_tw_cleanup): Little optimization.
5564         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5566 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5568         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5569         libpthread as "lib" parameter to SHLIB_COMPAT.
5570         (__novmx_siglongjmp): Fix typo in function name.
5571         (__novmx_longjmp): Fix typo in function name.
5573 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5575         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5576         __builtin_expect.
5578         * sysdeps/generic/pt-longjmp.c: Moved to...
5579         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5581 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5583         * Makefile (libpthread-routines): Add pt-cleanup.
5584         * pt-longjmp.c: Removed.
5585         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5586         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5587         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5588         Version longjmp, siglongjmp for GLIBC_2.3.4.
5589         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5591 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5593         * sysdeps/pthread/pthread_cond_timedwait.c
5594         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5595         Reuse code.  Add __builtin_expects.
5597         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5598         (__pthread_cond_timedwait): Get internal lock in case timeout has
5599         passed before the futex syscall.
5600         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5602 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5604         * allocatestack.c: Pretty printing.
5606         * sysdeps/pthread/createthread.c (create_thread): Don't add
5607         CLONE_DETACHED bit if it is not necessary.
5609 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5611         * pthread_getattr_np.c: Include ldsodefs.h.
5613 2004-01-16  Richard Henderson  <rth@redhat.com>
5615         * allocatestack.c: Don't declare __libc_stack_end.
5616         * init.c (__pthread_initialize_minimal_internal): Likewise.
5617         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5619 2004-01-15  Richard Henderson  <rth@redhat.com>
5621         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5622         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5623         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5624         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5625         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5626         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5627         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5628         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5630 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5632         * init.c (pthread_functions): Make array const.
5634 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5636         * allocatestack.c (__make_stacks_executable): Change interface.
5637         Check parameters.  Pass parameter on to libc counterpart.
5638         * pthreadP.h: Change declaration.
5640 2004-01-13  Richard Henderson  <rth@redhat.com>
5642         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5643         prototype form.
5644         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5645         Likewise.
5647         * sysdeps/alpha/Makefile: New file.
5648         * sysdeps/alpha/tcb-offsets.sym: New file.
5649         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5650         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5652         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5653         on powerpc version.
5655 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5657         * Makefile (tests): Add tst-backtrace1.
5658         * tst-backtrace1.c: New test.
5660 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5662         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5663         register as second parameter to the REGISTER macro.
5664         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5665         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5666         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5667         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5668         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5669         of thread register as second parameter to REGISTER macro in 64 case.
5671 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5673         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5674         (CFLAGS-getpid.o): Defined.
5675         (CFLAGS-getpid.os): Defined.
5677 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5679         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5680         returned for main thread does not overlap with any other VMA.
5681         Patch by Jakub Jelinek.
5683 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5685         * tst-raise1.c: Include stdio.h.
5687 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5689         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5690         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5691         If pid is 0, set it to selftid.
5692         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5693         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5694         != 0, return self->tid without doing a syscall.
5695         * descr.h (struct pthread): Move pid field after tid.
5697         * Makefile (tests): Add tst-raise1.
5698         * tst-raise1.c: New file.
5700 2003-12-23  Roland McGrath  <roland@redhat.com>
5702         * tst-oddstacklimit.c: New file.
5703         * Makefile (tests): Add it.
5704         (tst-oddstacklimit-ENV): New variable.
5706         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5707         value up to page size for __default_stacksize.
5709 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5711         * Makefile (tests): Add tst-eintr5.
5712         * tst-eintr5.c: New file.
5714         * eintr.c (eintr_source): Prevent sending signal to self.
5716         * tst-eintr2.c (tf1): Improve error message.
5718 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5720         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5721         * sysdeps/unix/sysv/linux/getpid.c: New file.
5722         * pthread_cancel.c: Add comment explaining use of PID field.
5723         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5724         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5725         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5726         temporarily to signal the field must not be relied on and updated
5727         by getpid().
5728         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5729         temporarily negative.
5730         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5732 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5734         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5735         (eintr_source): If ARG != NULL, use pthread_kill.
5736         * tst-eintr1.c: Adjust for this change.
5737         * tst-eintr2.c: Likewise.
5738         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5739         * tst-eintr3.c: New file.
5740         * tst-eintr4.c: New file.
5742 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5744         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5745         if CANCELSTATE_BITMASK is set.
5746         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5747         Likewise.
5749         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5750         (tests-reverse): Add tst-cancel23.
5751         * tst-cancel22.c: New test.
5752         * tst-cancel23.c: New test.
5754 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5756         * tst-eintr1.c: Better error messages.
5758         * Makefile (tests): Add tst-eintr2.
5759         * tst-eintr2.c: New file.
5761 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5763         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5764         (CFLAGS-tst-cancelx21.c): Set.
5765         * tst-cancel21.c: New test.
5766         * tst-cancelx21.c: New test.
5768         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5769         comparison operand.
5770         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5771         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5772         * pt-longjmp.c: Include jmpbuf-unwind.h.
5773         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5774         _JMPBUF_UNWINDS.  Adjust compared pointers.
5775         * init.c (__pthread_initialize_minimal_internal): Initialize
5776         pd->stackblock_size.
5777         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5778         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5779         * sysdeps/i386/jmpbuf-unwind.h: New file.
5780         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5781         * sysdeps/s390/jmpbuf-unwind.h: New file.
5782         * sysdeps/sh/jmpbuf-unwind.h: New file.
5783         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5784         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5785         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5786         (_JMPBUF_CFA_UNWINDS): Remove.
5787         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5789 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5791         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5792         (CFLAGS-tst-cancelx20.c): Set.
5793         * tst-cancel20.c: New test.
5794         * tst-cancelx20.c: New test.
5796 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5798         * init.c (__pthread_initialize_minimal_internal): Don't treat
5799         architectures with separate register stack special here when
5800         computing default stack size.
5802 2003-12-17  Roland McGrath  <roland@redhat.com>
5804         * Makefile (tst-cancelx7-ARGS): New variable.
5805         Reportd by Greg Schafer <gschafer@zip.com.au>.
5807 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5809         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5810         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5811         (tst-stack3-ENV): Set.
5812         ($(objpfx)tst-stack3-mem): New.
5813         * tst-stack3.c: New test.
5815 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5817         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5818         Add unwind directives.  Drop unused .regstk directive.
5819         (_fini_EPILOG_BEGINS): Add unwind directives.
5821 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5823         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5824         Assume parameter is a pointer.
5825         (lll_futex_wake): Likewise.
5826         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5827         Likewise.
5828         (lll_futex_wake): Likewise.
5829         Reported by Boris Hu.
5830         * sysdeps/unix/sysv/linux/unregister-atfork.c
5831         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5833         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5835 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5837         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5838         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5839         __rtld_lock_initialize for ld.so lock.
5840         Patch in part by Adam Li <adam.li@intel.com>.
5842 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5844         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5845         in $(gnulib).  Also, remove stale comment.
5847 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5849         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5850         advantage of new syscall stub and optimize accordingly.
5852         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5853         from SYS_futex, to match expectations of
5854         sysdep.h:DO_INLINE_SYSCALL.
5855         (lll_futex_clobbers): Remove.
5856         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5857         (lll_futex_wake): Likewise.
5858         (lll_futex_requeue): Likewise.
5859         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5860         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5861         Jelinek).
5862         (__lll_mutex_lock): Likewise.
5863         (__lll_mutex_cond_lock): Likewise.
5864         (__lll_mutex_timed_lock): Likewise.
5865         (__lll_mutex_unlock): Likewise.
5866         (__lll_mutex_unlock_force): Likewise.
5868         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5869         comes before the include of <sysdep.h>.
5870         (THREAD_SELF_SYSINFO): New macro.
5871         (THREAD_SYSINFO): Likewise.
5872         (INIT_SYSINFO): New macro.
5873         (TLS_INIT_TP): Call INIT_SYSINFO.
5875         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5877         * sysdeps/pthread/createthread.c (create_thread): Use
5878         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5879         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5880         THREAD_SELF_SYSINFO instead of open code.
5881         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5882         (THREAD_SYSINFO): Likewise.
5884         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5886         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5888 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5890         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5891         instead of .init.  Patch by David Mosberger.
5893 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5895         * sysdeps/pthread/configure.in: Remove broken declaration in C
5896         cleanup handling check.
5898 2003-11-30  Andreas Jaeger  <aj@suse.de>
5900         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5901         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5902         Likewise.
5904 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5906         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5907         * pthread_attr_destroy.c: Include shlib-compat.h.
5908         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5909         is set in iattr->flags.
5910         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5912 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5914         * Makefile (distribute): Add tst-cleanup4aux.c.
5916         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5917         include.
5919 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5921         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5922         pthread_cond_signal.
5924         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5925         store mutex address if the current value is ~0l.
5926         * sysdeps/pthread/pthread_cond_timedwait.c
5927         (__pthread_cond_timedwait): Likewise.
5928         * sysdeps/pthread/pthread_cond_broadcast.c
5929         (__pthread_cond_broadcast): Don't use requeue for pshared
5930         condvars.
5932         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5933         (__pthread_cond_wait): Don't store mutex address if the current
5934         value is ~0l.
5935         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5936         (__pthread_cond_timedwait): Likewise.
5937         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5938         (__pthread_cond_broadcast): Don't use requeue for pshared
5939         condvars.
5941         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5942         element with ~0l for pshared condvars, with NULL otherwise.
5944         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5945         (__pthread_cond_wait): Don't store mutex address if the current
5946         value is ~0l.
5947         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5948         (__pthread_cond_timedwait): Likewise.
5949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5950         (__pthread_cond_broadcast): Don't use requeue for pshared
5951         condvars.
5953         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5954         * tst-cond12.c: New file.
5955         * tst-cond13.c: New file.
5957 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5959         * sysdeps/pthread/configure.in: Make missing forced unwind support
5960         fatal.
5962 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5964         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5966 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5968         * Makefile: Add magic to clean up correctly.
5970 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5972         * unwind.c (FRAME_LEFT): Define.
5973         (unwind_stop): Handle old style cleanups here.
5974         (__pthread_unwind): Handle old style cleanups only if
5975         !HAVE_FORCED_UNWIND.
5976         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5977         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5978         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5979         ($(objpfx)tst-cleanupx4): Likewise.
5980         * tst-cleanup4.c: New test.
5981         * tst-cleanup4aux.c: New.
5982         * tst-cleanupx4.c: New test.
5984 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5986         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5987         lll_mutex_*lock macros to skip atomic operations on some archs.
5989 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5991         * sysdeps/pthread/tst-timer.c (main): Initialize
5992         sigev2.sigev_value as well.
5994 2003-10-15  Roland McGrath  <roland@redhat.com>
5996         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5997         is missing.
5998         * sysdeps/pthread/configure: Regenerated.
6000 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6002         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
6003         locking macros.  No distinction between normal and mutex locking
6004         anymore.
6005         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
6006         Merge bits from lowlevelmutex.S we still need.
6007         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
6008         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
6009         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
6010         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
6011         new mutex implementation.
6012         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
6013         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6014         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6015         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6016         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
6017         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6018         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6019         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
6020         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6021         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
6022         symbol for entry point to avoid cancellation.
6024 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
6026         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
6027         changes.
6028         (SAVE_OLDTYPE_0): Fix a typo.
6030 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
6032         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6033         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
6035 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6037         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
6038         correct offset.
6040 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
6042         * Makefile (tests): Add tst-cancel19.
6043         * tst-cancel19.c: New test.
6045 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
6047         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
6048         restoring of the old cancellation type.
6050 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
6052         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6054 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6056         * sysdeps/pthread/malloc-machine.h: New file
6058 2003-09-24  Roland McGrath  <roland@redhat.com>
6060         * allocatestack.c (__make_stacks_executable): Don't ignore return
6061         value from _dl_make_stack_executable.
6063 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6065         * allocatestack.c (__make_stacks_executable): Also change
6066         permission of the currently unused stacks.
6068         * allocatestack.c (change_stack_perm): Split out from
6069         __make_stacks_executable.
6070         (allocate_stack): If the required permission changed between the time
6071         we started preparing the stack and queueing it, change the permission.
6072         (__make_stacks_executable): Call change_stack_perm.
6074         * Makefile: Build tst-execstack-mod locally.
6075         * tst-execstack-mod.c: New file.
6077 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6079         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6081 2003-09-23  Roland McGrath  <roland@redhat.com>
6083         * tst-execstack.c: New file.
6084         * Makefile (tests): Add it.
6085         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6086         (LDFLAGS-tst-execstack): New variable.
6088         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6089         whether to use PROT_EXEC for stack mmap.
6090         (__make_stacks_executable): New function.
6091         * pthreadP.h: Declare it.
6092         * init.c (__pthread_initialize_minimal_internal): Set
6093         GL(dl_make_stack_executable_hook) to that.
6095 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6097         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6098         recommendation from AMD re avoidance of lock prefix.
6100 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6102         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6103         lll_futex_timed_wait instead of lll_futex_wait.
6104         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6105         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6106         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6107         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6108         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6109         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6110         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6111         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6112         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6113         Completely revamp the locking macros.  No distinction between
6114         normal and mutex locking anymore.
6115         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6116         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6117         __lll_lock_timedwait): Fix prototypes.
6118         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6119         __lll_lock_timedwait): Likewise.
6120         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6121         macros, add __builtin_expect.
6122         (lll_mutex_timedlock): Likewise.  Fix return value.
6123         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6124         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6125         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6126         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6127         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6128         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6129         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6130         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6132 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6134         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6135         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6136         operation if possible.
6138         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6139         like jumping over the lock prefix.
6141 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6143         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6144         locking macros.  No distinction between normal and mutex locking
6145         anymore.
6146         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6147         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6148         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6149         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6150         locking.  Merge bits from lowlevelmutex.S we still need.
6151         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6152         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6153         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6154         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6155         * Makefile (routines): Remove libc-lowlevelmutex.
6156         (libpthread-rountines): Remove lowlevelmutex.
6157         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6158         for new mutex implementation.
6159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6161         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6162         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6164         Likewise.
6165         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6166         Likewise.
6167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6168         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6169         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6170         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6171         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6173         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6174         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6175         Likewise.
6176         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6177         Likewise.
6178         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6179         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6181         Don't use requeue.
6182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6183         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6185 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6187         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6188         in parameters of asm with output parameters.
6190         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6191         type of DECR parameter to int.
6192         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6194 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6196         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6197         guardsize for each thread.
6199 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6201         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6202         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6203         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6205         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6206         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6207         NULL.
6208         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6209         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6210         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6211         (pthread_getaffinity_np): Add hidden_def.
6213         * Makefile (tests): Add tst-attr3.
6214         * tst-attr3.c: New test.
6216         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6218 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6220         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6221         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6223 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6225         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6226         * tst-align.c: Include tst-stack-align.h.
6227         (tf, do_test): Use TEST_STACK_ALIGN macro.
6229 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6231         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6232         variable.
6234 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6236         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6237         stack-related values for the initial thread.
6239 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6241         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6243 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6245         * pthread_mutex_lock.c: Minor code rearrangements.
6247 2003-09-05  Roland McGrath  <roland@redhat.com>
6249         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6250         Instead, include ../nptl_db/db_info.c to do its magic.
6251         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6252         (__pthread_pthread_key_2ndlevel_size): Likewise.
6253         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6254         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6255         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6256         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6257         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6258         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6259         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6260         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6261         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6262         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6263         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6264         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6265         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6266         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6267         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6268         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6269         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6271 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6273         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6274         of pthread_t to be compatible with LT.
6275         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6276         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6277         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6278         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6279         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6280         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6281         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6283 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6285         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6287 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6289         * unwind-forcedunwind.c: Move to...
6290         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6291         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6292         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6293         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6294         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6295         * unwind.c: Include jmpbuf-unwind.h.
6296         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6298 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6300         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6301         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6302         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6303         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6304         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6305         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6306         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6307         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6308         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6309         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6310         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6311         function.
6312         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6313         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6314         * Makefile (tests): Add tst-stack2.
6315         * tst-stack2.c: New test.
6316         * tst-stack1.c: Include limits.h and sys/param.h.
6317         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6319         * pthread_condattr_setpshared.c: Include errno.h.
6320         (pthread_condattr_setpshared): Return EINVAL if pshared
6321         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6323         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6324         defined symbol for entry point to avoid cancellation.
6325         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6326         Likewise.
6327         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6328         Likewise.
6329         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6330         Likewise.
6331         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6332         Likewise.
6333         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6334         Likewise.
6335         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6336         __close_nocancel, __read_nocancel, __write_nocancel,
6337         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6338         libpthread.so or librt.so, define to corresponding function
6339         without _nocancel suffix.
6340         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6341         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6342         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6344         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6346 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6348         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6349         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6351         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6352         in subsections has a symbol associated with it.
6354         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6355         defined symbol for entry point to avoid cancellation.
6356         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6358 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6360         * Makefile (tests): Add tst-tls5.
6361         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6362         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6363         ($(objpfx)tst-tls5): New.
6364         ($(objpfx)tst-tls6.out): Likewise.
6365         (tests): Depend on $(objpfx)tst-tls6.out.
6366         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6367         (do_test): Check pthread_self () return value alignment.
6368         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6369         (tf): Check pthread_self () return value alignment.
6370         * tst-tls5.c: New test.
6371         * tst-tls5.h: New.
6372         * tst-tls5mod.c: New.
6373         * tst-tls5moda.c: New.
6374         * tst-tls5modb.c: New.
6375         * tst-tls5modc.c: New.
6376         * tst-tls5modd.c: New.
6377         * tst-tls5mode.c: New.
6378         * tst-tls5modf.c: New.
6379         * tst-tls6.sh: New test.
6381         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6382         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6383         * init.c (pthread_functions): Initialize them.
6384         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6385         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6386         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6387         pthread_cond_timedwait@@GLIBC_2.3.2.
6389 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6391         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6392         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6393         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6394         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6395         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6396         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6398         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6400         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6401         _POSIX_THREAD_PRIORITY_SCHEDULING.
6402         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6404 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6406         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6407         nested function, use static inline function from libio.h.
6408         Code by Richard Henderson.
6410         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6411         weak.
6413 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6415         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6416         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6417         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6418         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6419         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6420         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6421         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6422         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6423         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6424         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6425         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6426         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6427         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6428         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6429         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6430         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6431         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6432         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6433         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6434         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6435         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6436         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6437         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6438         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6439         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6440         * sysdeps/sparc/tls.h: New file.
6441         * sysdeps/sparc/tcb-offsets.sym: New file.
6442         * sysdeps/sparc/Makefile: New file.
6443         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6444         * init.c [__sparc__] (__NR_set_tid_address): Define.
6446 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6448         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6449         _IO_release_lock): Define.
6451 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6453         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6454         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6456 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6458         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6459         (__pthread_cleanup_class): Add missing return types of member
6460         functions.
6462 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6464         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6465         (lll_mutex_unlock_force): Add memory barrier between store and futex
6466         syscall.
6468 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6470         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6471         tempmsg in first loop.
6473 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6475         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6476         _POSIX_THREAD_PRIORITY_SCHEDULING.
6477         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6479 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6481         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6482         (__rtld_lock_default_lock_recursive,
6483         __rtld_lock_default_unlock_recursive): Define.
6484         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6485         __rtld_lock_unlock_recursive): Define using
6486         GL(_dl_rtld_*lock_recursive).
6487         * init.c (__pthread_initialize_minimal_internal): Initialize
6488         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6489         Lock GL(_dl_load_lock) the same number of times as
6490         GL(_dl_load_lock) using non-mt implementation was nested.
6492         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6493         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6495 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6497         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6498         PIPE_BUF.
6500 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6502         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6504 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6506         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6507         to first syscall error check.  Move syscall error check for tkill
6508         into __ASSUME_CLONE_STOPPED #ifdef.
6510 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6512         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6513         is not defined, do explicit synchronization.
6514         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6515         is not defined also unlock pd->lock for non-debugging case in case
6516         it is necessary.
6517         * pthread_create.c (start_thread): Always get and release pd->lock
6518         if __ASSUME_CLONE_STOPPED is not defined.
6519         (start_thread_debug): Removed.  Adjust users.
6520         * allocatestack.c (allocate_stack): Always initialize lock if
6521         __ASSUME_CLONE_STOPPED is not defined.
6522         * Makefile (tests): Add tst-sched1.
6523         * tst-sched1.c: New file.
6525         * sysdeps/pthread/createthread.c (do_clone): Only use
6526         sched_setschduler and pass correct parameters.
6528 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6530         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6531         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6532         PTHREAD_STACK_MIN in comments.
6534 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6536         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6537         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6538         argument.
6539         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6540         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6541         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6542         (__pthread_cleanup_upto): Fix prototype.
6543         (_longjmp_unwind): Adjust caller.
6544         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6545         Change second argument to const struct pointer.
6546         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6547         * tst-sem9.c (main): Likewise.
6548         * unwind.c: Include string.h for strlen prototype.
6550 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6553         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6554         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6555         Define HAVE_CMOV.
6556         Patch by Nicholas Miell <nmiell@attbi.com>.
6558 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6560         * init.c (__pthread_initialize_minimal_internal): Initialize
6561         GL(dl_init_static_tls).
6562         * pthreadP.h (__pthread_init_static_tls): New prototype.
6563         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6564         New functions.
6565         * Makefile (tests): Add tst-tls4.
6566         (modules-names): Add tst-tls4moda and tst-tls4modb.
6567         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6568         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6569         tst-tls4modb.so.
6570         * tst-tls4.c: New file.
6571         * tst-tls4moda.c: New file.
6572         * tst-tls4modb.c: New file.
6574 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6576         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6577         before __timer_dealloc.
6578         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6579         Don't call list_unlink.
6581 2003-07-29  Roland McGrath  <roland@redhat.com>
6583         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6585 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6587         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6588         Don't reuse struct aiocb A if it failed.
6589         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6590         not just one byte, as that does not block.
6592 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6594         * sysdeps/pthread/unwind-resume.c: New file.
6595         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6596         unwind-resume in csu subdir.
6597         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6598         exceptions.
6599         (librt-sysdep_routines, librt-shared-only-routines): Add
6600         rt-unwind-resume.
6601         * sysdeps/pthread/rt-unwind-resume.c: New file.
6602         * unwind-forcedunwind.c: New file.
6603         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6604         (libpthread-shared-only-routines): Likewise.
6605         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6606         * pthreadP.h (pthread_cancel_init): New prototype.
6607         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6609         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6610         attr argument const struct pthread_attr *.
6612         * res.c (__res_state): Return __resp.
6613         * descr.h: Include resolv.h.
6614         (struct pthread): Add res field.
6615         * pthread_create.c: Include resolv.h.
6616         (start_thread): Initialize __resp.
6617         * Makefile (tests): Add tst-_res1.
6618         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6619         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6620         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6621         libpthread.
6622         * tst-_res1.c: New file.
6623         * tst-_res1mod1.c: New file.
6624         * tst-_res1mod2.c: New file.
6626 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6628         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6630         * Makefile: Define various *-no-z-defs variables for test DSOs
6631         which has undefined symbols.
6633 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6635         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6636         Retry if the stwcx fails to store once_control.
6638 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6640         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6641         pthread_attr_setaffinity.
6642         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6643         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6644         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6645         * pthread_attr_destroy.c: Free cpuset element if allocated.
6646         * pthread_create.c: Pass iattr as additional parameter to
6647         create_thread.
6648         * sysdeps/pthread/createthread.c: If attribute is provided and
6649         a new thread is created with affinity set or scheduling parameters,
6650         start thread with CLONE_STOPPED.
6651         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6652         pthread_attr_setaffinity.
6653         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6654         cpuset element.
6656 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6658         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6660 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6662         * sysdeps/pthread/configure.in: Require CFI directives also for
6663         ppc and s390.
6665 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6667         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6668         Add cfi directives.
6670 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6672         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6673         CLEANUP_JMP_BUF.
6674         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6675         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6676         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6678         not self pointer in __writer.  Compare with TID to determine
6679         deadlocks.
6680         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6682         Likewise.
6683         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6684         Likewise.
6685         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6686         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6687         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6688         macros also when compiling librt.
6690 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6692         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6693         -fasynchronous-unwind-tables.
6694         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6695         (PSEUDO): Add cfi directives.
6696         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6697         Likewise.
6698         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6699         Likewise.
6701 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6703         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6704         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6705         * unwind.c (__pthread_unwind_next): Add hidden_def.
6706         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6707         Likewise.
6708         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6709         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6710         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6711         Likewise.
6712         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6713         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6714         Likewise.
6715         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6716         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6717         __pthread_unregister_cancel and __pthread_unwind_next.
6719 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6721         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6722         different symbol for the cancellation syscall wrapper and
6723         non-cancellation syscall wrapper.
6724         (PSEUDO_END): Define.
6726 2003-07-05  Richard Henderson  <rth@redhat.com>
6728         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6729         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6730         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6731         return actual return value from the syscall, not 0.
6733 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6735         * descr.h (struct pthread): Add pid field.
6736         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6737         (__reclaim_stacks): Likewise.
6738         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6739         also check for PID of the signal source.
6740         (__pthread_initialize_minimal_internal): Also initialize pid field
6741         of initial thread's descriptor.
6742         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6743         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6744         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6745         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6746         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6748 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6750         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6751         Fix use of parameter.
6752         (__libc_cleanup_pop): Likewise.
6754 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6756         * init.c (sigcancel_handler): Change parameters to match handler
6757         for SA_SIGACTION.  Check signal number and code to recognize
6758         invalid invocations.
6760 2003-07-03  Roland McGrath  <roland@redhat.com>
6762         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6763         Apply sizeof (struct pthread) bias to r13 value.
6765 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6767         * sysdeps/pthread/configure.in: Require CFI directives.
6769         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6770         definition.
6771         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6772         libpthread compilation.
6773         * unwind.c (__pthread_unwind): Add hidden_def.
6774         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6776 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6778         * libc-cancellation.c (__libc_cleanup_routine): Define.
6779         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6780         (__pthread_cleanup_pop): Define.
6782 2003-07-01  Richard Henderson  <rth@redhat.com>
6784         * sysdeps/alpha/elf/pt-initfini.c: New file.
6785         * sysdeps/alpha/pthread_spin_lock.S: New file.
6786         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6787         * sysdeps/alpha/pthreaddef.h: New file.
6788         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6789         * sysdeps/alpha/tls.h: New file.
6790         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6791         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6792         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6793         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6794         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6795         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6796         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6797         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6798         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6799         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6801 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6803         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6804         cleanup support and unwind info.
6806 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6808         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6809         Use correct cleanup handler registration.  Add unwind info.
6810         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6811         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6812         * tst-once3.c: Add cleanup handler and check it is called.
6813         * tst-once4.c: Likewise.
6814         * tst-oncex3.c: New file.
6815         * tst-oncex4.c: New file.
6816         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6818 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6820         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6822 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6824         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6825         (tf_msgsnd): Likewise.
6827         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6828         premature returns a bit more.
6830 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6832         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6833         definition to the front.
6835         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6836         the cleanup functions to make the names unique.  Fix dwarf opcode
6837         un unwind table.
6838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6839         functions to make the names unique.  Fix CFA offset for two blocks.
6841 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6843         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6844         missing closing braces.
6845         Patch by Christophe Saout <christophe@saout.de>.
6847 2003-06-24  Roland McGrath  <roland@redhat.com>
6849         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6851 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6853         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6854         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6856         * pthreadP.h: Declare __find_thread_by_id.
6857         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6858         * pthread_clock_gettime.c: Allow using other thread's clock.
6859         * pthread_clock_settime.c: Likewise.
6860         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6861         * Makefile: Add rules to build and run tst-clock2.
6862         * tst-clock2.c: New file.
6864 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6867         to use exception-based cleanup handler.
6868         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6870         * tst-cond8.c (ch): Announce that we are done.
6872         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6874         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6875         Also test aio_suspend with timeout value.
6877 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6879         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6880         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6881         attribute_hidden.
6883         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6884         (__pthread_mutex_lock_internal): Likewise.
6885         (__pthread_mutex_unlock_internal): Likewise.
6886         (__pthread_mutex_unlock_usercnt): Declare.
6887         * pthread_mutex_destroy.c: Always fail if used in any way.
6888         * pthread_mutex_init.c: Update comment.
6889         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6890         * pthread_mutex_timedlock.c: Adjust __nusers.
6891         * pthread_mutex_trylock.c: Adjust __nusers.
6892         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6893         and public interfaces are wrapper with pass additional parameter.
6894         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6895         parameter zero.
6896         * tst-mutex8.c: New file.
6897         * Makefile (tests): Add tst-mutex8.
6898         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6899         __pthread_mutex_unlock_usercnt.
6900         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6902         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6903         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6905         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6906         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6907         Add __nusers.
6908         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6909         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6910         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6911         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6912         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6914         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6915         * pthread_mutex_timedlock.c: Likewise.
6916         * pthread_mutex_trylock.c: Adjust __nusers.
6917         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6918         * tst-mutex9.c: New file.
6919         * Makefile (tests): Add tst-mutex9.
6920         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6921         * sysdeps/ia64/tls.h: Likewise.
6922         * sysdeps/powerpc/tls.h: Likewise.
6923         * sysdeps/s390/tls.h: Likewise.
6924         * sysdeps/sh/tls.h: Likewise.
6925         * sysdeps/x86_64/tls.h: Likewise.
6926         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6927         Change type of __owner.
6928         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6929         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6930         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6931         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6932         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6934 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6936         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6937         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6939         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6940         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6941         instead of nr to lll_futex_wake.  Only set errno and return -1
6942         if err < 0.
6944         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6945         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6946         return actual return value from the syscall, not 0.
6948 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6950         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6951         find a random value.
6952         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6953         errno==EIDRM.
6955         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6956         compat_timer_settime.
6957         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6958         compat_timer_gettime.
6959         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6960         compat_timer_getoverrun.
6961         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6962         compat_timer_delete.
6964         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6965         error-checking mutex detect busy mutexes.
6967 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6969         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6970         Add ax to clobber list.
6971         (lll_mutex_cond_lock): Likewise.
6972         (lll_mutex_unlock): Likewise.
6973         (lll_lock): Likewise.
6974         (lll_unlock): Likewise.
6976         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6977         * tst-cancel18.c: New file.
6978         * tst-cancelx18.c: New file.
6980         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6981         and tcdrain.
6983         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6984         * tst-cancel17.c: New file.
6985         * tst-cancelx17.c: New file.
6987         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6988         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6989         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6991         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6993 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6995         * sysdeps/pthread/createthread.c (create_thread): Set
6996         header.multiple_threads unconditionally.
6997         * allocatestack.c (allocate_stack): Likewise.
6998         * descr.h (struct pthread): Add header.multiple_threads
6999         unconditionally.
7000         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
7001         Define for librt.  #error if neither libpthread, libc nor librt.
7002         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
7003         Likewise.
7004         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
7005         CDISABLE): Likewise.
7006         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
7007         CDISABLE): Likewise.
7008         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
7009         CDISABLE): Likewise.
7010         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
7011         CDISABLE): Likewise.  Access header.multiple_threads outside of
7012         libc and libpthread.
7013         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
7014         Likewise.
7015         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
7016         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
7018 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
7020         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
7021         Also test early cancellation before the thread reaches the cancellation
7022         point.
7024         * Makefile: Compile forward.c with exceptions.
7026         * sysdeps/unix/sysv/linux/sleep.c: New file.
7028 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
7030         * Makefile: Add CFLAGS definition to compile function wrappers
7031         duplicated from libc with exceptions.
7032         * tst-cancel4.c: Also check cancellation handlers.
7034         * Makefile: Add rules to build and run tst-cancel16 and
7035         tst-cancelx16.  Add missing CFLAGS definitions.
7036         * tst-cancel16.c: New file.
7037         * tst-cancelx16.c: New file.
7039 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7042         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
7043         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
7044         (DL_SYSINFO_IMPLEMENTATION): Likewise.
7046         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
7047         (LIBC_CANCEL_RESET): Likewise.
7048         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7049         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7050         librt-cancellation.
7051         (CFLAGS-libcrt-cancellation.c): Define.
7052         * sysdeps/pthread/librt-cancellation.c: New file.
7053         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7054         macros also when compiling librt.
7055         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7056         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7057         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7058         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7059         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7060         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7061         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7063         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7064         compat_timer_create.
7066 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7068         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7070         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7071         __register_atfork.
7072         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7073         Add libc_hidden_def.
7075 2003-06-13  Roland McGrath  <roland@redhat.com>
7077         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7078         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7080 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7082         * allocatestack.c (queue_stack): Always inline.
7083         * ptreadhP.h (__do_cancel): Likewise.
7085 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7087         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7088         a typo.
7090 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7092         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7093         (__pthread_cond_signal): Remove incorrect second addition for
7094         cond_lock!=0.
7096 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7099         (__pthread_cond_signal): Use correct futex pointer in
7100         __lll_mutex_lock_wait call.
7102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7103         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7105 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7107         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7108         cancelable.
7109         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7110         Likewise.
7112         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7113         hand-written CFI generation code.  Since ENTRY/END also initiated
7114         CFI frames this caused two CFI sets to be generated.
7116 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7118         * cleanup_routine.c: New file.
7119         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7120         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7121         cleanup handling.
7122         * Makefile (libpthread-routines): Add cleanup_routine.
7123         Add more CFLAGS variables to compile with exceptions.  Add comments
7124         why which file needs unwind tables.
7125         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7126         tests.
7127         * tst-cancelx1.c: New file.
7128         * tst-cancelx2.c: New file.
7129         * tst-cancelx3.c: New file.
7130         * tst-cancelx4.c: New file.
7131         * tst-cancelx5.c: New file.
7132         * tst-cancelx6.c: New file.
7133         * tst-cancelx7.c: New file.
7134         * tst-cancelx8.c: New file.
7135         * tst-cancelx9.c: New file.
7136         * tst-cancelx10.c: New file.
7137         * tst-cancelx11.c: New file.
7138         * tst-cancelx12.c: New file.
7139         * tst-cancelx13.c: New file.
7140         * tst-cancelx14.c: New file.
7141         * tst-cancelx15.c: New file.
7142         * tst-cleanupx0.c: New file.
7143         * tst-cleanupx0.expect: New file.
7144         * tst-cleanupx1.c: New file.
7145         * tst-cleanupx2.c: New file.
7146         * tst-cleanupx3.c: New file.
7148         * tst-cleanup0.c: Make standard compliant.
7149         * tst-cleanup1.c: Likewise.
7151         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7152         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7153         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7154         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7155         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7156         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7157         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7158         CLEANUP_JMP_BUF.
7159         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7160         * tst-cancel12.c: New file.
7161         * tst-cancel13.c: New file.
7162         * tst-cancel14.c: New file.
7163         * tst-cancel15.c: New file.
7164         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7165         and tst-cancel15.
7167         * tst-cancel1.c: Add some comments.
7169         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7170         timeout correctly.
7172 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7174         * Makefile (CFLAGS-pthread_cancel.c): Define.
7176 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7178         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7179         Change type of __writer element to int.
7180         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7181         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7182         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7183         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7184         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7185         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7186         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7187         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7188         Compare with TID to determine deadlocks.
7189         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7190         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7191         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7192         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7193         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7194         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7195         Likewise.
7196         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7197         Likewise.
7198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7200         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7201         Likewise.
7202         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7203         Likewise.
7204         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7205         * Makefile (tests): Add tst-rwlock12.
7206         * tst-rwlock12.c: New file.
7208 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7210         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7211         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7212         Remove bogus hidden_proto.
7213         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7214         Likewise.
7215         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7216         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7217         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7218         ___lll_mutex_timedlock): Likewise.
7220 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7223         (__pthread_cond_signal): Add some code to eventually handle
7224         cond_lock!=0.
7226 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7228         * Makefile (tests): Add tst-exec4.
7229         (tst-exec4-ARGS): Define.
7230         * tst-exec4.c: New file.
7232 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7234         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7235         Also fail if tv_nsec < 0.
7236         (__lll_timedwait_tid): Likewise.
7237         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7238         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7239         Likewise.
7240         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7241         Likewise.
7242         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7243         Likewise.
7244         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7245         Likewise.
7246         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7247         Likewise.
7248         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7249         Likewise.
7251         * Makefile (tests): Add tst-sem8 and tst-sem9.
7252         * tst-sem8.c: New file.
7253         * tst-sem9.c: New file.
7254         * sem_open.c: Fix creation of in_use record if the file exists but
7255         no internal record.
7257         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7258         definitions.
7260         * sysdeps/pthread/timer_create.c (timer_create): In case
7261         evp==NULL, assign timer ID to sival_ptr.
7263         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7264         struct pthread_unwind_buf *.
7265         (struct pthread): Likewise for cleanup_jmp_buf element.
7267         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7268         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7269         * unwind.c (__pthread_unwind_next): Likewise.
7271 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7273         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7274         (lll_futex_timed_wait): Use int for futex value parameter.
7275         (lll_futex_wake): Likewise.
7276         (lll_futex_requeue): Likewise.
7278         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7279         Replace one memory operation with one register operation.
7281         * tst-join4.c (do_test): Fix error message.
7283         * tst-rwlock6.c (do_test): Use correct format specifier.
7285         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7286         (__lll_mutex_lock_wait): Replace one memory operation with one
7287         register operation.
7288         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7289         (__lll_mutex_lock_wait): Likewise.
7291         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7292         (__lll_mutex_cond_lock): Add one to value parameter of
7293         __lll_lock_wait to reflect reality in the futex syscall.
7294         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7295         (lll_mutex_cond_lock): Likewise.
7297 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7299         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7300         New function.
7301         (lll_mutex_cond_lock): Define.
7303 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7305         * Makefile (tests): Add tst-signal6.
7306         * tst-signal6.c: New file.
7308         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7309         (__lll_mutex_unlock_force): New function
7310         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7312         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7313         (__lll_mutex_unlock_force): New function.
7314         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7316         * tst-rwlock7.c (do_test): Use correct format specifier.
7318         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7319         Find break parameter in correct asm argument.
7321 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7323         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7324         Remove out4.
7325         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7326         error occured.
7327         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7328         Add __mutex.
7329         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7330         lll_futex_requeue, lll_mutex_unlock_force): Define.
7332 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7334         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7335         (pthread_cond_t): Add __mutex.
7336         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7337         lll_futex_requeue, lll_mutex_unlock_force): Define.
7339 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7341         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7342         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7343         Add __mutex field.
7344         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7345         Define.
7346         (lll_futex_wait, lll_futex_wake): Define.
7347         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7348         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7349         FUTEX_REQUEUE instead of FUTEX_WAIT.
7350         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7351         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7352         mutex which was used in condvar structure.  Call
7353         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7354         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7356         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7357         include tcb-offsets.h.  Read wakeup value in locked region.
7358         Use the value of gbr register as THREAD_ID.
7359         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7360         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7361         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7363         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7364         macros.
7366 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7368         * sysdeps/pthread/pthread_cond_broadcast.c
7369         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7371 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7373         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7374         typo in register name.
7375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7376         correctly.  Actually use requeue.  Little optimization.
7377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7378         mutex address early.  Handle cancellation state as 32-bit value.
7379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7380         Remove unnecessary label.
7382 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7384         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7385         instead of FUTEX_WAIT.
7386         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7388         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7389         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7391         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7392         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7393         of __pthread_mutex_lock_internal.
7394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7395         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7396         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7397         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7398         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7400         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7401         Add pthread_mutex_cond_lock.
7402         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7403         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7404         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7405         lll_mutex_cond_lock.
7406         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7407         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7408         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7409         Add __mutex field.
7410         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7411         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7413         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7414         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7416         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7417         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7418         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7419         macro don't define aliases.
7421         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7422         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7423         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7424         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7425         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7426         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7427         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7428         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7429         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7431 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7433         * sem_open.c: Fix one endless loop.  Implement correct semantics
7434         wrt opening the same semaphore more then once.
7435         * sem_close.c: Adjust for sem_open change.
7436         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7437         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7438         * Makefile (tests): Add tst-sem7.
7439         * tst-sem7.c: New file.
7441 2003-05-16  Roland McGrath  <roland@redhat.com>
7443         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7444         uninitialized variable braino.
7446 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7448         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7449         test for syscall availability.
7451         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7452         __no_posix_timers to -1 if the syscalls don't exist.
7454         * pthread_join.c (pthread_join): Set tid field of the joined
7455         thread to -1.  This isn't necessary but helps to recognize some
7456         error conditions with almost no cost.
7458         * allocatestack.c (FREE_P): Also negative values indicate an
7459         unused stack.
7461         * unwind.c: Include <unistd.h>.
7463 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7465         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7467 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7469         * Makefile (crti-objs, crtn-objs): New variables.
7470         (omit-deps, extra-objs): Add crtn.
7471         ($(objpfx)libpthread.so): Depend on both crti and crtn
7472         and links to them in multidir.
7473         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7475 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7477         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7478         (lll_mutex_unlock): Use atomic_exchange_rel.
7480 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7482         * cond-perf.c (cons): Add missing locking around setting of alldone.
7484 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7486         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7487         related macros.
7488         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7490 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7492         * tst-sem6.c: New file.
7493         * Makefile (tests): Add tst-sem6.
7495         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7496         Use atomic_exchange_rel instead of atomic_exchange.
7497         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7498         Likewise.
7500         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7501         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7502         vsyscall is possible.
7504         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7505         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7506         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7507         pthread_setaffinity_np.
7508         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7509         and pthread_setaffinity_np.
7510         * Makefile (libpthread-routines): Add pthread_getaffinity and
7511         pthread_setaffinity.
7513         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7514         use it in case mmap to allocate the stack fails.
7515         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7516         ARCH_MAP_FLAGS here.
7517         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7518         ARCH_RETRY_MMAP.
7520 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7522         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7523         handler implementation.  It is now lockless in fork().
7524         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7525         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7526         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7527         declare the __fork_*_lists.
7528         (struct fork_handler): Include pointers to all three functions.
7529         Add next, refcntr and need_signal elements.
7530         (__fork_handlers): New declaration.
7531         (__register_atfork_malloc): Remove declaration.
7532         (HAVE_register_atfork_malloc): Remove definition.
7533         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7534         __pthread_child_handler variable.
7535         (__libc_pthread_init): Use __register_atfork instead of explicitly
7536         adding to the list.
7537         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7538         and lll_futex_wake.
7539         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7541         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7542         function must never be reached.
7544         * cond-perf.c: New file.
7546 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7548         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7550 2003-05-04  Roland McGrath  <roland@redhat.com>
7552         * Makefile ($(objpfx)../libc.so): New target.
7554 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7556         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7557         (pthread_condattr_t): Size is only an int, don't use long for
7558         alignment.
7559         (pthread_mutexattr_t): Likewise.
7560         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7561         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7562         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7564 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7566         * sysdeps/i386/tls.h: Define THREAD_ID.
7567         * sysdeps/ia64/tls.h: Likewise.
7568         * sysdeps/powerpc/tls.h: Likewise.
7569         * sysdeps/s390/tls.h: Likewise.
7570         * sysdeps/sh/tls.h: Likewise.
7571         * sysdeps/x86_64/tls.h: Likewise.
7572         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7573         record ownership.
7574         * pthread_mutex_timedlock.c: Likewise.
7575         * pthread_mutex_trylock.c: Likewise.
7576         * pthread_mutex_unlock.c: Likewise.
7577         * pthread_rwlock_trywrlock.c: Likewise.
7578         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7579         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7580         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7581         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7583         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7584         flag.
7586 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7588         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7589         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7590         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7591         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7592         Make __align long long instead of long.
7593         (pthread_rwlock_t): Formatting.
7594         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7595         (pthread_rwlock_t): Formatting.
7596         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7597         (pthread_cond_t): Make __align long long instead of long.
7598         (pthread_rwlock_t): Move __flags field to the same position as in
7599         linuxthreads.
7601 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7603         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7604         * tst-rwlock7.c (do_test): Likewise.
7606 2003-04-26  Roland McGrath  <roland@redhat.com>
7608         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7610 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7612         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7613         sizeof (struct pthread).
7614         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7615         1 struct pthread.
7616         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7617         to 0.
7618         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7619         struct pthread.
7620         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7621         to 32-bit bytes.
7622         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7623         tcbp.
7624         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7625         unneccessarily.
7626         (NO_TLS_OFFSET): Define.
7627         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7628         add TLS_TCB_SIZE unnecessarily.
7630 2003-04-22  Roland McGrath  <roland@redhat.com>
7632         * Makeconfig (shared-thread-library): Reverse link order to work
7633         around linker bug.
7635 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7637         * semaphore.h: Fix typo in comment.
7639 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7641         * sysdeps/pthread/sigfillset.c: New file.
7643         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7644         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7645         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7646         * sysdeps/pthread/sigaction.c: Likewise.
7647         * sysdeps/pthread/sigprocmask.c: New file.
7648         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7649         __SIGRTMIN+1.
7650         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7651         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7652         in this case.
7654 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7656         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7657         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7659         * sysdeps/unix/sysv/linux/unregister-atfork.c
7660         (__unregister_atfork): Don't free memory not allocated dynamically.
7662         * semaphore.h: Remove __THROW marker from cancellation points.
7663         * nptl/sysdeps/pthread/pthread.h: Likewise.
7665 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7667         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7668         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7669         __THROW.
7671 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7673         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7675 2003-04-15  Roland McGrath  <roland@redhat.com>
7677         * forward.c (__pthread_unwind): Tweak to avoid warning.
7679 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7681         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7683 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7685         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7686         overflow CFA advance instructions.
7687         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7689 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7691         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7692         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7693         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7694         defined.
7696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7697         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7698         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7699         DW_CFA_advance_loc for .Laddl-.Lsubl.
7701 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7703         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7704         position-independent unwind data for static libraries.
7705         Add missing unwind info.  Add comments.
7707         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7708         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7712 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7714         * Makefile: Make sure all cancellation points are compiled with
7715         exception and asynchronous unwind tables.
7717         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7718         which mishandles loading of global object addresses in PIC.
7719         (THREAD_SETMEM_NC): Likewise.
7721 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7723         * pthread.h: Define new data structure for cleanup buffer.  Declare
7724         new cleanup handler interfaces.
7725         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7726         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7727         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7728         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7729         it.  Declare old cleanup handler installation functions.
7730         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7731         handling.
7732         * cleanup_defer.c: Likewise.
7733         * cleanup_compat.c: New file.  Old cleanup code.
7734         * cleanup_def_compat.c: New file.  Old cleanup code.
7735         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7736         if own thread descriptor.
7737         * unwind.c: New file.
7738         * forward.c: Add __pthread_unwind.
7739         * init.c (pthread_functions): Add __pthread_unwind.
7740         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7741         Add ptr___pthread_unwind.
7742         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7743         and unwind function.
7744         * Makefile (libpthread-routines): Add cleanup_compat,
7745         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7746         table generation if necessary.
7747         * version.c: Record whether unwind support is compiled in.
7748         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7749         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7750         handler interfaces.
7751         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7752         complication to generate unwind information for syscall wrappers.
7753         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7754         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7755         __cleanup_fct_attribute.
7757         * Makefile: Add rules to build and run tst-cleanup0.
7758         * tst-cleanup0.c: New file.
7759         * tst-cleanup0.expect: New file.
7761         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7762         caller.  Optimize to avoid often unecessary local variable.
7764 2003-04-11  Roland McGrath  <roland@redhat.com>
7766         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7767         sets variable `multidir'; include that.
7768         (generated): Add it.
7769         ($(objpfx)$(multidir)/crti.o): New target.
7770         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7772 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7774         * tst-attr2.c (do_test): Add cast to avoid warning.
7775         * tst-mutex4.c (do_test): Likewise.
7777 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7779         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7780         in child.
7782 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7784         * Makefile (tests): Add tst-detach1.
7785         * tst-detach1.c: New file.
7787 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7789         * sysdeps/pthread/pthread.h: Remove duplicate
7790         pthread_cleanup_{push,pop} definitions.
7792         * tst-barrier2.c: Eliminate warnings.
7793         * tst-cancel4.c: Likewise.
7794         * tst-cond4.c: Likewise.
7795         * tst-cond6.c: Likewise.
7796         * tst-detach1.c: Likewise.
7797         * tst-rwlock4.c: Likewise.
7798         * tst-rwlock6.c: Likewise.
7799         * tst-rwlock7.c: Likewise.
7800         * tst-sem3.c: Likewise.
7801         * tst-spin2.c: Likewise.
7802         * tst-umask1.c: Likewise.
7804 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7806         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7808 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7810         * descr.h (struct pthread): Move cancelhandling member to the front.
7812 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7814         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7815         malloc_parent, and malloc_child statically.
7816         (__register_atfork_malloc): New function.
7817         (free_mem): Don't free any of the malloc_* variables on the list.
7818         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7819         Define HAVE_register_atfork_malloc.
7821 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7823         * sysdeps/pthread/createthread.c (create_thread): Add some more
7824         comments explaining when to set multiple_threads and when not.
7826         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7827         THREAD_ATOMIC_BIT_SET if not already defined.
7828         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7829         THREAD_ATOMIC_BIT_SET:
7830         * sysdeps/x86_64/tls.h: Likewise.
7831         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7832         THREAD_ATOMIC_CMPXCHG_VAL.
7833         (_pthread_cleanup_pop_restore): Likewise.
7834         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7835         (__pthread_enable_asynccancel_2): Likewise.
7836         (__pthread_disable_asynccancel): Likewise.
7837         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7838         (__libc_disable_asynccancel): Likewise.
7839         * init.c (sigcancel_handler): Likewise.
7840         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7841         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7843 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7845         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7846         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7847         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7848         * Makefile (tests): Add tst-cancel11.
7849         * tst-cancel11.c: New file.
7851 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7853         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7854         round, not the first.  Use specific_used flag instead of local
7855         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7856         (__free_tcb): Don't call deallocate_tsd here.
7857         (start_thread): Call deallocate_tsd here.
7858         * pthread_setspecific.c: Set specific_used flag really only when
7859         needed.
7860         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7861         * tst-tsd3.c: New file.
7862         * tst-tsd4.c: New file.
7864 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7866         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7867         Use atomic_exchange_and_add instead of __lll_add.
7868         (__lll_mutex_timedlock): Likewise.
7869         Patch by Ian Wienand.
7871 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7873         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7874         (SINGLE_THREAD_P): Fix typo.
7875         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7877 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7879         * Makefile (tests): Add tst-align.
7880         * tst-align.c: New file.
7881         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7883         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7884         function correctly.
7886         * tst-tsd2.c: Add casts to avoid warnings.
7888 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7890         * descr.h (struct pthread): Move most often used elements to the front.
7892 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7894         * Makefile (libpthread-routines): Add pthread_atfork.
7895         (libpthread-static-only-routines): Add pthread_atfork.
7897 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7899         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7900         of TLS_DTV_AT_TP.
7901         (INSTALL_DTV): Add parens.
7902         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7903         Use passed descr instead of THREAD_SELF.
7904         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7905         (__lll_mutex_timedlock_wait): Correct expected value after
7906         spurious wakeup.
7907         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7908         Release lock before waking up the waiters.
7909         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7910         criteria.  Reorderstruct passed to cleanup handler.  Fix
7911         handling of cancellation and failung pthread_mutex_unlock call.
7912         Use __pthread_enable_asynccancel_2 instead of
7913         __pthread_enable_asynccancel.
7914         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7915         Return result of lock re-get if it fails.
7916         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7917         for __pthread_cleanup_push.
7918         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7919         completely broken rwlock implementation.
7920         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7921         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7922         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7923         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7924         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7925         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7926         versioned_symbol macro.
7927         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7928         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7930 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7932         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7933         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7934         and __helper_tid.
7935         (struct timer): Remove th and bar field.
7936         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7937         debugging code.  Create only one helper thread.
7938         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7939         helper thread.
7940         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7941         Renamed.  Define statically.  Use thread info from siginfo.
7942         (__helper_once): New variable.
7943         (__helper_tid): New variable.
7944         (__reset_helper_control): New function.
7945         (__start_helper_thread): New function.
7947         * pthread_create.c (start_thread): Don't use setjmp inside
7948         __builtin_expect to work around gcc bug.
7950         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7951         timer_delete syscall fails, but not with ENOSYS, set
7952         __no_posix_timers.
7954         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7955         (timer_settime): Fix typo.
7956         * sysdeps/unix/sysv/linux/timer_getoverr.c
7957         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7959 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7962         offset of cleanupbuf.__prev.
7964 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7966         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7967         of included file.
7969 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7971         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7972         NULL provide default definition to syscall.
7974 2003-03-25  Roland McGrath  <roland@redhat.com>
7976         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7977         (timer_id2ptr): Fix typo.
7979 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7981         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7982         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7983         * sysdeps/ia64/pthreaddef.h: Likewise.
7984         * sysdeps/powerpc/pthreaddef.h: Likewise.
7985         * sysdeps/s390/pthreaddef.h: Likewise.
7986         * sysdeps/sh/pthreaddef.h: Likewise.
7987         * sysdeps/x86_64/pthreaddef.h: Likewise.
7988         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7989         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7990         being changed.
7991         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7992         SIGTIMER is not unblocked.
7993         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7994         RT signal taken.
7995         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7996         be send.
7997         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7998         pass pointer through as ID.
7999         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
8000         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
8001         * sysdeps/unix/sysv/linux/timer_create.c: New file.
8002         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
8003         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
8004         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
8005         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
8006         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
8007         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
8008         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
8009         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
8010         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
8011         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
8012         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
8013         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
8014         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
8015         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
8016         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
8017         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
8018         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
8019         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
8020         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
8021         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
8022         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
8023         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
8024         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
8025         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
8026         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
8027         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
8028         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
8029         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
8030         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
8031         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
8033         * pthreadP.h: Remove FRAME_LEFT definition.
8034         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
8035         already left frame.  Programs which have this problem are not POSIX
8036         compliant.
8037         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
8039 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
8041         * sysdeps/pthread/tst-timer.c: Check return values of the
8042         functions we test.
8044 2003-03-23  Roland McGrath  <roland@redhat.com>
8046         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
8047         * tst-tls3mod.c: Likewise.
8048         * tst-tls1.c: Likewise.
8049         * tst-tls2.c: Likewise.
8051         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8052         undefined behavior.
8054         * tst-join5.c (tf1, tf2): Add a cast.
8056         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8058         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8059         Don't test anything.
8060         * tst-cond4.c: Likewise.
8061         * tst-cond6.c: Likewise.
8062         * tst-flock2.c: Likewise.
8063         * tst-mutex4.c: Likewise.
8064         * tst-rwlock4.c: Likewise.
8065         * tst-signal1.c: Likewise.
8066         * tst-spin2.c: Likewise.
8067         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8069         * tst-mutex4.c: Use test-skeleton.c.
8070         * tst-spin2.c: Likewise.
8071         * tst-sysconf.c: Likewise.
8072         * tst-barrier2.c: Likewise.
8073         * tst-cond4.c: Likewise.
8074         * tst-cond6.c: Likewise.
8075         * tst-rwlock4.c: Likewise.
8076         * tst-unload.c: Likewise.
8077         * tst-flock2.c (do_test): Use return instead of exit.
8079 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8081         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8083 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8085         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8086         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8087         instead of __lll_compare_and_swap.
8088         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8089         Likewise.
8090         Removed definition if __lll_compare_and_swap.
8092         * cancellation.c: Adjust for new form of compare&exchange macros.
8093         * cleanup_defer.c: Likewise.
8094         * init.c: Likewise.
8095         * libc-cancellation.c: Likewise.
8096         * old_pthread_cond_broadcast.c: Likewise.
8097         * old_pthread_cond_signal.c: Likewise.
8098         * old_pthread_cond_timedwait.c: Likewise.
8099         * old_pthread_cond_wait.c: Likewise.
8100         * pthread_cancel.c: Likewise.
8101         * pthread_create.c: Likewise.
8102         * pthread_detach.c: Likewise.
8103         * pthread_join.c: Likewise.
8104         * pthread_key_delete.c: Likewise.
8105         * pthread_setcancelstate.c: Likewise.
8106         * pthread_setcanceltype.c: Likewise.
8107         * pthread_timedjoin.c: Likewise.
8108         * pthread_tryjoin.c: Likewise.
8109         * sysdeps/pthread/createthread.c: Likewise.
8111 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8113         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8114         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8115         definitions.  Replace uses with calls to atomic_* functions.
8116         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8117         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8118         __lll_test_and_set calls with atomic_exchange_and_add and
8119         atomic_exchange calls respectively.
8120         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8121         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8122         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8123         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8124         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8125         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8126         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8128         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8129         returns the old value.
8131 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8133         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8134         int for variable OLDVAL and correct inline assembler contraint.
8135         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8136         type int for variable OLD.
8138         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8139         only for s390-32.
8140         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8141         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8142         instead of multiple_threads field in the TCB.
8144 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8146         * sysdeps/i386/i686/bits/atomic.h: Removed.
8147         * sysdeps/i386/i586/bits/atomic.h: Removed.
8148         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8149         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8150         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8151         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8152         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8153         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8154         * atomic.h: Removed.  Moved to glibc.
8156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8157         support for clock selection.
8159         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8160         signalling waiters.
8162 2003-03-18  Roland McGrath  <roland@redhat.com>
8164         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8165         Add __lll_rel_instr first.  Add memory clobber.
8166         (lll_mutex_unlock): Use __lll_test_and_set.
8167         From Paul Mackerras <paulus@samba.org>.
8169         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8170         unconditionally.
8171         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8172         (SINGLE_THREAD_P):  Add `header.' prefix.
8173         From Paul Mackerras <paulus@samba.org>.
8175         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8176         pthread_timedjoin_np to ...
8177         (libpthread: GLIBC_2.3.3): ... here.
8178         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8180         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8181         Avoid shadowing VAL variable.
8183         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8184         New macro.
8186 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8188         * Makefile (tests): Add tst-cond11.
8189         * tst-cond11.c: New file.
8191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8192         struct passed to cleanup handler to eliminate one more
8193         instruction.
8194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8196         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8197         (pthrad_cond_t): Replace __unused field with __clock.
8199         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8200         waken all waiters in cleanup handler.
8201         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8204         * pthread_condattr_getclock.c: New file.
8205         * pthread_condattr_setclock.c: New file.
8206         * sysdeps/pthread/pthread.h: Declare these new functions.
8207         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8208         * Makefile (libpthread-routines): Add the new functions.
8209         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8210         Renamed field to value.  Document use of the bits.
8211         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8212         change.
8213         * pthread_condattr_setpshared.c: Likewise.
8214         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8215         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8216         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8217         Add __clock field.
8218         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8219         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8220         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8221         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8222         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8223         Implement clock selection.
8224         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8225         * pthread-errnos.sym: Add ENOSYS.
8226         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8227         _POSIX_CLOCK_SELECTION.
8228         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8231         invalid .size directive.
8233 2003-03-17  Roland McGrath  <roland@redhat.com>
8235         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8236         Formatting tweaks.
8238 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8240         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8241         Use __lll_add instead of spelling it out.  Use protected symbol names.
8242         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8243         Use __lll_add.
8244         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8245         Renamed from lll_compare_and_swap.  Use new name where necessary.
8246         (__lll_add): Defined.
8247         (__lll_dec_if_positive): Defined.
8248         (__lll_test_and_set): Defined.
8249         * sysdeps/ia64/pthread_spin_init.c: Removed.
8250         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8251         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8252         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8253         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8254         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8255         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8256         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8257         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8258         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8259         __sync_lock_release_si.
8260         Patch by Jakub Jelinek.
8262         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8263         Fix timeout handling.
8264         (__lll_timedwait_tid): Likewise.
8265         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8266         Patch by Jakub Jelinek.
8268         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8270 2003-03-17  Roland McGrath  <roland@redhat.com>
8272         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8273         * sysdeps/pthread/pthread_spin_init.c: New file.
8274         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8275         * sysdeps/powerpc/Makefile: New file.
8276         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8277         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8278         * sysdeps/powerpc/pthreaddef.h: New file.
8279         * sysdeps/powerpc/tcb-offsets.sym: New file.
8280         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8281         * sysdeps/powerpc/tls.h: New file.
8282         * sysdeps/powerpc/bits/atomic.h: New file.
8283         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8284         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8285         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8287         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8288         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8289         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8290         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8291         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8292         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8293         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8294         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8295         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8296         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8297         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8298         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8299         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8300         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8301         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8303         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8304         not gettimeofday.
8305         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8306         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8307         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8308         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8309         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8311 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8313         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8314         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8317         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8319 2003-03-16  Roland McGrath  <roland@redhat.com>
8321         * tst-fork4.c: Include <string.h>.
8322         * tst-signal2.c: Likewise.
8323         * tst-mutex5.c (do_test): exit -> return.
8324         * tst-mutex2.c: Include <stdlib.h>.
8326 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8328         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8329         (__lll_mutex_timedlock_wait): Correct expected value after
8330         spurious wakeup.  Otherwise we would never wait again.
8332         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8333         zone versus inline asm stupidity.  Use correct instructions.
8335         * tst-rwlock6.c: Add some more status output.
8337 2003-03-15  Roland McGrath  <roland@redhat.com>
8339         * sysdeps/pthread/configure.in: New file.
8340         * sysdeps/pthread/configure: New file (generated).
8342 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8344         * allocatestack.c (allocate_stack): Store the exact stack size of
8345         user allocated stacks.
8347 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8349         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8350         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8351         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8352         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8353         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8354         Use `header.' prefix.
8355         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8357 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8359         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8360         __builtin_frame_address, use stack pointer.
8362         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8363         instead of __builtin_frame_pointer.
8365 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8367         * tst-basic1.c (do_test): Add cast to avoid warning.
8368         * tst-basic2.c (do_test): Likewise.
8370         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8371         amount of stack correction.
8373         * tst-fork4.c: Use test-skeleton.c.
8375 2003-03-14  Roland McGrath  <roland@redhat.com>
8377         * init.c: Fix typo "#eli" for "#else".
8379 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8381         * allocatestack.c (__stack_user): Use hidden_data_def.
8382         * pthread_create.c (__pthread_keys): Likewise.
8384         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8386 2003-03-14  Roland McGrath  <roland@redhat.com>
8388         * tst-fork4.c: New file.
8389         * Makefile (tests): Add it.
8391         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8392         we always define the padding space.
8393         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8394         stopped supporting its own extensions fully.
8395         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8396         struct also called `header', so `header.multiple_threads' is the field
8397         name to use on all machines.
8398         * allocatestack.c (allocate_stack): Use `header.' prefix.
8399         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8400         * pthread_create.c (__pthread_create_2_1): Likewise.
8401         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8402         (THREAD_SELF): Likewise.
8403         * sysdeps/x86_64/tls.h: Likewise.
8404         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8405         (SINGLE_THREAD_P): Likewise.
8406         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8407         (SINGLE_THREAD_P): Likewise.
8408         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8409         (SINGLE_THREAD_P): Likewise.
8411         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8412         value directly.
8414 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8416         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8417         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8419         * pthread_create.c (start_thread): setjmp is expected to return 0.
8421         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8422         (THREAD_GETMEM_NC): Likewise.
8424 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8426         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8427         and the size of the stack which must be allocated is a multiple,
8428         allocate one more page.
8429         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8430         MULTI_PAGE_ALIASING.
8432 2003-03-13  Roland McGrath  <roland@redhat.com>
8434         * pthread_create.c (start_thread): Set EXITING_BIT after the
8435         event-reporting (and destructors), not before.
8437 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8439         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8440         lll_futex_wake): Declare register variables as long int instead of
8441         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8442         Make syscall arguments clobbered by the syscall.
8443         (lll_futex_wait): Define using lll_futex_timed_wait.
8445         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8446         to void *.
8448         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8449         PPID if [! NDEBUG].
8451         * allocatestack.c (nptl_ncreated): Only declare if
8452         COLORING_INCREMENT != 0.
8454         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8455         (__libc_enable_asynccancel_2): Remove prototype.
8457         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8458         ctid to match kernel.
8460 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8462         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8463         libc_multiple_threads.
8464         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8465         __libc_multiple_threads to...
8466         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8468         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8469         versioning.
8470         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8471         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8473         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8474         (__pthread_once_internal): Define.
8476         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8477         macros instead of .symver directly.
8478         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8479         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8481         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8482         * sysdeps/x86_64/tcb-offsets.sym: New file.
8483         * sysdeps/x86_64/Makefile: New file.
8485         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8486         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8487         to access own pthread_t in TCB.
8488         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8489         Likewise.
8490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8491         Likewise.
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8494 2003-03-12  Roland McGrath  <roland@redhat.com>
8496         * pthread-errnos.sym: New file.
8497         * Makefile (gen-as-const-headers): New variable, list that file.
8498         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8499         header <pthread-errnos.h> instead of defining errno values here.
8500         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8501         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8502         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8503         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8504         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8505         Likewise.
8506         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8507         Likewise.
8508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8510         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8511         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8512         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8513         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8514         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8515         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8516         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8517         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8518         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8519         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8520         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8521         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8522         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8523         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8524         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8525         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8526         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8527         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8528         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8529         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8530         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8531         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8532         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8533         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8534         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8536         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8537         CLONE_CHILD_SETTID worked.
8539 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8541         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8542         file.
8543         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8544         file.
8546         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8547         (pthread_cond_t): Add padding.
8549         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8550         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8551         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8553         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8554         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8555         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8556         (__pthread_rwlock_timedrdlock): Likewise.
8557         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8558         (__pthread_rwlock_wrlock): Likewise.
8559         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8560         (__pthread_rwlock_rdlock): Likewise.
8562         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8564         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8565         result of lock re-get if it fails.
8567 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8569         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8570         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8571         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8572         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8573         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8574         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8575         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8576         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8577         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8578         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8580         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8581         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8583         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8584         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8585         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8586         (create_thread): Likewise.
8587         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8588         * init.c (__pthread_initialize_minimal_internal): Initialize
8589         __libc_multiple_threads_ptr if necessary.
8590         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8591         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8592         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8593         __libc_multiple_threads.
8594         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8595         necessary.
8597         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8598         (THREAD_SETMEM_NC): Likewise.
8600         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8601         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8602         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8603         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8605         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8606         Eliminate one entire instruction.
8608         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8609         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8611         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8612         instead of __pthread_enable_asynccancel.
8613         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8614         (__pthread_cond_wait): Likewise.
8615         * sysdeps/pthread/pthread_cond_timedwait.c
8616         (__pthread_cond_timedwait): Likewise.
8617         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8619         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8620         (__condvar_cleanup): Wake up all waiters in case we got signaled
8621         after being woken up but before disabling asynchronous
8622         cancellation.
8623         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8624         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8625         (__condvar_cleanup): Likewise.
8627         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8628         Make it an error if architecture has no #if case.  Add x86-64.
8630         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8631         pt-initfini.s generation.
8633         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8634         (TLS_INIT_TP): Fix typo.
8636 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8638         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8639         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8641         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8642         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8643         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8644         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8645         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8646         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8647         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8648         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8650 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8652         * sysdeps/pthread/pthread_cond_timedwait.c
8653         (__pthread_cond_timedwait): Return the result of the final
8654         locking.  If it succeeds, the regular function return value.
8656         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8657         Return result of the final locking.
8658         * version.c (__nptl_main): Work around problems with the strange
8659         INTERNAL_SYSCALL macro on ppc32.
8660         * init.c (__pthread_initialize_minimal_internal): Unblock
8661         SIGCANCEL in case the parent blocked it.
8662         Reported by Paul Mackerras <paulus@samba.org>.
8664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8665         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8668 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8670         * sysdeps/pthread/pthread_cond_timedwait.c
8671         (__pthread_cond_timedwait): Unlock and fail if
8672         __pthread_mutex_unlock_internal failed.
8674         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8675         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8676         Use ARCH_CLONE.
8677         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8678         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8679         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8680         ALLOCATE_STACK): New macros.
8681         (TLS_TPADJ): New macro.
8682         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8683         (allocate_stack): Handle TLS_DTV_AT_TP and
8684         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8685         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8686         Don't set PD->self.
8687         * init.c [__ia64__] (__NR_set_tid_address): Define.
8689         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8690         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8691         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8692         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8693         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8694         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8695         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8696         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8697         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8698         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8699         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8700         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8701         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8702         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8703         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8704         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8705         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8706         * sysdeps/ia64/bits/atomic.h: New file.
8707         * sysdeps/ia64/Makefile: New file.
8708         * sysdeps/ia64/pthread_spin_init.c: New file.
8709         * sysdeps/ia64/pthread_spin_lock.c: New file.
8710         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8711         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8712         * sysdeps/ia64/pthreaddef.h: New file.
8713         * sysdeps/ia64/tcb-offsets.sym: New file.
8714         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8715         * sysdeps/ia64/tls.h: New file.
8717         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8718         to syscall instead of no arguments.
8720 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8722         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8723         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8724         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8725         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8727         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8728         unused code.
8730         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8732         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8733         lowlevelbarrier.sym.
8734         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8735         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8736         Include lowlevelbarrier.h and don't define offsets locally.
8737         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8739         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8740         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8741         (__lll_mutex_timedlock_wait): Likewise.
8742         (lll_mutex_lock): Adjust asm for that.
8743         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8744         (lll_lock): Adjust asm for operand order change.
8745         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8746         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8748         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8749         Reverse order of parameters.
8750         (__lll_timedwait_tid): Remove regparms attribute.
8751         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8752         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8754         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8755         (__lll_timedwait_tid): Remove one unnecessary instruction.
8757         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8758         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8759         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8760         lowlevelmutex.S.
8762         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8763         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8764         for NOT_IN_libc.
8765         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8766         lowlevellock.S.
8768         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8769         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8770         for libc.so.
8771         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8772         define LOCK here (if UP is not defined).  The actual code is in
8773         lowlevelmutex.S.
8775         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8776         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8777         __lll_timedwait_tid for libc.so.
8778         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8779         define LOCK here (if UP is not defined).  The actual code is in
8780         lowlevellock.S.
8782         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8783         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8784         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8785         instead of lowlevelsem.h.
8786         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8787         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8788         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8790         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8791         lowlevelrwlock.sym.
8792         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8793         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8794         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8796         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8797         register loading.
8798         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8799         last changed.  D'oh.
8801         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8803         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8804         of __libc_locking_needed.
8805         (lll_trylock): Initialize %eax to zero.
8807         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8808         pthread_cond_t definition.
8810 2003-03-10  Roland McGrath  <roland@redhat.com>
8812         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8813         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8814         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8815         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8816         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8818         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8819         Instead of setting PD->multiple_threads, set globals
8820         __pthread_multiple_threads and __libc_multiple_threads.
8821         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8822         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8823         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8825         * descr.h (struct pthread): Conditionalize first member on
8826         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8827         containing an anonymous tcbhead_t.  Move `list' member out.
8828         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8829         * allocatestack.c: Remove use of `header.data.' prefix.
8830         * pthread_create.c: Likewise.
8831         * init.c (__pthread_initialize_minimal_internal): Likewise.
8832         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8833         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8834         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8835         * sysdeps/x86_64/tls.h: Likewise.
8836         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8837         (SINGLE_THREAD_P): Likewise.
8838         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8839         (SINGLE_THREAD_P): Likewise.
8840         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8841         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8843 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8845         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8847         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8848         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8850         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8851         leftovers from the ia32 code.
8853         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8854         memory load.
8855         (clear_once_control): Don't load %esi.
8857         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8858         handling.
8860         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8862         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8863         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8865         * Makefile (tests): Add tst-cond10.
8866         * tst-cond10.c: New file.
8868 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8870         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8871         * tst-signal3.c (do_test): Likewise.
8872         * tst-sem5.c (do_test): Likewise.
8873         * tst-kill6.c (do_test): Likewise.
8874         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8876         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8877         of inc/dec.
8878         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8879         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8880         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8881         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8882         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8883         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8884         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8885         Likewise.
8886         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8887         Likewise.
8888         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8893         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8894         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8895         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8897         * allocatestack.c (allocate_stack): If mprotect() fails free the
8898         TLS memory.
8900 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8902         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8904         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8905         lll_wake_tid.  This was used only to work around kernel limits in
8906         the early days.
8907         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8908         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8909         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8910         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8912         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8913         (__pthread_initialize_minimal_internal): Change initialization of
8914         __static_tls_align_m1 appropriately.
8915         * pthreadP.h (__static_tls_align_m1): Renamed from
8916         __static_tls_align.
8917         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8918         instead of __static_tls_align-1.
8920 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8922         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8924         * pthread_create.c: Define __pthread_keys using nocommon
8925         attribute, not by placing it explicitly in bss.
8926         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8928         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8929         Use it in mmap call to allocate stacks.
8931         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8933         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8934         result of the thread function.
8936 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8938         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8939         version is just fine.
8941         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8942         (__pthread_child_handler): Renamed from pthread_child_handler,
8943         exported, and marked hidden.  Change all users.
8944         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8945         free __pthread_child_handler from child list.
8947 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8949         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8951         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8952         Fix handling of cancellation and failing pthread_mutex_unlock call.
8953         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8954         (__pthread_cond_wait): Likewise.
8956         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8957         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8958         lll_futex_timed_wait call.
8959         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8960         (pthread_rwlock_timedwrlock): Likewise.
8962         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8963         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8964         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8966         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8967         check of lll_futex_wake return value.
8969 2003-03-03  Roland McGrath  <roland@redhat.com>
8971         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8973         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8974         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8975         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8977 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8979         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8980         error for CPU clocks.
8982         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8983         _POSIX_MONOTONIC_CLOCK.
8984         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8986         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8987         recent kernels.
8989 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8991         * descr.h (struct pthread): Move cleanup field to the front.
8993 2003-03-01  Roland McGrath  <roland@redhat.com>
8995         * sem_open.c (sem_open): Braino fix.
8997 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8999         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
9000         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
9001         __pthread_cleanup_pop functionality.
9002         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9004         * descr.h (struct pthread): Move tid field to the front now that
9005         it is often used.
9007         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
9008         (__lll_mutex_timedlock_wait): Remove.
9009         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9010         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9011         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
9012         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9013         (lll_unlock_wake_cb): Don't save and restore %esi.
9014         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9015         %esi.
9016         (__lll_timedwait_tid): Add alignment.
9017         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9018         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
9019         %esi.
9020         (__lll_timedwait_tid): Removed.
9021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
9022         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
9023         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
9024         (pthread_barrier_wait): Don't save, load, and restore %esi for
9025         last thread.
9026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9027         (__pthread_cond_signal): Don't save, load, and restore %esi.
9028         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
9029         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
9030         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
9031         Don't save, load, and restore %esi.
9033 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
9035         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
9036         Release lock before waking up the waiters.
9038         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
9040         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
9041         (reader_thread): Likewise.
9043         * sysdeps/pthread/pthread_rwlock_unlock.c
9044         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
9045         to wake up readers if there are none.
9047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9048         Release internal lock before wake threads.
9050 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9052         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9053         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9054         predefined.
9055         * tst-rwlock9.c: Likewise.
9056         * tst-rwlock10.c: New file.
9057         * tst-rwlock11.c: New file.
9059         * Makefile (tests): Add tst-dlsym1.
9060         * tst-dlsym1.c: New file.
9062         * init.c (__pthread_initialize_minimal_internal): Set
9063         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9064         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9066 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9068         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9070         * tst-cond2.c: Fix sychronization with child.
9072         * tst-rwlock8.c (reader_thread): Remove unused variable.
9074         * Makefile: Add rules to build and run tst-tls3.
9075         * tst-tls3.c: New file.
9076         * tst-tls3mod.c: New file.
9078         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9079         * tst-rwlock8.c: New file.
9080         * tst-rwlock9.c: New file.
9081         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9082         complete broken rwlock implementation.
9083         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9084         Likewise.
9085         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9086         Likewise.
9087         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9088         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9089         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9090         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9091         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9092         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9093         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9095 2003-02-23  Roland McGrath  <roland@redhat.com>
9097         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9099 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9101         * Makefile (tests): Add tst-context1.
9102         * tst-context1.c: New file.
9104         * Makefile (tests): Add tst-tls1 and tst-tls2.
9105         * tst-tls1.c: New file.
9106         * tst-tls2.c: New file.
9108         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9109         for failed cmpxchg.
9111         * pthread_create.c (start_thread): Set EXITING_BIT early.
9113         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9114         (THREAD_GETMEM_NC): Likewise.
9116 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9118         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9119         off 3 more bytes by using offset-less instructions when possible.
9121         * Makefile: Add dependency for $(objpfx)version.d.
9123         * eintr.c (eintr_source): Add unnecessary return but the compiler
9124         insists.
9126         * tst-kill3.c: Include <unistd.h>.
9128 2003-02-21  Roland McGrath  <roland@redhat.com>
9130         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9132 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9134         * Makefile (tests): Add tst-eintr1.
9135         (distribute): Add eintr.c.
9136         * tst-eintr1.c: New file.
9137         * eintr.c: New file.
9139         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9141         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9142         Disallow sending SIGCANCEL.
9144         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9145         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9146         * tst-kill1.c: New file.
9147         * tst-kill2.c: New file.
9148         * tst-kill3.c: New file.
9149         * tst-kill5.c: New file.
9150         * tst-kill6.c: New file.
9151         * tst-basic7.c: Renamed to...
9152         * tst-kill4.c: ...this.
9154 2003-02-21  Roland McGrath  <roland@redhat.com>
9156         * Makefile (install-lib-ldscripts): New variable.
9158 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9160         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9161         * pthread_cancel.c: Use INVALID_TD_P.
9162         * pthread_detach.c: Likewise.
9163         * pthread_getschedparam.c: Likewise.
9164         * pthread_setschedparam.c: Likewise.
9165         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9166         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9167         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9168         * pthread_timedjoin.c: Likewise.
9170         * tst-basic7.c: Include <signal.h>.
9172         * pthread_join.c (pthread_join): Limited checking for invalid
9173         descriptors.
9174         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9176 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9178         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9179         beginning of the loop.  Clear the entire first block of TSD.
9180         * Makefile (tests): Add tst-key4.
9181         * tst-key4.c: New file.
9183 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9185         * Makefile (tests): Add tst-basic7.
9186         * tst-basic7.c: New file.
9188         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9189         Add some more __builtin_expect.
9191         * pthreadP.h: Define dummy version of DEBUGGING_P.
9193 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9195         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9196         _POSIX_THREAD_PRIORITY_SCHEDULING.
9197         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9198         _XOPEN_REALTIME_THREADS.
9199         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9201         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9202         kernel returns EINVAL for PID <= 0, work around it.
9204         * Makefile (tests): Add tst-signal5.
9205         * tst-signal5.c: New file.
9207         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9208         and LOGIN_NAME_MAX.
9210         * tst-cancel1.c (tf): Block all signals.
9212         * Makefile (tests): Add tst-basic6.
9213         * tst-basic6.c: New file.
9215         * tst-basic1.c: Add test for process ID.
9217         * Makefile (tests): Add tst-cancel10.
9218         * tst-cancel10.c: New file.
9220         * Makefile (tests): Add tst-signal4.
9221         * tst-signal4.c: New file.
9223         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9224         __sigismember instead of sigismember.  Add __builtin_expect.
9226 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9228         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9229         pthread_setcancelstate, and pthread_rwlock_setpshared.
9231         * tst-cancel7.c (do_test): Make sure the pid file exists before
9232         canceling the thread.
9234         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9235         pthread_rwlock_timedrdlock tests.
9236         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9237         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9238         Check for invalid tv_nsec field.
9239         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9240         Likewise.
9242         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9243         recursive mutex of overflow.
9245         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9247         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9248         going into an endless loop.
9249         * Makefile (tests): Add tst-cancel9.
9250         * tst-cancel9.c: New file.
9252         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9254 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9256         * tst-mutex5.c (do_test): Add more timedlock tests.
9258         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9259         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9261         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9262         use INLINE_SYSCALL.  Error number is returned, not -1.
9264         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9265         and __deallocate_stack with internal_function.
9266         * pthread_create.c: Adjust definitions appropriately.
9267         * allocatestack.c: Likewise.
9269         * pthread_join.c: Add one more __builtin_expect.
9270         * pthread_timedjoin.c: Likewise.
9272         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9273         not data of sequence number does not match.
9274         Add one __builtin_expect.
9276         * Makefile (tests): Add tst-clock1.
9277         * tst-clock1.c: New file.
9279         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9280         negative arguments.
9281         * Makefile (tests): Add tst-basic5.
9282         * tst-basic5.c: New file.
9284 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9286         * Makefile (tests): Add tst-basic4.
9287         * tst-basic4.c: New file.
9289         * pthreadP.h: Add declaraction for __nptl_nthreads.
9290         * pthread_create.c: Define __nptl_nthreads
9291         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9292         after thread is done.  If then zero, call exit(0).
9293         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9294         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9295         * init.c (pthread_functions): Initialize ptr_nthreads.
9296         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9297         (__reclaim_stacks): Decrement __nptl_nthreads.
9298         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9299         Define.
9300         * Makefile (tests): Add tst-basic3.
9301         * tst-basic3.c: New file.
9303         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9304         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9305         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9306         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9307         if asynchronous canceling is enabled.
9308         * pthread_join.c (pthread_join): When recognizing circular joins,
9309         take into account the other thread might be already canceled.
9310         * Makefile (tests): Add tst-join5.
9311         * tst-join5.c: New file.
9313         * Makefile (tests): Add tst-join4.
9314         * tst-join4.c: New file.
9316 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9318         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9320 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9322         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9323         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9324         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9325         warning.
9326         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9327         to avoid warning.
9328         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9329         error if lll_futex_wake failed.
9331 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9333         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9334         handling of cancellation and failung pthread_mutex_unlock call.
9335         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9336         * Makefile (tests): Add tst-cond8 and tst-cond9.
9337         * tst-cond8.c: New file.
9338         * tst-cond9.c: New file.
9340         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9342         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9343         non-standard initializers with __USE_GNU.
9345         * Makefile (tests): Add tst-cleanup3.
9346         * tst-cleanup3.c: New file.
9348 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9350         * Makefile (tests): Add tst-attr1 and tst-attr2.
9351         * tst-attr1.c: New file.
9352         * tst-attr2.c: New file.
9354         * Makefile: Add rules to build and run tst-atfork2 test.
9355         * tst-atfork2.c: New file.
9356         * tst-atfork2mod.c: New file.
9358         * sysdeps/unix/sysv/linux/unregister-atfork.c
9359         (__unregister_atfork): Free the memory allocated for the handlers
9360         after removing them from the lists.
9362         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9363         cleanup function.
9365         * tst-atfork1.c (do_test): Wait for the child we forked.
9366         Report error in child.
9368         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9370         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9372 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9374         * Makefile (tests): Add tst-cancel8.
9375         * tst-cancel8.c: New file.
9377         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9378         clearing of control variable.
9379         * Makefile (tests): Add tst-once3 and tst-once4.
9380         * tst-once3.c: New file.
9381         * tst-once4.c: New file.
9383 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9385         * sysdeps/sh/Makefile: New file.
9386         * sysdeps/sh/bits/atomic.h: New file.
9387         * sysdeps/sh/pthread_spin_init.c: New file.
9388         * sysdeps/sh/pthread_spin_lock.c: New file.
9389         * sysdeps/sh/pthread_spin_trylock.S: New file.
9390         * sysdeps/sh/pthread_spin_unlock.S: New file.
9391         * sysdeps/sh/pthreaddef.h: New file.
9392         * sysdeps/sh/tcb-offsets.sym: New file.
9393         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9394         * sysdeps/sh/tls.h: New file.
9395         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9396         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9397         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9398         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9399         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9400         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9401         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9402         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9403         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9404         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9405         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9406         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9407         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9408         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9409         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9410         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9411         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9412         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9413         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9414         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9415         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9416         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9417         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9418         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9419         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9420         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9421         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9422         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9423         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9424         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9426 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9428         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9429         according to POSIX.
9431         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9433 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9435         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9436         (TLS_GET_FS): New #define.
9437         (TLS_SET_FS): New #define.
9438         Correct value of __NR_set_thread_area.
9440         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9442 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9444         * Makefile (tests): Add tst-popen1.
9445         * tst-popen1.c: New file.
9447         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9448         but inactive generalization.
9449         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9451         Minor optimization, remove one instruction.
9452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9454 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9456         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9458 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9460         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9461         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9462         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9463         * sysdeps/pthread/pthread_cond_signal.c: New file.
9464         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9465         * sysdeps/pthread/pthread_cond_wait.c: New file.
9466         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9467         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9468         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9469         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9470         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9471         * sysdeps/s390/Makefile: New file.
9472         * sysdeps/s390/bits/atomic.h: New file.
9473         * sysdeps/s390/pthread_spin_init.c: New file.
9474         * sysdeps/s390/pthread_spin_lock.c: New file.
9475         * sysdeps/s390/pthread_spin_trylock.c: New file.
9476         * sysdeps/s390/pthread_spin_unlock.c: New file.
9477         * sysdeps/s390/pthreaddef.h: New file.
9478         * sysdeps/s390/tcb-offsets.sym: New file.
9479         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9480         * sysdeps/s390/tls.h: New file.
9481         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9482         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9483         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9484         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9485         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9486         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9487         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9488         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9489         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9490         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9491         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9492         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9493         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9494         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9495         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9496         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9497         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9498         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9499         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9500         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9501         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9502         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9503         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9505 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9507         * atomic.h: Add a couple more default implementations.
9508         (atomic_compare_and_exchange_acq): Use
9509         __arch_compare_and_exchange_32_acq in return value definition.  It
9510         always exists.
9511         (atomic_bit_set): Renamed from atomic_set_bit.
9512         Add missing atomic_ prefixes.
9514         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9515         thread library is available, use correct value to mark initialized
9516         once variable.
9518 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9520         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9521         __sysconf to determine pagesize.
9523         * pthread_create.c: Include <atomic.h>.
9524         * allocatestack.c (allocate_stack): Implement coloring of the
9525         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9526         size minus one.  Adjust users.
9527         * sysdeps/i386/i686/Makefile: New file.
9529 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9531         * allocatestack.c: Improve comment throughout the file.
9533         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9534         (__lll_lock_wait): Add branch prediction.
9535         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9536         (__lll_lock_wait): Likewise.
9537         (lll_unlock_wake_cb): Removed.
9539 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9541         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9542         _POSIX_THREAD_PRIORITY_SCHEDULING.
9544 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9546         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9547         Fix return type of ptr___pthread_getspecific.
9549 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9551         * Makefile (tests): Add tst-umask1.
9552         (tst-umask1-ARGS): Define.
9553         * tst-umask1.c: New file.
9555 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9557         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9558         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9559         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9560         pthread_rwlock_unlock.
9561         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9562         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9563         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9564         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9565         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9566         New file.
9567         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9568         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9569         New file.
9570         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9571         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9572         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9573         New file.
9574         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9575         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9576         New file.
9577         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9578         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9579         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9580         New file.
9581         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9582         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9583         New file.
9584         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9586         * Makefile (libpthread-routines): Remove lowlevelcond and
9587         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9588         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9589         and pthread_cond_broadcast.
9590         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9591         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9592         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9593         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9594         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9595         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9596         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9597         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9598         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9599         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9600         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9601         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9602         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9604         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9605         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9606         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9607         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9608         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9609         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9610         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9611         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9612         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9613         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9614         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9615         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9616         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9617         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9618         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9619         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9620         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9622         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9623         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9624         of the code is moved to ...
9625         * sysdeps/pthread/createthread.c: ...here.  New file.
9627 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9629         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9630         (__new_sem_post): Clear %eax before returning.
9631         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9633         * Makefile (tests): Add tst-cleanup2.
9634         * tst-cleanup2.c: New file.
9636         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9637         Interpret first parameter correctly.
9639 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9641         * Makefile (headers): Add bits/semaphore.h.
9643 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9645         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9646         if not SHARED.
9648 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9650         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9651         must be used and mapping failed.
9652         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9654         * Makefile (CFLAGS-pthread_self.os): Define this, not
9655         CFLAGS-pthread_self.c.
9657 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9659         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9660         lll_unlock_wake_cb.
9662         * Makefile (libpthread-routines): Add version.  Add rules to build
9663         version.os and banner.h.
9664         * version.c: New file.
9666 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9668         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9669         the alias unconditional.
9670         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9672 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9674         * Makefile (CFLAGS-pthread_self.c): New definition.
9676 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9678         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9679         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9680         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9681         * init.c (__pthread_initialize_minimal_internal): Likewise.
9683 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9685         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9687         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9688         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9689         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9690         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9691         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9692         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9694 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9696         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9697         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9698         * tst-cancel-wrappers.sh: Remove all exceptions.
9700 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9702         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9703         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9705         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9706         Use __libc_pthread_functions array if SHARED.
9708         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9709         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9711         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9712         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9713         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9714         __libc_ptf_call instead of __libc_maybe_call.
9715         (PTF): New #define.
9716         (__libc_cleanup_region_start): Wrap function name with PTF call.
9717         (__libc_cleanup_region_end): Likewise.
9718         (__libc_cleanup_end): Likewise.
9720         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9721         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9722         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9723         * pthreadP.h: Add prototypes.
9725         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9726         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9727         __pthread_rwlock_unlock aliases.
9728         * pthreadP.h: Add prototypes for new aliases.
9730         * pthreadP.h (struct pthead_functions): Moved to...
9731         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9732         * init.c (pthread_functions): Add initializers for new elements.
9734         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9735         __pthread_cleanup_pop_restore aliases.
9736         * pthreadP.h: Add prototypes.
9738         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9739         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9740         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9741         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9742         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9743         * pthreadP.h: Adjust prototypes and callers.
9745 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9747         * Makefile (tests): Add tst-cancel7.
9748         (tst-cancel7-ARGS): New variable.
9749         * tst-cancel7.c: New file.
9751         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9752         around gcc defficiencies.
9753         * old_pthread_cond_signal.c: Likewise.
9754         * old_pthread_cond_timedwait.c: Likewise.
9755         * old_pthread_cond_wait.c: Likewise.
9757         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9759 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9761         * Makefile (tests): Add tst-cond7.
9762         * tst-cond7.c: New file.
9764         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9765         (condvar_cleanup): Get condvar address from the right place.
9767         * atomic.h: Correct definitions of atomic_full_barrier,
9768         atomic_read_barrier, atomic_write_barrier.
9770         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9771         race-free.
9772         * old_pthread_cond_signal.c: Likewise.
9773         * old_pthread_cond_timedwait.c: Likewise.
9774         * old_pthread_cond_wait.c: Likewise.
9776 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9778         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9780 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9782         * pthreadP.h (pthread_cond_2_0_t): New type.
9783         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9784         Use new type for the 2.0 condvar function prototypes.
9785         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9786         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9787         parameter.
9788         * old_pthread_cond_destroy.c: Likewise.
9789         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9790         * old_pthread_cond_signal.c: Likewise.
9791         * old_pthread_cond_timedwait.c: Likewise.
9792         * old_pthread_cond_wait.c: Likewise.
9794         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9795         (__pthread_cond_wait): Don't save cancellation mode and seq value
9796         in same location.
9798         * herrno.c (__h_errno_location): Don't define as weak.
9800 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9802         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9803         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9804         and pthread_cond_wait.
9805         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9806         Renamed to...
9807         (__pthread_cond_broadcast_2_0): ... this.
9808         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9809         Renamed to...
9810         (__pthread_cond_destroy_2_0): ... this.
9811         * old_pthread_cond_init.c (__old_pthread_cond_init):
9812         Renamed to...
9813         (__pthread_cond_init_2_0): ... this.
9814         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9815         Renamed to...
9816         (__pthread_cond_signal_2_0): ... this.
9817         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9818         Renamed to...
9819         (__pthread_cond_wait_2_0): ... this.
9820         * pthread_cond_destroy.c: Include shlib-compat.h.
9821         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9822         * pthread_cond_init.c: Include shlib-compat.h.
9823         (pthread_cond_init): Change strong_alias into versioned_symbol.
9824         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9825         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9826         fields.
9827         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9828         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9829         __pthread_cond_wait_2_0): New prototypes.
9830         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9831         __old_pthread_cond_init, __old_pthread_cond_signal,
9832         __old_pthread_cond_wait): Removed.
9833         * init.c: Include shlib-compat.h.
9834         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9835         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9836         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9837         ptr___pthread_cond_*_2_0 fields.
9838         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9839         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9841         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9842         LIBC_SIGACTION was not yet defined.
9843         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9844         [!defined LIBC_SIGACTION] (__sigaction): New function and
9845         libc_hidden_weak.
9846         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9847         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9849 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9851         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9853 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9855         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9856         New, larger type definition.
9857         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9858         implementation.
9859         * Versions [libpthread]: Add definitions for new pthread_cond_*
9860         interfaces for version GLIBC_2.3.2.
9861         * pthread_cond_init.c: Update initialization for new type definition.
9862         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9863         pthread_cond_timedwait, pthread_cond_signal, and
9864         pthread_cond_broadcast.  Add old_pthread_cond_init,
9865         old_pthread_cond_destroy, old_pthread_cond_wait,
9866         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9867         old_pthread_cond_broadcast.
9868         * old_pthread_cond_broadcast.c: New file.
9869         * old_pthread_cond_destroy.c: New file.
9870         * old_pthread_cond_init.c: New file.
9871         * old_pthread_cond_signal.c: New file.
9872         * old_pthread_cond_timedwait.c: New file.
9873         * old_pthread_cond_wait.c: New file.
9874         * pthreadP.h: Add prototypes for the compatibility interfaces.
9876         * pthread_cond_destroy.c: Don't include <errno.h>.
9878 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9880         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9881         unnecessary zero offset when addressing MUTEX.
9883 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9885         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9886         __register_atfork.
9887         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9888         for __register_atfork.
9890 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9892         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9893         instead of ASSEMBLER test macro.
9895         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9896         __libc_current_sigrtmax): Add libc_hidden_def.
9898         * sysdeps/pthread/list.h: Remove assert.h include.
9900 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9902         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9903         __pthread_initialize_minimal_internal not
9904         __pthread_initialize_minimal.
9906 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9908         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9909         __pthread_initialize_minimal as hidden.
9911         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9912         constructor.
9914 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9916         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9917         $(common-objpfx)format.lds, include that into the output script.
9918         Fix comment.
9919         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9921 2002-12-28  Andreas Jaeger  <aj@suse.de>
9923         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9924         nsec resolution changes.
9925         (xstat64_conv): Likewise.
9926         (xstat32_conv): Likewise.
9927         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9928         struct kernel_stat.
9929         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9930         structs stat and stat64.
9931         * time/time.h (__timespec_defined): Define for __USE_MISC.
9932         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9934 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9936         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9937         argument.
9938         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9939         (pthread_exit): Use strong_alias to avoid warnings.
9940         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9941         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9942         ptr___pthread_attr_init_2_*.
9943         * init.c (pthread_functions): Adjust.
9945 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9947         * forward.c: Make all functions available by default again.  It
9948         caused too much trouble.
9950         * pt-siglongjmp.c: Removed.
9952 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9954         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9955         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9956         * sysdeps/i386/Makefile: New file.
9957         * sysdeps/i386/tcb-offsets.sym: New file.
9958         * sysdeps/pthread/tcb-offsets.h: New file.
9959         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9960         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9962         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9963         __register_atfork...
9964         (GLIBC_2.3.2): ...here.
9966 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9968         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9969         pthread_attr_setstackaddr with __attribute_deprecated__.
9971 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9973         * pt-system.c (system): Remove cancellation handling.
9974         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9975         cancellation routines.
9977 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9979         * descr.h: Include <dl-sysdep.h>.
9980         (struct pthread): Move header.data.list to the back of the struct.
9981         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9982         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9983         (SYSINFO_OFFSEET): Likewise.
9985 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9987         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9988         Define.
9989         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9990         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9991         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9992         (USE_DL_SYSINFO): Undef.
9994 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9996         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9997         $(common-objpfx)libc.so.
9998         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9999         it is bigger than pipe buffer size even on arches with bigger
10000         page size.
10001         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
10003 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
10005         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
10006         correct errno access for case that USE___THREAD is not defined.
10008 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
10010         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
10011         Patch by Marijn Ros <marijn@mad.scientist.com>.
10013 2002-12-22  Roland McGrath  <roland@redhat.com>
10015         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
10017 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
10019         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
10021 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
10023         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
10024         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
10025         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
10027         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
10028         of int $0x80.
10029         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10030         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
10031         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
10032         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10033         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10034         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
10035         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
10036         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10038         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
10039         sysenter.
10040         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10042         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
10044         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
10045         in new TCB.
10046         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
10047         that sysinfo is properly initialized.
10048         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10049         to 1 only for ld.so.
10051         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10052         RTLD_CORRECT_DYNAMIC_WEAK.
10054 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10056         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10057         Use return 0 as 6th argument to FORWARD4.
10058         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10060 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10062         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10063         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10064         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10065         (INIT_SYSINFO): New #define.
10066         (TLS_TP_INIT): Use INIT_SYSINFO.
10067         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10068         At test to make sure SYSINFO_OFFSET value is correct.
10069         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10071 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10073         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10074         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10075         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10076         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10077         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10078         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10079         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10081 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10083         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10084         macro instead of using int $0x80 directly.
10086         * sysdeps/pthread/bits/stdio-lock.h: New file.
10087         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10088         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10089         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10090         * Makefile (routines): Add libc-lowlevelmutex.
10092         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10093         __i686.get_pc_thunk.dx.
10095 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10097         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10098         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10099         ($(objpfx)tst-cancel-wrappers.out): New rule.
10100         * tst-cancel-wrappers.sh: New test.
10101         * tst-locale1.c: Include signal.h.
10102         (uselocale): Test static linking of __libc_current_sigrt*.
10104 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10106         * Makefile (tests): Add tst-cancel6.
10107         * tst-cancel6.c: New file
10109 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10111         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10112         Define meaningfully for assembler as well.
10113         * pthreadP.h (struct pthread_functions): Remove
10114         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10115         and ptr_pthread_attr_init_2_1 fields.
10116         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10117         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10118         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10119         (FORWARD3): Define using FORWARD4.
10120         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10121         versions.
10122         * pt-system.c: Remove duplicate stdlib.h include.
10124 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10126         * sem_init.c: Define sem_init@GLIBC_2.0.
10127         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10128         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10130         * flockfile.c: Moved to...
10131         * sysdeps/pthread/flockfile.c: ...here.  New file.
10132         * funlockfile.c: Moved to...
10133         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10134         * ftrylockfile.c: Moved to...
10135         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10137 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10139         * libc-cancellation.c: Guard both function with
10140         #if !defined NOT_IN_libc.
10141         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10142         automatically provided pthread wrappers.
10143         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10144         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10145         nor in libpthread.
10146         * pt-open.c: Removed.
10147         * pt-fcntl.c: Removed.
10148         * pt-fsync.c: Removed.
10149         * pt-lseek.c: Removed.
10150         * pt-msgrcv.c: Removed.
10151         * pt-msgsnd.c: Removed.
10152         * pt-msync.c: Removed.
10153         * pt-nanosleep.c: Removed.
10154         * pt-open64.c: Removed.
10155         * pt-pause.c: Removed.
10156         * pt-pread.c: Removed.
10157         * pt-pread64.c: Removed.
10158         * pt-pwrite.c: Removed.
10159         * pt-pwrite64.c: Removed.
10160         * pt-read.c: Removed.
10161         * pt-recv.c: Removed.
10162         * pt-recvfrom.c: Removed.
10163         * pt-recvmsg.c: Removed.
10164         * pt-send.c: Removed.
10165         * pt-sendto.c: Removed.
10166         * pt-sigtimedwait.c: Removed.
10167         * pt-sigwait.c: Removed.
10168         * pt-wait.c: Removed.
10169         * pt-waitpid.c: Removed.
10170         * pt-write.c: Removed.
10171         * pt-accept.c: Removed.
10172         * pt-close.c: Removed.
10173         * pt-connect.c: Removed.
10174         * pt-lseek64.c: Removed.
10175         * pt-sendmsg.c: Removed.
10176         * pt-tcdrain.c: Removed.
10178 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10180         * init.c (__pthread_initialize_minimal_internal): Renamed from
10181         __pthread_initialize_minimal.  Make old name an alias.  This
10182         converts a normal relocation into a relative relocation.
10184         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10186         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10187         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10188         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10189         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10190         pt-sigwaitinfo, pt-waitid, and pt-writev.
10191         * pt-creat.c: Removed.
10192         * pt-poll.c: Removed.
10193         * pt-pselect.c: Removed.
10194         * pt-readv.c: Removed.
10195         * pt-select.c: Removed.
10196         * pt-sigpause.c: Removed.
10197         * pt-sigsuspend.c: Removed.
10198         * pt-sigwaitinfo.c: Removed.
10199         * pt-waitid.c: Removed.
10200         * pt-writev.c: Removed.
10202         * init.c (pthread_functions): New variable.
10203         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10204         (or NULL) to __libc_pthread_init.
10205         * forward.c: Rewrite to use __libc:pthread_functions array to get
10206         function addresses.
10207         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10208         prototype.
10209         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10210         Take new parameter.  Copy content of variable pointed to by it
10211         to __libc_pthread_init.
10213         * pthreadP.h (struct pthread_functions): New type.
10214         (__libc_pthread_init): Declare.
10216         * pthread_attr_destroy.c: Add namespace protected alias.
10217         * pthread_attr_getdetachstate.c: Likewise.
10218         * pthread_attr_getinheritsched.c: Likewise.
10219         * pthread_attr_getschedparam.c: Likewise.
10220         * pthread_attr_getschedpolicy.c: Likewise.
10221         * pthread_attr_getscope.c: Likewise.
10222         * pthread_attr_setdetachstate.c: Likewise.
10223         * pthread_attr_setinheritsched.c: Likewise.
10224         * pthread_attr_setschedparam.c: Likewise.
10225         * pthread_attr_setschedpolicy.c: Likewise.
10226         * pthread_attr_setscope.c: Likewise.
10227         * pthread_cond_broadcast.c: Likewise.
10228         * pthread_cond_destroy.c: Likewise.
10229         * pthread_cond_init.c: Likewise.
10230         * pthread_cond_signal.c: Likewise.
10231         * pthread_cond_wait.c: Likewise.
10232         * pthread_condattr_destroy.c: Likewise.
10233         * pthread_condattr_init.c: Likewise.
10234         * pthread_equal.c: Likewise.
10235         * pthread_exit.c: Likewise.
10236         * pthread_getschedparam.c: Likewise.
10237         * pthread_self.c: Likewise.
10238         * pthread_setcancelstate.c: Likewise.
10239         * pthread_setschedparam.c: Likewise.
10240         * pthread_mutex_destroy.c: Likewise.
10241         * pthread_mutex_init.c: Likewise.
10242         * pthreadP.h: Add prototypes for the aliases.
10244         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10245         multiple_threads member in correct TCB to 1.
10247         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10248         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10249         member of thread decriptor, otherwise return unconditionally 1.
10251 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10253         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10254         regular Linux version.  Remove file.
10255         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10256         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10257         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10258         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10259         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10260         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10261         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10262         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10263         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10264         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10265         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10266         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10267         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10268         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10269         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10270         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10271         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10272         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10273         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10274         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10275         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10276         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10277         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10278         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10279         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10280         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10281         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10282         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10283         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10284         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10286 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10288         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10289         * sysdeps/unix/sysv/linux/open.c: Removed.
10290         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10291         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10292         * sysdeps/unix/sysv/linux/msync.c: Removed.
10293         * sysdeps/unix/sysv/linux/read.c: Removed.
10294         * sysdeps/unix/sysv/linux/close.c: Removed.
10295         * sysdeps/unix/sysv/linux/creat.c: Removed.
10296         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10297         * sysdeps/unix/sysv/linux/pause.c: Removed.
10298         * sysdeps/unix/sysv/linux/select.c: Removed.
10299         * sysdeps/unix/sysv/linux/write.c: Removed.
10301 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10303         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10304         element in TCB to see whether locking is needed.
10306         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10307         MULTIPLE_THREADS_OFFSET value is correct.
10309         * sysdeps/unix/sysv/linux/close.c: New file.
10310         * sysdeps/unix/sysv/linux/connect.S: New file.
10311         * sysdeps/unix/sysv/linux/creat.c: New file.
10312         * sysdeps/unix/sysv/linux/fsync.c: New file.
10313         * sysdeps/unix/sysv/linux/llseek.c: New file.
10314         * sysdeps/unix/sysv/linux/lseek.c: New file.
10315         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10316         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10317         * sysdeps/unix/sysv/linux/msync.c: New file.
10318         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10319         * sysdeps/unix/sysv/linux/open.c: New file.
10320         * sysdeps/unix/sysv/linux/open64.c: New file.
10321         * sysdeps/unix/sysv/linux/pause.c: New file.
10322         * sysdeps/unix/sysv/linux/poll.c: New file.
10323         * sysdeps/unix/sysv/linux/pread.c: New file.
10324         * sysdeps/unix/sysv/linux/pread64.c: New file.
10325         * sysdeps/unix/sysv/linux/pselect.c: New file.
10326         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10327         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10328         * sysdeps/unix/sysv/linux/readv.c: New file.
10329         * sysdeps/unix/sysv/linux/recv.S: New file.
10330         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10331         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10332         * sysdeps/unix/sysv/linux/select.c: New file.
10333         * sysdeps/unix/sysv/linux/send.S: New file.
10334         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10335         * sysdeps/unix/sysv/linux/sendto.S: New file.
10336         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10337         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10338         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10339         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10340         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10341         * sysdeps/unix/sysv/linux/system.c: New file.
10342         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10343         * sysdeps/unix/sysv/linux/wait.c: New file.
10344         * sysdeps/unix/sysv/linux/waitid.c: New file.
10345         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10346         * sysdeps/unix/sysv/linux/writev.c: New file.
10347         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10349         * pt-readv.c: Fix comment.
10351 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10353         * tst-cleanup1.c: Include stdlib.h.
10355         * tst-cancel5.c: New test.
10356         * Makefile (tests): Add tst-cancel5.
10357         (tst-cancel5): Link against libc.so libpthread.so in that order.
10359 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10361         * forward.c (test_loaded): Prevent recursive calls.
10363         * Makefile (routines): Add libc-cancellation.
10364         * libc-cancellation.c: New file.
10365         * descr.h (struct pthread): Add multiple_threads field.
10366         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10367         new thread descriptor to 1.
10368         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10369         Initialize multiple_thread field after successful thread creation.
10370         * cancellation.c (__do_cancel): Move to pthreadP.h.
10371         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10372         (__pthread_disable_asynccancel): Add internal_function attribute.
10373         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10374         * pthread_setcancelstate.c: Likewise.
10375         * pthread_setcanceltype.c: Likewise.
10376         * pthread_exit.c: Likewise.
10377         * pthreadP.h (CANCELLATION_P): Likewise.
10378         (__do_cancel): Define as static inline.
10379         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10380         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10381         declarations.
10382         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10383         fields.  Define MULTIPLE_THREADS_OFFSET.
10384         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10385         declaration.
10386         * sysdeps/unix/sysv/linux/accept.S: New file.
10387         * sysdeps/unix/sysv/linux/read.c: New file.
10388         * sysdeps/unix/sysv/linux/write.c: New file.
10389         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10390         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10391         initialization of __libc_locking_needed.
10392         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10393         __libc_locking_needed, use multiple_threads field in TCB.
10394         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10396 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10398         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10399         version.
10400         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10402         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10403         access to __libc_locking_needed for PIC.
10405 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10407         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10408         declare for libc.so.
10409         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10410         expression.
10411         (__libc_lock_lock): Put into statement expression.
10412         (__libc_lock_unlock): Remove trailing semicolon.
10413         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10415 2002-12-12  Roland McGrath  <roland@redhat.com>
10417         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10418         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10420 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10422         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10423         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10424         Initialize __libc_locking_needed.
10425         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10426         instead of __register_pthread_fork_handler.
10427         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10428         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10429         fork-gen with libc_pthread_init.
10430         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10431         of __register_pthread_fork_handler.
10432         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10433         of __register_pthread_fork_handler.
10434         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10435         __libc_locking_needed to determine whether lock prefix can be avoided.
10436         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10438 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10440         * Makefile (tests): Add tst-cleanup1.
10441         * tst-cleanup1.c: New file.
10442         * cancellation.c (__cleanup_thread): Removed.
10443         (__do_cancel): Remove call to __cleanup_thread.
10444         * pthreadP.h: Remove __cleanup_thread prorotype.
10446         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10447         Remember function and argument even if cancellation handler
10448         function is not available.
10449         (__libc_cleanup_region_end): Execute registered function directly if
10450         pthread functions are not available.
10451         (__libc_cleanup_end): Likewise.
10453         * init.c (__pthread_initialize_minimal): Fix initialization in
10454         static lib by preventing gcc from being too clever.
10456 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10458         * init.c (__pthread_initialize_minimal): Remove unneccesary
10459         sigaddset call.
10461         * Makefile (tests): We can run tst-locale2 now.
10463 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10465         * Versions: Remove duplicated sigwait entry.
10467 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10469         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10470         inside libpthread.
10472         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10474         * pthreadP.h: Declare __pthread_enable_asynccancel and
10475         __pthread_disable_asynccancel.
10476         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10477         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10478         * cancellation.c (__pthread_enable_asynccancel): New function.
10479         (__pthread_disable_asynccancel): New function.
10480         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10481         * pt-close.c: Likewise.
10482         * pt-connect.c: Likewise.
10483         * pt-creat.c: Likewise.
10484         * pt-fcntl.c: Likewise.
10485         * pt-fsync.c: Likewise.
10486         * pt-lseek.c: Likewise.
10487         * pt-lseek64.c: Likewise.
10488         * pt-msgrcv.c: Likewise.
10489         * pt-msgsnd.c: Likewise.
10490         * pt-msync.c: Likewise.
10491         * pt-nanosleep.c: Likewise.
10492         * pt-open.c: Likewise.
10493         * pt-open64.c: Likewise.
10494         * pt-pause.c: Likewise.
10495         * pt-poll.c: Likewise.
10496         * pt-pread.c: Likewise.
10497         * pt-pread64.c: Likewise.
10498         * pt-pselect.c: Likewise.
10499         * pt-pwrite.c: Likewise.
10500         * pt-pwrite64.c: Likewise.
10501         * pt-read.c: Likewise.
10502         * pt-readv.c: Likewise.
10503         * pt-recv.c: Likewise.
10504         * pt-recvfrom.c: Likewise.
10505         * pt-recvmsg.c: Likewise.
10506         * pt-select.c: Likewise.
10507         * pt-send.c: Likewise.
10508         * pt-sendmsg.c: Likewise.
10509         * pt-sendto.c: Likewise.
10510         * pt-sigpause.c: Likewise.
10511         * pt-sigsuspend.c: Likewise.
10512         * pt-sigtimedwait.c: Likewise.
10513         * pt-sigwait.c: Likewise.
10514         * pt-sigwaitinfo.c: Likewise.
10515         * pt-system.c: Likewise.
10516         * pt-tcdrain.c: Likewise.
10517         * pt-wait.c: Likewise.
10518         * pt-waitid.c: Likewise.
10519         * pt-waitpid.c: Likewise.
10520         * pt-write.c: Likewise.
10521         * pt-writev.c: Likewise.
10522         * pthread_join.c: Likewise.
10523         * pthread_timedjoin.c: Likewise.
10525         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10526         (__xpg_sigpause): New function.
10527         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10529 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10531         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10533         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10534         _GI_pthread_cleanup_pop to pthreadP.h.
10536         * ftrylockfile.c: Use _IO_lock_trylock instead of
10537         pthread_mutex_trylock.
10539         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10540         (CANCEL_RESET): Likewise.
10541         (__pthread_setcanceltype_): Declare.
10542         (__pthread_mutex_lock_internal): Declare.
10543         (__pthread_mutex_unlock_internal): Declare.
10544         (__pthread_once_internal): Declare.
10545         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10546         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10548         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10549         and pthread_mutex_unlock.
10550         * pthread_cond_wait.c: Likewise.
10551         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10552         * pthread_mutex_unlock.c: Likewise.
10554         * pthread_setcanceltype.c: Add additional alias
10555         __pthread_setcanceltype.
10557         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10558         * sem_open.c (sem_open): Likewise.
10559         Use __libc_open, __libc_write, and __libc_close instead of
10560         open, write, and close respectively.
10562         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10563         Rewrite as statement expression since it must return a value.
10565         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10566         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10567         __pthread_kill.
10569         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10570         alias __pthread_once_internal.
10572         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10574 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10576         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10577         * tst-stdio1.c: New file.
10578         * tst-stdio2.c: New file.
10580         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10582         * Makefile (tests): Comment out tst-locale2 for now.
10583         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10585         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10586         -D_IO_MTSAFE_IO.
10587         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10588         Use _IO_lock_init instead of explicit assignment.
10590         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10591         Define __libc_lock_* and __libc_lock_recursive macros with
10592         lowlevellock macros, not pthread mutexes.
10594         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10595         of pthread_mutex_lock.
10596         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10597         instead of pthread_mutex_unlock.
10599 2002-12-06  Roland McGrath  <roland@redhat.com>
10601         * allocatestack.c (__stack_user): Use uninitialized defn.
10602         * init.c (__pthread_initialize_minimal): Initialize it here.
10604 2002-12-05  Roland McGrath  <roland@redhat.com>
10606         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10607         string.
10608         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10610         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10611         missing & here too.
10613 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10615         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10616         lowlevellock.
10617         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10618         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10619         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10620         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10621         for __libc_lock_* macros.
10622         * Makefile (routines): Add libc-lowlevellock.
10624 2002-10-09  Roland McGrath  <roland@redhat.com>
10626         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10627         Under [__PIC__], call the function via the pointer fetched for
10628         comparison rather than a call by name that uses the PLT.
10629         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10630         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10631         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10632         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10633         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10635 2002-12-04  Roland McGrath  <roland@redhat.com>
10637         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10639         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10640         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10642         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10644 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10646         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10647         a completely opaque, non-integer type.
10648         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10650 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10652         * sysdeps/i386/tls.h: Include stdlib.h.
10653         * sysdeps/x86_64/tls.h: Likewise.
10655 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10657         * Makefile (tests): Add tst-locale2.
10658         (tests-static): Likewise.
10659         * tst-locale2.c: New file.
10661         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10662         volatile and add memory clobbers to lock operations.
10664 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10666         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10667         * sysdeps/i386/i486/bits/atomic.h: New file.
10668         * sysdeps/i386/i586/bits/atomic.h: New file.
10669         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10670         include i486 version.
10671         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10672         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10673         Patch by Marijn Ros <marijn@mad.scientist.com>.
10675         * allocatestack.c (get_cached_stack): Don't crash if we first
10676         found a stack with a larger size then needed.
10677         Reported by Hui Huang <hui.huang@sun.com>.
10679         * Makefile (tests): Add tst-sysconf.
10680         * tst-sysconf.c: New file.
10682         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10683         PTHREAD_THREADS_MAX.
10685 2002-12-02  Roland McGrath  <roland@redhat.com>
10687         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10688         Declare using hidden_proto instead of attribute_hidden, so there are
10689         non-.hidden static symbols for gdb to find.
10690         (__pthread_keys): Likewise.
10691         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10692         * allocatestack.c (__stack_user): Likewise.
10693         * pthread_create.c (__pthread_keys): Likewise.
10694         (__nptl_threads_events, __nptl_last_event): Make these static instead
10695         of hidden.
10696         * pthread_key_create.c (__pthread_pthread_keys_max,
10697         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10699 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10701         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10702         statically.
10703         * tst-locale1.c: New file.
10705         * pthread_cond_timedwait.c: Include <stdlib.h>.
10707         * Makefile (tests): Add tst-fork2 and tst-fork3.
10708         * tst-fork2.c: New file.
10709         * tst-fork3.c: New file.
10711 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10713         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10715         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10716         require it to 200112L.
10718         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10719         instruction only if HAVE_CMOV is defined.
10720         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10722         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10724         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10726         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10728         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10730 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10732         * sysdeps/x86_64/bits/atomic.h: New file.
10734         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10735         16-bit operations.
10737         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10738         possible since gettid cannot fail.
10740         * sysdeps/x86_64/pthreaddef.h: New file.
10742         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10744         * sysdeps/x86_64/pthread_spin_init.c: New file.
10745         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10746         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10747         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10749         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10750         Add missing lock prefix.  Minute optimization.
10752         * tst-spin2.c (main): Also check successful trylock call.
10754         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10755         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10757         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10758         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10760         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10761         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10762         value in case of an error.  Add support for INTERNAL_SYSCALL.
10764         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10765         value in case of an error.
10767         * sysdeps/x86_64/tls.h: New file.
10769 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10771         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10772         takes the array member name and the index as parameters.
10773         (THREAD_SETMEM_NC): Likewise.
10774         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10775         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10776         interfaces.
10778         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10779         to decide which code to use.
10780         (THREAD_SETMEM_NC): Likewise.
10782         * allocatestack.c (queue_stack): Don't remove stack from list here.
10783         Do it in the caller.  Correct condition to prematurely terminate
10784         loop to free stacks.
10785         (__deallocate_stack): Remove stack from list here.
10787 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10789         * Makefile (tests): Add tst-stack1.
10790         * tst-stack1.c: New file.
10792         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10793         provided stack.
10795         * pthread_attr_getstack.c: Return bottom of the thread area.
10797 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10799         * Makefile (libpthread-routines): Add pt-allocrtsig and
10800         pthread_kill_other_threads.
10801         * pt-allocrtsig.c: New file.
10802         * pthread_kill_other_threads.c: New file.
10803         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10804         all three functions.
10805         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10806         allocrtsig.
10807         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10808         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10809         and __libc_allocate_rtsig_private.
10810         * Versions (libpthread): Export pthread_kill_other_threads_np,
10811         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10813 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10815         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10816         the end of the stack.  Adjust computations.
10817         When mprotect call fails dequeue stack and free it.
10818         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10819         attribute.
10820         * pthread_getattr_np.c: Likewise.
10822         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10823         surprises.
10825 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10827         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10828         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10830 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10832         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10833         * pthread_setspecific.c: Likewise.
10835 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10837         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10838         definitions.  Get them from the official place.
10839         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10841         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10842         Use new CLONE_ flags in clone() calls.
10844         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10845         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10847         * Versions: Add pthread_* functions for libc.
10848         * forward.c: New file.
10850         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10851         errno-loc.
10852         * herrno.c: New file.
10853         * res.c: New file.
10855         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10856         sem_trywait, and sem_timedwait.  Add herrno and res.
10857         * sem_init.c: Don't initialize lock and waiters members.
10858         * sem_open.c: Likewise.
10859         * sem_post.c: Removed.
10860         * sem_wait.c: Removed.
10861         * sem_trywait.c: Removed.
10862         * sem_timedwait.c: Removed.
10863         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10864         Includes full implementations of sem_post, sem_wait, sem_trywait,
10865         and sem_timedwait.
10866         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10867         for new implementation.
10868         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10869         and waiters fields.
10871         * tst-sem3.c: Improve error message.
10872         * tst-signal3.c: Likewise.
10874         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10875         to tell the kernel about the termination futex and to initialize tid
10876         member.  Don't initialize main_thread.
10877         * descr.h (struct pthread): Remove main_thread member.
10878         * cancelllation.c (__do_cancel): Remove code handling main thread.
10879         The main thread is not special anymore.
10881         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10882         size of the stacks to stack_cache_actsize.
10884         * pt-readv.c: Add missing "defined".
10885         * pt-sigwait.c: Likewise.
10886         * pt-writev.c: Likewise.
10888 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10890         * Versions: Export __connect from libpthread.
10891         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10893         * Makefile (libpthread-routines): Add pt-raise.
10894         * sysdeps/unix/sysv/linux/raise.c: New file.
10895         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10896         * sysdeps/generic/pt-raise.c: New file.
10898         * pthread_cond_init.c: Initialize all data elements of the condvar
10899         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10901         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10902         * pthread_create.c: Likewise.
10904         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10905         * tst-key1.c: New file.
10906         * tst-key2.c: New file.
10907         * tst-key3.c: New file.
10909         * Versions: Export pthread_detach for version GLIBC_2.0.
10910         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10912 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10914         * pthread_key_create.c: Terminate search after an unused key was found.
10915         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10917         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10918         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10920 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10922         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10923         dynamic lookup for errno in PIC.
10925         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10926         release the stack lock as soon as possible.
10927         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10928         the static TLS block.
10929         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10931         * cancellation.c: Renamed from cancelation.c.
10932         * Makefile: Adjust accordingly.
10933         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10934         * cleanup_defer.c: Use CANCELLATION_P.
10935         * pthread_testcancel.c: Likewise.
10936         * descr.h: Fix spelling in comments.
10937         * init.c: Likewise.
10938         * pthread_getattr_np.c: Likewise.
10939         * pthread_getschedparam.c: Likewise.
10940         * pthread_setschedparam.c: Likewise.
10941         * Versions: Likewise.
10943         * pt-pselect.c: New file.
10944         * Makefile (libpthread-routines): Add pt-pselect.
10945         * Versions: Add pselect.
10947         * tst-cancel4.c: New file.
10948         * Makefile (tests): Add tst-cancel4.
10950 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10952         * pthread_mutex_lock.c: Always record lock ownership.
10953         * pthread_mutex_timedlock.c: Likewise.
10954         * pthread_mutex_trylock.c: Likewise.
10956         * pt-readv.c: New file.
10957         * pt-writev.c: New file.
10958         * pt-creat.c: New file.
10959         * pt-msgrcv.c: New file.
10960         * pt-msgsnd.c: New file.
10961         * pt-poll.c: New file.
10962         * pt-select.c: New file.
10963         * pt-sigpause.c: New file.
10964         * pt-sigsuspend.c: New file.
10965         * pt-sigwait.c: New file.
10966         * pt-sigwaitinfo.c: New file.
10967         * pt-waitid.c: New file.
10968         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10969         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10970         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10971         * Versions: Add all the new functions.
10973         * tst-exit1.c: New file.
10974         * Makefile (tests): Add tst-exit1.
10976         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10978 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10980         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10982         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10983         call.  pthread_join is an official cancellation point.
10984         * pthread_timedjoin.c: Likewise.
10986         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10987         and the condvar's mutex are retrieved.
10988         * pthread_cond_timedwait.c: Likewise.
10989         Reported by dice@saros.East.Sun.COM.
10991 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10993         * pthreadP.h: Cut out all type definitions and move them...
10994         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10995         * pthreadP.h: Include <internaltypes.h>.
10997         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10998         performance tweaks.
11000         * sem_trywait.c: Shuffle #includes around to get right order.
11001         * sem_timedwait.c: Likewise.
11002         * sem_post.c: Likewise.
11003         * sem_wait.c: Likewise.
11005         * nptl 0.3 released.
11007         * Makefile (tests): Add tst-signal3.
11008         * tst-signal3.c: New file.
11010 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
11012         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
11013         the asms modify the sem object.
11014         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
11016         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
11017         the actual members.
11018         * pthreadP.h (struct sem): New type.  Actual semaphore type.
11019         * semaphoreP.h: Include pthreadP.h.
11020         * sem_getvalue.c: Adjust to sem_t change.
11021         * sem_init.c: Likewise.
11022         * sem_open.c: Likewise.
11023         * sem_post.c: Likewise.
11024         * sem_timedwait.c: Likewise.
11025         * sem_trywait.c: Likewise.
11026         * sem_wait.c: Likewise.
11028 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
11030         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
11031         * tst-basic2.c: New file.
11032         * tst-exec1.c: New file.
11033         * tst-exec2.c: New file.
11034         * tst-exec3.c: New file.
11036         * tst-fork1.c: Remove extra */.
11038         * nptl 0.2 released.  The API for IA-32 is complete.