1 2009-07-27 Ulrich Drepper <drepper@redhat.com>
4 * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
5 instead of of _acq variants of cmpxchg.
7 2009-07-23 Ulrich Drepper <drepper@redhat.com>
9 * sysdeps/x86_64/configure.in: New file.
11 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
12 path when not using absolute timeout futex.
14 2009-07-20 Ulrich Drepper <drepper@redhat.com>
16 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
17 optimizations of last changes.
18 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
20 2009-07-19 Ulrich Drepper <drepper@redhat.com>
22 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
23 FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
24 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
25 is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
26 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
27 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
28 is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
29 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
31 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
32 (__pthread_cond_timedwait): Make more robust.
34 2009-07-18 Ulrich Drepper <drepper@redhat.com>
36 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
37 (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
38 directly use absolute timeout.
40 * tst-sem5.c (do_test): Add test for premature timeout.
41 * Makefile: Linu tst-sem5 with librt.
43 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
44 (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
45 directly use absolute timeout.
46 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
47 (pthread_rwlock_timedrdlock): Likewise.
49 * tst-cond11.c (run_test): Add test to check that the timeout is
52 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
53 (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
54 directly use absolute timeout.
56 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
57 (__pthread_cond_wait): Convert to using exception handler instead of
58 registered unwind buffer.
59 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
60 (__pthread_cond_timedwait): Likewise.
62 2009-07-17 Ulrich Drepper <drepper@redhat.com>
64 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
65 If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
68 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
69 handling of uncontested semaphore.
71 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
72 (__condvar_cleanup): Rewrite to use cfi directives instead of
73 hand-coded unwind tables.
74 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
76 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
77 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
80 2009-06-12 Ulrich Drepper <drepper@redhat.com>
82 * Makefile (libpthread-routines): Add pthread_sigqueue.
83 * Versions: Add pthread_sigqueue for GLIBC_2.11.
84 * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
85 * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
87 2009-06-11 Ulrich Drepper <drepper@redhat.com>
90 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
91 (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
93 Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
95 2009-05-16 Ulrich Drepper <drepper@redhat.com>
97 * libc-cancellation.c: Move __libc_cleanup_routine to...
98 * libc-cleanup.c: ...here. New file.
99 * Makefile (routines): Add libc-cleanup.
101 * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
103 * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
104 * sysdeps/pthread/librt-cancellation.c: Likewise.
107 * nptl-init.c: Renamed from init.c.
108 * Makefile: Change all occurences of init.c to nptl-init.c.
110 2009-05-15 Ulrich Drepper <drepper@redhat.com>
112 * cancellation.c (__pthread_disable_asynccancel): Correct the bits
113 to test when deciding on the delay.
114 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
115 * pthread_cancel.c: Close race between deciding on sending a signal
116 and setting the CANCELING_BIT bit.
118 * cancellation.c (__pthread_disable_asynccancel): Don't return if
120 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
122 2009-04-27 Ulrich Drepper <drepper@redhat.com>
124 * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
126 * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
127 * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
128 * sysdeps/i386/tls.h: Likewise.
129 (tcbhead_t): Add __private_tm member.
131 2009-04-26 Ulrich Drepper <drepper@redhat.com>
133 * sem_open.c (sem_open): Rewrite initialization of initsem to
136 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
137 Avoid warning by using may_alias attribute on ptrhack.
139 2009-04-22 Ulrich Drepper <drepper@redhat.com>
142 * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
143 Check policy and priority for validity.
144 Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
146 2009-03-15 Ulrich Drepper <drepper@redhat.com>
148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
149 (__pthread_cond_timedwait): Change to use cfi directives instead of
150 hand-coded unwind sections.
152 2009-03-10 Ulrich Drepper <drepper@redhat.com>
154 * init.c (nptl_freeres): Compile only for SHARED.
156 2009-03-09 Jakub Jelinek <jakub@redhat.com>
158 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
159 FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
160 FUTEX_BITSET_MATCH_ANY.
162 2009-02-27 Roland McGrath <roland@redhat.com>
164 * init.c (__nptl_initial_report_events): Mark __attribute_used__.
165 * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
167 2009-02-26 Ulrich Drepper <drepper@redhat.com>
169 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
170 _POSIX_THREAD_ROBUST_PRIO_INHERIT and
171 _POSIX_THREAD_ROBUST_PRIO_PROTECT. Reset value of macros from
174 2009-02-25 Ulrich Drepper <drepper@redhat.com>
176 * sysdeps/pthread/pthread.h: The robust mutex functions are in
179 2009-02-24 Ulrich Drepper <drepper@redhat.com>
181 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
182 Unify name of include protector macro.
184 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
186 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
187 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
189 2009-01-29 Ulrich Drepper <drepper@redhat.com>
191 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
194 * allocatestack.c (__free_stacks): Renamed from free_stacks.
195 (__free_stack_cache): Removed. Change callers to call __free_stacks.
196 * init.c (nptl_freeres): New function.
197 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
198 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
199 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
201 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
202 load DSO. Assign last.
203 (__unwind_freeres): New function.
205 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
206 for better debugging. No need to use stack_list_add here.
208 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
210 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
211 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
212 instead of computing relative timeout.
213 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
214 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
216 2009-01-25 Ulrich Drepper <drepper@redhat.com>
218 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
220 2009-01-08 Ulrich Drepper <drepper@redhat.com>
222 * sysdeps/pthread/list.h (list_add): Initialize new element first.
223 (list_add_tail): Removed.
225 2009-01-07 Ulrich Drepper <drepper@redhat.com>
227 * (in_flight_stack): New variable.
228 (stack_list_del): New function. Use instead of list_del.
229 (stack_list_add): New function. Use instead of list_add when adding to
230 stack_cache and stack_used lists.
231 (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
232 when the fork call interrupted another thread.
234 2009-01-04 Ulrich Drepper <drepper@redhat.com>
236 * init.c (__pthread_initialize_minimal_internal): Optimize test
237 FUTEX_CLOCK_REALTIME a bit.
239 2009-01-03 Ulrich Drepper <drepper@redhat.com>
241 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
242 only passing five parameters to FUTEX_WAIT_BITSET call.
244 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
245 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
246 instead of computing relative timeout.
248 2009-01-02 Ulrich Drepper <drepper@redhat.com>
250 * init.c (__pthread_initialize_minimal_internal): Check for
251 FUTEX_CLOCK_REALTIME flag.
252 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
253 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
256 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
257 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
258 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
259 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
260 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
261 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
263 2008-12-09 Ulrich Drepper <drepper@redhat.com>
265 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
266 loop body instead of ; to avoid gcc warnings.
267 (pthread_cleanup_pop_restore_np): Likewise.
268 Patch by Caolán McNamara <caolanm@redhat.com>.
270 2008-12-09 Jakub Jelinek <jakub@redhat.com>
272 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
273 fast path here, for robust/PI/PP mutexes call
274 __pthread_mutex_lock_full. Don't use switch, instead use a series
275 of ifs according to their probability.
276 (__pthread_mutex_lock_full): New function.
277 * pthread_mutex_unlock.c: Include assert.h.
278 (__pthread_mutex_unlock_usercnt): Handle only the
279 fast path here, for robust/PI/PP mutexes call
280 __pthread_mutex_unlock_full. Don't use switch, instead use a series
281 of ifs according to their probability.
282 (__pthread_mutex_unlock_full): New function.
283 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
284 (__pthread_mutex_lock_full): Define.
286 2008-12-08 Ulrich Drepper <drepper@redhat.com>
288 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
289 implementation. Add necessary padding and.
290 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
293 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
295 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
296 and FUTEX_WAKE_BITSET.
298 2008-12-02 Ulrich Drepper <drepper@redhat.com>
300 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
301 and FUTEX_WAKE_BITSET.
302 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
303 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
304 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
305 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
307 2008-11-25 Roland McGrath <roland@redhat.com>
309 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
310 Subdirectories moved to ports repository as
311 sysdeps/.../nptl subdirectories.
313 2008-11-12 Jakub Jelinek <jakub@redhat.com>
316 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
318 * pthread_cond_init.c (__pthread_cond_init): Fix
319 cond->__data.__nwaiters initialization.
320 * Makefile (tests): Add tst-cond23.
321 * tst-cond23.c: New test.
323 2008-11-07 Jakub Jelinek <jakub@redhat.com>
325 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
327 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
330 2008-11-01 Ulrich Drepper <drepper@redhat.com>
333 * pthread_mutex_lock.c: Add support for private PI mutexes.
334 * pthread_mutex_timedlock.c: Likewise.
335 * pthread_mutex_trylock.c: Likewise.
336 * pthread_mutex_unlock.c: Likewise.
337 Patch mostly by Ben Jackson <ben@ben.com>.
339 2008-10-31 Ulrich Drepper <drepper@redhat.com>
342 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
343 Increase stack size for helper thread.
345 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
347 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
348 assembly with a clobber list for access registers a0 and a1.
350 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
352 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
353 to force runp->refcntr to be read from memory.
355 2008-09-08 Richard Guenther <rguenther@suse.de>
357 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
358 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
359 lll_timedlock, lll_robust_timedlock, lll_unlock,
360 lll_robust_unlock): Promote private to int.
362 2008-08-15 Ulrich Drepper <drepper@redhat.com>
364 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
365 ARCH_RETRY_MMAP definitions.
366 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
367 Define MAP_STACK when not defined.
368 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
369 handling of ARCH_RETRY_MMAP.
371 2008-07-30 Ulrich Drepper <drepper@redhat.com>
373 * tst-align2.c (f): Print message that f is reached.
375 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
378 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
379 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
381 2008-07-25 Ulrich Drepper <drepper@redhat.com>
383 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
384 SOCK_CLOEXEC if possible.
386 2008-05-29 Ulrich Drepper <drepper@redhat.com>
388 * Makefile (tests): Add tst-rwlock2a.
389 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
390 * tst-rwlock2a.c: New file.
392 2008-06-12 Ulrich Drepper <drepper@redhat.com>
394 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
396 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
398 * sysdeps/pthread/pthread.h: Fix typo in comment.
400 2008-05-28 Ulrich Drepper <drepper@redhat.com>
402 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
403 of CPU set to the kernel.
405 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
407 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
409 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
410 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
411 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
412 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
414 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
416 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
418 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
420 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
422 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
424 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
427 2008-05-26 Ulrich Drepper <drepper@redhat.com>
429 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
431 2008-05-20 Jakub Jelinek <jakub@redhat.com>
433 David S. Miller <davem@davemloft.net>
435 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
437 2008-05-10 Ulrich Drepper <drepper@redhat.com>
439 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
441 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
443 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
445 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
447 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
449 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
451 2008-04-14 David S. Miller <davem@davemloft.net>
453 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
454 (__old_sem_wait): Fix argument to lll_futex_wait().
456 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
458 * pthread_create.c: Require pthread_mutex_trylock and
459 pthread_key_delete for libgcc.
461 2008-04-08 Jakub Jelinek <jakub@redhat.com>
464 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
465 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
466 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
468 2008-03-27 Ulrich Drepper <drepper@redhat.com>
470 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
471 <linux/limits.h> has defined it.
472 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
473 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
474 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
475 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
477 2008-03-18 Jakub Jelinek <jakub@redhat.com>
479 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
481 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
482 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
484 2008-03-14 Ulrich Drepper <drepper@redhat.com>
486 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
487 HAVE_DL_DISCOVER_OSVERSION.
488 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
489 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
491 2008-03-07 Ulrich Drepper <drepper@redhat.com>
494 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
495 _POSIX_CHOWN_RESTRICTED value to zero.
497 2008-01-31 Roland McGrath <roland@redhat.com>
499 * Makefile (omit-deps): Variable removed.
501 2008-01-30 Ulrich Drepper <drepper@redhat.com>
503 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
504 unnecessary addr32 prefix.
506 2008-01-29 Roland McGrath <roland@redhat.com>
508 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
510 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
512 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
514 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
516 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
518 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
519 (__lll_lock_wait_private): Fix typo.
520 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
521 (pthread_barrier_wait): Likewise. Adjust XADD use.
522 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
524 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
525 (pthread_rwlock_timedrdlock): Return correct return value.
526 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
527 (pthread_rwlock_timedwrlock): Likewise.
529 2008-01-15 Ulrich Drepper <drepper@redhat.com>
531 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
532 thread returns the program exits with an error code.
534 2008-01-10 Ulrich Drepper <drepper@redhat.com>
536 * pthread-errnos.sym: Add EOVERFLOW.
537 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
538 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
539 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
540 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
542 2007-12-14 Ulrich Drepper <drepper@redhat.com>
544 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
545 parameter. Passed it as permission to mmap.
546 * allocatestack.c (allocate_stack): Pass prot as second parameter
549 2007-12-12 Ulrich Drepper <drepper@redhat.com>
551 * tst-basic7.c: Allocate memory for the stack.
554 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
555 (__pthread_cond_timedwait): Don't use VDSO.
556 Patch by Michal Januszewski.
558 2007-12-07 Ulrich Drepper <drepper@redhat.com>
561 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
562 Allow label before pthread_cleanup_pop.
563 (pthread_cleanup_pop_restore_np): Likewise.
565 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
567 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
568 Store 2 before returning ETIMEDOUT.
570 2007-11-23 Ulrich Drepper <drepper@redhat.com>
572 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
573 Store 2 before returning ETIMEDOUT.
574 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
575 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
576 (__lll_lock_wait_private): Optimize.
577 (__lll_lock_wait): Likewise.
579 2007-11-20 Jakub Jelinek <jakub@redhat.com>
581 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
582 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
583 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
585 2007-11-08 Ulrich Drepper <drepper@redhat.com>
588 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
589 If we time out, try one last time to lock the futex to avoid
590 losing a wakeup signal.
591 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
592 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
595 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
598 2007-11-07 Ulrich Drepper <drepper@redhat.com>
601 * allocatestack.c (allocate_stack): Change ENOMEM error in case
602 mmap failed to EAGAIN.
603 * Makefile (tests): Add tst-basic7.
604 * tst-basic7.c: New file.
606 2007-11-05 Ulrich Drepper <drepper@redhat.com>
608 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
611 2007-11-03 Mike Frysinger <vapier@gentoo.org>
613 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
614 missing line continuations.
615 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
616 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
618 2007-10-28 Ulrich Drepper <drepper@redhat.com>
621 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
622 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
623 (struct timer): Add next element.
624 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
625 enqueue timer structure into __active_timer_sigev_thread list.
626 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
627 remove timer struct from __active_timer_sigev_thread.
628 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
629 Before using timer structure make sure it is still on the
630 __active_timer_sigev_thread list. Keep lock until done.
631 Define __active_timer_sigev_thread and
632 __active_timer_sigev_thread_lock.
634 2007-10-27 Ulrich Drepper <drepper@redhat.com>
636 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
637 Redefine thread_atfork for use of ATFORK_MEM.
638 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
639 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
641 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
642 Use atomic operation when removing first element of list.
644 2007-10-17 Jakub Jelinek <jakub@redhat.com>
646 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
647 routine instead of an alias to __new_sem_post.
649 2007-10-15 Jakub Jelinek <jakub@redhat.com>
651 * init.c (__pthread_initialize_minimal): Initialize word to appease
654 2007-10-10 Jakub Jelinek <jakub@redhat.com>
656 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
657 libc.so just clear NAME.
658 (__libc_rwlock_fini): Nop inside of libc.so.
659 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
662 2007-09-02 Ulrich Drepper <drepper@redhat.com>
664 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
665 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
667 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
669 2007-08-21 Ulrich Drepper <drepper@redhat.com>
672 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
673 reclaimed stack if necessary.
674 * Makefile (tests): Add tst-tsd6.
675 * tst-tsd6.c: New file.
677 2007-08-21 Jakub Jelinek <jakub@redhat.com>
679 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
680 Add private argument.
682 2007-08-20 Ulrich Drepper <drepper@redhat.com>
684 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
685 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
687 2007-08-16 Jakub Jelinek <jakub@redhat.com>
689 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
690 (__lll_robust_timedlock): Pass private as last argument to
691 __lll_robust_timedlock_wait.
692 (__lll_unlock): Fix a pasto.
694 2007-08-15 Jakub Jelinek <jakub@redhat.com>
696 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
697 sparc_old_sem): New structs.
698 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
699 (__sem_wait_cleanup): New function.
700 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
701 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
702 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
704 (__old_sem_wait): New function.
705 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
706 nptl/sysdeps/unix/sysv/linux/sparc version.
707 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
709 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
710 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
711 (__new_sem_trywait): Use sparc_old_sem structure.
712 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
713 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
714 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
715 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
716 lll_futex_timed_wait.
717 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
718 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
719 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
721 (__old_sem_post): New function.
722 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
723 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
724 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
725 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
726 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
727 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
729 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
731 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
732 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
733 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
734 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
735 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
736 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
737 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
739 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
740 kernel-features.h and tcb-offsets.h.
741 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
742 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
744 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
746 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
747 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
749 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
750 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
752 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
753 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
757 2007-08-14 Jakub Jelinek <jakub@redhat.com>
759 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
760 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
761 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
762 lll_futex_timed_wait.
764 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
765 __lll_robust_unlock): Rewrite as macros instead of inline functions.
766 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
767 __lll_robust_unlock, __lll_wait_tid): Likewise.
769 2007-08-13 Jakub Jelinek <jakub@redhat.com>
771 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
773 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
774 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
775 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
776 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
778 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
779 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
782 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
783 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
784 process private. Switch DW_CFA_advance_loc1 and some
785 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
787 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
788 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
789 process private. Switch DW_CFA_advance_loc{1,2} and some
790 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
791 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
792 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
793 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
795 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
796 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
797 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
799 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
800 (__pthread_cond_broadcast): Compare %r8 instead of
801 dep_mutex-cond_*(%rdi) with $-1.
802 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
803 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
806 2007-08-13 Ulrich Drepper <drepper@redhat.com>
808 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
810 2007-08-13 Jakub Jelinek <jakub@redhat.com>
812 * allocatestack.c: Include kernel-features.h.
813 * pthread_create.c: Likewise.
814 * pthread_mutex_init.c: Likewise.
816 * pthread_cond_timedwait.c: Likewise.
817 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
818 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
819 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
820 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
821 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
822 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
825 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
827 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
828 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
829 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
830 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
832 2007-08-12 Jakub Jelinek <jakub@redhat.com>
834 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
835 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
836 byte elements. One of them is the new __shared element.
837 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
838 adjust names of other padding elements.
839 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
840 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
841 byte elements. One of them is the new __shared element.
842 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
843 adjust names of other padding elements.
844 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
845 Renamed __pad1 element to __shared, adjust names of other padding
847 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
848 (pthread_rwlock_t): Likewise.
849 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
852 2007-08-09 Anton Blanchard <anton@samba.org>
854 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
856 2007-08-12 Ulrich Drepper <drepper@redhat.com>
858 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
860 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
862 2007-08-11 Ulrich Drepper <drepper@redhat.com>
864 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
865 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
866 dealing with robust mutexes.
867 * pthread_mutex_timedlock.c: Likewise.
868 * pthread_mutex_trylock.c: Likewise.
869 * pthread_mutex_unlock.c: Likewise.
870 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
872 2007-08-06 Jakub Jelinek <jakub@redhat.com>
874 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
875 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
876 (PTHREAD_MUTEX_PSHARED): Define.
877 * pthread_mutex_init.c (__pthread_mutex_init): Set
878 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
880 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
881 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
882 as second argument to lll_lock.
883 (LLL_MUTEX_TRYLOCK): Take mutex as argument
884 instead of its __data.__lock field.
885 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
886 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
888 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
889 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
890 instead of mutex->__data.__kind directly, pass
891 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
892 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
893 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
894 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
895 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
896 to lll_timedlock, lll_robust_timedlock, lll_unlock and
897 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
898 of mutex->__data.__kind directly.
899 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
900 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
901 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
902 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
903 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
904 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
906 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
907 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
908 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
910 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
911 Take mutex as argument instead of its __data.__lock field, pass
912 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
913 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
915 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
916 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
917 to lll_robust_cond_lock.
918 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
919 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
920 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
921 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
922 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
923 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
925 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
926 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
928 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
929 pshared variable, pass it to lll_lock, lll_unlock,
930 lll_futex_timedwait and lll_futex_wake.
931 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
932 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
934 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
935 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
937 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
938 lll_futex_wake_unlock): Likewise.
939 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
941 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
942 lll_futex_wake_unlock): Likewise.
943 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
945 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
946 lll_futex_wake_unlock): Likewise.
947 (lll_futex_wake): Fix a typo.
948 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
949 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
950 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
951 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
952 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
953 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
954 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
955 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
956 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
957 (__pthread_cond_timedwait): Likewise.
958 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
959 (__condvar_cleanup, __pthread_cond_wait): Likewise.
961 2007-08-05 Jakub Jelinek <jakub@redhat.com>
963 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
964 Don't use CGOTSETUP and CGOTRESTORE macros.
965 (CGOTSETUP, CGOTRESTORE): Remove.
966 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
969 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
971 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
972 definitions for private futexes.
973 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
974 kernel-features.h and lowlevellock.h. Use private futexes if
976 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
977 (__lll_mutex_lock_wait): Rename to
978 (__lll_lock_wait): ... this. Don't compile in for libc.so.
979 (__lll_mutex_timedlock_wait): Rename to ...
980 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
981 Don't compile in for libc.so.
982 (__lll_mutex_unlock_wake): Rename to ...
983 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
984 (__lll_timedwait_tid): Use __NR_gettimeofday.
985 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
986 the header from assembler. Renamed all lll_mutex_* resp.
987 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
988 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
989 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
991 (__lll_lock_wait_private): Add prototype.
992 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
993 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
994 __lll_unlock_wake): Likewise.
995 (lll_lock): Add private argument. Call __lll_lock_wait_private
996 if private is constant LLL_PRIVATE.
997 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
998 lll_timedlock, lll_robust_timedlock): Add private argument.
999 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
1000 if private is constant LLL_PRIVATE.
1001 (lll_robust_unlock, lll_robust_dead): Add private argument.
1002 (lll_lock_t): Remove.
1003 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1004 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1005 lll_cond_wake, lll_cond_broadcast): Remove.
1006 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1007 kernel-features.h and lowlevellock.h.
1008 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1009 (LOAD_FUTEX_WAIT): Define.
1010 (__lll_robust_mutex_lock_wait): Rename to ...
1011 (__lll_robust_lock_wait): ... this. Add private argument.
1012 Use LOAD_FUTEX_WAIT macro.
1013 (__lll_robust_mutex_timedlock_wait): Rename to ...
1014 (__lll_robust_timedlock_wait): ... this. Add private argument.
1015 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
1016 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1018 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1019 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1020 __lll_mutex_{lock,unlock}_*.
1021 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1022 lowlevellock.h and pthread-errnos.h.
1023 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1024 FUTEX_CMP_REQUEUE, EINVAL): Remove.
1025 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1026 __lll_mutex_{lock,unlock}_*.
1027 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1028 lowlevellock.h and pthread-errnos.h.
1029 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1030 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1031 __lll_mutex_{lock,unlock}_*.
1032 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1034 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1035 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1036 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1037 (__condvar_tw_cleanup): Likewise.
1038 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1040 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1041 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1042 __lll_mutex_{lock,unlock}_*.
1043 ( __condvar_w_cleanup): Likewise.
1044 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1045 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1046 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1048 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1049 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1050 __lll_mutex_{lock,unlock}_*.
1051 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1053 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1054 FUTEX_PRIVATE_FLAG): Remove.
1055 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1056 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1057 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1059 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1060 FUTEX_PRIVATE_FLAG): Remove.
1061 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1062 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
1063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1065 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1066 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1067 __lll_mutex_{lock,unlock}_*.
1068 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1070 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1071 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1072 __lll_mutex_{lock,unlock}_*.
1073 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1074 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1075 (__new_sem_post): Use standard initial exec code sequences.
1076 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1078 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1079 FUTEX_PRIVATE_FLAG): Remove.
1080 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
1081 exec code sequences.
1082 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1083 (__new_sem_trywait): Use standard initial exec code sequences.
1084 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1085 (__new_sem_wait): Use standard initial exec code sequences.
1087 2007-07-31 Anton Blanchard <anton@samba.org>
1089 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1090 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1091 atomic_full_barrier.
1093 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1095 * allocatestack.c (stack_cache_lock): Change type to int.
1096 (get_cached_stack, allocate_stack, __deallocate_stack,
1097 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1098 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1099 as second argument to lll_lock and lll_unlock macros on
1101 * pthread_create.c (__find_in_stack_list): Likewise.
1102 (start_thread): Similarly with pd->lock. Use lll_robust_dead
1103 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1105 * descr.h (struct pthread): Change lock and setxid_futex field
1107 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1108 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1109 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1110 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1112 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1113 * pthread_cond_init.c (__pthread_cond_init): Likewise.
1114 * pthreadP.h (__attr_list_lock): Change type to int.
1115 * pthread_attr_init.c (__attr_list_lock): Likewise.
1116 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1117 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1119 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1120 also for lll_futex_{wake,wait}.
1121 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1123 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1124 LLL_SHARED as second argument to lll_{,un}lock.
1125 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1126 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1127 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1128 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1130 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1131 as second argument to lll_{,un}lock macros on pd->lock.
1132 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1133 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1134 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1135 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1137 * sysdeps/pthread/createthread.c (do_clone, create_thread):
1139 * pthread_once.c (once_lock): Change type to int.
1140 (__pthread_once): Pass LLL_PRIVATE as second argument to
1141 lll_{,un}lock macros on once_lock.
1142 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1143 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1144 rwlock->__data.__shared as second argument to them and similarly
1146 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1148 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1150 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1151 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1152 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1153 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1154 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1155 to lll_{,un}lock macros on __sem_mappings_lock.
1156 * sem_open.c (check_add_mapping): Likewise.
1157 (__sem_mappings_lock): Change type to int.
1158 * semaphoreP.h (__sem_mappings_lock): Likewise.
1159 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1160 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1161 instead of lll_*mutex_*, pass LLL_SHARED as last
1163 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1164 pass LLL_SHARED as last argument.
1165 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1166 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1167 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1168 pass LLL_SHARED as last argument.
1169 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1170 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1171 LLL_SHARED as last argument.
1172 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1173 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1175 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1176 __libc_lock_lock_recursive, __libc_lock_unlock,
1177 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1178 argument to lll_{,un}lock.
1179 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1180 _IO_lock_unlock): Likewise.
1181 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1183 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1184 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1186 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1187 free_mem): Likewise.
1188 (__fork_lock): Change type to int.
1189 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1190 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1191 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1193 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1194 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1195 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1197 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1198 pass it through to lll_futex_*wait, only compile in when
1200 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1201 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1202 argument and pass it through to lll_futex_*wait.
1203 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1204 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1205 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1206 inline functions to __lll_* resp. __lll_robust_*.
1207 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1208 (lll_mutex_dead): Add private argument.
1209 (__lll_lock_wait_private): New prototype.
1210 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1211 __lll_robust_lock_timedwait): Add private argument to prototypes.
1212 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1213 call __lll_lock_wait_private, otherwise pass private to
1215 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1216 __lll_robust_timedlock): Add private argument, pass it to
1217 __lll_*wait functions.
1218 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1219 call __lll_unlock_wake_private, otherwise pass private to
1221 (__lll_robust_unlock): Add private argument, pass it to
1222 __lll_robust_unlock_wake.
1223 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1224 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1225 argument, pass it through to __lll_* inline function.
1226 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1227 (lll_lock_t): Remove.
1228 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1229 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1230 lll_cond_wake, lll_cond_broadcast): Remove.
1231 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1232 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1233 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1234 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1235 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1236 the header from assembler. Renamed all lll_mutex_* resp.
1237 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1238 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1239 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1240 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1241 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1242 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1243 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1245 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1246 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1247 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1248 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1249 MULTIPLE_THREADS_OFFSET as another asm operand.
1250 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1251 MULTIPLE_THREADS_OFFSET as last asm operand, call
1252 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1253 otherwise pass private as another argument to __lll_lock_wait.
1254 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1255 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1256 private as another argument to __lll_*lock_wait call.
1257 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1258 MULTIPLE_THREADS_OFFSET as another asm operand, call
1259 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1260 otherwise pass private as another argument to __lll_unlock_wake.
1261 (lll_robust_unlock): Add private argument, pass private as another
1262 argument to __lll_unlock_wake.
1263 (lll_robust_dead): Add private argument, use __lll_private_flag
1265 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1266 LLL_MUTEX_LOCK_INITIALIZER.
1267 (lll_lock_t): Remove.
1268 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1269 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1270 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1271 lll_cond_wake, lll_cond_broadcast): Remove.
1272 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1273 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1274 2007-05-2{3,9} changes.
1275 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1276 kernel-features.h and lowlevellock.h.
1277 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1278 (LOAD_FUTEX_WAIT): Rewritten.
1279 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1281 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1282 (__lll_mutex_lock_wait): Rename to ...
1283 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1284 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1285 (__lll_mutex_timedlock_wait): Rename to ...
1286 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1287 contains private argument. Don't compile in for libc.so.
1288 (__lll_mutex_unlock_wake): Rename to ...
1289 (__lll_unlock_wake): ... this. %ecx contains private argument.
1290 Don't compile in for libc.so.
1291 (__lll_timedwait_tid): Use __NR_gettimeofday.
1292 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1293 kernel-features.h and lowlevellock.h.
1294 (LOAD_FUTEX_WAIT): Define.
1295 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1297 (__lll_robust_mutex_lock_wait): Rename to ...
1298 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1299 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1301 (__lll_robust_mutex_timedlock_wait): Rename to ...
1302 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1303 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1304 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1306 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1307 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1308 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1309 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1310 to __lll_lock_wait in %edx.
1311 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1312 Include lowlevellock.h and pthread-errnos.h.
1313 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1314 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1315 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1316 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1317 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1319 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1320 Include lowlevellock.h and pthread-errnos.h.
1321 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1322 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1323 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1324 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1325 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1327 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1328 Include lowlevellock.h.
1329 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1331 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1332 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1333 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1334 __lll_unlock_wake. Use __NR_gettimeofday.
1335 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1336 Include lowlevellock.h.
1337 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1338 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1339 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1340 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1341 and __lll_unlock_wake.
1342 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1343 Include lowlevellock.h.
1344 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1345 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1346 MUTEX(%ebx) address in %edx rather than %ecx to
1347 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1348 and __lll_unlock_wake. Move return value from %ecx to %edx
1350 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1351 Include lowlevellock.h.
1352 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1354 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1355 MUTEX(%ebp) address in %edx rather than %ecx to
1356 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1357 and __lll_unlock_wake. Move return value from %ecx to %edx
1358 register. Use __NR_gettimeofday.
1359 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1360 Include lowlevellock.h.
1361 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1363 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1364 MUTEX(%ebp) address in %edx rather than %ecx to
1365 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1366 and __lll_unlock_wake. Move return value from %ecx to %edx
1367 register. Use __NR_gettimeofday.
1368 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1369 Include lowlevellock.h.
1370 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1371 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1372 MUTEX(%edi) address in %edx rather than %ecx to
1373 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1374 and __lll_unlock_wake.
1375 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1376 Include lowlevellock.h.
1377 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1378 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1379 MUTEX(%ebx) address in %edx rather than %ecx to
1380 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1381 and __lll_unlock_wake. Move return value from %ecx to %edx
1383 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1385 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1387 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1388 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1389 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1391 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1392 (sem_timedwait): Use __NR_gettimeofday.
1393 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1395 (LOCK): Don't define.
1396 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1398 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1399 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1401 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1402 2007-05-2{3,9} changes.
1403 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1404 kernel-features.h and lowlevellock.h.
1405 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1406 (LOAD_FUTEX_WAIT): Rewritten.
1407 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1408 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1409 (__lll_mutex_lock_wait): Rename to ...
1410 (__lll_lock_wait): ... this. %esi is now private argument.
1411 Don't compile in for libc.so.
1412 (__lll_mutex_timedlock_wait): Rename to ...
1413 (__lll_timedlock_wait): ... this. %esi contains private argument.
1414 Don't compile in for libc.so.
1415 (__lll_mutex_unlock_wake): Rename to ...
1416 (__lll_unlock_wake): ... this. %esi contains private argument.
1417 Don't compile in for libc.so.
1418 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1419 kernel-features.h and lowlevellock.h.
1420 (LOAD_FUTEX_WAIT): Define.
1421 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1422 (__lll_robust_mutex_lock_wait): Rename to ...
1423 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1424 Use LOAD_FUTEX_WAIT macro.
1425 (__lll_robust_mutex_timedlock_wait): Rename to ...
1426 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1427 private, use LOAD_FUTEX_WAIT macro.
1428 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1430 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1431 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1432 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1433 __lll_lock_wait and __lll_unlock_wake.
1434 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1435 Include lowlevellock.h and pthread-errnos.h.
1436 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1437 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1438 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1439 pass LLL_SHARED in %esi to both __lll_lock_wait and
1441 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1442 Include lowlevellock.h and pthread-errnos.h.
1443 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1444 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1445 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1446 pass LLL_SHARED in %esi to both __lll_lock_wait and
1448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1449 Include lowlevellock.h.
1450 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1451 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1452 pass LLL_SHARED in %esi to both __lll_lock_wait and
1454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1455 Include lowlevellock.h.
1456 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1457 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1458 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1459 and __lll_unlock_wake.
1460 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1461 Include lowlevellock.h.
1462 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1464 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1465 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1466 and __lll_unlock_wake.
1467 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1468 Include lowlevellock.h.
1469 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1471 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1472 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1473 and __lll_unlock_wake.
1474 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1475 Include lowlevellock.h.
1476 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1478 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1479 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1480 and __lll_unlock_wake.
1481 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1482 Include lowlevellock.h.
1483 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1485 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1486 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1487 and __lll_unlock_wake.
1488 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1489 Include lowlevellock.h.
1490 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1492 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1493 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1494 and __lll_unlock_wake.
1495 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1497 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1499 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1500 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1501 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1503 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1504 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1506 (LOCK): Don't define.
1507 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1509 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1510 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1511 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1512 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1513 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1514 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1515 (__lll_lock_wait_private): New function.
1516 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1517 it to lll_futex_*wait. Don't compile in for libc.so.
1518 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1520 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1521 (struct sparc_pthread_barrier): Remove.
1522 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1523 struct sparc_pthread_barrier. Pass
1524 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1525 and lll_futex_wait macros.
1526 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1528 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1529 Include sparc pthread_barrier_wait.c instead of generic one.
1531 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1533 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1535 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1536 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1538 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1539 (pthread_rwlock_timedwrlock): Likewise.
1540 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1541 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1543 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1545 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1547 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1549 * tst-locale2.c (useless): Add return statement.
1551 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1553 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1554 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1555 * pthread_create.c (start_thread): Likewise.
1556 * init.c (sighandler_setxid): Likewise.
1557 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1558 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1559 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1560 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1561 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1562 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1563 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1564 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1565 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1567 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1569 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1571 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1572 __rtld_notify): Likewise.
1573 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1574 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1575 __pthread_once): Likewise.
1576 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1577 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1578 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1579 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1580 (lll_futex_wait): Add private argument, define as wrapper around
1581 lll_futex_timed_wait.
1582 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1583 use __lll_private_flag macro.
1584 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1585 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1586 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1587 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1588 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1589 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1590 (lll_futex_wait): Add private argument, define as wrapper around
1591 lll_futex_timed_wait.
1592 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1593 use __lll_private_flag macro.
1594 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1595 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1596 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1598 (lll_futex_timed_wait, lll_futex_wake): Use it.
1599 (lll_private_futex_wait, lll_private_futex_timed_wait,
1600 lll_private_futex_wake): Removed.
1601 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1602 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1603 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1604 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1605 (lll_futex_wait): Add private argument, define as wrapper around
1606 lll_futex_timed_wait.
1607 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1608 use __lll_private_flag macro.
1609 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1610 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1612 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1613 (lll_private_futex_wait, lll_private_futex_timed_wait,
1614 lll_private_futex_wake): Removed.
1615 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1616 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1617 (lll_private_futex_wait, lll_private_futex_timed_wait,
1618 lll_private_futex_wake): Removed.
1619 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1620 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1621 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1622 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1623 (lll_futex_wait): Add private argument, define as wrapper around
1624 lll_futex_timed_wait.
1625 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1626 use __lll_private_flag macro.
1627 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1628 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1630 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1632 (lll_futex_timed_wait, lll_futex_wake): Use it.
1633 (lll_private_futex_wait, lll_private_futex_timed_wait,
1634 lll_private_futex_wake): Removed.
1636 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1638 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1639 of the structure for sparc32.
1641 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1643 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1645 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1647 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1648 code used when private futexes are assumed.
1649 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1652 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1654 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1655 (__lll_private_flag): Define.
1656 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1657 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1659 (lll_private_futex_wait, lll_private_futex_timedwait,
1660 lll_private_futex_wake): Define as wrapper around non-_private
1662 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1663 (__lll_private_flag): Define.
1664 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1665 (lll_private_futex_wait, lll_private_futex_timedwait,
1666 lll_private_futex_wake): Define as wrapper around non-_private
1669 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1671 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1672 parameter to lll_futex_wait call.
1673 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1675 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1676 Replace lll_futex_wait with lll_private_futex_wait.
1677 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1678 Add LLL_SHARED parameter to lll_futex_wake().
1680 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1681 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1682 lll_private_futex_wake.
1683 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1684 bit from private parm before syscall.
1685 (lll_futex_timed_wait): Likewise.
1686 (lll_futex_wake): Likewise.
1687 (lll_futex_wake_unlock): Likewise.
1688 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1689 (lll_robust_mutex_unlock): Likewise.
1690 (lll_mutex_unlock_force): Likewise.
1691 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1693 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1695 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1696 compilation when unconditionally using private futexes.
1697 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1698 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1701 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1703 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1705 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1708 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1710 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1713 2007-05-16 Roland McGrath <roland@redhat.com>
1715 * init.c (__nptl_initial_report_events): New variable.
1716 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1719 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1721 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1722 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1724 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1726 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1729 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1731 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1732 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1733 * pthread_mutex_timedlock.c: Likewise.
1734 * pthread_mutex_trylock.c: Likewise.
1735 * pthread_mutex_unlock.c: Likewise.
1737 2007-06-17 Andreas Schwab <schwab@suse.de>
1739 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1742 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1744 * allocatestack.c (allocate_stack): Make code compile if
1745 __ASSUME_PRIVATE_FUTEX is set.
1747 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1749 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1750 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1752 (__pthread_rwlock_wrlock): Likewise.
1753 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1754 (pthread_rwlock_timedrdlock): Likewise.
1755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1756 (pthread_rwlock_timedwrlock): Likewise.
1757 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1758 (__pthread_rwlock_unlock): Likewise.
1760 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1762 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1763 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1764 Split __flags into __flags, __shared, __pad1 and __pad2.
1765 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1766 futexes if they are available.
1767 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1768 in libc-lowlevellock.S allow using private futexes.
1769 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1770 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1771 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1772 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1773 lll_private_futex_timed_wait and lll_private_futex_wake.
1774 (lll_robust_mutex_unlock): Fix typo.
1775 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1776 field in futex command setup.
1777 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1778 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1779 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1780 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1781 if they are available. Remove clear_once_control.
1782 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1783 futexes if they are available.
1784 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1785 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1786 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1787 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1788 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1789 Wake only when there are waiters.
1790 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1791 support. Indicate that there are waiters. Remove unnecessary
1792 extra cancellation test.
1793 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1794 left-over duplication of __sem_wait_cleanup.
1796 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1798 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1799 parameter to lll_futex_wait, lll_futex_timed_wait, and
1800 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1801 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1802 lll_private_futex_wake.
1803 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1804 * allocatestack.c: Adjust use of lll_futex_* macros.
1806 * lowlevellock.h: Likewise.
1807 * pthread_barrier_wait.c: Likewise.
1808 * pthread_cond_broadcast.c: Likewise.
1809 * pthread_cond_destroy.c: Likewise.
1810 * pthread_cond_signal.c: Likewise.
1811 * pthread_cond_timedwait.c: Likewise.
1812 * pthread_cond_wait.c: Likewise.
1813 * pthread_create.c: Likewise.
1814 * pthread_mutex_lock.c: Likewise.
1815 * pthread_mutex_setprioceiling.c: Likewise.
1816 * pthread_mutex_timedlock.c: Likewise.
1817 * pthread_mutex_unlock.c: Likewise.
1818 * pthread_rwlock_timedrdlock.c: Likewise.
1819 * pthread_rwlock_timedwrlock.c: Likewise.
1820 * pthread_rwlock_unlock.c: Likewise.
1821 * sysdeps/alpha/tls.h: Likewise.
1822 * sysdeps/i386/tls.h: Likewise.
1823 * sysdeps/ia64/tls.h: Likewise.
1824 * sysdeps/powerpc/tls.h: Likewise.
1825 * sysdeps/pthread/aio_misc.h: Likewise.
1826 * sysdeps/pthread/gai_misc.h: Likewise.
1827 * sysdeps/s390/tls.h: Likewise.
1828 * sysdeps/sh/tls.h: Likewise.
1829 * sysdeps/sparc/tls.h: Likewise.
1830 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1831 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1832 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1833 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1834 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1835 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1836 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1837 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1838 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1839 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1841 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1842 * sysdeps/x86_64/tls.h: Likewise.
1844 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1846 * pthread_getattr_np.c: No need to install a cancellation handler,
1847 this is no cancellation point.
1848 * pthread_getschedparam.c: Likewise.
1849 * pthread_setschedparam.c: Likewise.
1850 * pthread_setschedprio.c: Likewise.
1851 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1853 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1854 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1855 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1856 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1857 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1858 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1859 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1860 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1861 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1862 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1863 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1864 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1866 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1867 whether there are more than one thread makes no sense here since
1868 we only call the slow path if the locks are taken.
1869 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1871 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1872 COND_NWAITERS_SHIFT.
1873 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1875 * pthread_cond_init.c: Likewise.
1876 * pthread_cond_timedwait.c: Likewise.
1877 * pthread_cond_wait.c: Likewise.
1878 * pthread_condattr_getclock.c: Likewise.
1879 * pthread_condattr_setclock.c: Likewise.
1880 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1881 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1882 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1883 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1884 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1886 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1888 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1891 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1893 (THREAD_GSCOPE_GET_FLAG): Remove.
1894 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1895 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1897 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1898 (THREAD_GSCOPE_GET_FLAG): Remove.
1899 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1900 instead of THREAD_GSCOPE_GET_FLAG.
1901 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1903 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1904 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1905 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1906 THREAD_GSCOPE_WAIT): Define.
1907 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1908 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1909 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1910 THREAD_GSCOPE_WAIT): Define.
1911 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1912 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1913 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1914 THREAD_GSCOPE_WAIT): Define.
1915 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1916 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1917 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1918 THREAD_GSCOPE_WAIT): Define.
1920 2007-05-24 Richard Henderson <rth@redhat.com>
1922 * descr.h (struct pthread): Add header.gscope_flag.
1923 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1924 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1925 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1926 THREAD_GSCOPE_WAIT): Define.
1928 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1930 * init.c: Make it compile with older kernel headers.
1932 * tst-initializers1.c: Show through exit code which test failed.
1934 * pthread_rwlock_init.c: Also initialize __shared field.
1935 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1936 element in rwlock structure into four byte elements. One of them is
1937 the new __shared element.
1938 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1940 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1941 __shared, adjust names of other padding elements.
1942 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1943 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1944 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1945 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1947 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1948 futex to use private operations if possible.
1949 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1951 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1953 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1954 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1955 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1956 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1958 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1960 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1961 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1963 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1965 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1966 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1967 * pthread_rwlock_timedrdlock.c: Likewise.
1968 * pthread_rwlock_tryrdlock.c: Likewise.
1970 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1973 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1974 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1975 duplication of __sem_wait_cleanup.
1977 * allocatestack.c: Revert last change.
1979 * sysdeps/i386/tls.h: Likewise.
1980 * sysdeps/x86_64/tls.h: Likewise.
1981 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1983 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1985 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1987 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1988 * pthread_barrier_init.c: Set private flag if pshared and private
1989 futexes are supported.
1990 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1991 private field in futex command setup.
1992 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1994 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1996 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1998 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1999 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2000 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2001 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2002 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2004 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2005 * sem_init.c (__new_sem_init): Rewrite to initialize all three
2006 fields in the structure.
2007 (__old_sem_init): New function.
2008 * sem_open.c: Initialize all fields of the structure.
2009 * sem_getvalue.c: Adjust for renamed element.
2010 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2011 (gen-as-const-headers): Add structsem.sym.
2012 * sysdeps/unix/sysv/linux/structsem.sym: New file.
2013 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2014 struct new_sem. Add struct old_sem.
2015 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2016 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2017 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2018 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2019 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2020 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2021 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2022 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2023 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2024 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2025 * tst-sem10.c: New file.
2026 * tst-sem11.c: New file.
2027 * tst-sem12.c: New file.
2028 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2031 2007-05-25 Ulrich Drepper <drepper@redhat.com>
2032 Jakub Jelinek <jakub@redhat.com>
2034 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2035 Move __pthread_enable_asynccancel right before futex syscall.
2036 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2039 2007-05-24 Jakub Jelinek <jakub@redhat.com>
2041 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2042 THREAD_COPY_PRIVATE_FUTEX): Define.
2043 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2044 THREAD_COPY_PRIVATE_FUTEX): Define.
2045 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2046 * init.c (__pthread_initialize_minimal_internal): Use
2047 THREAD_SET_PRIVATE_FUTEX.
2049 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2050 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2051 THREAD_GSCOPE_FLAG_WAIT): Define.
2052 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2053 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2054 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2056 (THREAD_GSCOPE_GET_FLAG): Define.
2057 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2058 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2059 instead of ->header.gscope_flag directly.
2061 2007-05-23 Ulrich Drepper <drepper@redhat.com>
2063 * init.c (__pthread_initialize_minimal_internal): Check whether
2064 private futexes are available.
2065 * allocatestack.c (allocate_stack): Copy private_futex field from
2066 current thread into the new stack.
2067 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2068 futexes if they are available.
2069 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2070 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2071 in libc-lowlevellock.S allow using private futexes.
2072 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2073 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2075 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2076 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2077 if they are available.
2078 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2079 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2080 * sysdeps/i386/tcb-offsets.sym: Likewise.
2081 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2082 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2084 2007-05-21 Ulrich Drepper <drepper@redhat.com>
2086 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2087 Remove ptr_wait_lookup_done again.
2088 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2089 (__pthread_initialize_minimal_internal): Initialize
2090 _dl_wait_lookup_done pointer in _rtld_global directly.
2091 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2092 Remove code to code _dl_wait_lookup_done.
2093 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2096 2007-05-21 Jakub Jelinek <jakub@redhat.com>
2098 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2099 pthread_mutex_init failed with ENOTSUP.
2101 2007-05-19 Ulrich Drepper <drepper@redhat.com>
2103 * allocatestack.c (__wait_lookup_done): New function.
2104 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2105 Add ptr_wait_lookup_done.
2106 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2107 * pthreadP.h: Declare __wait_lookup_done.
2108 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2109 Define macros to implement reference handling of global scope.
2110 * sysdeps/x86_64/tls.h: Likewise.
2111 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2112 Initialize GL(dl_wait_lookup_done).
2114 2007-05-17 Ulrich Drepper <drepper@redhat.com>
2117 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2119 * pthread_mutex_timedlock.c: Likewise.
2120 * pthread_mutex_trylock.c: Likewise.
2121 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2123 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2124 * tst-robust9.c: New file.
2125 * tst-robustpi9.c: New file.
2127 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2128 unnecessary extra cancellation test.
2130 2007-05-14 Ulrich Drepper <drepper@redhat.com>
2132 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2133 extra cancellation test.
2134 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2136 2007-05-10 Ulrich Drepper <drepper@redhat.com>
2138 * descr.h (struct pthread): Rearrange members to fill hole in
2141 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2142 (__pthread_setaffinity_new): If syscall was successful and
2143 RESET_VGETCPU_CACHE is defined, use it before returning.
2144 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2146 2007-05-10 Jakub Jelinek <jakub@redhat.com>
2149 * tst-align2.c: Include stackinfo.h.
2150 * tst-getpid1.c: Likewise.
2152 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
2155 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2156 * tst-getpid1.c (do_test): Likewise.
2159 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2160 (allocate_stack): Likewise.
2162 2007-05-07 Ulrich Drepper <drepper@redhat.com>
2164 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2165 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2166 (__lll_robust_timedlock_wait): Likewise.
2167 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2169 2007-05-06 Mike Frysinger <vapier@gentoo.org>
2172 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2173 * tst-cancel4.c (tf_fdatasync): New test.
2175 2007-04-27 Ulrich Drepper <drepper@redhat.com>
2178 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2179 check mutexes like normal mutexes.
2182 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2183 Initialize the whole sigevent structure to appease valgrind.
2185 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2187 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2188 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2190 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2192 * tst-locale1.c: Avoid warnings.
2193 * tst-locale2.c: Likewise.
2195 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2197 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2198 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2200 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2202 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2203 __extern_always_inline where appropriate.
2204 * sysdeps/pthread/pthread.h: Likewise.
2206 2007-03-13 Richard Henderson <rth@redhat.com>
2208 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2209 separate cfi regions for the two subsections.
2211 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2213 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2214 new thread, don't just decrement it.
2215 Patch by Suzuki K P <suzuki@in.ibm.com>.
2217 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2219 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2220 PTHFCT_CALL definition.
2222 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2224 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2225 available, don't use it.
2227 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2229 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2230 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2231 call into the kernel to delay.
2233 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2235 * tst-initializers1.c: We want to test the initializers as seen
2236 outside of libc, so undefined _LIBC.
2238 * pthread_join.c (cleanup): Avoid warning.
2240 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2242 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2243 (__lll_timedwait_tid): Add unwind info.
2245 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2246 function table, mangle the pointers.
2247 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2248 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2249 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2250 demangle pointers before use.
2251 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2253 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2254 * sysdeps/pthread/setxid.h: Likewise.
2256 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2258 * tst-rwlock7.c: Show some more information in case of correct
2261 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2263 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2264 (lll_futex_timed_wait): Undo part of last change, don't negate
2267 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2269 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2270 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2272 2006-12-28 David S. Miller <davem@davemloft.net>
2274 * shlib-versions: Fix sparc64 linux target specification.
2276 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2278 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2279 Adjust include path for pthread_barrier_wait.c move.
2281 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2283 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2284 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2286 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2288 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2289 6 argument cancellable syscalls.
2290 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2291 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2292 6 argument cancellable syscalls.
2293 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2295 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2297 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2298 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2300 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2302 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2303 __sync_lock_release instead of __sync_lock_release_si.
2305 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2307 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2309 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2310 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2311 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2312 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2313 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2314 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2315 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2316 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2317 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2318 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2319 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2321 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2323 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2324 * pthread_barrier_wait.c: ...here.
2325 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2326 * pthread_cond_broadcast.c: ...here.
2327 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2328 * pthread_cond_signal.c: ...here.
2329 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2330 * pthread_cond_timedwait.c: ...here.
2331 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2332 * pthread_cond_wait.c: ...here.
2333 * sysdeps/pthread/pthread_once.c: Move to...
2334 * pthread_once.c: ...here.
2335 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2336 * pthread_rwlock_rdlock.c: ...here.
2337 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2338 * pthread_rwlock_timedrdlock.c: ...here.
2339 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2340 * pthread_rwlock_timedwrlock.c: ...here.
2341 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2342 * pthread_rwlock_unlock.c: ...here.
2343 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2344 * pthread_rwlock_wrlock.c: ...here.
2345 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2346 * pthread_spin_destroy.c: ...here.
2347 * sysdeps/pthread/pthread_spin_init.c: Move to...
2348 * pthread_spin_init.c: ...here.
2349 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2350 * pthread_spin_unlock.c: ...here.
2351 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2352 * pthread_getcpuclockid.c: ...here.
2354 * init.c: USE_TLS support is now always enabled.
2355 * tst-tls5.h: Likewise.
2356 * sysdeps/alpha/tls.h: Likewise.
2357 * sysdeps/i386/tls.h: Likewise.
2358 * sysdeps/ia64/tls.h: Likewise.
2359 * sysdeps/powerpc/tls.h: Likewise.
2360 * sysdeps/s390/tls.h: Likewise.
2361 * sysdeps/sh/tls.h: Likewise.
2362 * sysdeps/sparc/tls.h: Likewise.
2363 * sysdeps/x86_64/tls.h: Likewise.
2365 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2367 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2368 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2371 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2372 Define to THREAD_SELF->header.multiple_threads.
2373 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2375 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2377 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2378 (SINGLE_THREAD_P): Likewise.
2379 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2380 (SINGLE_THREAD_P): Likewise.
2381 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2382 (SINGLE_THREAD_P): Likewise.
2383 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2384 (SINGLE_THREAD_P): Likewise.
2385 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2387 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2388 (SINGLE_THREAD_P): Likewise.
2389 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2390 (SINGLE_THREAD_P): Likewise.
2391 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2394 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2396 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2397 by default rather than 2_3_3.
2399 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2401 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2402 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2403 atomic_* instead of catomic_* macros.
2405 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2408 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2409 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2410 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2411 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2412 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2413 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2414 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2415 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2416 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2417 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2418 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2419 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2420 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2422 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2424 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2425 cancelable syscalls with six parameters.
2427 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2428 operations instead of atomic_*.
2430 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2432 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2434 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2436 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2437 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2438 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2440 * pthread_attr_setstack.c: Allow overwriting the version number of the
2442 * pthread_attr_setstacksize.c: Likewise.
2443 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2445 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2446 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2448 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2451 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2452 Patch by Petr Baudis.
2454 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2456 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2458 * tst-cancel2.c (tf): Loop as long as something was written.
2460 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2462 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2463 mutexes wake all mutexes.
2464 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2465 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2466 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2468 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2470 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2471 to guarantee the thread is always canceled.
2473 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2475 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2477 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2478 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2479 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2481 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2483 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2486 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2487 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2489 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2490 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2491 * Makefile (tests): Add tst-cond22.
2492 * tst-cond22.c: New file.
2494 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2497 * descr.h (struct pthread): Add parent_cancelhandling.
2498 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2499 cancelhandling value to child.
2500 * pthread_create.c (start_thread): If parent thread was canceled
2501 reset the SIGCANCEL mask.
2502 * Makefile (tests): Add tst-cancel25.
2503 * tst-cancel25.c: New file.
2505 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2506 Ulrich Drepper <drepper@redhat.com>
2508 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2509 counterp if it is already zero.
2510 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2512 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2513 Roland McGrath <roland@redhat.com>
2515 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2516 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2517 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2518 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2519 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2520 lll_robust_mutex_timedlock, lll_mutex_unlock,
2521 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2522 Add _L_*_ symbols around the subsection.
2523 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2524 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2526 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2527 Roland McGrath <roland@redhat.com>
2529 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2530 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2531 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2532 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2533 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2534 lll_robust_mutex_timedlock, lll_mutex_unlock,
2535 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2536 Add _L_*_ symbols around the subsection.
2537 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2538 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2540 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2542 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2543 change because it can disturb too much existing code. If real hard
2544 reader preference is needed we'll introduce another type.
2545 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2546 (pthread_rwlock_timedwrlock): Likewise.
2547 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2550 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2552 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2554 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2555 (pthread_rwlock_timedwrlock): Likewise.
2556 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2559 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2561 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2562 Only define ifdef SHARED.
2564 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2566 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2567 (free_stacks): ...here.
2568 (__free_stack_cache): New function.
2569 * pthreadP.h: Declare __free_stack_cache.
2570 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2572 * init.c (pthread_functions): Initialize ptr_freeres.
2573 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2574 New freeres function.
2576 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2579 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2581 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2583 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2584 _XOPEN_REALTIME_THREADS.
2586 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2588 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2589 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2590 HAVE_CLOCK_GETTIME_VSYSCALL.
2591 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2593 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2595 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2596 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2597 * descr.h (struct priority_protection_data): New type.
2598 (struct pthread): Add tpp field.
2599 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2600 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2601 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2602 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2604 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2605 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2606 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2607 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2609 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2611 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2612 * pthread_mutexattr_getprioceiling.c
2613 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2614 in the SCHED_FIFO priority range.
2615 * pthread_mutexattr_setprioceiling.c
2616 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2617 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2618 if mutex is not TPP. Ceiling is now in __data.__lock.
2619 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2620 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2621 is now in __data.__lock. Add locking.
2622 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2623 * Makefile (libpthread-routines): Add tpp.
2624 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2625 * tst-tpp.h: New file.
2626 * tst-mutexpp1.c: New file.
2627 * tst-mutexpp6.c: New file.
2628 * tst-mutexpp10.c: New file.
2629 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2630 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2632 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2635 * pthread_join.c (pthread_join): Account for self being canceled
2636 when checking for deadlocks.
2637 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2638 (tf1): Don't print anything after pthread_join returns, this would be
2639 another cancellation point.
2641 * tst-join6.c: New file.
2642 * Makefile (tests): Add tst-join6.
2644 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2647 * pthread_setspecific.c (__pthread_setspecific): Check
2648 out-of-range index before checking for unused key.
2650 * sysdeps/pthread/gai_misc.h: New file.
2652 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2654 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2655 file. Don't use sysctl.
2656 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2657 overwrite the file if this is likely not true.
2659 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2661 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2662 * Makefile (tests): Add tst-getpid3.
2663 * tst-getpid3.c: New file.
2665 2006-07-30 Roland McGrath <roland@redhat.com>
2667 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2669 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2670 (pause_not_cancel): New macro.
2671 (nanosleep_not_cancel): New macro.
2672 (sigsuspend_not_cancel): New macro.
2673 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2674 nanosleep_not_cancel macro from <not-cancel.h>.
2675 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2676 macro from <not-cancel.h>.
2678 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2679 Jakub Jelinek <jakub@redhat.com>
2681 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2682 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2683 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2684 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2685 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2686 * pthread_mutex_lock.c: Likewise.
2687 * pthread_mutex_timedlock.c: Likewise.
2688 * pthread_mutex_trylock.c: Likewise.
2689 * pthread_mutex_unlock.c: Likewise.
2690 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2692 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2693 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2694 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2695 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2696 pthread-pi-defines.sym.
2697 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2698 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2699 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2700 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2701 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2702 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2703 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2704 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2705 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2706 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2707 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2708 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2709 * tst-mutex2.c: Likewise.
2710 * tst-mutex3.c: Likewise.
2711 * tst-mutex4.c: Likewise.
2712 * tst-mutex5.c: Likewise.
2713 * tst-mutex6.c: Likewise.
2714 * tst-mutex7.c: Likewise.
2715 * tst-mutex7a.c: Likewise.
2716 * tst-mutex8.c: Likewise.
2717 * tst-mutex9.c: Likewise.
2718 * tst-robust1.c: Likewise.
2719 * tst-robust7.c: Likewise.
2720 * tst-robust8.c: Likewise.
2721 * tst-mutexpi1.c: New file.
2722 * tst-mutexpi2.c: New file.
2723 * tst-mutexpi3.c: New file.
2724 * tst-mutexpi4.c: New file.
2725 * tst-mutexpi5.c: New file.
2726 * tst-mutexpi6.c: New file.
2727 * tst-mutexpi7.c: New file.
2728 * tst-mutexpi7a.c: New file.
2729 * tst-mutexpi8.c: New file.
2730 * tst-mutexpi9.c: New file.
2731 * tst-robust1.c: New file.
2732 * tst-robust2.c: New file.
2733 * tst-robust3.c: New file.
2734 * tst-robust4.c: New file.
2735 * tst-robust5.c: New file.
2736 * tst-robust6.c: New file.
2737 * tst-robust7.c: New file.
2738 * tst-robust8.c: New file.
2739 * Makefile (tests): Add the new tests.
2741 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2742 * pthread_mutex_destroy.c: Remove unneeded label.
2744 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2746 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2747 computations to compile time.
2749 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2751 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2753 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2755 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2757 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2759 * pthread_key_create.c (__pthread_key_create): Do away with
2760 __pthread_keys_lock.
2762 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2763 (__kernel_cpumask_size): Mark as hidden.
2764 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2766 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2767 * semaphoreP.h (__sem_mappings_lock): Likewise.
2769 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2771 * pthread_atfork.c: Mark __dso_handle as hidden.
2773 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2776 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2777 the reload problem. Change the one path in pthread_cancel_init
2778 which causes the problem. Force gcc to reload. Simplify callers.
2779 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2780 (_Unwind_GetBSP): Undo last patch.
2782 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2784 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2785 function pointer is reloaded after pthread_cancel_init calls.
2788 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2789 pointers are reloaded after pthread_cancel_init calls.
2791 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2793 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2796 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2798 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2799 Allocate new object which is passed to timer_sigev_thread so that
2800 the timer can be deleted before the new thread is scheduled.
2802 2006-04-26 Roland McGrath <roland@redhat.com>
2804 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2806 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2808 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2809 suffix for conditional jumps.
2810 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2811 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2812 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2813 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2814 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2815 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2817 * init.c (sigcancel_handler): Compare with correct PID even if the
2818 thread is in the middle of a fork call.
2819 (sighandler_setxid): Likewise.
2820 Reported by Suzuki K P <suzuki@in.ibm.com> .
2822 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2824 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2826 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2828 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2829 fails [Coverity CID 105].
2831 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2833 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2835 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2838 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2839 Define __lll_rel_instr using lwsync.
2841 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2843 * allocatestack.c (allocate_stack): Always initialize robust_head.
2844 * descr.h: Define struct robust_list_head.
2845 (struct pthread): Use robust_list_head in robust mutex list definition.
2846 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2847 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2848 (__pthread_initialize_minimal_internal): Register robust_list with
2850 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2851 Declare __set_robust_list_avail.
2852 * pthread_create.c (start_thread): Register robust_list of new thread.
2853 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2855 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2856 number of users, it's unreliable.
2857 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2858 set_robust_list syscall is available.
2859 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2860 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2861 Set robust_head.list_op_pending before trying to lock a robust mutex.
2862 * pthread_mutex_timedlock.c: Likewise.
2863 * pthread_mutex_trylock.c: Likewise.
2864 * pthread_mutex_unlock.c: Likewise for unlocking.
2865 * Makefile (tests): Add tst-robust8.
2866 * tst-robust8.c: New file.
2868 2006-03-08 Andreas Schwab <schwab@suse.de>
2870 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2871 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2873 2006-03-05 Roland McGrath <roland@redhat.com>
2875 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2876 and $config_os doesn't match *linux*.
2878 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2880 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2881 Use __syscall_error.
2882 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2883 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2884 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2885 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2886 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2887 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2889 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2891 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2893 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2895 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2896 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2898 (__lll_robust_timedlock_wait): Likewise.
2899 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2900 (__lll_robust_lock_wait): Likewise.
2901 (__lll_robust_timedlock_wait): Likewise.
2902 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2903 (__lll_robust_lock_wait): Likewise.
2904 (__lll_robust_timedlock_wait): Likewise.
2906 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2908 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2909 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2910 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2911 lll_robust_mutex_unlock): Define.
2912 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2914 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2916 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2917 instead of <clone.S>.
2919 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2921 * Makefile (libpthread-routines): Add
2922 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2923 and pthread_mutex_[sg]etprioceiling.
2924 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2925 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2926 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2927 pthread_mutex_setprioceiling.
2928 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2929 PTHREAD_PRIO_PROTECT): New enum values.
2930 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2931 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2932 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2934 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2935 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2936 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2938 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2939 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2940 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2941 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2942 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2943 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2944 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2946 * pthread_mutex_getprioceiling.c: New file.
2947 * pthread_mutex_setprioceiling.c: New file.
2948 * pthread_mutexattr_getprioceiling.c: New file.
2949 * pthread_mutexattr_setprioceiling.c: New file.
2950 * pthread_mutexattr_getprotocol.c: New file.
2951 * pthread_mutexattr_setprotocol.c: New file.
2953 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2955 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2957 2006-02-27 Roland McGrath <roland@redhat.com>
2959 * sysdeps/pthread/Subdirs: List nptl here too.
2960 * configure (libc_add_on_canonical): New variable.
2962 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2964 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2965 self to get main source tree's file.
2966 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2967 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2968 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2969 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2970 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2971 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2972 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2973 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2974 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2975 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2976 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2977 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2978 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2980 * Makefile: Use $(sysdirs) in vpath directive.
2982 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2983 (CPPFLAGS-timer_routines.c): Likewise.
2985 * Makeconfig (includes): Variable removed.
2987 2006-02-26 Roland McGrath <roland@redhat.com>
2989 * sysdeps/generic/pt-raise.c: Moved to ...
2990 * pt-raise.c: ... here.
2991 * sysdeps/generic/lowlevellock.h: Moved to ...
2992 * lowlevellock.h: ... here.
2994 2006-02-23 Roland McGrath <roland@redhat.com>
2996 * descr.h (struct pthread): Add final member `end_padding'.
2997 (PTHREAD_STRUCT_END_PADDING): Use it.
2999 2006-02-20 Roland McGrath <roland@redhat.com>
3001 * sysdeps/mips: Directory removed, saved in ports repository.
3002 * sysdeps/unix/sysv/linux/mips: Likewise.
3004 2006-02-18 Ulrich Drepper <drepper@redhat.com>
3006 * tst-robust1.c: Add second mutex to check that the mutex list is
3009 2006-02-17 Jakub Jelinek <jakub@redhat.com>
3011 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3012 lll_robust_mutex_trylock, lll_robust_mutex_lock,
3013 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3014 lll_robust_mutex_unlock): New macros.
3015 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3016 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3017 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3018 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3019 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3021 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3023 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3025 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3027 2006-02-17 Ulrich Drepper <drepper@redhat.com>
3029 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3030 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3031 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3032 (lll_robust_mutex_unlock): Likewise.
3034 2006-02-13 Jakub Jelinek <jakub@redhat.com>
3036 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3037 Set robust_list.__next rather than robust_list.
3038 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3039 (__pthread_list_t): New typedef.
3040 (pthread_mutex_t): Replace __next and __prev fields with __list.
3041 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3042 (__pthread_list_t): New typedef.
3043 (pthread_mutex_t): Replace __next and __prev fields with __list.
3044 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3045 (__pthread_list_t, __pthread_slist_t): New typedefs.
3046 (pthread_mutex_t): Replace __next and __prev fields with __list.
3047 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3048 (__pthread_list_t, __pthread_slist_t): New typedefs.
3049 (pthread_mutex_t): Replace __next and __prev fields with __list.
3050 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3051 (__pthread_list_t, __pthread_slist_t): New typedefs.
3052 (pthread_mutex_t): Replace __next and __prev fields with __list.
3053 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3054 (__pthread_slist_t): New typedef.
3055 (pthread_mutex_t): Replace __next field with __list.
3057 2006-02-15 Ulrich Drepper <drepper@redhat.com>
3059 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3060 PTHREAD_MUTEX_OWNERDEAD.
3061 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3062 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3063 * Makefile (libpthread-routines): Add lowlevelrobustlock.
3064 * pthread_create.c (start_thread): Very much simplify robust_list loop.
3065 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3066 to PTHREAD_MUTEX_INCONSISTENT.
3067 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3068 * pthread_mutex_lock.c: Reimplement robust mutex handling.
3069 * pthread_mutex_trylock.c: Likewise.
3070 * pthread_mutex_timedlock.c: Likewise.
3071 * pthread_mutex_unlock.c: Likewise.
3072 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3073 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3074 lowlevelrobustlock.sym.
3075 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3076 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3078 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3079 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3080 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3081 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3082 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3084 2006-02-12 Ulrich Drepper <drepper@redhat.com>
3086 * allocatestack.c (allocate_stack): Initialize robust_list.
3087 * init.c (__pthread_initialize_minimal_internal): Likewise.
3088 * descr.h (struct xid_command): Pretty printing.
3089 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3090 robust_list. Adjust macros.
3091 * pthread_create.c (start_thread): Adjust robust_list handling.
3092 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3093 but the owner for all robust mutex types.
3094 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3095 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
3096 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3097 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3099 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3100 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3102 2006-02-08 Jakub Jelinek <jakub@redhat.com>
3104 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3105 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3107 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3109 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3111 (lll_futex_timed_wait): Define.
3113 2006-01-19 Ulrich Drepper <drepper@redhat.com>
3115 * tst-cancel4.c: Test ppoll.
3117 2006-01-18 Andreas Jaeger <aj@suse.de>
3120 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3121 (pthread_mutex_t): Follow changes for other archs. Based on patch
3122 by Jim Gifford <patches@jg555.com>.
3124 2006-01-13 Richard Henderson <rth@redhat.com>
3126 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3128 2006-01-10 Roland McGrath <roland@redhat.com>
3130 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3131 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3132 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3133 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3134 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3135 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3136 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3137 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3138 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3139 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3141 2006-01-09 Roland McGrath <roland@redhat.com>
3143 * tst-initializers1-c89.c: New file.
3144 * tst-initializers1-c99.c: New file.
3145 * tst-initializers1-gnu89.c: New file.
3146 * tst-initializers1-gnu99.c: New file.
3147 * Makefile (tests): Add them.
3148 (CFLAGS-tst-initializers1-c89.c): New variable.
3149 (CFLAGS-tst-initializers1-c99.c): New variable.
3150 (CFLAGS-tst-initializers1-gnu89.c): New variable.
3151 (CFLAGS-tst-initializers1-gnu99.c): New variable.
3153 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3154 Use __extension__ on anonymous union definition.
3155 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3156 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3157 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3158 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3159 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3161 2006-01-08 Jakub Jelinek <jakub@redhat.com>
3163 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3164 Don't give the union a name because it changes the mangled name.
3165 Instead name the struct for __data.
3166 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3168 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3171 2006-01-09 Jakub Jelinek <jakub@redhat.com>
3173 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3174 stack bias to mc_ftp field.
3176 2006-01-07 Ulrich Drepper <drepper@redhat.com>
3178 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3179 being too clever and reloading the futex value where it shouldn't.
3181 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3183 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3186 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3188 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3191 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3193 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3194 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3195 rename in tcbhead_t.
3197 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3198 Don't give the union a name because it changes the mangled name.
3199 Instead name the struct for __data.
3200 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3201 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3202 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3203 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3204 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3205 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3207 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3209 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3211 (lll_futex_timed_wait): Define.
3212 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3213 * sysdeps/pthread/aio_misc.h: New file.
3215 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3217 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3219 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3221 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3222 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3223 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3225 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3227 * tst-cancel24.cc: Use C headers instead of C++ headers.
3229 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3231 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3232 sparc-linux configured glibc.
3233 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3234 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3235 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3236 atomic_compare_and_exchange_val_24_acq instead of
3237 atomic_compare_and_exchange_val_acq.
3238 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3239 instead of atomic_exchange_rel.
3240 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3241 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3243 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3245 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3246 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3247 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3248 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3249 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3250 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3252 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3254 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3255 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3256 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3258 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3260 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3262 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3264 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3267 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3269 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3270 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3271 THREAD_COPY_POINTER_GUARD): Define.
3272 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3273 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3275 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3277 * version.c: Update copyright year.
3279 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3281 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3282 .eh_frame section, use cfi_* directives.
3283 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3285 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3287 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3290 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3292 * sysdeps/pthread/sigaction.c: Removed.
3293 * sigaction.c: New file.
3294 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3296 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3298 * Makefile (tests): Add tst-signal7.
3299 * tst-signal7.c: New file.
3301 2005-12-27 Roland McGrath <roland@redhat.com>
3303 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3304 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3305 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3306 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3307 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3308 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3309 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3310 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3311 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3312 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3313 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3315 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3317 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3318 and __prev field to pthread_mutex_t.
3319 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3320 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3321 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3322 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3323 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3326 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3328 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3329 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3330 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3331 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3332 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3333 and PTHREAD_MUTEXATTR_FLAG_BITS.
3334 * descr.h (struct pthread): Add robust_list field and define
3335 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3336 * pthread_mutexattr_getrobust.c: New file.
3337 * pthread_mutexattr_setrobust.c: New file.
3338 * pthread_mutex_consistent.c: New file.
3339 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3340 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3341 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3342 Adjust pthread_mutex_t initializers.
3343 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3344 field to pthread_mutex_t.
3345 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3346 and __prev field to pthread_mutex_t.
3347 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3348 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3349 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3350 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3351 * pthread_mutexattr_gettype.c: Likewise.
3352 * pthread_mutexattr_setpshared.c: Likewise.
3353 * pthread_mutexattr_settype.c: Likewise.
3354 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3355 Initialize mutex kind according to robust flag.
3356 * pthread_mutex_lock.c: Implement local robust mutex.
3357 * pthread_mutex_timedlock.c: Likewise.
3358 * pthread_mutex_trylock.c: Likewise.
3359 * pthread_mutex_unlock.c: Likewise.
3360 * pthread_create.c (start_thread): Mark robust mutexes which remained
3362 * tst-robust1.c: New file.
3363 * tst-robust2.c: New file.
3364 * tst-robust3.c: New file.
3365 * tst-robust4.c: New file.
3366 * tst-robust5.c: New file.
3367 * tst-robust6.c: New file.
3368 * tst-robust7.c: New file.
3369 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3370 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3371 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3372 tst-robust5, tst-robust6, and tst-robust7.
3374 * tst-typesizes.c: New file.
3375 * Makefile (tests): Add tst-typesizes.
3377 * tst-once3.c: More debug output.
3379 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3381 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3382 missing after last change.
3384 * version.c: Update copyright year.
3386 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3388 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3389 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3390 * pthread_mutex_trylock.c: Likewise.
3391 * pthread_mutex_timedlock.c: Likewise.
3392 * pthread_mutex_unlock.c: Likewise.
3394 2005-12-22 Roland McGrath <roland@redhat.com>
3396 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3397 so that #include_next's search location is not reset to the -I..
3398 directory where <nptl/...> can be found.
3400 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3403 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3404 Fix unwind info. Remove useless branch prediction prefix.
3405 * tst-cancel24.cc: New file.
3406 * Makefile: Add rules to build and run tst-cancel24.
3408 2005-12-21 Roland McGrath <roland@redhat.com>
3410 * libc-cancellation.c: Use <> rather than "" #includes.
3411 * pt-cleanup.c: Likewise.
3412 * pthread_create.c: Likewise.
3413 * pthread_join.c: Likewise.
3414 * pthread_timedjoin.c: Likewise.
3415 * pthread_tryjoin.c: Likewise.
3416 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3417 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3418 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3419 * unwind.c: Likewise.
3421 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3423 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3424 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3425 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3426 THREAD_COPY_POINTER_GUARD): Define.
3428 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3430 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3432 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3433 THREAD_COPY_POINTER_GUARD): Define.
3434 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3435 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3436 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3437 THREAD_COPY_POINTER_GUARD): Define.
3438 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3439 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3440 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3441 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3442 Use PTR_DEMANGLE for B0 if defined.
3444 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3446 * pthread_create.c (__pthread_create_2_1): Use
3447 THREAD_COPY_POINTER_GUARD if available.
3448 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3449 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3450 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3451 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3452 * sysdeps/x86_64/tls.h: Likewise.
3454 2005-12-15 Roland McGrath <roland@redhat.com>
3456 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3458 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3460 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3462 * errno-loc.c: New file.
3464 2005-12-12 Roland McGrath <roland@redhat.com>
3466 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3467 adjustments before choosing stack size. Update minimum stack size
3468 calculation to match allocate_stack change.
3470 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3472 * allocatestack.c (allocate_stack): Don't demand that there is an
3473 additional full page available on the stack beside guard, TLS, the
3476 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3478 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3479 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3481 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3482 compiling 32-bit code we must define __cleanup_fct_attribute.
3484 005-11-24 Jakub Jelinek <jakub@redhat.com>
3487 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3488 __attribute__ instead of __attribute.
3489 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3490 (__cleanup_fct_attribute): Likewise.
3492 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3494 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3495 a write barrier before writing libgcc_s_getcfa.
3497 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3499 * sysdeps/unix/sysv/linux/configure: Removed.
3501 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3503 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3504 optional init_array/fini_array support.
3506 2005-10-24 Roland McGrath <roland@redhat.com>
3508 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3509 versioned_symbol use.
3511 2005-10-16 Roland McGrath <roland@redhat.com>
3513 * init.c (__pthread_initialize_minimal_internal): Even when using a
3514 compile-time default stack size, apply the minimum that allocate_stack
3515 will require, and round up to page size.
3517 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3519 * Makefile ($(test-modules)): Remove static pattern rule.
3521 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3522 Ulrich Drepper <drepper@redhat.com>
3524 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3525 alignment in callback function.
3526 * Makefile: Add rules to build and run tst-align3.
3527 * tst-align3.c: New file.
3529 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3531 * allocatestack.c (setxid_signal_thread): Add
3532 INTERNAL_SYSCALL_DECL (err).
3534 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3536 * allocatestack.c (setxid_signal_thread): Need to use
3537 atomic_compare_and_exchange_bool_acq.
3539 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3540 Jakub Jelinek <jakub@redhat.com>
3542 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3544 (struct pthread): Move specific_used field to avoid padding.
3545 Add setxid_futex field.
3546 * init.c (sighandler_setxid): Reset setxid flag and release the
3548 * allocatestack.c (setxid_signal_thread): New function. Broken
3549 out of the bodies of the two loops in __nptl_setxid. For undetached
3550 threads check whether they are exiting and if yes, don't send a signal.
3551 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3552 * pthread_create.c (start_thread): For undetached threads, check
3553 whether setxid bit is set. If yes, wait until signal has been
3556 * allocatestack.c (STACK_VARIABLES): Initialize them.
3557 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3559 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3561 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3562 waiters, awake all waiters on the associated mutex.
3564 2005-09-22 Roland McGrath <roland@redhat.com>
3566 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3567 ../sysdeps/x86_64/hp-timing.h).
3569 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3571 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3572 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3573 (lll_futex_wake_unlock): Define.
3574 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3575 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3576 (lll_futex_wake_unlock): Define.
3577 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3578 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3579 (lll_futex_wake_unlock): Define.
3580 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3581 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3582 (lll_futex_wake_unlock): Define.
3583 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3584 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3585 (lll_futex_wake_unlock): Define.
3586 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3587 lll_futex_wake_unlock.
3588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3589 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3590 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3591 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3592 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3593 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3595 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3597 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3598 Fix typo in register name.
3600 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3602 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3603 Use __sigfillset. Document that sigfillset does the right thing wrt
3606 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3609 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3610 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3611 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3612 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3613 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3614 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3616 * Makefile (tests): Add tst-initializers1.
3617 (CFLAGS-tst-initializers1.c): Set.
3618 * tst-initializers1.c: New test.
3620 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3622 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3623 Make sure __flags are located at offset 48 from the start of the
3626 2005-07-02 Roland McGrath <roland@redhat.com>
3628 * Makeconfig: Comment fix.
3630 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3632 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3633 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3634 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3635 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3636 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3637 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3638 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3639 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3640 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3641 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3643 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3645 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3646 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3647 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3649 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3650 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3651 field. Put in sysinfo field unconditionally.
3652 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3653 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3654 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3655 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3657 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3658 * pthread_create.c (__pthread_create_2_1): Use
3659 THREAD_COPY_STACK_GUARD macro.
3660 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3662 * tst-stackguard1.c: New file.
3663 * tst-stackguard1-static.c: New file.
3665 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3667 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3668 Invoke CGOTSETUP and CGOTRESTORE.
3669 (CGOTSETUP, CGOTRESTORE): Define.
3671 2005-05-29 Richard Henderson <rth@redhat.com>
3673 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3674 (tf_write, tf_writev): Use it.
3675 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3678 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3680 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3681 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3682 __librt_*_asynccancel@local.
3684 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3686 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3687 all occurrences of JUMPTARGET. Instead append @local to labels.
3689 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3691 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3692 size/alignment of struct pthread rather than tcbhead_t.
3693 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3695 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3697 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3700 2005-05-19 Richard Henderson <rth@redhat.com>
3702 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3703 __sync_val_compare_and_swap, not explicit _si variant.
3704 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3706 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3709 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3711 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3713 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3714 .eh_frame section, use cfi_* directives.
3716 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3718 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3721 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3724 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3727 2005-04-27 Roland McGrath <roland@redhat.com>
3729 * Makefile (tests): Remove tst-clock2.
3731 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3732 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3733 translating to the kernel clockid_t for our own process/thread clock.
3735 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3737 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3739 * old_pthread_cond_init.c: Include <errno.h>.
3740 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3741 process shared or uses clock other than CLOCK_REALTIME.
3742 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3744 2005-04-13 David S. Miller <davem@davemloft.net>
3746 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3747 * sysdeps/sparc/sparc64/clone.S: New file.
3749 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3752 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3753 __inline instead of inline.
3754 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3756 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3758 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3759 functionally equivalent, but shorter instructions.
3760 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3761 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3762 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3764 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3765 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3766 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3767 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3769 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3770 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3772 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3773 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3774 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3775 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3776 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3778 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3780 * sysdeps/mips/Makefile: New file.
3781 * sysdeps/mips/nptl-sysdep.S: New file.
3782 * sysdeps/mips/tcb-offsets.sym: New file.
3783 * sysdeps/mips/pthread_spin_lock.S: New file.
3784 * sysdeps/mips/pthread_spin_trylock.S: New file.
3785 * sysdeps/mips/pthreaddef.h: New file.
3786 * sysdeps/mips/tls.h: New file.
3787 * sysdeps/mips/jmpbuf-unwind.h: New file.
3788 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3789 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3790 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3791 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3792 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3793 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3794 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3795 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3796 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3797 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3799 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3802 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3805 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3807 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3809 2005-02-25 Roland McGrath <roland@redhat.com>
3811 * alloca_cutoff.c: Correct license text.
3812 * tst-unload.c: Likewise.
3813 * sysdeps/pthread/allocalim.h: Likewise.
3814 * sysdeps/pthread/pt-initfini.c: Likewise.
3815 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3816 * sysdeps/pthread/bits/sigthread.h: Likewise.
3817 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3818 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3820 2005-02-16 Roland McGrath <roland@redhat.com>
3822 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3823 Use unsigned int * for ptr_nthreads.
3825 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3828 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3831 2005-02-07 Richard Henderson <rth@redhat.com>
3834 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3837 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3839 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3840 order of arguments in invocation of atomic_add_zero.
3842 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3845 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3846 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3847 at least gotntpoff relocation and addition.
3848 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3850 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3852 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3855 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3857 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3858 entry for static tls deallocation fix.
3859 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3860 also contains information whether the memory pointed to is static
3862 * sysdeps/i386/tls.h: Likewise.
3863 * sysdeps/ia64/tls.h: Likewise.
3864 * sysdeps/powerpc/tls.h: Likewise.
3865 * sysdeps/s390/tls.h: Likewise.
3866 * sysdeps/sh/tls.h: Likewise.
3867 * sysdeps/sparc/tls.h: Likewise.
3868 * sysdeps/x86_64/tls.h: Likewise.
3870 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3872 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3874 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3876 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3878 * Makefile (tests): Add tst-align2.
3879 * tst-align2.c: New test.
3880 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3881 -mpreferred-stack-boundary=4.
3883 2004-12-18 Roland McGrath <roland@redhat.com>
3885 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3886 New file removed withdrawn for the moment.
3888 2004-12-17 Richard Henderson <rth@redhat.com>
3890 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3891 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3893 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3895 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3896 Increased PTHREAD_STACK_MIN.
3898 * tst-context1.c (stacks): Use bigger stack size.
3900 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3902 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3903 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3905 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3907 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3908 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3909 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3911 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3913 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3915 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3917 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3918 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3920 * tst-getpid1.c: If child crashes, report this first. Print which
3923 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3925 * init.c (__pthread_initialize_minimal_internal): Also unblock
3928 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3930 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3931 _POSIX_THREAD_CPUTIME): Define to 0.
3932 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3933 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3934 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3935 __timer_signal_thread_tclk): Remove.
3936 (init_module): Remove their initialization.
3937 (thread_cleanup): Remove their cleanup assertions.
3938 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3939 __timer_signal_thread_tclk): Remove.
3940 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3941 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3942 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3944 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3946 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3947 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3949 * Makefile (tests): Add tst-getpid2.
3950 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3951 (do_test): Use it. Use __clone2 instead of clone on ia64.
3952 * tst-getpid2.c: New test.
3954 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3956 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3958 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3960 * Makefile (tests): Add tst-getpid1.
3961 * tst-getpid1.c: New file.
3962 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3963 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3965 2004-12-02 Roland McGrath <roland@redhat.com>
3967 * Makefile (libpthread-nonshared): Variable removed.
3968 ($(objpfx)libpthread_nonshared.a): Target removed.
3969 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3970 These are now handled by generic magic from
3971 libpthread-static-only-routines being set.
3973 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3975 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3976 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3977 _POSIX_THREAD_PRIO_PROTECT): Define.
3978 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3979 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3980 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3982 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3984 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3985 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3986 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3987 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3988 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3989 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3990 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3992 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3994 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3996 * Makefile (libpthread-routines): Add pthread_setschedprio.
3997 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3998 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3999 * pthread_setschedprio.c: New file.
4001 2004-11-20 Jakub Jelinek <jakub@redhat.com>
4003 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4004 * pthread_cancel.c (pthread_create): Likewise.
4006 * Makefile (libpthread-routines): Add vars.
4007 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4008 * init.c (__default_stacksize, __is_smp): Remove.
4010 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4011 and define a wrapper macro.
4012 (PTHREAD_STATIC_FN_REQUIRE): Define.
4013 * allocatestack.c (__find_thread_by_id): Undefine.
4014 * pthread_create (__pthread_keys): Remove.
4015 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4016 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4017 PTHREAD_STATIC_FN_REQUIRE.
4019 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4021 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4022 parameter to REGISTER macro.
4024 2004-11-17 Roland McGrath <roland@redhat.com>
4026 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4027 Make sure SIGCANCEL is blocked as well.
4029 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4031 * sysdeps/pthread/setxid.h: New file.
4032 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4033 (struct xid_command): Add forward decl.
4034 (struct pthread_functions): Change return type of __nptl_setxid hook
4036 * pthreadP.h (__nptl_setxid): Change return type to int.
4037 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4038 calling thread, return its return value and set errno on failure.
4039 * descr.h (struct xid_command): Change id type to long array.
4041 * Makefile: Add rules to build and test tst-setuid1 and
4043 * tst-setuid1.c: New test.
4044 * tst-setuid1-static.c: New test.
4046 2004-11-10 Jakub Jelinek <jakub@redhat.com>
4048 * Makefile (tests): Add tst-exit3.
4049 * tst-exit3.c: New test.
4051 2004-11-09 Ulrich Drepper <drepper@redhat.com>
4053 * Makefile (tests): Add tst-exit2.
4054 * tst-exit2.c: New file.
4056 2004-11-09 Roland McGrath <roland@redhat.com>
4059 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4060 here, before calling clone.
4061 * pthread_create.c (start_thread): Don't do it here.
4063 2004-11-02 Jakub Jelinek <jakub@redhat.com>
4065 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4067 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4069 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4070 Set ETIMEDOUT to errno when time is up. Tweak to avoid
4073 2004-10-28 Jakub Jelinek <jakub@redhat.com>
4075 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4076 if sched_priority is not between minprio and maxprio.
4078 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4080 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4081 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4083 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4084 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4086 2004-10-24 Ulrich Drepper <drepper@redhat.com>
4088 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4089 not-cancelable I/O functions.
4091 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4093 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4094 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4095 make sure 2 is stored in the futex and we looked at the old value.
4096 Fix a few other problems to return the correct value.
4098 2004-10-14 Richard Henderson <rth@redhat.com>
4100 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4103 2004-10-06 Jakub Jelinek <jakub@redhat.com>
4105 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4106 of pthread-functions.h and pthreaddef.h.
4107 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4109 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4110 Change __data.__nwaiters from int to unsigned int.
4112 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4113 sysconf (_SC_THREAD_CPUTIME) returns negative value.
4115 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4118 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4119 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4121 2004-10-06 Ulrich Drepper <drepper@redhat.com>
4123 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
4124 test fails, remove message queue.
4125 (tf_msgsnd): Likewise.
4127 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4129 * tst-clock1.c: Change #ifdef to #if defined.
4130 * tst-clock2.c: Likewise.
4131 * tst-cond11.c: Likewise.
4133 * sysdeps/pthread/timer_create.c (timer_create): Use
4134 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4135 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4138 2004-10-05 Jakub Jelinek <jakub@redhat.com>
4140 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4141 _POSIX_THREAD_CPUTIME): Define to 0.
4143 2004-10-04 Ulrich Drepper <drepper@redhat.com>
4145 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4146 and _POSIX_THREAD_CPUTIME to zero.
4147 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4148 * tst-barrier2.c: Fix testing for POSIX feature.
4149 * tst-clock1.c: Likewise.
4150 * tst-clock2.c: Likewise.
4151 * tst-cond11.c: Likewise.
4152 * tst-cond4.c: Likewise.
4153 * tst-cond6.c: Likewise.
4154 * tst-flock2.c: Likewise.
4155 * tst-mutex4.c: Likewise.
4156 * tst-mutex9.c: Likewise.
4157 * tst-rwlock12.c: Likewise.
4158 * tst-rwlock4.c: Likewise.
4159 * tst-signal1.c: Likewise.
4160 * tst-spin2.c: Likewise.
4161 * sysdeps/pthread/posix-timer.h: Likewise.
4162 * sysdeps/pthread/timer_create.c: Likewise.
4163 * sysdeps/pthread/timer_routines.c: Likewise.
4165 2004-10-01 Ulrich Drepper <drepper@redhat.com>
4167 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4168 (__lll_mutex_timedlock_wait): Address futex correctly.
4170 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4171 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4172 make sure 2 is stored in the futex and we looked at the old value.
4173 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4174 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
4175 which might very well made the code not working at all before.
4178 2004-09-28 Ulrich Drepper <drepper@redhat.com>
4180 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4181 allow SIGSETXID to be sent.
4182 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4183 for SIGSETXID to be defined.
4184 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4185 SIGSETXID cannot be blocked.
4187 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4188 Add __extension__ to long long types.
4189 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4190 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4191 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4192 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4193 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4194 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4195 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4197 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4199 * descr.h (struct pthread): Add stopped_start field.
4200 * sysdeps/pthread/createthread.c (create_thread): Set
4201 start_stopped flag in descriptor for new thread appropriately.
4202 * pthread_create.c (start_thread): Only take lock to be stopped on
4203 startup if stopped_start flag says so.
4205 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4207 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4208 is created detached and if yes, do not try to free the stack in case
4209 the thread creation failed.
4210 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4211 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4212 case there has been no error. [BZ #405]
4214 * pthread_create.c (start_thread): Don't wait for scheduler data
4215 etc to be set at the beginning of the function. The cancellation
4216 infrastructure must have been set up. And enable async
4217 cancellation before potentially going to sleep. [BZ #401]
4219 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4221 * Versions: Remove exports for pthread_set*id_np functions.
4222 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4224 * Makefile: Don't build pthread_set*id code for now.
4226 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4228 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4230 * allocatestack.c (__nptl_setxid): New function.
4231 * descr.h (struct xid_command): Define type.
4232 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4233 (sighandler_setxid): New function.
4234 (__pthread_initialize_minimal): Register sighandler_setxid for
4236 * pt-allocrtsig.c: Update comment.
4237 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4238 Declare __nptl_setxid.
4239 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4240 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4241 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4242 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4243 and pthread_setresuid_np.
4244 * pthread_setgid_np.c: New file.
4245 * pthread_setuid_np.c: New file.
4246 * pthread_setegid_np.c: New file.
4247 * pthread_seteuid_np.c: New file.
4248 * pthread_setregid_np.c: New file.
4249 * pthread_setreuid_np.c: New file.
4250 * pthread_setresgid_np.c: New file.
4251 * pthread_setresuid_np.c: New file.
4252 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4253 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4254 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4255 and pthread_setresuid_np.
4256 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4257 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4258 pthread_setregid, and pthread_setresgid.
4260 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4262 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4263 ENOMEM when out of memory.
4265 2004-09-10 Roland McGrath <roland@redhat.com>
4268 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4269 code, since we don't try to use the broken CLONE_STOPPED any more.
4270 * pthread_create.c (start_thread): Likewise.
4272 2004-09-15 Richard Henderson <rth@redhat.com>
4274 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4276 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4278 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4279 (__libc_unwind_longjmp): Delete macro and declare as function.
4280 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4281 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4283 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4284 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4285 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4287 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4289 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4291 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4292 types also for __USE_XOPEN2K.
4293 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4294 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4295 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4296 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4297 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4298 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4299 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4302 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4304 * sysdeps/pthread/pthread.h
4305 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4306 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4307 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4308 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4311 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4313 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4314 PSEUDO to be used with . prefix.
4316 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4317 Use atomic_increment instead of atomic_exchange_and_add.
4318 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4320 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4322 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4325 * allocatestack.c (allocate_stack): Use atomic_increment_val
4326 instead of atomic_exchange_and_add.
4327 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4328 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4330 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4333 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4334 the initialization function might throw.
4336 2005-09-05 Richard Henderson <rth@redhat.com>
4338 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4339 Move definition inside libpthread, libc, librt check. Provide
4340 definition for rtld.
4342 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4344 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4345 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4346 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4347 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4348 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4349 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4350 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4351 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4354 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4355 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4356 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4358 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4359 Decrement __nwaiters. If pthread_cond_destroy has been called and
4360 this is the last waiter, signal pthread_cond_destroy caller and
4361 avoid using the pthread_cond_t structure after unlock.
4362 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4364 Read clock type from the least significant bits of __nwaiters instead
4366 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4367 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4369 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4372 * Makefile (tests): Add tst-cond20 and tst-cond21.
4373 * tst-cond20.c: New test.
4374 * tst-cond21.c: New test.
4375 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4376 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4378 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4380 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4381 (pthread_cond_t): Likewise.
4382 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4384 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4386 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4388 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4389 (cond_nwaiters): New.
4391 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4392 if there are waiters not signalled yet.
4393 Wait until all already signalled waiters wake up.
4394 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4395 __nwaiters. If pthread_cond_destroy has been called and this is the
4396 last waiter, signal pthread_cond_destroy caller and avoid using
4397 the pthread_cond_t structure after unlock.
4398 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4399 decrement it when leaving. If pthread_cond_destroy has been called
4400 and this is the last waiter, signal pthread_cond_destroy caller.
4401 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4402 Likewise. Read clock type from the least significant bits of
4403 __nwaiters instead of __clock.
4404 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4405 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4406 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4407 clock type just from the last COND_CLOCK_BITS bits of value.
4408 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4409 instead of __clock, just from second bit of condattr's value.
4411 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4413 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4414 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4416 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4418 2004-08-15 Roland McGrath <roland@frob.com>
4420 * pthread_atfork.c: Update copyright terms including special exception
4421 for these trivial files, which are statically linked into executables
4422 that use dynamic linking for the significant library code.
4424 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4426 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4427 pthread_rwlock_rdlock.
4428 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4429 Decrease __nr_readers_queued after reacquiring lock.
4430 * sysdeps/pthread/pthread_rwlock_timedrdlock
4431 (pthread_rwlock_timedrdlock): Likewise.
4432 Reported by Bob Cook <bobcook47@hotmail.com>.
4434 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4436 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4437 before pthread_barrier_wait.
4439 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4442 Remove unnecessary exception handling data.
4444 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4447 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4448 instead of clockid_t.
4450 2004-07-21 Roland McGrath <roland@redhat.com>
4452 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4454 2004-07-19 Roland McGrath <roland@redhat.com>
4456 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4458 2004-07-02 Roland McGrath <roland@redhat.com>
4460 * configure: Don't exit.
4462 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4464 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4465 (__pthread_cond_timedwait): Check for invalid nanosecond in
4468 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4470 * Makefile: Add rules to build and run tst-fini1.
4471 * tst-fini1.c: New file.
4472 * tst-fini1mod.c: New file.
4474 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4476 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4477 if no cancellation support is needed.
4478 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4479 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4480 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4481 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4482 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4483 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4484 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4485 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4486 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4488 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4489 only if not already defined.
4491 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4493 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4494 constraint "m" instead of "0" for futex.
4496 * shlib-versions: Add powerpc64-.*-linux.*.
4498 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4500 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4501 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4503 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4504 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4507 2004-06-29 Roland McGrath <roland@redhat.com>
4509 * Banner: NPTL no longer has its own version number.
4510 * Makefile (nptl-version): Variable removed.
4511 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4512 using $(version), the glibc version number.
4514 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4516 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4517 Fix branch offset for a PLT entry.
4518 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4520 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4522 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4524 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4527 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4529 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4532 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4534 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4535 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4537 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4538 (pthread_rwlock_timedrdlock): Likewise.
4540 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4542 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4543 Set __r7 to val, not mutex.
4545 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4547 * Makefile: Add rules to build tst-rwlock14.
4548 * tst-rwlock14.c: New file.
4550 2004-06-24 Boris Hu <boris.hu@intel.com>
4552 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4554 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4556 2004-06-19 Andreas Jaeger <aj@suse.de>
4558 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4559 assembler in last patch.
4561 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4563 * sysdeps/pthread/pthread_cond_timedwait.c
4564 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4565 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4566 (__pthread_cond_timedwait): Check for invalid nanosecond in
4568 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4569 * tst-cond19.c: New file.
4570 * Makefile: Add rules to build and run tst-cond19.
4572 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4574 * tst-context1.c (GUARD_PATTERN): Defined.
4575 (tst_context_t): Define struct containing ucontext_t & guard words.
4576 (ctx): Declare as an array of tst_context_t.
4577 (fct): Verify uc_link & guard words are still valid.
4578 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4580 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4582 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4583 Add __data.__futex field, reshuffle __data.__clock.
4584 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4585 (__pthread_cond_signal): Increment __futex at the same time as
4586 __wakeup_seq or __total_seq. Pass address of __futex instead of
4587 address of low 32-bits of __wakeup_seq to futex syscall.
4588 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4589 (__pthread_cond_wait): Likewise. Pass __futex value from before
4590 releasing internal lock to FUTEX_WAIT.
4591 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4592 (__pthread_cond_timedwait): Likewise.
4593 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4594 (FUTEX_CMP_REQUEUE): Define.
4595 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4596 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4597 Pass __futex value from before the unlock and __futex address instead
4598 of address of low 32-bits of __wakeup_seq to futex syscall.
4599 Fallback to FUTEX_WAKE all on any errors.
4601 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4603 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4605 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4606 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4607 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4608 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4609 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4611 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4613 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4614 Add memory clobber to inline assembly.
4615 (__lll_mutex_trylock): Likewise.
4616 (__lll_mutex_cond_trylock): Likewise.
4618 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4620 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4621 Pass val argument as 6th system call argument in %r7.
4623 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4625 * Makefile (tests): Add tst-cond16.
4626 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4627 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4628 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4629 Add __data.__futex field, reshuffle __data.__clock.
4630 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4631 (__pthread_cond_signal): Increment __futex at the same time as
4632 __wakeup_seq or __total_seq. Pass address of __futex instead of
4633 address of low 32-bits of __wakeup_seq to futex syscall.
4634 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4635 (__pthread_cond_wait): Likewise. Pass __futex value from before
4636 releasing internal lock to FUTEX_WAIT.
4637 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4638 (__pthread_cond_timedwait): Likewise.
4639 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4640 (FUTEX_CMP_REQUEUE): Define.
4641 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4642 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4643 Pass __futex value from before the unlock and __futex address instead
4644 of address of low 32-bits of __wakeup_seq to futex syscall.
4645 Fallback to FUTEX_WAKE all on any errors.
4646 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4648 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4649 internally. Return non-zero if error, zero if success.
4650 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4651 Add __data.__futex field, reshuffle __data.__clock.
4652 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4654 (lll_futex_requeue): Add val argument, return 1 unconditionally
4656 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4657 Add __data.__futex field, reshuffle __data.__clock.
4658 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4660 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4661 internally. Return non-zero if error, zero if success.
4662 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4663 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4664 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4666 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4667 internally. Return non-zero if error, zero if success.
4668 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4669 Add __data.__futex field, reshuffle __data.__clock.
4670 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4672 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4673 internally. Return non-zero if error, zero if success.
4674 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4675 Add __data.__futex field, reshuffle __data.__clock.
4676 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4677 Add __data.__futex field, reshuffle __data.__clock.
4678 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4679 Increment __futex at the same time as __wakeup_seq or __total_seq.
4680 Pass address of __futex instead of address of low 32-bits of
4681 __wakeup_seq to futex syscall.
4682 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4683 Pass __futex value from before releasing internal lock
4685 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4686 Likewise. Avoid unnecessary shadowing of variables.
4687 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4688 Set __futex to 2 * __total_seq. Pass __futex value from before the
4689 unlock and __futex address instead of address of low 32-bits of
4690 __wakeup_seq to futex_requeue macro, adjust for new return value
4692 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4693 (__pthread_cond_signal): Increment __futex at the same time as
4694 __wakeup_seq or __total_seq. Pass address of __futex instead of
4695 address of low 32-bits of __wakeup_seq to futex syscall.
4696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4697 (__pthread_cond_wait): Likewise. Pass __futex value from before
4698 releasing internal lock to FUTEX_WAIT.
4699 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4700 (__pthread_cond_timedwait): Likewise.
4701 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4702 (FUTEX_CMP_REQUEUE): Define.
4703 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4704 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4705 Pass __futex value from before the unlock and __futex address instead
4706 of address of low 32-bits of __wakeup_seq to futex syscall.
4707 Fallback to FUTEX_WAKE all on any errors.
4709 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4711 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4712 Add nop to align the end of critical section.
4713 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4715 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4717 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4718 Add __broadcast_seq field.
4719 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4720 all waiters as woken with woken_seq and bump broadcast counter.
4721 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4722 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4723 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4724 Comment typo fixes. Avoid returning -ETIMEDOUT.
4726 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4728 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4729 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4730 Reported by Kaz Kojima.
4732 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4734 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4736 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4738 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4739 __broadcast_seq with bc_seq after acquiring internal lock instead of
4742 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4744 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4746 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4747 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4748 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4749 (pthread_cond_t): Add __data.__broadcast_seq field.
4750 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4751 (FRAME_SIZE): Define.
4752 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4756 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4758 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4759 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4762 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4764 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4765 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4766 Add __broadcast_seq field.
4767 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4768 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4769 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4770 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4771 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4772 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4773 all waiters as woken with woken_seq and bump broadcast counter.
4774 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4775 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4776 __broadcast_seq field.
4777 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4778 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4779 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4780 * pthread_cond_init.c: Initialize __broadcast_seq field.
4781 * Makefile (tests): Add tst-cond17 and tst-cond18.
4782 Add .NOTPARALLEL goal.
4783 * tst-cond16.c: New file. From Jakub.
4784 * tst-cond17.c: New file. From Jakub.
4785 * tst-cond18.c: New file. From Jakub.
4787 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4789 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4792 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4793 Parametrize frame size. Correct some unwind info.
4794 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4796 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4798 * tst-stack3.c: Note testing functionality beyond POSIX.
4800 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4802 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4803 Change conditional from ifdef to if.
4805 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4807 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4808 SYSDEP_CANCEL_ERROR): Define.
4811 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4813 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4815 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4817 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4819 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4821 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4822 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4823 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4824 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4826 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4828 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4829 thread has all signals blocked.
4831 2004-04-18 Andreas Jaeger <aj@suse.de>
4833 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4834 (SEM_VALUE_MAX): Add missing brace.
4836 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4838 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4840 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4841 * sysdeps/pthread/tst-mqueue8x.c: New test.
4842 * tst-cancel4.c: Update comment about message queues.
4844 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4845 return it_value { 0, 0 }.
4846 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4848 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4849 assertion for SIGEV_NONE.
4850 (thread_attr_compare): Compare all attributes, not just a partial
4853 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4855 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4857 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4859 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4860 Just use a plain number.
4861 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4862 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4863 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4864 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4865 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4866 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4867 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4869 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4871 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4873 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4875 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4877 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4878 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4879 of calling sigwaitinfo.
4881 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4883 * allocatestack.c (allocate_stack): Set reported_guardsize
4885 * pthread_getattr_np.c (pthread_getattr_np): Use
4886 reported_guardsize instead of guardsize.
4887 * descr.h (struct pthread): Add reported_guardsize field.
4889 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4891 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4893 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4895 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4897 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4899 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4900 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4901 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4902 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4903 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4905 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4906 (_POSIX_MESSAGE_PASSING): Define.
4907 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4908 (_POSIX_MESSAGE_PASSING): Define.
4909 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4910 (_POSIX_MESSAGE_PASSING): Define.
4912 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4914 * tst-context1.c (fct): Check whether correct stack is used.
4916 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4918 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4919 matching constraints for asm mem parameters.
4921 * tst-clock2.c (tf): Don't define unless needed.
4923 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4925 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4928 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4930 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4931 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4932 * pthreadP.h: Declare __nptl_deallocate_tsd.
4933 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4936 * Makefile (tests): Add tst-tsd5.
4937 * tst-tsd5.c: New file.
4939 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4941 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4942 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4943 is SHLIB_COMPAT check.
4944 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4945 (__pthread_attr_getaffinity_old): Likewise.
4946 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4947 (__pthread_getaffinity_old): Likewise.
4948 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4949 (__pthread_setaffinity_old): Likewise.
4951 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4953 * allocatestack.c (_make_stacks_executable): Call
4954 _dl_make_stack_executable first.
4956 2004-03-24 Roland McGrath <roland@redhat.com>
4958 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4959 constraint instead of "0".
4961 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4963 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4964 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4966 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4967 code to avoid warning.
4969 2004-03-24 Andreas Jaeger <aj@suse.de>
4971 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4972 (__pthread_attr_setaffinity_old): Remove const.
4974 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4976 * sysdeps/unix/sysv/linux/smp.h: New file.
4977 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4978 * init.c: Define __is_smp.
4979 (__pthread_initialize_minimal_internal): Call is_smp_system to
4980 initialize __is_smp.
4981 * pthreadP.h: Declare __is_smp.
4982 Define MAX_ADAPTIVE_COUNT is necessary.
4983 * pthread_mutex_init.c: Add comment regarding __spins field.
4984 * pthread_mutex_lock.c: Implement adaptive mutex type.
4985 * pthread_mutex_timedlock.c: Likewise.
4986 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4987 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4989 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4990 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4991 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4992 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4993 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4994 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4995 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4996 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4997 lll_mutex_cond_trylock.
4998 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4999 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5000 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5001 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5002 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5003 Define BUSY_WAIT_NOP.
5004 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5005 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5007 * tst-mutex5.c: Add support for testing adaptive mutexes.
5008 * tst-mutex7.c: Likewise.
5009 * tst-mutex5a.c: New file.
5010 * tst-mutex7a.c: New file.
5011 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5013 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5014 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5015 vgettimeofday call might destroy the content.
5017 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5020 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5021 No need to restrict type of ret. Make it int. Add comment.
5023 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5024 Remove unnecessary setne instruction.
5026 2004-03-22 Jakub Jelinek <jakub@redhat.com>
5028 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5029 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5030 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5031 If realloc fails, break out of the loop.
5033 2004-03-20 Andreas Jaeger <aj@suse.de>
5035 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5036 (__pthread_setaffinity_old): Fix interface.
5037 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5038 (__pthread_getaffinity_old): Likewise.
5040 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5041 (__pthread_setaffinity_new): Remove duplicate declaration.
5043 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5045 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5046 the return value to a safe register.
5047 (CDISABLE): Set the function argument correctly.
5049 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5051 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5052 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5053 Rewrite so that only one locked memory operation per round is needed.
5054 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5055 (pthread_barrier_wait): After wakeup, release lock only when the
5056 last thread stopped using the barrier object.
5057 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5058 (__pthread_cond_wait): Don't store mutex address if the current
5059 value is ~0l. Add correct cleanup support and unwind info.
5060 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5061 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5062 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5063 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5064 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5065 Add correct cleanup support and unwind info.
5066 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5067 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5068 information for syscall wrappers.
5070 2004-03-18 Ulrich Drepper <drepper@redhat.com>
5072 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5073 cpusetsize field, remove next.
5074 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5075 parameter for size of the CPU set.
5076 (pthread_setaffinity_np): Likewise.
5077 (pthread_attr_getaffinity_np): Likewise.
5078 (pthread_attr_setaffinity_np): Likewise.
5079 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5080 interface change, keep compatibility code.
5081 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5082 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5083 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5084 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
5085 __pthread_getaffinity_np.
5086 * Versions: Add version for changed interfaces.
5087 * tst-attr3.c: Adjust test for interface change.
5088 * pthread_getattr_np.c: Query the kernel about the affinity mask with
5089 increasing buffer sizes.
5090 * pthread_attr_destroy.c: Remove unused list handling.
5091 * pthread_attr_init.c: Likewise.
5093 2004-03-17 Roland McGrath <roland@redhat.com>
5095 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5096 first argument to clock_getres so we ever enable kernel timers.
5098 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
5100 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5102 2004-03-12 Richard Henderson <rth@redhat.com>
5104 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5105 oldvalue from CENABLE to CDISABLE.
5107 2004-03-12 Ulrich Drepper <drepper@redhat.com>
5109 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5110 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5111 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5112 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5114 2004-03-11 Richard Henderson <rth@redhat.com>
5116 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5117 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5118 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5120 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5122 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5123 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5124 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5126 2004-03-11 Jakub Jelinek <jakub@redhat.com>
5128 * forward.c (__pthread_cond_broadcast_2_0,
5129 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5130 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5131 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5133 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5135 * sysdeps/sh/tcb-offsets.sym: Add PID.
5136 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5137 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5139 2004-03-10 Ulrich Drepper <drepper@redhat.com>
5141 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5142 include <sysdep-cancel.h>, vfork is no cancellation point.
5143 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5144 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5145 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5147 2004-03-10 Jakub Jelinek <jakub@redhat.com>
5149 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5151 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5152 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5154 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5156 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5157 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5158 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5159 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5160 of DO_CALL_VIA_BREAK. Work around a gas problem.
5162 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5163 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5164 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5165 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5166 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5167 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5169 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5170 a local register for saving old PID. Negate PID in parent upon exit.
5172 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5174 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5175 before syscall, set to the old value in the parent afterwards.
5176 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5177 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5179 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5180 before syscall, set to the old value in the parent afterwards.
5181 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5182 * sysdeps/s390/tcb-offsets.sym: Add PID.
5184 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5185 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5186 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5187 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5188 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5189 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5191 2004-03-10 Andreas Schwab <schwab@suse.de>
5193 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5194 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5195 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5197 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5199 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5200 * tst-cancel21.c (do_one_test): Likewise.
5201 Reported by Gordon Jin <gordon.jin@intel.com>.
5203 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5205 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5206 if non-zero and set to INT_MIN if zero.
5207 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5208 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5209 (SAVE_PID, RESTORE_PID): Define.
5211 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5212 Use relative path to avoid including NPTL i386/vfork.S.
5213 (SAVE_PID, RESTORE_PID): Define.
5214 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5215 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5216 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5218 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5219 * tst-vfork1.c: New test.
5220 * tst-vfork2.c: New test.
5221 * tst-vfork1x.c: New test.
5222 * tst-vfork2x.c: New test.
5224 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5226 * sysdeps/i386/tcb-offsets.sym: Add PID.
5227 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5228 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5229 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5231 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5233 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5235 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5237 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5240 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5242 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5245 * tst-once4.c: Remove unnecessary macro definition.
5247 * tst-mutex7.c (do_test): Limit thread stack size.
5248 * tst-once2.c (do_test): Likewise.
5249 * tst-tls3.c (do_test): Likewise.
5250 * tst-tls1.c (do_test): Likewise.
5251 * tst-signal3.c (do_test): Likewise.
5252 * tst-kill6.c (do_test): Likewise.
5253 * tst-key4.c (do_test): Likewise.
5254 * tst-join4.c (do_test): Likewise.
5255 * tst-fork1.c (do_test): Likewise.
5256 * tst-context1.c (do_test): Likewise.
5257 * tst-cond2.c (do_test): Likewise.
5258 * tst-cond10.c (do_test): Likewise.
5259 * tst-clock2.c (do_test): Likewise.
5260 * tst-cancel10.c (do_test): Likewise.
5261 * tst-basic2.c (do_test): Likewise.
5262 * tst-barrier4.c (do_test): Likewise.
5264 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5266 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5268 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5270 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5271 (__pthread_cond_timedwait): Optimize wakeup test.
5272 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5273 (__pthread_cond_wait): Likewise.
5274 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5275 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5278 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5280 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5281 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5282 the atomic instruction needed.
5283 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5284 (__lll_mutex_lock_wait): Likewise.
5286 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5288 * Makefile (tests): Add tst-cond14 and tst-cond15.
5289 * tst-cond14.c: New file.
5290 * tst-cond15.c: New file.
5292 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5294 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5295 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5296 needs to be implemented differently to be useful.
5298 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5300 * pthread_attr_setschedparam.c: Don't test priority against limits
5301 here. Set ATTR_FLAG_SCHED_SET flag.
5302 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5303 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5304 from parent thread to child. If attribute is used and scheduling
5305 parameters are not inherited, copy parameters from attribute or
5306 compute them. Check priority value.
5307 * pthread_getschedparam.c: If the parameters aren't known yet get
5308 them from the kernel.
5309 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5310 ATTR_FLAG_POLICY_SET flag for thread.
5311 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5312 and ATTR_FLAG_POLICY_SET.
5314 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5316 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5317 fail if stack address hasn't been set. Just return 0.
5319 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5321 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5322 libpthread for the files in this list.
5323 (CFLAGS-tst-unload): Removed.
5324 * tst-unload.c (do_test): Don't use complete path for
5327 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5330 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5332 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5333 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5334 operation per round is needed.
5335 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5336 (__lll_mutex_lock_wait): Likewise.
5338 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5340 * tst-cancel9.c (cleanup): Don't print to stderr.
5342 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5344 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5346 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5348 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5349 (__syscall_error_handler2): Call CDISABLE.
5350 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5351 (__syscall_error_handler2): Call CDISABLE.
5353 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5354 Release lock before the loop, don't reacquire it.
5356 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5358 2004-02-19 Andreas Schwab <schwab@suse.de>
5360 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5363 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5365 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5366 (pthread_barrier_wait): After wakeup, release lock only when the
5367 last thread stopped using the barrier object.
5368 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5369 (pthread_barrier_wait): Likewise.
5370 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5372 * Makefile (tests): Add tst-barrier4.
5373 * tst-barrier4.c: New file.
5375 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5376 (__pthread_cond_timedwait): Perform timeout test while holding
5377 internal lock to prevent wakeup race.
5378 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5379 * sysdeps/pthread/pthread_cond_timedwait.c
5380 (__pthread_cond_timedwait): Likewise.
5381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5382 (__pthread_cond_timedwait): Likewise.
5384 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5386 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5387 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5388 * Makefile (tests): Add tst-rwlock13.
5389 * tst-rwlock13.c: New test.
5391 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5393 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5394 (__condvar_tw_cleanup): Little optimization.
5395 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5397 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5399 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5400 libpthread as "lib" parameter to SHLIB_COMPAT.
5401 (__novmx_siglongjmp): Fix typo in function name.
5402 (__novmx_longjmp): Fix typo in function name.
5404 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5406 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5409 * sysdeps/generic/pt-longjmp.c: Moved to...
5410 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5412 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5414 * Makefile (libpthread-routines): Add pt-cleanup.
5415 * pt-longjmp.c: Removed.
5416 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5417 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5418 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5419 Version longjmp, siglongjmp for GLIBC_2.3.4.
5420 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5422 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5424 * sysdeps/pthread/pthread_cond_timedwait.c
5425 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5426 Reuse code. Add __builtin_expects.
5428 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5429 (__pthread_cond_timedwait): Get internal lock in case timeout has
5430 passed before the futex syscall.
5431 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5433 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5435 * allocatestack.c: Pretty printing.
5437 * sysdeps/pthread/createthread.c (create_thread): Don't add
5438 CLONE_DETACHED bit if it is not necessary.
5440 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5442 * pthread_getattr_np.c: Include ldsodefs.h.
5444 2004-01-16 Richard Henderson <rth@redhat.com>
5446 * allocatestack.c: Don't declare __libc_stack_end.
5447 * init.c (__pthread_initialize_minimal_internal): Likewise.
5448 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5450 2004-01-15 Richard Henderson <rth@redhat.com>
5452 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5453 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5454 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5455 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5456 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5457 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5458 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5459 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5461 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5463 * init.c (pthread_functions): Make array const.
5465 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5467 * allocatestack.c (__make_stacks_executable): Change interface.
5468 Check parameters. Pass parameter on to libc counterpart.
5469 * pthreadP.h: Change declaration.
5471 2004-01-13 Richard Henderson <rth@redhat.com>
5473 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5475 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5478 * sysdeps/alpha/Makefile: New file.
5479 * sysdeps/alpha/tcb-offsets.sym: New file.
5480 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5481 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5483 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5486 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5488 * Makefile (tests): Add tst-backtrace1.
5489 * tst-backtrace1.c: New test.
5491 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5493 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5494 register as second parameter to the REGISTER macro.
5495 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5496 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5497 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5498 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5499 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5500 of thread register as second parameter to REGISTER macro in 64 case.
5502 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5504 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5505 (CFLAGS-getpid.o): Defined.
5506 (CFLAGS-getpid.os): Defined.
5508 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5510 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5511 returned for main thread does not overlap with any other VMA.
5512 Patch by Jakub Jelinek.
5514 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5516 * tst-raise1.c: Include stdio.h.
5518 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5520 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5521 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5522 If pid is 0, set it to selftid.
5523 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5524 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5525 != 0, return self->tid without doing a syscall.
5526 * descr.h (struct pthread): Move pid field after tid.
5528 * Makefile (tests): Add tst-raise1.
5529 * tst-raise1.c: New file.
5531 2003-12-23 Roland McGrath <roland@redhat.com>
5533 * tst-oddstacklimit.c: New file.
5534 * Makefile (tests): Add it.
5535 (tst-oddstacklimit-ENV): New variable.
5537 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5538 value up to page size for __default_stacksize.
5540 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5542 * Makefile (tests): Add tst-eintr5.
5543 * tst-eintr5.c: New file.
5545 * eintr.c (eintr_source): Prevent sending signal to self.
5547 * tst-eintr2.c (tf1): Improve error message.
5549 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5551 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5552 * sysdeps/unix/sysv/linux/getpid.c: New file.
5553 * pthread_cancel.c: Add comment explaining use of PID field.
5554 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5555 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5556 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5557 temporarily to signal the field must not be relied on and updated
5559 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5560 temporarily negative.
5561 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5563 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5565 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5566 (eintr_source): If ARG != NULL, use pthread_kill.
5567 * tst-eintr1.c: Adjust for this change.
5568 * tst-eintr2.c: Likewise.
5569 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5570 * tst-eintr3.c: New file.
5571 * tst-eintr4.c: New file.
5573 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5575 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5576 if CANCELSTATE_BITMASK is set.
5577 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5580 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5581 (tests-reverse): Add tst-cancel23.
5582 * tst-cancel22.c: New test.
5583 * tst-cancel23.c: New test.
5585 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5587 * tst-eintr1.c: Better error messages.
5589 * Makefile (tests): Add tst-eintr2.
5590 * tst-eintr2.c: New file.
5592 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5594 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5595 (CFLAGS-tst-cancelx21.c): Set.
5596 * tst-cancel21.c: New test.
5597 * tst-cancelx21.c: New test.
5599 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5601 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5602 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5603 * pt-longjmp.c: Include jmpbuf-unwind.h.
5604 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5605 _JMPBUF_UNWINDS. Adjust compared pointers.
5606 * init.c (__pthread_initialize_minimal_internal): Initialize
5607 pd->stackblock_size.
5608 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5609 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5610 * sysdeps/i386/jmpbuf-unwind.h: New file.
5611 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5612 * sysdeps/s390/jmpbuf-unwind.h: New file.
5613 * sysdeps/sh/jmpbuf-unwind.h: New file.
5614 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5615 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5616 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5617 (_JMPBUF_CFA_UNWINDS): Remove.
5618 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5620 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5622 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5623 (CFLAGS-tst-cancelx20.c): Set.
5624 * tst-cancel20.c: New test.
5625 * tst-cancelx20.c: New test.
5627 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5629 * init.c (__pthread_initialize_minimal_internal): Don't treat
5630 architectures with separate register stack special here when
5631 computing default stack size.
5633 2003-12-17 Roland McGrath <roland@redhat.com>
5635 * Makefile (tst-cancelx7-ARGS): New variable.
5636 Reportd by Greg Schafer <gschafer@zip.com.au>.
5638 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5640 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5641 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5642 (tst-stack3-ENV): Set.
5643 ($(objpfx)tst-stack3-mem): New.
5644 * tst-stack3.c: New test.
5646 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5648 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5649 Add unwind directives. Drop unused .regstk directive.
5650 (_fini_EPILOG_BEGINS): Add unwind directives.
5652 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5654 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5655 Assume parameter is a pointer.
5656 (lll_futex_wake): Likewise.
5657 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5659 (lll_futex_wake): Likewise.
5660 Reported by Boris Hu.
5661 * sysdeps/unix/sysv/linux/unregister-atfork.c
5662 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5664 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5666 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5668 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5669 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5670 __rtld_lock_initialize for ld.so lock.
5671 Patch in part by Adam Li <adam.li@intel.com>.
5673 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5675 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5676 in $(gnulib). Also, remove stale comment.
5678 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5680 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5681 advantage of new syscall stub and optimize accordingly.
5683 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5684 from SYS_futex, to match expectations of
5685 sysdep.h:DO_INLINE_SYSCALL.
5686 (lll_futex_clobbers): Remove.
5687 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5688 (lll_futex_wake): Likewise.
5689 (lll_futex_requeue): Likewise.
5690 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5691 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5693 (__lll_mutex_lock): Likewise.
5694 (__lll_mutex_cond_lock): Likewise.
5695 (__lll_mutex_timed_lock): Likewise.
5696 (__lll_mutex_unlock): Likewise.
5697 (__lll_mutex_unlock_force): Likewise.
5699 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5700 comes before the include of <sysdep.h>.
5701 (THREAD_SELF_SYSINFO): New macro.
5702 (THREAD_SYSINFO): Likewise.
5703 (INIT_SYSINFO): New macro.
5704 (TLS_INIT_TP): Call INIT_SYSINFO.
5706 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5708 * sysdeps/pthread/createthread.c (create_thread): Use
5709 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5710 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5711 THREAD_SELF_SYSINFO instead of open code.
5712 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5713 (THREAD_SYSINFO): Likewise.
5715 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5717 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5719 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5721 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5722 instead of .init. Patch by David Mosberger.
5724 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5726 * sysdeps/pthread/configure.in: Remove broken declaration in C
5727 cleanup handling check.
5729 2003-11-30 Andreas Jaeger <aj@suse.de>
5731 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5732 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5735 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5737 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5738 * pthread_attr_destroy.c: Include shlib-compat.h.
5739 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5740 is set in iattr->flags.
5741 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5743 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5745 * Makefile (distribute): Add tst-cleanup4aux.c.
5747 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5750 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5752 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5753 pthread_cond_signal.
5755 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5756 store mutex address if the current value is ~0l.
5757 * sysdeps/pthread/pthread_cond_timedwait.c
5758 (__pthread_cond_timedwait): Likewise.
5759 * sysdeps/pthread/pthread_cond_broadcast.c
5760 (__pthread_cond_broadcast): Don't use requeue for pshared
5763 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5764 (__pthread_cond_wait): Don't store mutex address if the current
5766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5767 (__pthread_cond_timedwait): Likewise.
5768 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5769 (__pthread_cond_broadcast): Don't use requeue for pshared
5772 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5773 element with ~0l for pshared condvars, with NULL otherwise.
5775 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5776 (__pthread_cond_wait): Don't store mutex address if the current
5778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5779 (__pthread_cond_timedwait): Likewise.
5780 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5781 (__pthread_cond_broadcast): Don't use requeue for pshared
5784 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5785 * tst-cond12.c: New file.
5786 * tst-cond13.c: New file.
5788 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5790 * sysdeps/pthread/configure.in: Make missing forced unwind support
5793 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5795 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5797 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5799 * Makefile: Add magic to clean up correctly.
5801 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5803 * unwind.c (FRAME_LEFT): Define.
5804 (unwind_stop): Handle old style cleanups here.
5805 (__pthread_unwind): Handle old style cleanups only if
5806 !HAVE_FORCED_UNWIND.
5807 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5808 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5809 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5810 ($(objpfx)tst-cleanupx4): Likewise.
5811 * tst-cleanup4.c: New test.
5812 * tst-cleanup4aux.c: New.
5813 * tst-cleanupx4.c: New test.
5815 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5817 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5818 lll_mutex_*lock macros to skip atomic operations on some archs.
5820 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5822 * sysdeps/pthread/tst-timer.c (main): Initialize
5823 sigev2.sigev_value as well.
5825 2003-10-15 Roland McGrath <roland@redhat.com>
5827 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5829 * sysdeps/pthread/configure: Regenerated.
5831 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5833 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5834 locking macros. No distinction between normal and mutex locking
5836 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5837 Merge bits from lowlevelmutex.S we still need.
5838 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5839 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5840 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5841 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5842 new mutex implementation.
5843 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5844 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5845 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5846 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5847 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5848 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5849 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5850 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5851 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5852 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5853 symbol for entry point to avoid cancellation.
5855 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5857 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5859 (SAVE_OLDTYPE_0): Fix a typo.
5861 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5863 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5864 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5866 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5868 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5871 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5873 * Makefile (tests): Add tst-cancel19.
5874 * tst-cancel19.c: New test.
5876 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5878 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5879 restoring of the old cancellation type.
5881 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5883 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5885 2003-09-27 Wolfram Gloger <wg@malloc.de>
5887 * sysdeps/pthread/malloc-machine.h: New file
5889 2003-09-24 Roland McGrath <roland@redhat.com>
5891 * allocatestack.c (__make_stacks_executable): Don't ignore return
5892 value from _dl_make_stack_executable.
5894 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5896 * allocatestack.c (__make_stacks_executable): Also change
5897 permission of the currently unused stacks.
5899 * allocatestack.c (change_stack_perm): Split out from
5900 __make_stacks_executable.
5901 (allocate_stack): If the required permission changed between the time
5902 we started preparing the stack and queueing it, change the permission.
5903 (__make_stacks_executable): Call change_stack_perm.
5905 * Makefile: Build tst-execstack-mod locally.
5906 * tst-execstack-mod.c: New file.
5908 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5910 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5912 2003-09-23 Roland McGrath <roland@redhat.com>
5914 * tst-execstack.c: New file.
5915 * Makefile (tests): Add it.
5916 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5917 (LDFLAGS-tst-execstack): New variable.
5919 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5920 whether to use PROT_EXEC for stack mmap.
5921 (__make_stacks_executable): New function.
5922 * pthreadP.h: Declare it.
5923 * init.c (__pthread_initialize_minimal_internal): Set
5924 GL(dl_make_stack_executable_hook) to that.
5926 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5928 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5929 recommendation from AMD re avoidance of lock prefix.
5931 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5933 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5934 lll_futex_timed_wait instead of lll_futex_wait.
5935 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5936 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5937 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5938 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5939 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5940 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5941 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5942 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5943 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5944 Completely revamp the locking macros. No distinction between
5945 normal and mutex locking anymore.
5946 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5947 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5948 __lll_lock_timedwait): Fix prototypes.
5949 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5950 __lll_lock_timedwait): Likewise.
5951 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5952 macros, add __builtin_expect.
5953 (lll_mutex_timedlock): Likewise. Fix return value.
5954 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5955 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5956 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5957 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5958 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5959 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5960 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5961 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5963 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5965 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5966 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5967 operation if possible.
5969 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5970 like jumping over the lock prefix.
5972 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5974 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5975 locking macros. No distinction between normal and mutex locking
5977 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5978 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5979 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5980 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5981 locking. Merge bits from lowlevelmutex.S we still need.
5982 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5983 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5984 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5985 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5986 * Makefile (routines): Remove libc-lowlevelmutex.
5987 (libpthread-rountines): Remove lowlevelmutex.
5988 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5989 for new mutex implementation.
5990 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5991 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5992 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5993 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5994 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5996 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5998 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5999 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6000 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6001 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6002 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6003 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6004 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6005 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6007 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6009 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6010 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6011 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6013 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6014 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6016 2003-09-20 Ulrich Drepper <drepper@redhat.com>
6018 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6019 in parameters of asm with output parameters.
6021 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6022 type of DECR parameter to int.
6023 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6025 2003-09-18 Jakub Jelinek <jakub@redhat.com>
6027 * tst-attr3.c (tf, do_test): Print stack start/end/size and
6028 guardsize for each thread.
6030 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6032 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6033 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6034 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6036 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6037 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6039 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6040 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6041 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6042 (pthread_getaffinity_np): Add hidden_def.
6044 * Makefile (tests): Add tst-attr3.
6045 * tst-attr3.c: New test.
6047 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6049 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6051 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6052 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6054 2003-09-17 Jakub Jelinek <jakub@redhat.com>
6056 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6057 * tst-align.c: Include tst-stack-align.h.
6058 (tf, do_test): Use TEST_STACK_ALIGN macro.
6060 2003-09-17 Ulrich Drepper <drepper@redhat.com>
6062 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6065 2003-09-16 Ulrich Drepper <drepper@redhat.com>
6067 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6068 stack-related values for the initial thread.
6070 2003-09-15 Jakub Jelinek <jakub@redhat.com>
6072 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6074 2003-09-11 Ulrich Drepper <drepper@redhat.com>
6076 * pthread_mutex_lock.c: Minor code rearrangements.
6078 2003-09-05 Roland McGrath <roland@redhat.com>
6080 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6081 Instead, include ../nptl_db/db_info.c to do its magic.
6082 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6083 (__pthread_pthread_key_2ndlevel_size): Likewise.
6084 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6085 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6086 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6087 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6088 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6089 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6090 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6091 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6092 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6093 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6094 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6095 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6096 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6097 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6098 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6099 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6100 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6102 2003-09-08 Ulrich Drepper <drepper@redhat.com>
6104 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6105 of pthread_t to be compatible with LT.
6106 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6107 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6108 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6109 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6110 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6111 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6112 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6114 2003-09-04 Ulrich Drepper <drepper@redhat.com>
6116 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6118 2003-09-04 Jakub Jelinek <jakub@redhat.com>
6120 * unwind-forcedunwind.c: Move to...
6121 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6122 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6123 * sysdeps/pthread/jmpbuf-unwind.h: New file.
6124 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6125 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6126 * unwind.c: Include jmpbuf-unwind.h.
6127 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6129 2003-09-02 Jakub Jelinek <jakub@redhat.com>
6131 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6132 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6133 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6134 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6135 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6136 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6137 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6138 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6139 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6140 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6141 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6143 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6144 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6145 * Makefile (tests): Add tst-stack2.
6146 * tst-stack2.c: New test.
6147 * tst-stack1.c: Include limits.h and sys/param.h.
6148 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6150 * pthread_condattr_setpshared.c: Include errno.h.
6151 (pthread_condattr_setpshared): Return EINVAL if pshared
6152 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6154 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6155 defined symbol for entry point to avoid cancellation.
6156 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6158 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6160 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6162 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6164 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6166 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6167 __close_nocancel, __read_nocancel, __write_nocancel,
6168 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
6169 libpthread.so or librt.so, define to corresponding function
6170 without _nocancel suffix.
6171 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6172 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6173 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6175 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6177 2003-09-02 Ulrich Drepper <drepper@redhat.com>
6179 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6180 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6182 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6183 in subsections has a symbol associated with it.
6185 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6186 defined symbol for entry point to avoid cancellation.
6187 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6189 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6191 * Makefile (tests): Add tst-tls5.
6192 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6193 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6194 ($(objpfx)tst-tls5): New.
6195 ($(objpfx)tst-tls6.out): Likewise.
6196 (tests): Depend on $(objpfx)tst-tls6.out.
6197 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6198 (do_test): Check pthread_self () return value alignment.
6199 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6200 (tf): Check pthread_self () return value alignment.
6201 * tst-tls5.c: New test.
6203 * tst-tls5mod.c: New.
6204 * tst-tls5moda.c: New.
6205 * tst-tls5modb.c: New.
6206 * tst-tls5modc.c: New.
6207 * tst-tls5modd.c: New.
6208 * tst-tls5mode.c: New.
6209 * tst-tls5modf.c: New.
6210 * tst-tls6.sh: New test.
6212 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6213 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6214 * init.c (pthread_functions): Initialize them.
6215 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6216 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6217 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6218 pthread_cond_timedwait@@GLIBC_2.3.2.
6220 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6222 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6223 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6224 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6225 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6226 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6227 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6229 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6231 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6232 _POSIX_THREAD_PRIORITY_SCHEDULING.
6233 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6235 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6237 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6238 nested function, use static inline function from libio.h.
6239 Code by Richard Henderson.
6241 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6244 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6246 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6247 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6248 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6249 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6250 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6251 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6252 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6253 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6254 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6255 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6256 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6257 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6258 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6259 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6260 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6261 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6262 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6263 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6264 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6265 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6266 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6267 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6268 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6269 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6270 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6271 * sysdeps/sparc/tls.h: New file.
6272 * sysdeps/sparc/tcb-offsets.sym: New file.
6273 * sysdeps/sparc/Makefile: New file.
6274 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6275 * init.c [__sparc__] (__NR_set_tid_address): Define.
6277 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6279 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6280 _IO_release_lock): Define.
6282 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6284 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6285 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6287 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6289 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6290 (__pthread_cleanup_class): Add missing return types of member
6293 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6295 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6296 (lll_mutex_unlock_force): Add memory barrier between store and futex
6299 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6301 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6302 tempmsg in first loop.
6304 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6306 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6307 _POSIX_THREAD_PRIORITY_SCHEDULING.
6308 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6310 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6312 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6313 (__rtld_lock_default_lock_recursive,
6314 __rtld_lock_default_unlock_recursive): Define.
6315 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6316 __rtld_lock_unlock_recursive): Define using
6317 GL(_dl_rtld_*lock_recursive).
6318 * init.c (__pthread_initialize_minimal_internal): Initialize
6319 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6320 Lock GL(_dl_load_lock) the same number of times as
6321 GL(_dl_load_lock) using non-mt implementation was nested.
6323 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6324 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6326 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6328 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6331 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6333 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6335 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6337 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6338 to first syscall error check. Move syscall error check for tkill
6339 into __ASSUME_CLONE_STOPPED #ifdef.
6341 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6343 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6344 is not defined, do explicit synchronization.
6345 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6346 is not defined also unlock pd->lock for non-debugging case in case
6348 * pthread_create.c (start_thread): Always get and release pd->lock
6349 if __ASSUME_CLONE_STOPPED is not defined.
6350 (start_thread_debug): Removed. Adjust users.
6351 * allocatestack.c (allocate_stack): Always initialize lock if
6352 __ASSUME_CLONE_STOPPED is not defined.
6353 * Makefile (tests): Add tst-sched1.
6354 * tst-sched1.c: New file.
6356 * sysdeps/pthread/createthread.c (do_clone): Only use
6357 sched_setschduler and pass correct parameters.
6359 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6361 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6362 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6363 PTHREAD_STACK_MIN in comments.
6365 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6367 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6368 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6370 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6371 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6372 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6373 (__pthread_cleanup_upto): Fix prototype.
6374 (_longjmp_unwind): Adjust caller.
6375 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6376 Change second argument to const struct pointer.
6377 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6378 * tst-sem9.c (main): Likewise.
6379 * unwind.c: Include string.h for strlen prototype.
6381 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6383 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6384 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6385 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6387 Patch by Nicholas Miell <nmiell@attbi.com>.
6389 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6391 * init.c (__pthread_initialize_minimal_internal): Initialize
6392 GL(dl_init_static_tls).
6393 * pthreadP.h (__pthread_init_static_tls): New prototype.
6394 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6396 * Makefile (tests): Add tst-tls4.
6397 (modules-names): Add tst-tls4moda and tst-tls4modb.
6398 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6399 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6401 * tst-tls4.c: New file.
6402 * tst-tls4moda.c: New file.
6403 * tst-tls4modb.c: New file.
6405 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6407 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6408 before __timer_dealloc.
6409 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6410 Don't call list_unlink.
6412 2003-07-29 Roland McGrath <roland@redhat.com>
6414 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6416 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6418 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6419 Don't reuse struct aiocb A if it failed.
6420 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6421 not just one byte, as that does not block.
6423 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6425 * sysdeps/pthread/unwind-resume.c: New file.
6426 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6427 unwind-resume in csu subdir.
6428 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6430 (librt-sysdep_routines, librt-shared-only-routines): Add
6432 * sysdeps/pthread/rt-unwind-resume.c: New file.
6433 * unwind-forcedunwind.c: New file.
6434 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6435 (libpthread-shared-only-routines): Likewise.
6436 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6437 * pthreadP.h (pthread_cancel_init): New prototype.
6438 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6440 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6441 attr argument const struct pthread_attr *.
6443 * res.c (__res_state): Return __resp.
6444 * descr.h: Include resolv.h.
6445 (struct pthread): Add res field.
6446 * pthread_create.c: Include resolv.h.
6447 (start_thread): Initialize __resp.
6448 * Makefile (tests): Add tst-_res1.
6449 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6450 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6451 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6453 * tst-_res1.c: New file.
6454 * tst-_res1mod1.c: New file.
6455 * tst-_res1mod2.c: New file.
6457 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6459 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6461 * Makefile: Define various *-no-z-defs variables for test DSOs
6462 which has undefined symbols.
6464 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6466 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6467 Retry if the stwcx fails to store once_control.
6469 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6471 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6472 pthread_attr_setaffinity.
6473 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6474 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6475 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6476 * pthread_attr_destroy.c: Free cpuset element if allocated.
6477 * pthread_create.c: Pass iattr as additional parameter to
6479 * sysdeps/pthread/createthread.c: If attribute is provided and
6480 a new thread is created with affinity set or scheduling parameters,
6481 start thread with CLONE_STOPPED.
6482 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6483 pthread_attr_setaffinity.
6484 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6487 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6489 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6491 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6493 * sysdeps/pthread/configure.in: Require CFI directives also for
6496 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6498 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6501 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6503 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6505 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6506 registers as variables. Call __pthread_mutex_unlock_usercnt.
6507 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6509 not self pointer in __writer. Compare with TID to determine
6511 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6512 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6514 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6516 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6517 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6518 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6519 macros also when compiling librt.
6521 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6523 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6524 -fasynchronous-unwind-tables.
6525 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6526 (PSEUDO): Add cfi directives.
6527 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6529 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6532 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6534 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6535 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6536 * unwind.c (__pthread_unwind_next): Add hidden_def.
6537 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6539 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6540 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6541 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6543 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6544 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6546 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6547 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6548 __pthread_unregister_cancel and __pthread_unwind_next.
6550 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6552 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6553 different symbol for the cancellation syscall wrapper and
6554 non-cancellation syscall wrapper.
6555 (PSEUDO_END): Define.
6557 2003-07-05 Richard Henderson <rth@redhat.com>
6559 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6560 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6561 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6562 return actual return value from the syscall, not 0.
6564 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6566 * descr.h (struct pthread): Add pid field.
6567 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6568 (__reclaim_stacks): Likewise.
6569 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6570 also check for PID of the signal source.
6571 (__pthread_initialize_minimal_internal): Also initialize pid field
6572 of initial thread's descriptor.
6573 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6574 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6575 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6576 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6577 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6579 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6581 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6582 Fix use of parameter.
6583 (__libc_cleanup_pop): Likewise.
6585 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6587 * init.c (sigcancel_handler): Change parameters to match handler
6588 for SA_SIGACTION. Check signal number and code to recognize
6589 invalid invocations.
6591 2003-07-03 Roland McGrath <roland@redhat.com>
6593 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6594 Apply sizeof (struct pthread) bias to r13 value.
6596 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6598 * sysdeps/pthread/configure.in: Require CFI directives.
6600 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6602 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6603 libpthread compilation.
6604 * unwind.c (__pthread_unwind): Add hidden_def.
6605 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6607 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6609 * libc-cancellation.c (__libc_cleanup_routine): Define.
6610 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6611 (__pthread_cleanup_pop): Define.
6613 2003-07-01 Richard Henderson <rth@redhat.com>
6615 * sysdeps/alpha/elf/pt-initfini.c: New file.
6616 * sysdeps/alpha/pthread_spin_lock.S: New file.
6617 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6618 * sysdeps/alpha/pthreaddef.h: New file.
6619 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6620 * sysdeps/alpha/tls.h: New file.
6621 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6622 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6623 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6624 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6625 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6626 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6627 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6628 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6629 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6630 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6632 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6634 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6635 cleanup support and unwind info.
6637 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6639 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6640 Use correct cleanup handler registration. Add unwind info.
6641 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6642 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6643 * tst-once3.c: Add cleanup handler and check it is called.
6644 * tst-once4.c: Likewise.
6645 * tst-oncex3.c: New file.
6646 * tst-oncex4.c: New file.
6647 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6649 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6651 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6653 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6655 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6656 (tf_msgsnd): Likewise.
6658 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6659 premature returns a bit more.
6661 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6663 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6664 definition to the front.
6666 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6667 the cleanup functions to make the names unique. Fix dwarf opcode
6669 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6670 functions to make the names unique. Fix CFA offset for two blocks.
6672 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6674 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6675 missing closing braces.
6676 Patch by Christophe Saout <christophe@saout.de>.
6678 2003-06-24 Roland McGrath <roland@redhat.com>
6680 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6682 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6684 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6685 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6687 * pthreadP.h: Declare __find_thread_by_id.
6688 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6689 * pthread_clock_gettime.c: Allow using other thread's clock.
6690 * pthread_clock_settime.c: Likewise.
6691 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6692 * Makefile: Add rules to build and run tst-clock2.
6693 * tst-clock2.c: New file.
6695 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6697 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6698 to use exception-based cleanup handler.
6699 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6701 * tst-cond8.c (ch): Announce that we are done.
6703 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6705 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6706 Also test aio_suspend with timeout value.
6708 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6710 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6711 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6714 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6715 (__pthread_mutex_lock_internal): Likewise.
6716 (__pthread_mutex_unlock_internal): Likewise.
6717 (__pthread_mutex_unlock_usercnt): Declare.
6718 * pthread_mutex_destroy.c: Always fail if used in any way.
6719 * pthread_mutex_init.c: Update comment.
6720 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6721 * pthread_mutex_timedlock.c: Adjust __nusers.
6722 * pthread_mutex_trylock.c: Adjust __nusers.
6723 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6724 and public interfaces are wrapper with pass additional parameter.
6725 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6727 * tst-mutex8.c: New file.
6728 * Makefile (tests): Add tst-mutex8.
6729 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6730 __pthread_mutex_unlock_usercnt.
6731 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6732 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6733 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6734 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6735 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6736 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6737 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6739 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6740 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6741 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6742 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6743 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6745 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6746 * pthread_mutex_timedlock.c: Likewise.
6747 * pthread_mutex_trylock.c: Adjust __nusers.
6748 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6749 * tst-mutex9.c: New file.
6750 * Makefile (tests): Add tst-mutex9.
6751 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6752 * sysdeps/ia64/tls.h: Likewise.
6753 * sysdeps/powerpc/tls.h: Likewise.
6754 * sysdeps/s390/tls.h: Likewise.
6755 * sysdeps/sh/tls.h: Likewise.
6756 * sysdeps/x86_64/tls.h: Likewise.
6757 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6758 Change type of __owner.
6759 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6760 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6761 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6762 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6763 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6765 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6767 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6768 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6770 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6771 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6772 instead of nr to lll_futex_wake. Only set errno and return -1
6775 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6776 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6777 return actual return value from the syscall, not 0.
6779 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6781 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6782 find a random value.
6783 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6786 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6787 compat_timer_settime.
6788 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6789 compat_timer_gettime.
6790 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6791 compat_timer_getoverrun.
6792 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6793 compat_timer_delete.
6795 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6796 error-checking mutex detect busy mutexes.
6798 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6800 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6801 Add ax to clobber list.
6802 (lll_mutex_cond_lock): Likewise.
6803 (lll_mutex_unlock): Likewise.
6804 (lll_lock): Likewise.
6805 (lll_unlock): Likewise.
6807 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6808 * tst-cancel18.c: New file.
6809 * tst-cancelx18.c: New file.
6811 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6814 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6815 * tst-cancel17.c: New file.
6816 * tst-cancelx17.c: New file.
6818 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6819 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6820 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6822 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6824 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6826 * sysdeps/pthread/createthread.c (create_thread): Set
6827 header.multiple_threads unconditionally.
6828 * allocatestack.c (allocate_stack): Likewise.
6829 * descr.h (struct pthread): Add header.multiple_threads
6831 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6832 Define for librt. #error if neither libpthread, libc nor librt.
6833 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6835 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6836 CDISABLE): Likewise.
6837 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6838 CDISABLE): Likewise.
6839 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6840 CDISABLE): Likewise.
6841 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6842 CDISABLE): Likewise. Access header.multiple_threads outside of
6843 libc and libpthread.
6844 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6846 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6847 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6849 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6851 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6852 Also test early cancellation before the thread reaches the cancellation
6855 * Makefile: Compile forward.c with exceptions.
6857 * sysdeps/unix/sysv/linux/sleep.c: New file.
6859 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6861 * Makefile: Add CFLAGS definition to compile function wrappers
6862 duplicated from libc with exceptions.
6863 * tst-cancel4.c: Also check cancellation handlers.
6865 * Makefile: Add rules to build and run tst-cancel16 and
6866 tst-cancelx16. Add missing CFLAGS definitions.
6867 * tst-cancel16.c: New file.
6868 * tst-cancelx16.c: New file.
6870 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6872 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6873 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6874 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6875 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6877 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6878 (LIBC_CANCEL_RESET): Likewise.
6879 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6880 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6882 (CFLAGS-libcrt-cancellation.c): Define.
6883 * sysdeps/pthread/librt-cancellation.c: New file.
6884 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6885 macros also when compiling librt.
6886 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6887 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6888 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6889 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6890 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6891 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6892 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6894 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6895 compat_timer_create.
6897 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6899 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6901 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6903 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6904 Add libc_hidden_def.
6906 2003-06-13 Roland McGrath <roland@redhat.com>
6908 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6909 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6911 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6913 * allocatestack.c (queue_stack): Always inline.
6914 * ptreadhP.h (__do_cancel): Likewise.
6916 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6918 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6921 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6924 (__pthread_cond_signal): Remove incorrect second addition for
6927 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6929 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6930 (__pthread_cond_signal): Use correct futex pointer in
6931 __lll_mutex_lock_wait call.
6933 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6934 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6936 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6938 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6940 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6943 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6944 hand-written CFI generation code. Since ENTRY/END also initiated
6945 CFI frames this caused two CFI sets to be generated.
6947 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6949 * cleanup_routine.c: New file.
6950 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6951 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6953 * Makefile (libpthread-routines): Add cleanup_routine.
6954 Add more CFLAGS variables to compile with exceptions. Add comments
6955 why which file needs unwind tables.
6956 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6958 * tst-cancelx1.c: New file.
6959 * tst-cancelx2.c: New file.
6960 * tst-cancelx3.c: New file.
6961 * tst-cancelx4.c: New file.
6962 * tst-cancelx5.c: New file.
6963 * tst-cancelx6.c: New file.
6964 * tst-cancelx7.c: New file.
6965 * tst-cancelx8.c: New file.
6966 * tst-cancelx9.c: New file.
6967 * tst-cancelx10.c: New file.
6968 * tst-cancelx11.c: New file.
6969 * tst-cancelx12.c: New file.
6970 * tst-cancelx13.c: New file.
6971 * tst-cancelx14.c: New file.
6972 * tst-cancelx15.c: New file.
6973 * tst-cleanupx0.c: New file.
6974 * tst-cleanupx0.expect: New file.
6975 * tst-cleanupx1.c: New file.
6976 * tst-cleanupx2.c: New file.
6977 * tst-cleanupx3.c: New file.
6979 * tst-cleanup0.c: Make standard compliant.
6980 * tst-cleanup1.c: Likewise.
6982 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6983 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6984 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6985 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6986 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6987 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6988 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6990 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6991 * tst-cancel12.c: New file.
6992 * tst-cancel13.c: New file.
6993 * tst-cancel14.c: New file.
6994 * tst-cancel15.c: New file.
6995 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6998 * tst-cancel1.c: Add some comments.
7000 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7003 2003-06-06 Ulrich Drepper <drepper@redhat.com>
7005 * Makefile (CFLAGS-pthread_cancel.c): Define.
7007 2003-06-05 Ulrich Drepper <drepper@redhat.com>
7009 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7010 Change type of __writer element to int.
7011 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7012 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7013 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7014 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7015 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7016 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7017 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7018 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7019 Compare with TID to determine deadlocks.
7020 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7021 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7022 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7023 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7024 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7025 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7027 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7029 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7030 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7031 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7033 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7035 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7036 * Makefile (tests): Add tst-rwlock12.
7037 * tst-rwlock12.c: New file.
7039 2003-06-05 Jakub Jelinek <jakub@redhat.com>
7041 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7042 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7043 Remove bogus hidden_proto.
7044 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7046 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7047 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7048 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7049 ___lll_mutex_timedlock): Likewise.
7051 2003-06-04 Ulrich Drepper <drepper@redhat.com>
7053 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7054 (__pthread_cond_signal): Add some code to eventually handle
7057 2003-06-01 Ulrich Drepper <drepper@redhat.com>
7059 * Makefile (tests): Add tst-exec4.
7060 (tst-exec4-ARGS): Define.
7061 * tst-exec4.c: New file.
7063 2003-05-31 Ulrich Drepper <drepper@redhat.com>
7065 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7066 Also fail if tv_nsec < 0.
7067 (__lll_timedwait_tid): Likewise.
7068 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7069 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7071 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7073 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7075 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7077 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7079 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7082 * Makefile (tests): Add tst-sem8 and tst-sem9.
7083 * tst-sem8.c: New file.
7084 * tst-sem9.c: New file.
7085 * sem_open.c: Fix creation of in_use record if the file exists but
7088 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7091 * sysdeps/pthread/timer_create.c (timer_create): In case
7092 evp==NULL, assign timer ID to sival_ptr.
7094 * descr.h (struct pthread_unwind_buf): Change type of prev element to
7095 struct pthread_unwind_buf *.
7096 (struct pthread): Likewise for cleanup_jmp_buf element.
7098 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7099 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7100 * unwind.c (__pthread_unwind_next): Likewise.
7102 2003-05-30 Ulrich Drepper <drepper@redhat.com>
7104 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7105 (lll_futex_timed_wait): Use int for futex value parameter.
7106 (lll_futex_wake): Likewise.
7107 (lll_futex_requeue): Likewise.
7109 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7110 Replace one memory operation with one register operation.
7112 * tst-join4.c (do_test): Fix error message.
7114 * tst-rwlock6.c (do_test): Use correct format specifier.
7116 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7117 (__lll_mutex_lock_wait): Replace one memory operation with one
7119 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7120 (__lll_mutex_lock_wait): Likewise.
7122 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7123 (__lll_mutex_cond_lock): Add one to value parameter of
7124 __lll_lock_wait to reflect reality in the futex syscall.
7125 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7126 (lll_mutex_cond_lock): Likewise.
7128 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7130 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7132 (lll_mutex_cond_lock): Define.
7134 2003-05-29 Ulrich Drepper <drepper@redhat.com>
7136 * Makefile (tests): Add tst-signal6.
7137 * tst-signal6.c: New file.
7139 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7140 (__lll_mutex_unlock_force): New function
7141 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7143 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7144 (__lll_mutex_unlock_force): New function.
7145 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7147 * tst-rwlock7.c (do_test): Use correct format specifier.
7149 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7150 Find break parameter in correct asm argument.
7152 2003-05-27 Jakub Jelinek <jakub@redhat.com>
7154 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7156 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7158 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7160 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7161 lll_futex_requeue, lll_mutex_unlock_force): Define.
7163 2003-05-30 Jakub Jelinek <jakub@redhat.com>
7165 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7166 (pthread_cond_t): Add __mutex.
7167 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7168 lll_futex_requeue, lll_mutex_unlock_force): Define.
7170 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7172 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7173 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7175 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7177 (lll_futex_wait, lll_futex_wake): Define.
7178 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7179 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7180 FUTEX_REQUEUE instead of FUTEX_WAIT.
7181 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7182 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7183 mutex which was used in condvar structure. Call
7184 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7185 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7187 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7188 include tcb-offsets.h. Read wakeup value in locked region.
7189 Use the value of gbr register as THREAD_ID.
7190 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7191 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7192 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7194 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7197 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7199 * sysdeps/pthread/pthread_cond_broadcast.c
7200 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7202 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7204 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7205 typo in register name.
7206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7207 correctly. Actually use requeue. Little optimization.
7208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7209 mutex address early. Handle cancellation state as 32-bit value.
7210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7211 Remove unnecessary label.
7213 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7215 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7216 instead of FUTEX_WAIT.
7217 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7218 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7219 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7220 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7221 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7222 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7223 used in condvar structure. Call __pthread_mutex_cond_lock instead
7224 of __pthread_mutex_lock_internal.
7225 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7226 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7227 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7228 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7229 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7230 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7231 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7232 Add pthread_mutex_cond_lock.
7233 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7234 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7235 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7236 lll_mutex_cond_lock.
7237 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7238 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7239 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7241 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7242 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7244 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7245 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7247 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7248 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7249 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7250 macro don't define aliases.
7252 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7253 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7254 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7255 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7256 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7257 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7258 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7260 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7262 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7264 * sem_open.c: Fix one endless loop. Implement correct semantics
7265 wrt opening the same semaphore more then once.
7266 * sem_close.c: Adjust for sem_open change.
7267 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7268 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7269 * Makefile (tests): Add tst-sem7.
7270 * tst-sem7.c: New file.
7272 2003-05-16 Roland McGrath <roland@redhat.com>
7274 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7275 uninitialized variable braino.
7277 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7279 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7280 test for syscall availability.
7282 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7283 __no_posix_timers to -1 if the syscalls don't exist.
7285 * pthread_join.c (pthread_join): Set tid field of the joined
7286 thread to -1. This isn't necessary but helps to recognize some
7287 error conditions with almost no cost.
7289 * allocatestack.c (FREE_P): Also negative values indicate an
7292 * unwind.c: Include <unistd.h>.
7294 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7296 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7298 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7300 * Makefile (crti-objs, crtn-objs): New variables.
7301 (omit-deps, extra-objs): Add crtn.
7302 ($(objpfx)libpthread.so): Depend on both crti and crtn
7303 and links to them in multidir.
7304 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7306 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7308 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7309 (lll_mutex_unlock): Use atomic_exchange_rel.
7311 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7313 * cond-perf.c (cons): Add missing locking around setting of alldone.
7315 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7317 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7319 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7321 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7323 * tst-sem6.c: New file.
7324 * Makefile (tests): Add tst-sem6.
7326 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7327 Use atomic_exchange_rel instead of atomic_exchange.
7328 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7331 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7332 code for lll_futex_wait and lll_futex_wake in static apps. Use
7333 vsyscall is possible.
7335 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7336 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7337 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7338 pthread_setaffinity_np.
7339 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7340 and pthread_setaffinity_np.
7341 * Makefile (libpthread-routines): Add pthread_getaffinity and
7342 pthread_setaffinity.
7344 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7345 use it in case mmap to allocate the stack fails.
7346 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7347 ARCH_MAP_FLAGS here.
7348 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7351 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7353 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7354 handler implementation. It is now lockless in fork().
7355 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7356 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7357 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7358 declare the __fork_*_lists.
7359 (struct fork_handler): Include pointers to all three functions.
7360 Add next, refcntr and need_signal elements.
7361 (__fork_handlers): New declaration.
7362 (__register_atfork_malloc): Remove declaration.
7363 (HAVE_register_atfork_malloc): Remove definition.
7364 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7365 __pthread_child_handler variable.
7366 (__libc_pthread_init): Use __register_atfork instead of explicitly
7368 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7370 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7372 * unwind.c (unwind_cleanup): Print error message and then abort. This
7373 function must never be reached.
7375 * cond-perf.c: New file.
7377 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7379 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7381 2003-05-04 Roland McGrath <roland@redhat.com>
7383 * Makefile ($(objpfx)../libc.so): New target.
7385 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7387 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7388 (pthread_condattr_t): Size is only an int, don't use long for
7390 (pthread_mutexattr_t): Likewise.
7391 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7392 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7393 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7395 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7397 * sysdeps/i386/tls.h: Define THREAD_ID.
7398 * sysdeps/ia64/tls.h: Likewise.
7399 * sysdeps/powerpc/tls.h: Likewise.
7400 * sysdeps/s390/tls.h: Likewise.
7401 * sysdeps/sh/tls.h: Likewise.
7402 * sysdeps/x86_64/tls.h: Likewise.
7403 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7405 * pthread_mutex_timedlock.c: Likewise.
7406 * pthread_mutex_trylock.c: Likewise.
7407 * pthread_mutex_unlock.c: Likewise.
7408 * pthread_rwlock_trywrlock.c: Likewise.
7409 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7410 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7411 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7412 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7414 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7417 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7419 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7420 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7421 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7422 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7423 Make __align long long instead of long.
7424 (pthread_rwlock_t): Formatting.
7425 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7426 (pthread_rwlock_t): Formatting.
7427 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7428 (pthread_cond_t): Make __align long long instead of long.
7429 (pthread_rwlock_t): Move __flags field to the same position as in
7432 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7434 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7435 * tst-rwlock7.c (do_test): Likewise.
7437 2003-04-26 Roland McGrath <roland@redhat.com>
7439 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7441 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7443 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7444 sizeof (struct pthread).
7445 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7447 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7449 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7451 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7453 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7455 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7457 (NO_TLS_OFFSET): Define.
7458 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7459 add TLS_TCB_SIZE unnecessarily.
7461 2003-04-22 Roland McGrath <roland@redhat.com>
7463 * Makeconfig (shared-thread-library): Reverse link order to work
7466 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7468 * semaphore.h: Fix typo in comment.
7470 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7472 * sysdeps/pthread/sigfillset.c: New file.
7474 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7475 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7476 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7477 * sysdeps/pthread/sigaction.c: Likewise.
7478 * sysdeps/pthread/sigprocmask.c: New file.
7479 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7481 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7482 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7485 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7487 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7488 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7490 * sysdeps/unix/sysv/linux/unregister-atfork.c
7491 (__unregister_atfork): Don't free memory not allocated dynamically.
7493 * semaphore.h: Remove __THROW marker from cancellation points.
7494 * nptl/sysdeps/pthread/pthread.h: Likewise.
7496 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7498 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7499 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7502 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7504 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7506 2003-04-15 Roland McGrath <roland@redhat.com>
7508 * forward.c (__pthread_unwind): Tweak to avoid warning.
7510 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7512 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7514 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7517 overflow CFA advance instructions.
7518 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7520 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7522 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7523 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7524 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7528 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7529 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7530 DW_CFA_advance_loc for .Laddl-.Lsubl.
7532 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7534 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7535 position-independent unwind data for static libraries.
7536 Add missing unwind info. Add comments.
7538 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7539 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7540 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7543 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7545 * Makefile: Make sure all cancellation points are compiled with
7546 exception and asynchronous unwind tables.
7548 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7549 which mishandles loading of global object addresses in PIC.
7550 (THREAD_SETMEM_NC): Likewise.
7552 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7554 * pthread.h: Define new data structure for cleanup buffer. Declare
7555 new cleanup handler interfaces.
7556 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7557 (struct pthread): Add cleanup_jmp_buf pointer. Define
7558 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7559 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7560 it. Declare old cleanup handler installation functions.
7561 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7563 * cleanup_defer.c: Likewise.
7564 * cleanup_compat.c: New file. Old cleanup code.
7565 * cleanup_def_compat.c: New file. Old cleanup code.
7566 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7567 if own thread descriptor.
7568 * unwind.c: New file.
7569 * forward.c: Add __pthread_unwind.
7570 * init.c (pthread_functions): Add __pthread_unwind.
7571 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7572 Add ptr___pthread_unwind.
7573 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7574 and unwind function.
7575 * Makefile (libpthread-routines): Add cleanup_compat,
7576 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7577 table generation if necessary.
7578 * version.c: Record whether unwind support is compiled in.
7579 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7580 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7582 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7583 complication to generate unwind information for syscall wrappers.
7584 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7585 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7586 __cleanup_fct_attribute.
7588 * Makefile: Add rules to build and run tst-cleanup0.
7589 * tst-cleanup0.c: New file.
7590 * tst-cleanup0.expect: New file.
7592 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7593 caller. Optimize to avoid often unecessary local variable.
7595 2003-04-11 Roland McGrath <roland@redhat.com>
7597 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7598 sets variable `multidir'; include that.
7599 (generated): Add it.
7600 ($(objpfx)$(multidir)/crti.o): New target.
7601 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7603 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7605 * tst-attr2.c (do_test): Add cast to avoid warning.
7606 * tst-mutex4.c (do_test): Likewise.
7608 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7610 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7613 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7615 * Makefile (tests): Add tst-detach1.
7616 * tst-detach1.c: New file.
7618 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7620 * sysdeps/pthread/pthread.h: Remove duplicate
7621 pthread_cleanup_{push,pop} definitions.
7623 * tst-barrier2.c: Eliminate warnings.
7624 * tst-cancel4.c: Likewise.
7625 * tst-cond4.c: Likewise.
7626 * tst-cond6.c: Likewise.
7627 * tst-detach1.c: Likewise.
7628 * tst-rwlock4.c: Likewise.
7629 * tst-rwlock6.c: Likewise.
7630 * tst-rwlock7.c: Likewise.
7631 * tst-sem3.c: Likewise.
7632 * tst-spin2.c: Likewise.
7633 * tst-umask1.c: Likewise.
7635 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7637 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7639 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7641 * descr.h (struct pthread): Move cancelhandling member to the front.
7643 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7645 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7646 malloc_parent, and malloc_child statically.
7647 (__register_atfork_malloc): New function.
7648 (free_mem): Don't free any of the malloc_* variables on the list.
7649 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7650 Define HAVE_register_atfork_malloc.
7652 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7654 * sysdeps/pthread/createthread.c (create_thread): Add some more
7655 comments explaining when to set multiple_threads and when not.
7657 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7658 THREAD_ATOMIC_BIT_SET if not already defined.
7659 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7660 THREAD_ATOMIC_BIT_SET:
7661 * sysdeps/x86_64/tls.h: Likewise.
7662 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7663 THREAD_ATOMIC_CMPXCHG_VAL.
7664 (_pthread_cleanup_pop_restore): Likewise.
7665 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7666 (__pthread_enable_asynccancel_2): Likewise.
7667 (__pthread_disable_asynccancel): Likewise.
7668 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7669 (__libc_disable_asynccancel): Likewise.
7670 * init.c (sigcancel_handler): Likewise.
7671 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7672 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7674 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7676 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7677 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7678 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7679 * Makefile (tests): Add tst-cancel11.
7680 * tst-cancel11.c: New file.
7682 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7684 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7685 round, not the first. Use specific_used flag instead of local
7686 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7687 (__free_tcb): Don't call deallocate_tsd here.
7688 (start_thread): Call deallocate_tsd here.
7689 * pthread_setspecific.c: Set specific_used flag really only when
7691 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7692 * tst-tsd3.c: New file.
7693 * tst-tsd4.c: New file.
7695 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7697 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7698 Use atomic_exchange_and_add instead of __lll_add.
7699 (__lll_mutex_timedlock): Likewise.
7700 Patch by Ian Wienand.
7702 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7704 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7705 (SINGLE_THREAD_P): Fix typo.
7706 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7708 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7710 * Makefile (tests): Add tst-align.
7711 * tst-align.c: New file.
7712 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7714 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7717 * tst-tsd2.c: Add casts to avoid warnings.
7719 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7721 * descr.h (struct pthread): Move most often used elements to the front.
7723 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7725 * Makefile (libpthread-routines): Add pthread_atfork.
7726 (libpthread-static-only-routines): Add pthread_atfork.
7728 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7730 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7732 (INSTALL_DTV): Add parens.
7733 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7734 Use passed descr instead of THREAD_SELF.
7735 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7736 (__lll_mutex_timedlock_wait): Correct expected value after
7738 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7739 Release lock before waking up the waiters.
7740 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7741 criteria. Reorderstruct passed to cleanup handler. Fix
7742 handling of cancellation and failung pthread_mutex_unlock call.
7743 Use __pthread_enable_asynccancel_2 instead of
7744 __pthread_enable_asynccancel.
7745 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7746 Return result of lock re-get if it fails.
7747 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7748 for __pthread_cleanup_push.
7749 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7750 completely broken rwlock implementation.
7751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7752 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7753 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7754 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7755 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7756 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7757 versioned_symbol macro.
7758 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7759 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7761 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7763 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7764 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7766 (struct timer): Remove th and bar field.
7767 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7768 debugging code. Create only one helper thread.
7769 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7771 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7772 Renamed. Define statically. Use thread info from siginfo.
7773 (__helper_once): New variable.
7774 (__helper_tid): New variable.
7775 (__reset_helper_control): New function.
7776 (__start_helper_thread): New function.
7778 * pthread_create.c (start_thread): Don't use setjmp inside
7779 __builtin_expect to work around gcc bug.
7781 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7782 timer_delete syscall fails, but not with ENOSYS, set
7785 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7786 (timer_settime): Fix typo.
7787 * sysdeps/unix/sysv/linux/timer_getoverr.c
7788 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7790 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7792 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7793 offset of cleanupbuf.__prev.
7795 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7797 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7800 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7802 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7803 NULL provide default definition to syscall.
7805 2003-03-25 Roland McGrath <roland@redhat.com>
7807 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7808 (timer_id2ptr): Fix typo.
7810 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7812 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7813 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7814 * sysdeps/ia64/pthreaddef.h: Likewise.
7815 * sysdeps/powerpc/pthreaddef.h: Likewise.
7816 * sysdeps/s390/pthreaddef.h: Likewise.
7817 * sysdeps/sh/pthreaddef.h: Likewise.
7818 * sysdeps/x86_64/pthreaddef.h: Likewise.
7819 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7820 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7822 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7823 SIGTIMER is not unblocked.
7824 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7826 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7828 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7829 pass pointer through as ID.
7830 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7831 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7832 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7833 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7834 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7835 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7836 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7837 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7838 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7839 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7840 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7841 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7842 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7843 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7844 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7845 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7846 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7847 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7848 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7849 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7850 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7851 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7852 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7853 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7854 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7855 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7856 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7857 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7858 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7859 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7860 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7861 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7862 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7864 * pthreadP.h: Remove FRAME_LEFT definition.
7865 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7866 already left frame. Programs which have this problem are not POSIX
7868 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7870 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7872 * sysdeps/pthread/tst-timer.c: Check return values of the
7875 2003-03-23 Roland McGrath <roland@redhat.com>
7877 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7878 * tst-tls3mod.c: Likewise.
7879 * tst-tls1.c: Likewise.
7880 * tst-tls2.c: Likewise.
7882 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7885 * tst-join5.c (tf1, tf2): Add a cast.
7887 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7889 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7890 Don't test anything.
7891 * tst-cond4.c: Likewise.
7892 * tst-cond6.c: Likewise.
7893 * tst-flock2.c: Likewise.
7894 * tst-mutex4.c: Likewise.
7895 * tst-rwlock4.c: Likewise.
7896 * tst-signal1.c: Likewise.
7897 * tst-spin2.c: Likewise.
7898 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7900 * tst-mutex4.c: Use test-skeleton.c.
7901 * tst-spin2.c: Likewise.
7902 * tst-sysconf.c: Likewise.
7903 * tst-barrier2.c: Likewise.
7904 * tst-cond4.c: Likewise.
7905 * tst-cond6.c: Likewise.
7906 * tst-rwlock4.c: Likewise.
7907 * tst-unload.c: Likewise.
7908 * tst-flock2.c (do_test): Use return instead of exit.
7910 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7912 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7914 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7916 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7917 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7918 instead of __lll_compare_and_swap.
7919 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7921 Removed definition if __lll_compare_and_swap.
7923 * cancellation.c: Adjust for new form of compare&exchange macros.
7924 * cleanup_defer.c: Likewise.
7926 * libc-cancellation.c: Likewise.
7927 * old_pthread_cond_broadcast.c: Likewise.
7928 * old_pthread_cond_signal.c: Likewise.
7929 * old_pthread_cond_timedwait.c: Likewise.
7930 * old_pthread_cond_wait.c: Likewise.
7931 * pthread_cancel.c: Likewise.
7932 * pthread_create.c: Likewise.
7933 * pthread_detach.c: Likewise.
7934 * pthread_join.c: Likewise.
7935 * pthread_key_delete.c: Likewise.
7936 * pthread_setcancelstate.c: Likewise.
7937 * pthread_setcanceltype.c: Likewise.
7938 * pthread_timedjoin.c: Likewise.
7939 * pthread_tryjoin.c: Likewise.
7940 * sysdeps/pthread/createthread.c: Likewise.
7942 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7944 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7945 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7946 definitions. Replace uses with calls to atomic_* functions.
7947 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7948 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7949 __lll_test_and_set calls with atomic_exchange_and_add and
7950 atomic_exchange calls respectively.
7951 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7952 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7953 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7954 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7955 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7956 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7957 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7959 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7960 returns the old value.
7962 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7964 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7965 int for variable OLDVAL and correct inline assembler contraint.
7966 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7967 type int for variable OLD.
7969 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7971 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7972 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7973 instead of multiple_threads field in the TCB.
7975 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7977 * sysdeps/i386/i686/bits/atomic.h: Removed.
7978 * sysdeps/i386/i586/bits/atomic.h: Removed.
7979 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7980 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7981 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7982 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7983 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7984 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7985 * atomic.h: Removed. Moved to glibc.
7987 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7988 support for clock selection.
7990 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7993 2003-03-18 Roland McGrath <roland@redhat.com>
7995 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7996 Add __lll_rel_instr first. Add memory clobber.
7997 (lll_mutex_unlock): Use __lll_test_and_set.
7998 From Paul Mackerras <paulus@samba.org>.
8000 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8002 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8003 (SINGLE_THREAD_P): Add `header.' prefix.
8004 From Paul Mackerras <paulus@samba.org>.
8006 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8007 pthread_timedjoin_np to ...
8008 (libpthread: GLIBC_2.3.3): ... here.
8009 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8011 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8012 Avoid shadowing VAL variable.
8014 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8017 2003-03-18 Ulrich Drepper <drepper@redhat.com>
8019 * Makefile (tests): Add tst-cond11.
8020 * tst-cond11.c: New file.
8022 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8023 struct passed to cleanup handler to eliminate one more
8025 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8027 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8028 (pthrad_cond_t): Replace __unused field with __clock.
8030 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8031 waken all waiters in cleanup handler.
8032 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8035 * pthread_condattr_getclock.c: New file.
8036 * pthread_condattr_setclock.c: New file.
8037 * sysdeps/pthread/pthread.h: Declare these new functions.
8038 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8039 * Makefile (libpthread-routines): Add the new functions.
8040 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8041 Renamed field to value. Document use of the bits.
8042 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8044 * pthread_condattr_setpshared.c: Likewise.
8045 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8046 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8047 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8049 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8050 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8051 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8052 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8053 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8054 Implement clock selection.
8055 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8056 * pthread-errnos.sym: Add ENOSYS.
8057 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8058 _POSIX_CLOCK_SELECTION.
8059 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8061 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8062 invalid .size directive.
8064 2003-03-17 Roland McGrath <roland@redhat.com>
8066 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8069 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8071 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8072 Use __lll_add instead of spelling it out. Use protected symbol names.
8073 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8075 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8076 Renamed from lll_compare_and_swap. Use new name where necessary.
8077 (__lll_add): Defined.
8078 (__lll_dec_if_positive): Defined.
8079 (__lll_test_and_set): Defined.
8080 * sysdeps/ia64/pthread_spin_init.c: Removed.
8081 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8082 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8083 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8084 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8085 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8086 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8087 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8088 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8089 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8090 __sync_lock_release_si.
8091 Patch by Jakub Jelinek.
8093 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8094 Fix timeout handling.
8095 (__lll_timedwait_tid): Likewise.
8096 (lll_unlock_wake_cb): Wake up other waiters if necessary.
8097 Patch by Jakub Jelinek.
8099 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8101 2003-03-17 Roland McGrath <roland@redhat.com>
8103 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8104 * sysdeps/pthread/pthread_spin_init.c: New file.
8105 * sysdeps/pthread/pthread_spin_unlock.c: New file.
8106 * sysdeps/powerpc/Makefile: New file.
8107 * sysdeps/powerpc/pthread_spin_lock.c: New file.
8108 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8109 * sysdeps/powerpc/pthreaddef.h: New file.
8110 * sysdeps/powerpc/tcb-offsets.sym: New file.
8111 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8112 * sysdeps/powerpc/tls.h: New file.
8113 * sysdeps/powerpc/bits/atomic.h: New file.
8114 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8115 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8116 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8118 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8119 * sysdeps/unix/sysv/linux/sem_post.c: New file.
8120 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8121 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8122 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8123 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8124 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8125 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8126 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8127 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8128 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8129 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8130 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8131 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8132 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8134 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8136 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8137 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8138 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8139 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8140 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8142 2003-03-17 Ulrich Drepper <drepper@redhat.com>
8144 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8145 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8147 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8148 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8150 2003-03-16 Roland McGrath <roland@redhat.com>
8152 * tst-fork4.c: Include <string.h>.
8153 * tst-signal2.c: Likewise.
8154 * tst-mutex5.c (do_test): exit -> return.
8155 * tst-mutex2.c: Include <stdlib.h>.
8157 2003-03-16 Ulrich Drepper <drepper@redhat.com>
8159 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8160 (__lll_mutex_timedlock_wait): Correct expected value after
8161 spurious wakeup. Otherwise we would never wait again.
8163 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8164 zone versus inline asm stupidity. Use correct instructions.
8166 * tst-rwlock6.c: Add some more status output.
8168 2003-03-15 Roland McGrath <roland@redhat.com>
8170 * sysdeps/pthread/configure.in: New file.
8171 * sysdeps/pthread/configure: New file (generated).
8173 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8175 * allocatestack.c (allocate_stack): Store the exact stack size of
8176 user allocated stacks.
8178 2003-03-15 Jakub Jelinek <jakub@redhat.com>
8180 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8181 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8182 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8183 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8184 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8185 Use `header.' prefix.
8186 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8188 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8190 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8191 __builtin_frame_address, use stack pointer.
8193 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8194 instead of __builtin_frame_pointer.
8196 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8198 * tst-basic1.c (do_test): Add cast to avoid warning.
8199 * tst-basic2.c (do_test): Likewise.
8201 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8202 amount of stack correction.
8204 * tst-fork4.c: Use test-skeleton.c.
8206 2003-03-14 Roland McGrath <roland@redhat.com>
8208 * init.c: Fix typo "#eli" for "#else".
8210 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8212 * allocatestack.c (__stack_user): Use hidden_data_def.
8213 * pthread_create.c (__pthread_keys): Likewise.
8215 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8217 2003-03-14 Roland McGrath <roland@redhat.com>
8219 * tst-fork4.c: New file.
8220 * Makefile (tests): Add it.
8222 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8223 we always define the padding space.
8224 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8225 stopped supporting its own extensions fully.
8226 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8227 struct also called `header', so `header.multiple_threads' is the field
8228 name to use on all machines.
8229 * allocatestack.c (allocate_stack): Use `header.' prefix.
8230 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8231 * pthread_create.c (__pthread_create_2_1): Likewise.
8232 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8233 (THREAD_SELF): Likewise.
8234 * sysdeps/x86_64/tls.h: Likewise.
8235 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8236 (SINGLE_THREAD_P): Likewise.
8237 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8238 (SINGLE_THREAD_P): Likewise.
8239 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8240 (SINGLE_THREAD_P): Likewise.
8242 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8245 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8247 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8248 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8250 * pthread_create.c (start_thread): setjmp is expected to return 0.
8252 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8253 (THREAD_GETMEM_NC): Likewise.
8255 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8257 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8258 and the size of the stack which must be allocated is a multiple,
8259 allocate one more page.
8260 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8261 MULTI_PAGE_ALIASING.
8263 2003-03-13 Roland McGrath <roland@redhat.com>
8265 * pthread_create.c (start_thread): Set EXITING_BIT after the
8266 event-reporting (and destructors), not before.
8268 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8270 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8271 lll_futex_wake): Declare register variables as long int instead of
8272 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8273 Make syscall arguments clobbered by the syscall.
8274 (lll_futex_wait): Define using lll_futex_timed_wait.
8276 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8279 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8282 * allocatestack.c (nptl_ncreated): Only declare if
8283 COLORING_INCREMENT != 0.
8285 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8286 (__libc_enable_asynccancel_2): Remove prototype.
8288 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8289 ctid to match kernel.
8291 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8293 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8294 libc_multiple_threads.
8295 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8296 __libc_multiple_threads to...
8297 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8299 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8301 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8302 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8304 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8305 (__pthread_once_internal): Define.
8307 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8308 macros instead of .symver directly.
8309 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8310 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8312 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8313 * sysdeps/x86_64/tcb-offsets.sym: New file.
8314 * sysdeps/x86_64/Makefile: New file.
8316 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8317 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8318 to access own pthread_t in TCB.
8319 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8321 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8323 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8325 2003-03-12 Roland McGrath <roland@redhat.com>
8327 * pthread-errnos.sym: New file.
8328 * Makefile (gen-as-const-headers): New variable, list that file.
8329 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8330 header <pthread-errnos.h> instead of defining errno values here.
8331 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8332 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8333 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8334 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8335 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8337 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8339 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8341 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8342 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8343 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8344 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8345 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8346 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8347 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8348 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8349 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8350 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8351 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8352 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8353 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8354 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8355 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8356 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8357 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8358 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8359 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8360 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8361 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8362 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8363 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8364 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8365 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8367 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8368 CLONE_CHILD_SETTID worked.
8370 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8372 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8374 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8377 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8378 (pthread_cond_t): Add padding.
8380 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8381 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8382 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8384 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8385 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8386 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8387 (__pthread_rwlock_timedrdlock): Likewise.
8388 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8389 (__pthread_rwlock_wrlock): Likewise.
8390 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8391 (__pthread_rwlock_rdlock): Likewise.
8393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8395 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8396 result of lock re-get if it fails.
8398 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8400 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8401 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8402 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8403 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8405 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8406 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8407 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8408 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8409 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8411 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8412 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8414 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8415 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8416 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8417 (create_thread): Likewise.
8418 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8419 * init.c (__pthread_initialize_minimal_internal): Initialize
8420 __libc_multiple_threads_ptr if necessary.
8421 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8422 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8423 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8424 __libc_multiple_threads.
8425 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8428 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8429 (THREAD_SETMEM_NC): Likewise.
8431 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8432 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8433 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8434 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8436 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8437 Eliminate one entire instruction.
8439 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8440 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8441 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8442 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8443 instead of __pthread_enable_asynccancel.
8444 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8445 (__pthread_cond_wait): Likewise.
8446 * sysdeps/pthread/pthread_cond_timedwait.c
8447 (__pthread_cond_timedwait): Likewise.
8448 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8450 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8451 (__condvar_cleanup): Wake up all waiters in case we got signaled
8452 after being woken up but before disabling asynchronous
8454 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8455 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8456 (__condvar_cleanup): Likewise.
8458 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8459 Make it an error if architecture has no #if case. Add x86-64.
8461 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8462 pt-initfini.s generation.
8464 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8465 (TLS_INIT_TP): Fix typo.
8467 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8469 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8470 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8472 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8473 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8474 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8475 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8476 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8477 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8478 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8479 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8481 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8483 * sysdeps/pthread/pthread_cond_timedwait.c
8484 (__pthread_cond_timedwait): Return the result of the final
8485 locking. If it succeeds, the regular function return value.
8487 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8488 Return result of the final locking.
8489 * version.c (__nptl_main): Work around problems with the strange
8490 INTERNAL_SYSCALL macro on ppc32.
8491 * init.c (__pthread_initialize_minimal_internal): Unblock
8492 SIGCANCEL in case the parent blocked it.
8493 Reported by Paul Mackerras <paulus@samba.org>.
8495 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8496 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8497 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8499 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8501 * sysdeps/pthread/pthread_cond_timedwait.c
8502 (__pthread_cond_timedwait): Unlock and fail if
8503 __pthread_mutex_unlock_internal failed.
8505 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8506 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8508 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8509 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8510 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8511 ALLOCATE_STACK): New macros.
8512 (TLS_TPADJ): New macro.
8513 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8514 (allocate_stack): Handle TLS_DTV_AT_TP and
8515 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8516 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8518 * init.c [__ia64__] (__NR_set_tid_address): Define.
8520 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8521 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8522 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8523 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8524 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8525 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8526 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8527 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8528 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8529 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8530 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8531 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8532 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8533 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8534 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8535 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8536 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8537 * sysdeps/ia64/bits/atomic.h: New file.
8538 * sysdeps/ia64/Makefile: New file.
8539 * sysdeps/ia64/pthread_spin_init.c: New file.
8540 * sysdeps/ia64/pthread_spin_lock.c: New file.
8541 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8542 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8543 * sysdeps/ia64/pthreaddef.h: New file.
8544 * sysdeps/ia64/tcb-offsets.sym: New file.
8545 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8546 * sysdeps/ia64/tls.h: New file.
8548 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8549 to syscall instead of no arguments.
8551 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8553 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8554 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8555 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8556 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8558 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8561 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8563 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8564 lowlevelbarrier.sym.
8565 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8566 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8567 Include lowlevelbarrier.h and don't define offsets locally.
8568 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8570 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8571 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8572 (__lll_mutex_timedlock_wait): Likewise.
8573 (lll_mutex_lock): Adjust asm for that.
8574 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8575 (lll_lock): Adjust asm for operand order change.
8576 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8577 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8579 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8580 Reverse order of parameters.
8581 (__lll_timedwait_tid): Remove regparms attribute.
8582 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8583 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8585 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8586 (__lll_timedwait_tid): Remove one unnecessary instruction.
8588 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8589 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8590 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8593 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8594 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8596 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8599 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8600 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8602 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8603 define LOCK here (if UP is not defined). The actual code is in
8606 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8607 LOCK is already defined. Don't define lll_unlock_wake_cb and
8608 __lll_timedwait_tid for libc.so.
8609 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8610 define LOCK here (if UP is not defined). The actual code is in
8613 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8614 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8615 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8616 instead of lowlevelsem.h.
8617 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8618 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8619 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8621 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8623 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8624 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8625 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8627 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8629 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8632 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8634 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8635 of __libc_locking_needed.
8636 (lll_trylock): Initialize %eax to zero.
8638 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8639 pthread_cond_t definition.
8641 2003-03-10 Roland McGrath <roland@redhat.com>
8643 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8644 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8645 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8646 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8647 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8649 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8650 Instead of setting PD->multiple_threads, set globals
8651 __pthread_multiple_threads and __libc_multiple_threads.
8652 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8653 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8654 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8656 * descr.h (struct pthread): Conditionalize first member on
8657 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8658 containing an anonymous tcbhead_t. Move `list' member out.
8659 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8660 * allocatestack.c: Remove use of `header.data.' prefix.
8661 * pthread_create.c: Likewise.
8662 * init.c (__pthread_initialize_minimal_internal): Likewise.
8663 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8664 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8665 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8666 * sysdeps/x86_64/tls.h: Likewise.
8667 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8668 (SINGLE_THREAD_P): Likewise.
8669 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8670 (SINGLE_THREAD_P): Likewise.
8671 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8672 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8674 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8676 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8678 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8679 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8681 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8682 leftovers from the ia32 code.
8684 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8686 (clear_once_control): Don't load %esi.
8688 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8691 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8693 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8694 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8696 * Makefile (tests): Add tst-cond10.
8697 * tst-cond10.c: New file.
8699 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8701 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8702 * tst-signal3.c (do_test): Likewise.
8703 * tst-sem5.c (do_test): Likewise.
8704 * tst-kill6.c (do_test): Likewise.
8705 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8707 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8709 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8710 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8711 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8712 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8715 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8717 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8720 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8721 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8722 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8723 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8724 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8725 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8726 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8728 * allocatestack.c (allocate_stack): If mprotect() fails free the
8731 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8733 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8735 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8736 lll_wake_tid. This was used only to work around kernel limits in
8738 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8739 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8740 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8741 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8743 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8744 (__pthread_initialize_minimal_internal): Change initialization of
8745 __static_tls_align_m1 appropriately.
8746 * pthreadP.h (__static_tls_align_m1): Renamed from
8748 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8749 instead of __static_tls_align-1.
8751 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8753 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8755 * pthread_create.c: Define __pthread_keys using nocommon
8756 attribute, not by placing it explicitly in bss.
8757 Remove DEFINE_DEALLOC definition. Not needed anymore.
8759 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8760 Use it in mmap call to allocate stacks.
8762 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8764 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8765 result of the thread function.
8767 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8769 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8770 version is just fine.
8772 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8773 (__pthread_child_handler): Renamed from pthread_child_handler,
8774 exported, and marked hidden. Change all users.
8775 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8776 free __pthread_child_handler from child list.
8778 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8780 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8782 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8783 Fix handling of cancellation and failing pthread_mutex_unlock call.
8784 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8785 (__pthread_cond_wait): Likewise.
8787 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8788 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8789 lll_futex_timed_wait call.
8790 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8791 (pthread_rwlock_timedwrlock): Likewise.
8793 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8794 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8795 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8797 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8798 check of lll_futex_wake return value.
8800 2003-03-03 Roland McGrath <roland@redhat.com>
8802 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8804 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8805 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8806 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8808 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8810 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8811 error for CPU clocks.
8813 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8814 _POSIX_MONOTONIC_CLOCK.
8815 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8817 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8820 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8822 * descr.h (struct pthread): Move cleanup field to the front.
8824 2003-03-01 Roland McGrath <roland@redhat.com>
8826 * sem_open.c (sem_open): Braino fix.
8828 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8830 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8831 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8832 __pthread_cleanup_pop functionality.
8833 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8835 * descr.h (struct pthread): Move tid field to the front now that
8838 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8839 (__lll_mutex_timedlock_wait): Remove.
8840 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8841 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8842 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8843 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8844 (lll_unlock_wake_cb): Don't save and restore %esi.
8845 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8847 (__lll_timedwait_tid): Add alignment.
8848 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8849 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8851 (__lll_timedwait_tid): Removed.
8852 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8853 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8854 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8855 (pthread_barrier_wait): Don't save, load, and restore %esi for
8857 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8858 (__pthread_cond_signal): Don't save, load, and restore %esi.
8859 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8860 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8861 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8862 Don't save, load, and restore %esi.
8864 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8867 Release lock before waking up the waiters.
8869 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8871 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8872 (reader_thread): Likewise.
8874 * sysdeps/pthread/pthread_rwlock_unlock.c
8875 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8876 to wake up readers if there are none.
8878 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8879 Release internal lock before wake threads.
8881 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8883 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8884 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8886 * tst-rwlock9.c: Likewise.
8887 * tst-rwlock10.c: New file.
8888 * tst-rwlock11.c: New file.
8890 * Makefile (tests): Add tst-dlsym1.
8891 * tst-dlsym1.c: New file.
8893 * init.c (__pthread_initialize_minimal_internal): Set
8894 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8895 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8897 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8899 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8901 * tst-cond2.c: Fix sychronization with child.
8903 * tst-rwlock8.c (reader_thread): Remove unused variable.
8905 * Makefile: Add rules to build and run tst-tls3.
8906 * tst-tls3.c: New file.
8907 * tst-tls3mod.c: New file.
8909 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8910 * tst-rwlock8.c: New file.
8911 * tst-rwlock9.c: New file.
8912 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8913 complete broken rwlock implementation.
8914 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8916 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8918 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8919 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8920 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8921 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8922 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8923 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8924 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8926 2003-02-23 Roland McGrath <roland@redhat.com>
8928 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8930 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8932 * Makefile (tests): Add tst-context1.
8933 * tst-context1.c: New file.
8935 * Makefile (tests): Add tst-tls1 and tst-tls2.
8936 * tst-tls1.c: New file.
8937 * tst-tls2.c: New file.
8939 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8942 * pthread_create.c (start_thread): Set EXITING_BIT early.
8944 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8945 (THREAD_GETMEM_NC): Likewise.
8947 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8949 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8950 off 3 more bytes by using offset-less instructions when possible.
8952 * Makefile: Add dependency for $(objpfx)version.d.
8954 * eintr.c (eintr_source): Add unnecessary return but the compiler
8957 * tst-kill3.c: Include <unistd.h>.
8959 2003-02-21 Roland McGrath <roland@redhat.com>
8961 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8963 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8965 * Makefile (tests): Add tst-eintr1.
8966 (distribute): Add eintr.c.
8967 * tst-eintr1.c: New file.
8968 * eintr.c: New file.
8970 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8972 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8973 Disallow sending SIGCANCEL.
8975 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8976 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8977 * tst-kill1.c: New file.
8978 * tst-kill2.c: New file.
8979 * tst-kill3.c: New file.
8980 * tst-kill5.c: New file.
8981 * tst-kill6.c: New file.
8982 * tst-basic7.c: Renamed to...
8983 * tst-kill4.c: ...this.
8985 2003-02-21 Roland McGrath <roland@redhat.com>
8987 * Makefile (install-lib-ldscripts): New variable.
8989 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8991 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8992 * pthread_cancel.c: Use INVALID_TD_P.
8993 * pthread_detach.c: Likewise.
8994 * pthread_getschedparam.c: Likewise.
8995 * pthread_setschedparam.c: Likewise.
8996 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8997 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8998 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8999 * pthread_timedjoin.c: Likewise.
9001 * tst-basic7.c: Include <signal.h>.
9003 * pthread_join.c (pthread_join): Limited checking for invalid
9005 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9007 2003-02-20 Ulrich Drepper <drepper@redhat.com>
9009 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9010 beginning of the loop. Clear the entire first block of TSD.
9011 * Makefile (tests): Add tst-key4.
9012 * tst-key4.c: New file.
9014 2003-02-18 Ulrich Drepper <drepper@redhat.com>
9016 * Makefile (tests): Add tst-basic7.
9017 * tst-basic7.c: New file.
9019 * pthread_create.c (deallocate_tsd): Mark as internal_function.
9020 Add some more __builtin_expect.
9022 * pthreadP.h: Define dummy version of DEBUGGING_P.
9024 2003-02-17 Ulrich Drepper <drepper@redhat.com>
9026 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9027 _POSIX_THREAD_PRIORITY_SCHEDULING.
9028 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9029 _XOPEN_REALTIME_THREADS.
9030 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9032 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9033 kernel returns EINVAL for PID <= 0, work around it.
9035 * Makefile (tests): Add tst-signal5.
9036 * tst-signal5.c: New file.
9038 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9041 * tst-cancel1.c (tf): Block all signals.
9043 * Makefile (tests): Add tst-basic6.
9044 * tst-basic6.c: New file.
9046 * tst-basic1.c: Add test for process ID.
9048 * Makefile (tests): Add tst-cancel10.
9049 * tst-cancel10.c: New file.
9051 * Makefile (tests): Add tst-signal4.
9052 * tst-signal4.c: New file.
9054 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9055 __sigismember instead of sigismember. Add __builtin_expect.
9057 2003-02-16 Ulrich Drepper <drepper@redhat.com>
9059 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9060 pthread_setcancelstate, and pthread_rwlock_setpshared.
9062 * tst-cancel7.c (do_test): Make sure the pid file exists before
9063 canceling the thread.
9065 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9066 pthread_rwlock_timedrdlock tests.
9067 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9068 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9069 Check for invalid tv_nsec field.
9070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9073 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9074 recursive mutex of overflow.
9076 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9078 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9079 going into an endless loop.
9080 * Makefile (tests): Add tst-cancel9.
9081 * tst-cancel9.c: New file.
9083 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9085 2003-02-15 Ulrich Drepper <drepper@redhat.com>
9087 * tst-mutex5.c (do_test): Add more timedlock tests.
9089 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9090 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9092 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9093 use INLINE_SYSCALL. Error number is returned, not -1.
9095 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9096 and __deallocate_stack with internal_function.
9097 * pthread_create.c: Adjust definitions appropriately.
9098 * allocatestack.c: Likewise.
9100 * pthread_join.c: Add one more __builtin_expect.
9101 * pthread_timedjoin.c: Likewise.
9103 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9104 not data of sequence number does not match.
9105 Add one __builtin_expect.
9107 * Makefile (tests): Add tst-clock1.
9108 * tst-clock1.c: New file.
9110 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9112 * Makefile (tests): Add tst-basic5.
9113 * tst-basic5.c: New file.
9115 2003-02-14 Ulrich Drepper <drepper@redhat.com>
9117 * Makefile (tests): Add tst-basic4.
9118 * tst-basic4.c: New file.
9120 * pthreadP.h: Add declaraction for __nptl_nthreads.
9121 * pthread_create.c: Define __nptl_nthreads
9122 (start_thread): Increment __nptl_nthreads at beginning. Decrement
9123 after thread is done. If then zero, call exit(0).
9124 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9125 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
9126 * init.c (pthread_functions): Initialize ptr_nthreads.
9127 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9128 (__reclaim_stacks): Decrement __nptl_nthreads.
9129 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9131 * Makefile (tests): Add tst-basic3.
9132 * tst-basic3.c: New file.
9134 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
9135 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
9136 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9137 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
9138 if asynchronous canceling is enabled.
9139 * pthread_join.c (pthread_join): When recognizing circular joins,
9140 take into account the other thread might be already canceled.
9141 * Makefile (tests): Add tst-join5.
9142 * tst-join5.c: New file.
9144 * Makefile (tests): Add tst-join4.
9145 * tst-join4.c: New file.
9147 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9149 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9151 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
9153 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9154 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9155 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9157 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9159 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9160 error if lll_futex_wake failed.
9162 2003-02-13 Ulrich Drepper <drepper@redhat.com>
9164 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9165 handling of cancellation and failung pthread_mutex_unlock call.
9166 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9167 * Makefile (tests): Add tst-cond8 and tst-cond9.
9168 * tst-cond8.c: New file.
9169 * tst-cond9.c: New file.
9171 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9173 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
9174 non-standard initializers with __USE_GNU.
9176 * Makefile (tests): Add tst-cleanup3.
9177 * tst-cleanup3.c: New file.
9179 2003-02-12 Ulrich Drepper <drepper@redhat.com>
9181 * Makefile (tests): Add tst-attr1 and tst-attr2.
9182 * tst-attr1.c: New file.
9183 * tst-attr2.c: New file.
9185 * Makefile: Add rules to build and run tst-atfork2 test.
9186 * tst-atfork2.c: New file.
9187 * tst-atfork2mod.c: New file.
9189 * sysdeps/unix/sysv/linux/unregister-atfork.c
9190 (__unregister_atfork): Free the memory allocated for the handlers
9191 after removing them from the lists.
9193 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9196 * tst-atfork1.c (do_test): Wait for the child we forked.
9197 Report error in child.
9199 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9201 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9203 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9205 * Makefile (tests): Add tst-cancel8.
9206 * tst-cancel8.c: New file.
9208 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9209 clearing of control variable.
9210 * Makefile (tests): Add tst-once3 and tst-once4.
9211 * tst-once3.c: New file.
9212 * tst-once4.c: New file.
9214 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9216 * sysdeps/sh/Makefile: New file.
9217 * sysdeps/sh/bits/atomic.h: New file.
9218 * sysdeps/sh/pthread_spin_init.c: New file.
9219 * sysdeps/sh/pthread_spin_lock.c: New file.
9220 * sysdeps/sh/pthread_spin_trylock.S: New file.
9221 * sysdeps/sh/pthread_spin_unlock.S: New file.
9222 * sysdeps/sh/pthreaddef.h: New file.
9223 * sysdeps/sh/tcb-offsets.sym: New file.
9224 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9225 * sysdeps/sh/tls.h: New file.
9226 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9227 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9228 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9229 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9230 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9231 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9232 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9233 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9234 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9235 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9236 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9237 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9238 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9239 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9240 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9241 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9242 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9243 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9244 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9245 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9246 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9247 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9248 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9249 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9250 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9251 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9252 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9253 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9254 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9255 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9257 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9259 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9262 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9264 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9266 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9267 (TLS_GET_FS): New #define.
9268 (TLS_SET_FS): New #define.
9269 Correct value of __NR_set_thread_area.
9271 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9273 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9275 * Makefile (tests): Add tst-popen1.
9276 * tst-popen1.c: New file.
9278 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9279 but inactive generalization.
9280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9281 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9282 Minor optimization, remove one instruction.
9283 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9285 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9287 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9289 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9291 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9292 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9293 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9294 * sysdeps/pthread/pthread_cond_signal.c: New file.
9295 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9296 * sysdeps/pthread/pthread_cond_wait.c: New file.
9297 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9298 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9299 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9300 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9301 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9302 * sysdeps/s390/Makefile: New file.
9303 * sysdeps/s390/bits/atomic.h: New file.
9304 * sysdeps/s390/pthread_spin_init.c: New file.
9305 * sysdeps/s390/pthread_spin_lock.c: New file.
9306 * sysdeps/s390/pthread_spin_trylock.c: New file.
9307 * sysdeps/s390/pthread_spin_unlock.c: New file.
9308 * sysdeps/s390/pthreaddef.h: New file.
9309 * sysdeps/s390/tcb-offsets.sym: New file.
9310 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9311 * sysdeps/s390/tls.h: New file.
9312 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9313 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9314 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9315 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9316 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9317 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9318 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9319 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9320 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9321 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9322 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9323 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9324 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9325 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9326 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9327 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9328 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9329 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9330 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9331 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9332 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9333 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9334 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9336 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9338 * atomic.h: Add a couple more default implementations.
9339 (atomic_compare_and_exchange_acq): Use
9340 __arch_compare_and_exchange_32_acq in return value definition. It
9342 (atomic_bit_set): Renamed from atomic_set_bit.
9343 Add missing atomic_ prefixes.
9345 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9346 thread library is available, use correct value to mark initialized
9349 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9351 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9352 __sysconf to determine pagesize.
9354 * pthread_create.c: Include <atomic.h>.
9355 * allocatestack.c (allocate_stack): Implement coloring of the
9356 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9357 size minus one. Adjust users.
9358 * sysdeps/i386/i686/Makefile: New file.
9360 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9362 * allocatestack.c: Improve comment throughout the file.
9364 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9365 (__lll_lock_wait): Add branch prediction.
9366 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9367 (__lll_lock_wait): Likewise.
9368 (lll_unlock_wake_cb): Removed.
9370 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9372 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9373 _POSIX_THREAD_PRIORITY_SCHEDULING.
9375 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9377 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9378 Fix return type of ptr___pthread_getspecific.
9380 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9382 * Makefile (tests): Add tst-umask1.
9383 (tst-umask1-ARGS): Define.
9384 * tst-umask1.c: New file.
9386 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9388 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9389 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9390 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9391 pthread_rwlock_unlock.
9392 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9393 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9394 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9395 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9396 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9398 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9399 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9401 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9402 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9403 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9405 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9406 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9408 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9409 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9410 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9412 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9413 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9415 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9417 * Makefile (libpthread-routines): Remove lowlevelcond and
9418 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9419 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9420 and pthread_cond_broadcast.
9421 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9422 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9423 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9424 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9425 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9426 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9427 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9428 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9429 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9430 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9431 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9432 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9433 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9434 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9435 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9436 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9437 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9438 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9439 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9440 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9441 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9442 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9443 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9444 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9445 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9446 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9447 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9448 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9449 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9450 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9451 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9453 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9454 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9455 of the code is moved to ...
9456 * sysdeps/pthread/createthread.c: ...here. New file.
9458 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9460 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9461 (__new_sem_post): Clear %eax before returning.
9462 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9464 * Makefile (tests): Add tst-cleanup2.
9465 * tst-cleanup2.c: New file.
9467 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9468 Interpret first parameter correctly.
9470 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9472 * Makefile (headers): Add bits/semaphore.h.
9474 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9476 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9479 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9481 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9482 must be used and mapping failed.
9483 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9485 * Makefile (CFLAGS-pthread_self.os): Define this, not
9486 CFLAGS-pthread_self.c.
9488 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9490 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9493 * Makefile (libpthread-routines): Add version. Add rules to build
9494 version.os and banner.h.
9495 * version.c: New file.
9497 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9499 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9500 the alias unconditional.
9501 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9503 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9505 * Makefile (CFLAGS-pthread_self.c): New definition.
9507 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9509 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9510 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9511 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9512 * init.c (__pthread_initialize_minimal_internal): Likewise.
9514 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9516 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9518 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9519 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9520 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9521 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9522 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9523 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9525 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9527 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9528 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9529 * tst-cancel-wrappers.sh: Remove all exceptions.
9531 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9533 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9534 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9536 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9537 Use __libc_pthread_functions array if SHARED.
9539 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9540 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9542 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9543 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9544 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9545 __libc_ptf_call instead of __libc_maybe_call.
9547 (__libc_cleanup_region_start): Wrap function name with PTF call.
9548 (__libc_cleanup_region_end): Likewise.
9549 (__libc_cleanup_end): Likewise.
9551 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9552 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9553 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9554 * pthreadP.h: Add prototypes.
9556 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9557 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9558 __pthread_rwlock_unlock aliases.
9559 * pthreadP.h: Add prototypes for new aliases.
9561 * pthreadP.h (struct pthead_functions): Moved to...
9562 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9563 * init.c (pthread_functions): Add initializers for new elements.
9565 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9566 __pthread_cleanup_pop_restore aliases.
9567 * pthreadP.h: Add prototypes.
9569 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9570 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9571 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9572 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9573 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9574 * pthreadP.h: Adjust prototypes and callers.
9576 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9578 * Makefile (tests): Add tst-cancel7.
9579 (tst-cancel7-ARGS): New variable.
9580 * tst-cancel7.c: New file.
9582 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9583 around gcc defficiencies.
9584 * old_pthread_cond_signal.c: Likewise.
9585 * old_pthread_cond_timedwait.c: Likewise.
9586 * old_pthread_cond_wait.c: Likewise.
9588 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9590 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9592 * Makefile (tests): Add tst-cond7.
9593 * tst-cond7.c: New file.
9595 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9596 (condvar_cleanup): Get condvar address from the right place.
9598 * atomic.h: Correct definitions of atomic_full_barrier,
9599 atomic_read_barrier, atomic_write_barrier.
9601 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9603 * old_pthread_cond_signal.c: Likewise.
9604 * old_pthread_cond_timedwait.c: Likewise.
9605 * old_pthread_cond_wait.c: Likewise.
9607 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9609 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9611 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9613 * pthreadP.h (pthread_cond_2_0_t): New type.
9614 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9615 Use new type for the 2.0 condvar function prototypes.
9616 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9617 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9619 * old_pthread_cond_destroy.c: Likewise.
9620 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9621 * old_pthread_cond_signal.c: Likewise.
9622 * old_pthread_cond_timedwait.c: Likewise.
9623 * old_pthread_cond_wait.c: Likewise.
9625 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9626 (__pthread_cond_wait): Don't save cancellation mode and seq value
9629 * herrno.c (__h_errno_location): Don't define as weak.
9631 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9633 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9634 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9635 and pthread_cond_wait.
9636 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9638 (__pthread_cond_broadcast_2_0): ... this.
9639 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9641 (__pthread_cond_destroy_2_0): ... this.
9642 * old_pthread_cond_init.c (__old_pthread_cond_init):
9644 (__pthread_cond_init_2_0): ... this.
9645 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9647 (__pthread_cond_signal_2_0): ... this.
9648 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9650 (__pthread_cond_wait_2_0): ... this.
9651 * pthread_cond_destroy.c: Include shlib-compat.h.
9652 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9653 * pthread_cond_init.c: Include shlib-compat.h.
9654 (pthread_cond_init): Change strong_alias into versioned_symbol.
9655 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9656 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9658 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9659 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9660 __pthread_cond_wait_2_0): New prototypes.
9661 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9662 __old_pthread_cond_init, __old_pthread_cond_signal,
9663 __old_pthread_cond_wait): Removed.
9664 * init.c: Include shlib-compat.h.
9665 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9666 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9667 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9668 ptr___pthread_cond_*_2_0 fields.
9669 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9670 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9672 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9673 LIBC_SIGACTION was not yet defined.
9674 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9675 [!defined LIBC_SIGACTION] (__sigaction): New function and
9677 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9678 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9680 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9682 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9684 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9686 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9687 New, larger type definition.
9688 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9690 * Versions [libpthread]: Add definitions for new pthread_cond_*
9691 interfaces for version GLIBC_2.3.2.
9692 * pthread_cond_init.c: Update initialization for new type definition.
9693 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9694 pthread_cond_timedwait, pthread_cond_signal, and
9695 pthread_cond_broadcast. Add old_pthread_cond_init,
9696 old_pthread_cond_destroy, old_pthread_cond_wait,
9697 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9698 old_pthread_cond_broadcast.
9699 * old_pthread_cond_broadcast.c: New file.
9700 * old_pthread_cond_destroy.c: New file.
9701 * old_pthread_cond_init.c: New file.
9702 * old_pthread_cond_signal.c: New file.
9703 * old_pthread_cond_timedwait.c: New file.
9704 * old_pthread_cond_wait.c: New file.
9705 * pthreadP.h: Add prototypes for the compatibility interfaces.
9707 * pthread_cond_destroy.c: Don't include <errno.h>.
9709 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9711 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9712 unnecessary zero offset when addressing MUTEX.
9714 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9716 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9718 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9719 for __register_atfork.
9721 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9723 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9724 instead of ASSEMBLER test macro.
9726 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9727 __libc_current_sigrtmax): Add libc_hidden_def.
9729 * sysdeps/pthread/list.h: Remove assert.h include.
9731 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9733 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9734 __pthread_initialize_minimal_internal not
9735 __pthread_initialize_minimal.
9737 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9739 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9740 __pthread_initialize_minimal as hidden.
9742 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9745 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9747 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9748 $(common-objpfx)format.lds, include that into the output script.
9750 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9752 2002-12-28 Andreas Jaeger <aj@suse.de>
9754 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9755 nsec resolution changes.
9756 (xstat64_conv): Likewise.
9757 (xstat32_conv): Likewise.
9758 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9760 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9761 structs stat and stat64.
9762 * time/time.h (__timespec_defined): Define for __USE_MISC.
9763 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9765 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9767 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9769 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9770 (pthread_exit): Use strong_alias to avoid warnings.
9771 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9772 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9773 ptr___pthread_attr_init_2_*.
9774 * init.c (pthread_functions): Adjust.
9776 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9778 * forward.c: Make all functions available by default again. It
9779 caused too much trouble.
9781 * pt-siglongjmp.c: Removed.
9783 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9785 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9786 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9787 * sysdeps/i386/Makefile: New file.
9788 * sysdeps/i386/tcb-offsets.sym: New file.
9789 * sysdeps/pthread/tcb-offsets.h: New file.
9790 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9791 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9793 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9794 __register_atfork...
9795 (GLIBC_2.3.2): ...here.
9797 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9799 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9800 pthread_attr_setstackaddr with __attribute_deprecated__.
9802 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9804 * pt-system.c (system): Remove cancellation handling.
9805 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9806 cancellation routines.
9808 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9810 * descr.h: Include <dl-sysdep.h>.
9811 (struct pthread): Move header.data.list to the back of the struct.
9812 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9813 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9814 (SYSINFO_OFFSEET): Likewise.
9816 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9818 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9820 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9821 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9822 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9823 (USE_DL_SYSINFO): Undef.
9825 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9827 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9828 $(common-objpfx)libc.so.
9829 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9830 it is bigger than pipe buffer size even on arches with bigger
9832 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9834 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9836 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9837 correct errno access for case that USE___THREAD is not defined.
9839 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9841 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9842 Patch by Marijn Ros <marijn@mad.scientist.com>.
9844 2002-12-22 Roland McGrath <roland@redhat.com>
9846 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9848 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9850 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9852 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9854 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9855 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9856 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9858 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9860 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9861 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9862 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9863 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9864 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9865 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9866 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9867 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9869 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9871 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9873 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9875 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9877 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9878 that sysinfo is properly initialized.
9879 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9880 to 1 only for ld.so.
9882 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9883 RTLD_CORRECT_DYNAMIC_WEAK.
9885 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9887 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9888 Use return 0 as 6th argument to FORWARD4.
9889 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9891 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9893 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9894 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9895 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9896 (INIT_SYSINFO): New #define.
9897 (TLS_TP_INIT): Use INIT_SYSINFO.
9898 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9899 At test to make sure SYSINFO_OFFSET value is correct.
9900 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9902 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9904 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9905 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9906 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9907 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9908 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9909 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9910 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9912 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9914 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9915 macro instead of using int $0x80 directly.
9917 * sysdeps/pthread/bits/stdio-lock.h: New file.
9918 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9919 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9920 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9921 * Makefile (routines): Add libc-lowlevelmutex.
9923 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9924 __i686.get_pc_thunk.dx.
9926 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9928 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9929 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9930 ($(objpfx)tst-cancel-wrappers.out): New rule.
9931 * tst-cancel-wrappers.sh: New test.
9932 * tst-locale1.c: Include signal.h.
9933 (uselocale): Test static linking of __libc_current_sigrt*.
9935 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9937 * Makefile (tests): Add tst-cancel6.
9938 * tst-cancel6.c: New file
9940 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9942 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9943 Define meaningfully for assembler as well.
9944 * pthreadP.h (struct pthread_functions): Remove
9945 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9946 and ptr_pthread_attr_init_2_1 fields.
9947 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9948 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9949 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9950 (FORWARD3): Define using FORWARD4.
9951 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9953 * pt-system.c: Remove duplicate stdlib.h include.
9955 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9957 * sem_init.c: Define sem_init@GLIBC_2.0.
9958 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9959 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9961 * flockfile.c: Moved to...
9962 * sysdeps/pthread/flockfile.c: ...here. New file.
9963 * funlockfile.c: Moved to...
9964 * sysdeps/pthread/funlockfile.c: ...here. New file.
9965 * ftrylockfile.c: Moved to...
9966 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9968 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9970 * libc-cancellation.c: Guard both function with
9971 #if !defined NOT_IN_libc.
9972 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9973 automatically provided pthread wrappers.
9974 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9975 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9977 * pt-open.c: Removed.
9978 * pt-fcntl.c: Removed.
9979 * pt-fsync.c: Removed.
9980 * pt-lseek.c: Removed.
9981 * pt-msgrcv.c: Removed.
9982 * pt-msgsnd.c: Removed.
9983 * pt-msync.c: Removed.
9984 * pt-nanosleep.c: Removed.
9985 * pt-open64.c: Removed.
9986 * pt-pause.c: Removed.
9987 * pt-pread.c: Removed.
9988 * pt-pread64.c: Removed.
9989 * pt-pwrite.c: Removed.
9990 * pt-pwrite64.c: Removed.
9991 * pt-read.c: Removed.
9992 * pt-recv.c: Removed.
9993 * pt-recvfrom.c: Removed.
9994 * pt-recvmsg.c: Removed.
9995 * pt-send.c: Removed.
9996 * pt-sendto.c: Removed.
9997 * pt-sigtimedwait.c: Removed.
9998 * pt-sigwait.c: Removed.
9999 * pt-wait.c: Removed.
10000 * pt-waitpid.c: Removed.
10001 * pt-write.c: Removed.
10002 * pt-accept.c: Removed.
10003 * pt-close.c: Removed.
10004 * pt-connect.c: Removed.
10005 * pt-lseek64.c: Removed.
10006 * pt-sendmsg.c: Removed.
10007 * pt-tcdrain.c: Removed.
10009 2002-12-15 Ulrich Drepper <drepper@redhat.com>
10011 * init.c (__pthread_initialize_minimal_internal): Renamed from
10012 __pthread_initialize_minimal. Make old name an alias. This
10013 converts a normal relocation into a relative relocation.
10015 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10017 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10018 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10019 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10020 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10021 pt-sigwaitinfo, pt-waitid, and pt-writev.
10022 * pt-creat.c: Removed.
10023 * pt-poll.c: Removed.
10024 * pt-pselect.c: Removed.
10025 * pt-readv.c: Removed.
10026 * pt-select.c: Removed.
10027 * pt-sigpause.c: Removed.
10028 * pt-sigsuspend.c: Removed.
10029 * pt-sigwaitinfo.c: Removed.
10030 * pt-waitid.c: Removed.
10031 * pt-writev.c: Removed.
10033 * init.c (pthread_functions): New variable.
10034 (__pthread_initialize_minimal): Pass pointer to pthread_functions
10035 (or NULL) to __libc_pthread_init.
10036 * forward.c: Rewrite to use __libc:pthread_functions array to get
10037 function addresses.
10038 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10040 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10041 Take new parameter. Copy content of variable pointed to by it
10042 to __libc_pthread_init.
10044 * pthreadP.h (struct pthread_functions): New type.
10045 (__libc_pthread_init): Declare.
10047 * pthread_attr_destroy.c: Add namespace protected alias.
10048 * pthread_attr_getdetachstate.c: Likewise.
10049 * pthread_attr_getinheritsched.c: Likewise.
10050 * pthread_attr_getschedparam.c: Likewise.
10051 * pthread_attr_getschedpolicy.c: Likewise.
10052 * pthread_attr_getscope.c: Likewise.
10053 * pthread_attr_setdetachstate.c: Likewise.
10054 * pthread_attr_setinheritsched.c: Likewise.
10055 * pthread_attr_setschedparam.c: Likewise.
10056 * pthread_attr_setschedpolicy.c: Likewise.
10057 * pthread_attr_setscope.c: Likewise.
10058 * pthread_cond_broadcast.c: Likewise.
10059 * pthread_cond_destroy.c: Likewise.
10060 * pthread_cond_init.c: Likewise.
10061 * pthread_cond_signal.c: Likewise.
10062 * pthread_cond_wait.c: Likewise.
10063 * pthread_condattr_destroy.c: Likewise.
10064 * pthread_condattr_init.c: Likewise.
10065 * pthread_equal.c: Likewise.
10066 * pthread_exit.c: Likewise.
10067 * pthread_getschedparam.c: Likewise.
10068 * pthread_self.c: Likewise.
10069 * pthread_setcancelstate.c: Likewise.
10070 * pthread_setschedparam.c: Likewise.
10071 * pthread_mutex_destroy.c: Likewise.
10072 * pthread_mutex_init.c: Likewise.
10073 * pthreadP.h: Add prototypes for the aliases.
10075 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10076 multiple_threads member in correct TCB to 1.
10078 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10079 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
10080 member of thread decriptor, otherwise return unconditionally 1.
10082 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10084 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10085 regular Linux version. Remove file.
10086 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
10087 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
10088 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
10089 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
10090 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
10091 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
10092 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
10093 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
10094 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
10095 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
10096 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
10097 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
10098 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
10099 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
10100 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
10101 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
10102 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
10103 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
10104 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
10105 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
10106 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
10107 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
10108 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
10109 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
10110 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
10111 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
10112 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
10113 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
10114 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
10115 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
10117 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10119 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10120 * sysdeps/unix/sysv/linux/open.c: Removed.
10121 * sysdeps/unix/sysv/linux/fsync.c: Removed.
10122 * sysdeps/unix/sysv/linux/lseek.c: Removed.
10123 * sysdeps/unix/sysv/linux/msync.c: Removed.
10124 * sysdeps/unix/sysv/linux/read.c: Removed.
10125 * sysdeps/unix/sysv/linux/close.c: Removed.
10126 * sysdeps/unix/sysv/linux/creat.c: Removed.
10127 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10128 * sysdeps/unix/sysv/linux/pause.c: Removed.
10129 * sysdeps/unix/sysv/linux/select.c: Removed.
10130 * sysdeps/unix/sysv/linux/write.c: Removed.
10132 2002-12-14 Ulrich Drepper <drepper@redhat.com>
10134 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10135 element in TCB to see whether locking is needed.
10137 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10138 MULTIPLE_THREADS_OFFSET value is correct.
10140 * sysdeps/unix/sysv/linux/close.c: New file.
10141 * sysdeps/unix/sysv/linux/connect.S: New file.
10142 * sysdeps/unix/sysv/linux/creat.c: New file.
10143 * sysdeps/unix/sysv/linux/fsync.c: New file.
10144 * sysdeps/unix/sysv/linux/llseek.c: New file.
10145 * sysdeps/unix/sysv/linux/lseek.c: New file.
10146 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10147 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10148 * sysdeps/unix/sysv/linux/msync.c: New file.
10149 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10150 * sysdeps/unix/sysv/linux/open.c: New file.
10151 * sysdeps/unix/sysv/linux/open64.c: New file.
10152 * sysdeps/unix/sysv/linux/pause.c: New file.
10153 * sysdeps/unix/sysv/linux/poll.c: New file.
10154 * sysdeps/unix/sysv/linux/pread.c: New file.
10155 * sysdeps/unix/sysv/linux/pread64.c: New file.
10156 * sysdeps/unix/sysv/linux/pselect.c: New file.
10157 * sysdeps/unix/sysv/linux/pwrite.c: New file.
10158 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10159 * sysdeps/unix/sysv/linux/readv.c: New file.
10160 * sysdeps/unix/sysv/linux/recv.S: New file.
10161 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10162 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10163 * sysdeps/unix/sysv/linux/select.c: New file.
10164 * sysdeps/unix/sysv/linux/send.S: New file.
10165 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10166 * sysdeps/unix/sysv/linux/sendto.S: New file.
10167 * sysdeps/unix/sysv/linux/sigpause.c: New file.
10168 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10169 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10170 * sysdeps/unix/sysv/linux/sigwait.c: New file.
10171 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10172 * sysdeps/unix/sysv/linux/system.c: New file.
10173 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10174 * sysdeps/unix/sysv/linux/wait.c: New file.
10175 * sysdeps/unix/sysv/linux/waitid.c: New file.
10176 * sysdeps/unix/sysv/linux/waitpid.c: New file.
10177 * sysdeps/unix/sysv/linux/writev.c: New file.
10178 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10180 * pt-readv.c: Fix comment.
10182 2002-12-14 Jakub Jelinek <jakub@redhat.com>
10184 * tst-cleanup1.c: Include stdlib.h.
10186 * tst-cancel5.c: New test.
10187 * Makefile (tests): Add tst-cancel5.
10188 (tst-cancel5): Link against libc.so libpthread.so in that order.
10190 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10192 * forward.c (test_loaded): Prevent recursive calls.
10194 * Makefile (routines): Add libc-cancellation.
10195 * libc-cancellation.c: New file.
10196 * descr.h (struct pthread): Add multiple_threads field.
10197 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10198 new thread descriptor to 1.
10199 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10200 Initialize multiple_thread field after successful thread creation.
10201 * cancellation.c (__do_cancel): Move to pthreadP.h.
10202 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10203 (__pthread_disable_asynccancel): Add internal_function attribute.
10204 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10205 * pthread_setcancelstate.c: Likewise.
10206 * pthread_setcanceltype.c: Likewise.
10207 * pthread_exit.c: Likewise.
10208 * pthreadP.h (CANCELLATION_P): Likewise.
10209 (__do_cancel): Define as static inline.
10210 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10211 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10213 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10214 fields. Define MULTIPLE_THREADS_OFFSET.
10215 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10217 * sysdeps/unix/sysv/linux/accept.S: New file.
10218 * sysdeps/unix/sysv/linux/read.c: New file.
10219 * sysdeps/unix/sysv/linux/write.c: New file.
10220 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10221 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10222 initialization of __libc_locking_needed.
10223 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10224 __libc_locking_needed, use multiple_threads field in TCB.
10225 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10227 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10229 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10231 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10233 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10234 access to __libc_locking_needed for PIC.
10236 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10238 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10239 declare for libc.so.
10240 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10242 (__libc_lock_lock): Put into statement expression.
10243 (__libc_lock_unlock): Remove trailing semicolon.
10244 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10246 2002-12-12 Roland McGrath <roland@redhat.com>
10248 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10249 "m" constraint to refer to __libc_locking_needed. Declare it here.
10251 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10253 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10254 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10255 Initialize __libc_locking_needed.
10256 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10257 instead of __register_pthread_fork_handler.
10258 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10259 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10260 fork-gen with libc_pthread_init.
10261 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10262 of __register_pthread_fork_handler.
10263 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10264 of __register_pthread_fork_handler.
10265 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10266 __libc_locking_needed to determine whether lock prefix can be avoided.
10267 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10269 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10271 * Makefile (tests): Add tst-cleanup1.
10272 * tst-cleanup1.c: New file.
10273 * cancellation.c (__cleanup_thread): Removed.
10274 (__do_cancel): Remove call to __cleanup_thread.
10275 * pthreadP.h: Remove __cleanup_thread prorotype.
10277 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10278 Remember function and argument even if cancellation handler
10279 function is not available.
10280 (__libc_cleanup_region_end): Execute registered function directly if
10281 pthread functions are not available.
10282 (__libc_cleanup_end): Likewise.
10284 * init.c (__pthread_initialize_minimal): Fix initialization in
10285 static lib by preventing gcc from being too clever.
10287 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10289 * init.c (__pthread_initialize_minimal): Remove unneccesary
10292 * Makefile (tests): We can run tst-locale2 now.
10294 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10296 * Versions: Remove duplicated sigwait entry.
10298 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10300 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10303 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10305 * pthreadP.h: Declare __pthread_enable_asynccancel and
10306 __pthread_disable_asynccancel.
10307 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10308 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10309 * cancellation.c (__pthread_enable_asynccancel): New function.
10310 (__pthread_disable_asynccancel): New function.
10311 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10312 * pt-close.c: Likewise.
10313 * pt-connect.c: Likewise.
10314 * pt-creat.c: Likewise.
10315 * pt-fcntl.c: Likewise.
10316 * pt-fsync.c: Likewise.
10317 * pt-lseek.c: Likewise.
10318 * pt-lseek64.c: Likewise.
10319 * pt-msgrcv.c: Likewise.
10320 * pt-msgsnd.c: Likewise.
10321 * pt-msync.c: Likewise.
10322 * pt-nanosleep.c: Likewise.
10323 * pt-open.c: Likewise.
10324 * pt-open64.c: Likewise.
10325 * pt-pause.c: Likewise.
10326 * pt-poll.c: Likewise.
10327 * pt-pread.c: Likewise.
10328 * pt-pread64.c: Likewise.
10329 * pt-pselect.c: Likewise.
10330 * pt-pwrite.c: Likewise.
10331 * pt-pwrite64.c: Likewise.
10332 * pt-read.c: Likewise.
10333 * pt-readv.c: Likewise.
10334 * pt-recv.c: Likewise.
10335 * pt-recvfrom.c: Likewise.
10336 * pt-recvmsg.c: Likewise.
10337 * pt-select.c: Likewise.
10338 * pt-send.c: Likewise.
10339 * pt-sendmsg.c: Likewise.
10340 * pt-sendto.c: Likewise.
10341 * pt-sigpause.c: Likewise.
10342 * pt-sigsuspend.c: Likewise.
10343 * pt-sigtimedwait.c: Likewise.
10344 * pt-sigwait.c: Likewise.
10345 * pt-sigwaitinfo.c: Likewise.
10346 * pt-system.c: Likewise.
10347 * pt-tcdrain.c: Likewise.
10348 * pt-wait.c: Likewise.
10349 * pt-waitid.c: Likewise.
10350 * pt-waitpid.c: Likewise.
10351 * pt-write.c: Likewise.
10352 * pt-writev.c: Likewise.
10353 * pthread_join.c: Likewise.
10354 * pthread_timedjoin.c: Likewise.
10356 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10357 (__xpg_sigpause): New function.
10358 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10360 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10362 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10364 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10365 _GI_pthread_cleanup_pop to pthreadP.h.
10367 * ftrylockfile.c: Use _IO_lock_trylock instead of
10368 pthread_mutex_trylock.
10370 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10371 (CANCEL_RESET): Likewise.
10372 (__pthread_setcanceltype_): Declare.
10373 (__pthread_mutex_lock_internal): Declare.
10374 (__pthread_mutex_unlock_internal): Declare.
10375 (__pthread_once_internal): Declare.
10376 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10377 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10379 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10380 and pthread_mutex_unlock.
10381 * pthread_cond_wait.c: Likewise.
10382 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10383 * pthread_mutex_unlock.c: Likewise.
10385 * pthread_setcanceltype.c: Add additional alias
10386 __pthread_setcanceltype.
10388 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10389 * sem_open.c (sem_open): Likewise.
10390 Use __libc_open, __libc_write, and __libc_close instead of
10391 open, write, and close respectively.
10393 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10394 Rewrite as statement expression since it must return a value.
10396 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10397 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10400 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10401 alias __pthread_once_internal.
10403 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10405 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10407 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10408 * tst-stdio1.c: New file.
10409 * tst-stdio2.c: New file.
10411 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10413 * Makefile (tests): Comment out tst-locale2 for now.
10414 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10416 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10418 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10419 Use _IO_lock_init instead of explicit assignment.
10421 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10422 Define __libc_lock_* and __libc_lock_recursive macros with
10423 lowlevellock macros, not pthread mutexes.
10425 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10426 of pthread_mutex_lock.
10427 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10428 instead of pthread_mutex_unlock.
10430 2002-12-06 Roland McGrath <roland@redhat.com>
10432 * allocatestack.c (__stack_user): Use uninitialized defn.
10433 * init.c (__pthread_initialize_minimal): Initialize it here.
10435 2002-12-05 Roland McGrath <roland@redhat.com>
10437 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10439 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10441 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10442 missing & here too.
10444 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10446 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10448 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10449 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10450 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10451 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10452 for __libc_lock_* macros.
10453 * Makefile (routines): Add libc-lowlevellock.
10455 2002-10-09 Roland McGrath <roland@redhat.com>
10457 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10458 Under [__PIC__], call the function via the pointer fetched for
10459 comparison rather than a call by name that uses the PLT.
10460 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10461 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10462 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10463 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10464 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10466 2002-12-04 Roland McGrath <roland@redhat.com>
10468 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10470 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10471 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10473 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10475 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10477 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10478 a completely opaque, non-integer type.
10479 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10481 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10483 * sysdeps/i386/tls.h: Include stdlib.h.
10484 * sysdeps/x86_64/tls.h: Likewise.
10486 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10488 * Makefile (tests): Add tst-locale2.
10489 (tests-static): Likewise.
10490 * tst-locale2.c: New file.
10492 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10493 volatile and add memory clobbers to lock operations.
10495 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10497 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10498 * sysdeps/i386/i486/bits/atomic.h: New file.
10499 * sysdeps/i386/i586/bits/atomic.h: New file.
10500 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10501 include i486 version.
10502 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10503 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10504 Patch by Marijn Ros <marijn@mad.scientist.com>.
10506 * allocatestack.c (get_cached_stack): Don't crash if we first
10507 found a stack with a larger size then needed.
10508 Reported by Hui Huang <hui.huang@sun.com>.
10510 * Makefile (tests): Add tst-sysconf.
10511 * tst-sysconf.c: New file.
10513 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10514 PTHREAD_THREADS_MAX.
10516 2002-12-02 Roland McGrath <roland@redhat.com>
10518 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10519 Declare using hidden_proto instead of attribute_hidden, so there are
10520 non-.hidden static symbols for gdb to find.
10521 (__pthread_keys): Likewise.
10522 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10523 * allocatestack.c (__stack_user): Likewise.
10524 * pthread_create.c (__pthread_keys): Likewise.
10525 (__nptl_threads_events, __nptl_last_event): Make these static instead
10527 * pthread_key_create.c (__pthread_pthread_keys_max,
10528 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10530 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10532 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10534 * tst-locale1.c: New file.
10536 * pthread_cond_timedwait.c: Include <stdlib.h>.
10538 * Makefile (tests): Add tst-fork2 and tst-fork3.
10539 * tst-fork2.c: New file.
10540 * tst-fork3.c: New file.
10542 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10544 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10546 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10547 require it to 200112L.
10549 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10550 instruction only if HAVE_CMOV is defined.
10551 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10553 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10555 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10557 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10559 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10561 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10563 * sysdeps/x86_64/bits/atomic.h: New file.
10565 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10568 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10569 possible since gettid cannot fail.
10571 * sysdeps/x86_64/pthreaddef.h: New file.
10573 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10575 * sysdeps/x86_64/pthread_spin_init.c: New file.
10576 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10577 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10578 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10580 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10581 Add missing lock prefix. Minute optimization.
10583 * tst-spin2.c (main): Also check successful trylock call.
10585 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10586 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10588 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10589 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10591 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10592 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10593 value in case of an error. Add support for INTERNAL_SYSCALL.
10595 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10596 value in case of an error.
10598 * sysdeps/x86_64/tls.h: New file.
10600 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10602 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10603 takes the array member name and the index as parameters.
10604 (THREAD_SETMEM_NC): Likewise.
10605 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10606 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10609 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10610 to decide which code to use.
10611 (THREAD_SETMEM_NC): Likewise.
10613 * allocatestack.c (queue_stack): Don't remove stack from list here.
10614 Do it in the caller. Correct condition to prematurely terminate
10615 loop to free stacks.
10616 (__deallocate_stack): Remove stack from list here.
10618 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10620 * Makefile (tests): Add tst-stack1.
10621 * tst-stack1.c: New file.
10623 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10626 * pthread_attr_getstack.c: Return bottom of the thread area.
10628 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10630 * Makefile (libpthread-routines): Add pt-allocrtsig and
10631 pthread_kill_other_threads.
10632 * pt-allocrtsig.c: New file.
10633 * pthread_kill_other_threads.c: New file.
10634 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10635 all three functions.
10636 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10638 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10639 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10640 and __libc_allocate_rtsig_private.
10641 * Versions (libpthread): Export pthread_kill_other_threads_np,
10642 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10644 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10646 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10647 the end of the stack. Adjust computations.
10648 When mprotect call fails dequeue stack and free it.
10649 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10651 * pthread_getattr_np.c: Likewise.
10653 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10656 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10658 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10659 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10661 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10663 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10664 * pthread_setspecific.c: Likewise.
10666 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10668 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10669 definitions. Get them from the official place.
10670 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10672 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10673 Use new CLONE_ flags in clone() calls.
10675 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10676 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10678 * Versions: Add pthread_* functions for libc.
10679 * forward.c: New file.
10681 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10683 * herrno.c: New file.
10686 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10687 sem_trywait, and sem_timedwait. Add herrno and res.
10688 * sem_init.c: Don't initialize lock and waiters members.
10689 * sem_open.c: Likewise.
10690 * sem_post.c: Removed.
10691 * sem_wait.c: Removed.
10692 * sem_trywait.c: Removed.
10693 * sem_timedwait.c: Removed.
10694 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10695 Includes full implementations of sem_post, sem_wait, sem_trywait,
10697 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10698 for new implementation.
10699 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10700 and waiters fields.
10702 * tst-sem3.c: Improve error message.
10703 * tst-signal3.c: Likewise.
10705 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10706 to tell the kernel about the termination futex and to initialize tid
10707 member. Don't initialize main_thread.
10708 * descr.h (struct pthread): Remove main_thread member.
10709 * cancelllation.c (__do_cancel): Remove code handling main thread.
10710 The main thread is not special anymore.
10712 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10713 size of the stacks to stack_cache_actsize.
10715 * pt-readv.c: Add missing "defined".
10716 * pt-sigwait.c: Likewise.
10717 * pt-writev.c: Likewise.
10719 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10721 * Versions: Export __connect from libpthread.
10722 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10724 * Makefile (libpthread-routines): Add pt-raise.
10725 * sysdeps/unix/sysv/linux/raise.c: New file.
10726 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10727 * sysdeps/generic/pt-raise.c: New file.
10729 * pthread_cond_init.c: Initialize all data elements of the condvar
10730 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10732 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10733 * pthread_create.c: Likewise.
10735 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10736 * tst-key1.c: New file.
10737 * tst-key2.c: New file.
10738 * tst-key3.c: New file.
10740 * Versions: Export pthread_detach for version GLIBC_2.0.
10741 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10743 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10745 * pthread_key_create.c: Terminate search after an unused key was found.
10746 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10748 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10749 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10751 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10753 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10754 dynamic lookup for errno in PIC.
10756 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10757 release the stack lock as soon as possible.
10758 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10759 the static TLS block.
10760 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10762 * cancellation.c: Renamed from cancelation.c.
10763 * Makefile: Adjust accordingly.
10764 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10765 * cleanup_defer.c: Use CANCELLATION_P.
10766 * pthread_testcancel.c: Likewise.
10767 * descr.h: Fix spelling in comments.
10768 * init.c: Likewise.
10769 * pthread_getattr_np.c: Likewise.
10770 * pthread_getschedparam.c: Likewise.
10771 * pthread_setschedparam.c: Likewise.
10772 * Versions: Likewise.
10774 * pt-pselect.c: New file.
10775 * Makefile (libpthread-routines): Add pt-pselect.
10776 * Versions: Add pselect.
10778 * tst-cancel4.c: New file.
10779 * Makefile (tests): Add tst-cancel4.
10781 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10783 * pthread_mutex_lock.c: Always record lock ownership.
10784 * pthread_mutex_timedlock.c: Likewise.
10785 * pthread_mutex_trylock.c: Likewise.
10787 * pt-readv.c: New file.
10788 * pt-writev.c: New file.
10789 * pt-creat.c: New file.
10790 * pt-msgrcv.c: New file.
10791 * pt-msgsnd.c: New file.
10792 * pt-poll.c: New file.
10793 * pt-select.c: New file.
10794 * pt-sigpause.c: New file.
10795 * pt-sigsuspend.c: New file.
10796 * pt-sigwait.c: New file.
10797 * pt-sigwaitinfo.c: New file.
10798 * pt-waitid.c: New file.
10799 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10800 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10801 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10802 * Versions: Add all the new functions.
10804 * tst-exit1.c: New file.
10805 * Makefile (tests): Add tst-exit1.
10807 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10809 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10811 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10813 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10814 call. pthread_join is an official cancellation point.
10815 * pthread_timedjoin.c: Likewise.
10817 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10818 and the condvar's mutex are retrieved.
10819 * pthread_cond_timedwait.c: Likewise.
10820 Reported by dice@saros.East.Sun.COM.
10822 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10824 * pthreadP.h: Cut out all type definitions and move them...
10825 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10826 * pthreadP.h: Include <internaltypes.h>.
10828 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10829 performance tweaks.
10831 * sem_trywait.c: Shuffle #includes around to get right order.
10832 * sem_timedwait.c: Likewise.
10833 * sem_post.c: Likewise.
10834 * sem_wait.c: Likewise.
10836 * nptl 0.3 released.
10838 * Makefile (tests): Add tst-signal3.
10839 * tst-signal3.c: New file.
10841 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10843 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10844 the asms modify the sem object.
10845 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10847 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10848 the actual members.
10849 * pthreadP.h (struct sem): New type. Actual semaphore type.
10850 * semaphoreP.h: Include pthreadP.h.
10851 * sem_getvalue.c: Adjust to sem_t change.
10852 * sem_init.c: Likewise.
10853 * sem_open.c: Likewise.
10854 * sem_post.c: Likewise.
10855 * sem_timedwait.c: Likewise.
10856 * sem_trywait.c: Likewise.
10857 * sem_wait.c: Likewise.
10859 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10861 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10862 * tst-basic2.c: New file.
10863 * tst-exec1.c: New file.
10864 * tst-exec2.c: New file.
10865 * tst-exec3.c: New file.
10867 * tst-fork1.c: Remove extra */.
10869 * nptl 0.2 released. The API for IA-32 is complete.