1 2009-02-24 Ulrich Drepper <drepper@redhat.com>
3 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
4 Unify name of include protector macro.
6 2009-02-14 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
8 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
9 LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
11 2009-01-29 Ulrich Drepper <drepper@redhat.com>
13 * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
16 * allocatestack.c (__free_stacks): Renamed from free_stacks.
17 (__free_stack_cache): Removed. Change callers to call __free_stacks.
18 * init.c (nptl_freeres): New function.
19 (pthread_functions): Initialize ptr_freeres to nptl_freeres.
20 * pthreadP.h: Don't declare __free_stack_cache. Declare __free_stacks.
21 * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
23 (pthread_cancel_init): Depend in libgcc_s_handle for decision to
24 load DSO. Assign last.
25 (__unwind_freeres): New function.
27 * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
28 for better debugging. No need to use stack_list_add here.
30 2009-01-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
32 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
33 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
34 instead of computing relative timeout.
35 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
36 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
38 2009-01-25 Ulrich Drepper <drepper@redhat.com>
40 * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
42 2009-01-08 Ulrich Drepper <drepper@redhat.com>
44 * sysdeps/pthread/list.h (list_add): Initialize new element first.
45 (list_add_tail): Removed.
47 2009-01-04 Ulrich Drepper <drepper@redhat.com>
49 * init.c (__pthread_initialize_minimal_internal): Optimize test
50 FUTEX_CLOCK_REALTIME a bit.
52 2009-01-03 Ulrich Drepper <drepper@redhat.com>
54 * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
55 only passing five parameters to FUTEX_WAIT_BITSET call.
57 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
58 (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
59 instead of computing relative timeout.
61 2009-01-02 Ulrich Drepper <drepper@redhat.com>
63 * init.c (__pthread_initialize_minimal_internal): Check for
64 FUTEX_CLOCK_REALTIME flag.
65 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
66 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
69 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
70 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
71 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
72 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
73 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
74 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
76 2008-12-09 Ulrich Drepper <drepper@redhat.com>
78 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
79 loop body instead of ; to avoid gcc warnings.
80 (pthread_cleanup_pop_restore_np): Likewise.
81 Patch by Caolán McNamara <caolanm@redhat.com>.
83 2008-12-09 Jakub Jelinek <jakub@redhat.com>
85 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
86 fast path here, for robust/PI/PP mutexes call
87 __pthread_mutex_lock_full. Don't use switch, instead use a series
88 of ifs according to their probability.
89 (__pthread_mutex_lock_full): New function.
90 * pthread_mutex_unlock.c: Include assert.h.
91 (__pthread_mutex_unlock_usercnt): Handle only the
92 fast path here, for robust/PI/PP mutexes call
93 __pthread_mutex_unlock_full. Don't use switch, instead use a series
94 of ifs according to their probability.
95 (__pthread_mutex_unlock_full): New function.
96 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
97 (__pthread_mutex_lock_full): Define.
99 2008-12-08 Ulrich Drepper <drepper@redhat.com>
101 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
102 implementation. Add necessary padding and.
103 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
106 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
108 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
109 and FUTEX_WAKE_BITSET.
111 2008-12-02 Ulrich Drepper <drepper@redhat.com>
113 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
114 and FUTEX_WAKE_BITSET.
115 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
116 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
117 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
118 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
120 2008-11-25 Roland McGrath <roland@redhat.com>
122 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
123 Subdirectories moved to ports repository as
124 sysdeps/.../nptl subdirectories.
126 2008-11-12 Jakub Jelinek <jakub@redhat.com>
129 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
131 * pthread_cond_init.c (__pthread_cond_init): Fix
132 cond->__data.__nwaiters initialization.
133 * Makefile (tests): Add tst-cond23.
134 * tst-cond23.c: New test.
136 2008-11-07 Jakub Jelinek <jakub@redhat.com>
138 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
140 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
143 2008-11-01 Ulrich Drepper <drepper@redhat.com>
146 * pthread_mutex_lock.c: Add support for private PI mutexes.
147 * pthread_mutex_timedlock.c: Likewise.
148 * pthread_mutex_trylock.c: Likewise.
149 * pthread_mutex_unlock.c: Likewise.
150 Patch mostly by Ben Jackson <ben@ben.com>.
152 2008-10-31 Ulrich Drepper <drepper@redhat.com>
155 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
156 Increase stack size for helper thread.
158 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
160 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
161 assembly with a clobber list for access registers a0 and a1.
163 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
165 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
166 to force runp->refcntr to be read from memory.
168 2008-09-08 Richard Guenther <rguenther@suse.de>
170 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
171 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
172 lll_timedlock, lll_robust_timedlock, lll_unlock,
173 lll_robust_unlock): Promote private to int.
175 2008-08-15 Ulrich Drepper <drepper@redhat.com>
177 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
178 ARCH_RETRY_MMAP definitions.
179 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
180 Define MAP_STACK when not defined.
181 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
182 handling of ARCH_RETRY_MMAP.
184 2008-07-30 Ulrich Drepper <drepper@redhat.com>
186 * tst-align2.c (f): Print message that f is reached.
188 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
191 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
192 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
194 2008-07-25 Ulrich Drepper <drepper@redhat.com>
196 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
197 SOCK_CLOEXEC if possible.
199 2008-05-29 Ulrich Drepper <drepper@redhat.com>
201 * Makefile (tests): Add tst-rwlock2a.
202 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
203 * tst-rwlock2a.c: New file.
205 2008-06-12 Ulrich Drepper <drepper@redhat.com>
207 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
209 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
211 * sysdeps/pthread/pthread.h: Fix typo in comment.
213 2008-05-28 Ulrich Drepper <drepper@redhat.com>
215 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
216 of CPU set to the kernel.
218 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
220 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
222 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
224 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
225 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
226 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
227 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
229 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
231 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
233 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
235 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
237 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
240 2008-05-26 Ulrich Drepper <drepper@redhat.com>
242 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
244 2008-05-20 Jakub Jelinek <jakub@redhat.com>
246 David S. Miller <davem@davemloft.net>
248 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
250 2008-05-10 Ulrich Drepper <drepper@redhat.com>
252 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
254 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
256 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
258 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
260 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
262 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
264 2008-04-14 David S. Miller <davem@davemloft.net>
266 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
267 (__old_sem_wait): Fix argument to lll_futex_wait().
269 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
271 * pthread_create.c: Require pthread_mutex_trylock and
272 pthread_key_delete for libgcc.
274 2008-04-08 Jakub Jelinek <jakub@redhat.com>
277 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
278 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
279 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
281 2008-03-27 Ulrich Drepper <drepper@redhat.com>
283 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
284 <linux/limits.h> has defined it.
285 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
286 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
287 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
288 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
290 2008-03-18 Jakub Jelinek <jakub@redhat.com>
292 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
294 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
295 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
297 2008-03-14 Ulrich Drepper <drepper@redhat.com>
299 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
300 HAVE_DL_DISCOVER_OSVERSION.
301 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
302 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
304 2008-03-07 Ulrich Drepper <drepper@redhat.com>
307 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
308 _POSIX_CHOWN_RESTRICTED value to zero.
310 2008-01-31 Roland McGrath <roland@redhat.com>
312 * Makefile (omit-deps): Variable removed.
314 2008-01-30 Ulrich Drepper <drepper@redhat.com>
316 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
317 unnecessary addr32 prefix.
319 2008-01-29 Roland McGrath <roland@redhat.com>
321 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
323 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
325 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
327 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
329 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
331 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
332 (__lll_lock_wait_private): Fix typo.
333 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
334 (pthread_barrier_wait): Likewise. Adjust XADD use.
335 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
337 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
338 (pthread_rwlock_timedrdlock): Return correct return value.
339 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
340 (pthread_rwlock_timedwrlock): Likewise.
342 2008-01-15 Ulrich Drepper <drepper@redhat.com>
344 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
345 thread returns the program exits with an error code.
347 2008-01-10 Ulrich Drepper <drepper@redhat.com>
349 * pthread-errnos.sym: Add EOVERFLOW.
350 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
351 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
352 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
353 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
355 2007-12-14 Ulrich Drepper <drepper@redhat.com>
357 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
358 parameter. Passed it as permission to mmap.
359 * allocatestack.c (allocate_stack): Pass prot as second parameter
362 2007-12-12 Ulrich Drepper <drepper@redhat.com>
364 * tst-basic7.c: Allocate memory for the stack.
367 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
368 (__pthread_cond_timedwait): Don't use VDSO.
369 Patch by Michal Januszewski.
371 2007-12-07 Ulrich Drepper <drepper@redhat.com>
374 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
375 Allow label before pthread_cleanup_pop.
376 (pthread_cleanup_pop_restore_np): Likewise.
378 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
380 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
381 Store 2 before returning ETIMEDOUT.
383 2007-11-23 Ulrich Drepper <drepper@redhat.com>
385 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
386 Store 2 before returning ETIMEDOUT.
387 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
388 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
389 (__lll_lock_wait_private): Optimize.
390 (__lll_lock_wait): Likewise.
392 2007-11-20 Jakub Jelinek <jakub@redhat.com>
394 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
395 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
396 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
398 2007-11-08 Ulrich Drepper <drepper@redhat.com>
401 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
402 If we time out, try one last time to lock the futex to avoid
403 losing a wakeup signal.
404 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
405 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
408 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
411 2007-11-07 Ulrich Drepper <drepper@redhat.com>
414 * allocatestack.c (allocate_stack): Change ENOMEM error in case
415 mmap failed to EAGAIN.
416 * Makefile (tests): Add tst-basic7.
417 * tst-basic7.c: New file.
419 2007-11-05 Ulrich Drepper <drepper@redhat.com>
421 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
424 2007-11-03 Mike Frysinger <vapier@gentoo.org>
426 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
427 missing line continuations.
428 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
429 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
431 2007-10-28 Ulrich Drepper <drepper@redhat.com>
434 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
435 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
436 (struct timer): Add next element.
437 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
438 enqueue timer structure into __active_timer_sigev_thread list.
439 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
440 remove timer struct from __active_timer_sigev_thread.
441 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
442 Before using timer structure make sure it is still on the
443 __active_timer_sigev_thread list. Keep lock until done.
444 Define __active_timer_sigev_thread and
445 __active_timer_sigev_thread_lock.
447 2007-10-27 Ulrich Drepper <drepper@redhat.com>
449 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
450 Redefine thread_atfork for use of ATFORK_MEM.
451 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
452 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
454 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
455 Use atomic operation when removing first element of list.
457 2007-10-17 Jakub Jelinek <jakub@redhat.com>
459 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
460 routine instead of an alias to __new_sem_post.
462 2007-10-15 Jakub Jelinek <jakub@redhat.com>
464 * init.c (__pthread_initialize_minimal): Initialize word to appease
467 2007-10-10 Jakub Jelinek <jakub@redhat.com>
469 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
470 libc.so just clear NAME.
471 (__libc_rwlock_fini): Nop inside of libc.so.
472 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
475 2007-09-02 Ulrich Drepper <drepper@redhat.com>
477 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
478 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
480 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
482 2007-08-21 Ulrich Drepper <drepper@redhat.com>
485 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
486 reclaimed stack if necessary.
487 * Makefile (tests): Add tst-tsd6.
488 * tst-tsd6.c: New file.
490 2007-08-21 Jakub Jelinek <jakub@redhat.com>
492 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
493 Add private argument.
495 2007-08-20 Ulrich Drepper <drepper@redhat.com>
497 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
498 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
500 2007-08-16 Jakub Jelinek <jakub@redhat.com>
502 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
503 (__lll_robust_timedlock): Pass private as last argument to
504 __lll_robust_timedlock_wait.
505 (__lll_unlock): Fix a pasto.
507 2007-08-15 Jakub Jelinek <jakub@redhat.com>
509 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
510 sparc_old_sem): New structs.
511 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
512 (__sem_wait_cleanup): New function.
513 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
514 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
515 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
517 (__old_sem_wait): New function.
518 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
519 nptl/sysdeps/unix/sysv/linux/sparc version.
520 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
522 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
523 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
524 (__new_sem_trywait): Use sparc_old_sem structure.
525 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
526 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
527 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
528 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
529 lll_futex_timed_wait.
530 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
531 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
532 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
534 (__old_sem_post): New function.
535 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
536 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
537 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
538 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
539 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
540 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
542 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
544 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
545 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
546 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
547 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
548 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
549 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
550 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
552 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
553 kernel-features.h and tcb-offsets.h.
554 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
555 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
557 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
559 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
560 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
562 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
563 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
564 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
565 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
566 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
567 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
568 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
570 2007-08-14 Jakub Jelinek <jakub@redhat.com>
572 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
573 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
574 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
575 lll_futex_timed_wait.
577 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
578 __lll_robust_unlock): Rewrite as macros instead of inline functions.
579 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
580 __lll_robust_unlock, __lll_wait_tid): Likewise.
582 2007-08-13 Jakub Jelinek <jakub@redhat.com>
584 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
587 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
588 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
589 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
591 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
592 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
595 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
596 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
597 process private. Switch DW_CFA_advance_loc1 and some
598 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
599 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
600 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
601 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
602 process private. Switch DW_CFA_advance_loc{1,2} and some
603 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
604 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
605 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
608 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
609 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
610 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
612 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
613 (__pthread_cond_broadcast): Compare %r8 instead of
614 dep_mutex-cond_*(%rdi) with $-1.
615 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
616 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
619 2007-08-13 Ulrich Drepper <drepper@redhat.com>
621 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
623 2007-08-13 Jakub Jelinek <jakub@redhat.com>
625 * allocatestack.c: Include kernel-features.h.
626 * pthread_create.c: Likewise.
627 * pthread_mutex_init.c: Likewise.
629 * pthread_cond_timedwait.c: Likewise.
630 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
631 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
632 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
633 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
634 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
636 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
638 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
640 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
641 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
642 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
643 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
645 2007-08-12 Jakub Jelinek <jakub@redhat.com>
647 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
648 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
649 byte elements. One of them is the new __shared element.
650 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
651 adjust names of other padding elements.
652 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
653 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
654 byte elements. One of them is the new __shared element.
655 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
656 adjust names of other padding elements.
657 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
658 Renamed __pad1 element to __shared, adjust names of other padding
660 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
661 (pthread_rwlock_t): Likewise.
662 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
665 2007-08-09 Anton Blanchard <anton@samba.org>
667 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
669 2007-08-12 Ulrich Drepper <drepper@redhat.com>
671 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
673 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
675 2007-08-11 Ulrich Drepper <drepper@redhat.com>
677 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
678 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
679 dealing with robust mutexes.
680 * pthread_mutex_timedlock.c: Likewise.
681 * pthread_mutex_trylock.c: Likewise.
682 * pthread_mutex_unlock.c: Likewise.
683 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
685 2007-08-06 Jakub Jelinek <jakub@redhat.com>
687 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
688 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
689 (PTHREAD_MUTEX_PSHARED): Define.
690 * pthread_mutex_init.c (__pthread_mutex_init): Set
691 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
693 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
694 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
695 as second argument to lll_lock.
696 (LLL_MUTEX_TRYLOCK): Take mutex as argument
697 instead of its __data.__lock field.
698 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
699 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
701 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
702 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
703 instead of mutex->__data.__kind directly, pass
704 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
705 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
706 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
707 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
708 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
709 to lll_timedlock, lll_robust_timedlock, lll_unlock and
710 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
711 of mutex->__data.__kind directly.
712 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
713 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
714 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
715 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
716 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
717 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
719 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
720 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
721 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
723 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
724 Take mutex as argument instead of its __data.__lock field, pass
725 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
726 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
728 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
729 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
730 to lll_robust_cond_lock.
731 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
732 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
733 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
734 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
735 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
736 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
738 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
739 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
741 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
742 pshared variable, pass it to lll_lock, lll_unlock,
743 lll_futex_timedwait and lll_futex_wake.
744 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
745 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
747 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
748 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
750 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
751 lll_futex_wake_unlock): Likewise.
752 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
754 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
755 lll_futex_wake_unlock): Likewise.
756 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
758 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
759 lll_futex_wake_unlock): Likewise.
760 (lll_futex_wake): Fix a typo.
761 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
762 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
763 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
764 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
765 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
767 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
768 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
769 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
770 (__pthread_cond_timedwait): Likewise.
771 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
772 (__condvar_cleanup, __pthread_cond_wait): Likewise.
774 2007-08-05 Jakub Jelinek <jakub@redhat.com>
776 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
777 Don't use CGOTSETUP and CGOTRESTORE macros.
778 (CGOTSETUP, CGOTRESTORE): Remove.
779 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
782 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
784 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
785 definitions for private futexes.
786 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
787 kernel-features.h and lowlevellock.h. Use private futexes if
789 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
790 (__lll_mutex_lock_wait): Rename to
791 (__lll_lock_wait): ... this. Don't compile in for libc.so.
792 (__lll_mutex_timedlock_wait): Rename to ...
793 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
794 Don't compile in for libc.so.
795 (__lll_mutex_unlock_wake): Rename to ...
796 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
797 (__lll_timedwait_tid): Use __NR_gettimeofday.
798 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
799 the header from assembler. Renamed all lll_mutex_* resp.
800 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
801 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
802 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
804 (__lll_lock_wait_private): Add prototype.
805 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
806 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
807 __lll_unlock_wake): Likewise.
808 (lll_lock): Add private argument. Call __lll_lock_wait_private
809 if private is constant LLL_PRIVATE.
810 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
811 lll_timedlock, lll_robust_timedlock): Add private argument.
812 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
813 if private is constant LLL_PRIVATE.
814 (lll_robust_unlock, lll_robust_dead): Add private argument.
815 (lll_lock_t): Remove.
816 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
817 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
818 lll_cond_wake, lll_cond_broadcast): Remove.
819 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
820 kernel-features.h and lowlevellock.h.
821 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
822 (LOAD_FUTEX_WAIT): Define.
823 (__lll_robust_mutex_lock_wait): Rename to ...
824 (__lll_robust_lock_wait): ... this. Add private argument.
825 Use LOAD_FUTEX_WAIT macro.
826 (__lll_robust_mutex_timedlock_wait): Rename to ...
827 (__lll_robust_timedlock_wait): ... this. Add private argument.
828 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
829 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
831 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
832 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
833 __lll_mutex_{lock,unlock}_*.
834 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
835 lowlevellock.h and pthread-errnos.h.
836 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
837 FUTEX_CMP_REQUEUE, EINVAL): Remove.
838 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
839 __lll_mutex_{lock,unlock}_*.
840 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
841 lowlevellock.h and pthread-errnos.h.
842 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
843 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
844 __lll_mutex_{lock,unlock}_*.
845 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
847 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
848 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
849 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
850 (__condvar_tw_cleanup): Likewise.
851 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
853 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
854 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
855 __lll_mutex_{lock,unlock}_*.
856 ( __condvar_w_cleanup): Likewise.
857 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
858 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
859 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
861 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
862 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
863 __lll_mutex_{lock,unlock}_*.
864 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
866 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
867 FUTEX_PRIVATE_FLAG): Remove.
868 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
869 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
870 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
872 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
873 FUTEX_PRIVATE_FLAG): Remove.
874 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
875 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
876 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
878 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
879 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
880 __lll_mutex_{lock,unlock}_*.
881 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
883 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
884 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
885 __lll_mutex_{lock,unlock}_*.
886 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
887 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
888 (__new_sem_post): Use standard initial exec code sequences.
889 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
891 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
892 FUTEX_PRIVATE_FLAG): Remove.
893 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
895 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
896 (__new_sem_trywait): Use standard initial exec code sequences.
897 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
898 (__new_sem_wait): Use standard initial exec code sequences.
900 2007-07-31 Anton Blanchard <anton@samba.org>
902 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
903 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
906 2007-07-31 Jakub Jelinek <jakub@redhat.com>
908 * allocatestack.c (stack_cache_lock): Change type to int.
909 (get_cached_stack, allocate_stack, __deallocate_stack,
910 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
911 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
912 as second argument to lll_lock and lll_unlock macros on
914 * pthread_create.c (__find_in_stack_list): Likewise.
915 (start_thread): Similarly with pd->lock. Use lll_robust_dead
916 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
918 * descr.h (struct pthread): Change lock and setxid_futex field
920 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
921 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
922 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
923 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
925 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
926 * pthread_cond_init.c (__pthread_cond_init): Likewise.
927 * pthreadP.h (__attr_list_lock): Change type to int.
928 * pthread_attr_init.c (__attr_list_lock): Likewise.
929 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
930 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
932 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
933 also for lll_futex_{wake,wait}.
934 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
936 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
937 LLL_SHARED as second argument to lll_{,un}lock.
938 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
939 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
940 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
941 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
943 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
944 as second argument to lll_{,un}lock macros on pd->lock.
945 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
946 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
947 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
948 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
950 * sysdeps/pthread/createthread.c (do_clone, create_thread):
952 * pthread_once.c (once_lock): Change type to int.
953 (__pthread_once): Pass LLL_PRIVATE as second argument to
954 lll_{,un}lock macros on once_lock.
955 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
956 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
957 rwlock->__data.__shared as second argument to them and similarly
959 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
961 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
963 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
964 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
965 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
966 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
967 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
968 to lll_{,un}lock macros on __sem_mappings_lock.
969 * sem_open.c (check_add_mapping): Likewise.
970 (__sem_mappings_lock): Change type to int.
971 * semaphoreP.h (__sem_mappings_lock): Likewise.
972 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
973 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
974 instead of lll_*mutex_*, pass LLL_SHARED as last
976 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
977 pass LLL_SHARED as last argument.
978 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
979 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
980 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
981 pass LLL_SHARED as last argument.
982 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
983 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
984 LLL_SHARED as last argument.
985 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
986 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
988 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
989 __libc_lock_lock_recursive, __libc_lock_unlock,
990 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
991 argument to lll_{,un}lock.
992 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
993 _IO_lock_unlock): Likewise.
994 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
996 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
997 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
999 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1000 free_mem): Likewise.
1001 (__fork_lock): Change type to int.
1002 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1003 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1004 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1006 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1007 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1008 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1010 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1011 pass it through to lll_futex_*wait, only compile in when
1013 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1014 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1015 argument and pass it through to lll_futex_*wait.
1016 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1017 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1018 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1019 inline functions to __lll_* resp. __lll_robust_*.
1020 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1021 (lll_mutex_dead): Add private argument.
1022 (__lll_lock_wait_private): New prototype.
1023 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1024 __lll_robust_lock_timedwait): Add private argument to prototypes.
1025 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1026 call __lll_lock_wait_private, otherwise pass private to
1028 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1029 __lll_robust_timedlock): Add private argument, pass it to
1030 __lll_*wait functions.
1031 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1032 call __lll_unlock_wake_private, otherwise pass private to
1034 (__lll_robust_unlock): Add private argument, pass it to
1035 __lll_robust_unlock_wake.
1036 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1037 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1038 argument, pass it through to __lll_* inline function.
1039 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1040 (lll_lock_t): Remove.
1041 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1042 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1043 lll_cond_wake, lll_cond_broadcast): Remove.
1044 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1045 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1046 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1047 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1048 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1049 the header from assembler. Renamed all lll_mutex_* resp.
1050 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1051 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1052 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1053 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1054 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1055 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1056 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1058 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1059 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1060 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1061 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1062 MULTIPLE_THREADS_OFFSET as another asm operand.
1063 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1064 MULTIPLE_THREADS_OFFSET as last asm operand, call
1065 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1066 otherwise pass private as another argument to __lll_lock_wait.
1067 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1068 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1069 private as another argument to __lll_*lock_wait call.
1070 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1071 MULTIPLE_THREADS_OFFSET as another asm operand, call
1072 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1073 otherwise pass private as another argument to __lll_unlock_wake.
1074 (lll_robust_unlock): Add private argument, pass private as another
1075 argument to __lll_unlock_wake.
1076 (lll_robust_dead): Add private argument, use __lll_private_flag
1078 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1079 LLL_MUTEX_LOCK_INITIALIZER.
1080 (lll_lock_t): Remove.
1081 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1082 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1083 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1084 lll_cond_wake, lll_cond_broadcast): Remove.
1085 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1086 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1087 2007-05-2{3,9} changes.
1088 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1089 kernel-features.h and lowlevellock.h.
1090 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1091 (LOAD_FUTEX_WAIT): Rewritten.
1092 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1094 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1095 (__lll_mutex_lock_wait): Rename to ...
1096 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1097 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1098 (__lll_mutex_timedlock_wait): Rename to ...
1099 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1100 contains private argument. Don't compile in for libc.so.
1101 (__lll_mutex_unlock_wake): Rename to ...
1102 (__lll_unlock_wake): ... this. %ecx contains private argument.
1103 Don't compile in for libc.so.
1104 (__lll_timedwait_tid): Use __NR_gettimeofday.
1105 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1106 kernel-features.h and lowlevellock.h.
1107 (LOAD_FUTEX_WAIT): Define.
1108 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1110 (__lll_robust_mutex_lock_wait): Rename to ...
1111 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1112 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1114 (__lll_robust_mutex_timedlock_wait): Rename to ...
1115 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1116 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1117 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1119 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1120 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1121 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1122 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1123 to __lll_lock_wait in %edx.
1124 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1125 Include lowlevellock.h and pthread-errnos.h.
1126 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1127 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1128 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1129 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1130 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1132 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1133 Include lowlevellock.h and pthread-errnos.h.
1134 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1135 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1136 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1137 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1138 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1140 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1141 Include lowlevellock.h.
1142 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1144 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1145 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1146 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1147 __lll_unlock_wake. Use __NR_gettimeofday.
1148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1149 Include lowlevellock.h.
1150 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1151 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1152 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1153 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1154 and __lll_unlock_wake.
1155 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1156 Include lowlevellock.h.
1157 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1158 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1159 MUTEX(%ebx) address in %edx rather than %ecx to
1160 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1161 and __lll_unlock_wake. Move return value from %ecx to %edx
1163 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1164 Include lowlevellock.h.
1165 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1167 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1168 MUTEX(%ebp) address in %edx rather than %ecx to
1169 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1170 and __lll_unlock_wake. Move return value from %ecx to %edx
1171 register. Use __NR_gettimeofday.
1172 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1173 Include lowlevellock.h.
1174 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1176 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1177 MUTEX(%ebp) address in %edx rather than %ecx to
1178 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1179 and __lll_unlock_wake. Move return value from %ecx to %edx
1180 register. Use __NR_gettimeofday.
1181 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1182 Include lowlevellock.h.
1183 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1184 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1185 MUTEX(%edi) address in %edx rather than %ecx to
1186 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1187 and __lll_unlock_wake.
1188 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1189 Include lowlevellock.h.
1190 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1191 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1192 MUTEX(%ebx) address in %edx rather than %ecx to
1193 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1194 and __lll_unlock_wake. Move return value from %ecx to %edx
1196 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1198 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1200 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1201 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1202 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1204 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1205 (sem_timedwait): Use __NR_gettimeofday.
1206 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1208 (LOCK): Don't define.
1209 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1211 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1212 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1214 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1215 2007-05-2{3,9} changes.
1216 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1217 kernel-features.h and lowlevellock.h.
1218 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1219 (LOAD_FUTEX_WAIT): Rewritten.
1220 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1221 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1222 (__lll_mutex_lock_wait): Rename to ...
1223 (__lll_lock_wait): ... this. %esi is now private argument.
1224 Don't compile in for libc.so.
1225 (__lll_mutex_timedlock_wait): Rename to ...
1226 (__lll_timedlock_wait): ... this. %esi contains private argument.
1227 Don't compile in for libc.so.
1228 (__lll_mutex_unlock_wake): Rename to ...
1229 (__lll_unlock_wake): ... this. %esi contains private argument.
1230 Don't compile in for libc.so.
1231 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1232 kernel-features.h and lowlevellock.h.
1233 (LOAD_FUTEX_WAIT): Define.
1234 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1235 (__lll_robust_mutex_lock_wait): Rename to ...
1236 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1237 Use LOAD_FUTEX_WAIT macro.
1238 (__lll_robust_mutex_timedlock_wait): Rename to ...
1239 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1240 private, use LOAD_FUTEX_WAIT macro.
1241 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1243 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1244 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1245 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1246 __lll_lock_wait and __lll_unlock_wake.
1247 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1248 Include lowlevellock.h and pthread-errnos.h.
1249 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1250 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1251 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1252 pass LLL_SHARED in %esi to both __lll_lock_wait and
1254 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1255 Include lowlevellock.h and pthread-errnos.h.
1256 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1257 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1258 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1259 pass LLL_SHARED in %esi to both __lll_lock_wait and
1261 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1262 Include lowlevellock.h.
1263 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1264 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1265 pass LLL_SHARED in %esi to both __lll_lock_wait and
1267 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1268 Include lowlevellock.h.
1269 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1270 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1271 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1272 and __lll_unlock_wake.
1273 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1274 Include lowlevellock.h.
1275 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1277 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1278 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1279 and __lll_unlock_wake.
1280 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1281 Include lowlevellock.h.
1282 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1284 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1285 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1286 and __lll_unlock_wake.
1287 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1288 Include lowlevellock.h.
1289 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1291 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1292 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1293 and __lll_unlock_wake.
1294 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1295 Include lowlevellock.h.
1296 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1298 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1299 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1300 and __lll_unlock_wake.
1301 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1302 Include lowlevellock.h.
1303 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1305 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1306 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1307 and __lll_unlock_wake.
1308 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1310 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1312 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1313 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1314 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1316 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1317 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1319 (LOCK): Don't define.
1320 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1322 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1323 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1324 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1325 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1326 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1327 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1328 (__lll_lock_wait_private): New function.
1329 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1330 it to lll_futex_*wait. Don't compile in for libc.so.
1331 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1333 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1334 (struct sparc_pthread_barrier): Remove.
1335 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1336 struct sparc_pthread_barrier. Pass
1337 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1338 and lll_futex_wait macros.
1339 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1341 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1342 Include sparc pthread_barrier_wait.c instead of generic one.
1344 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1346 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1348 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1349 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1351 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1352 (pthread_rwlock_timedwrlock): Likewise.
1353 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1354 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1356 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1358 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1360 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1362 * tst-locale2.c (useless): Add return statement.
1364 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1366 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1367 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1368 * pthread_create.c (start_thread): Likewise.
1369 * init.c (sighandler_setxid): Likewise.
1370 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1371 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1372 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1373 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1374 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1375 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1376 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1377 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1378 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1380 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1382 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1384 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1385 __rtld_notify): Likewise.
1386 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1387 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1388 __pthread_once): Likewise.
1389 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1390 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1391 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1392 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1393 (lll_futex_wait): Add private argument, define as wrapper around
1394 lll_futex_timed_wait.
1395 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1396 use __lll_private_flag macro.
1397 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1398 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1399 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1400 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1401 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1402 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1403 (lll_futex_wait): Add private argument, define as wrapper around
1404 lll_futex_timed_wait.
1405 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1406 use __lll_private_flag macro.
1407 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1408 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1409 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1411 (lll_futex_timed_wait, lll_futex_wake): Use it.
1412 (lll_private_futex_wait, lll_private_futex_timed_wait,
1413 lll_private_futex_wake): Removed.
1414 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1415 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1416 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1417 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1418 (lll_futex_wait): Add private argument, define as wrapper around
1419 lll_futex_timed_wait.
1420 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1421 use __lll_private_flag macro.
1422 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1423 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1425 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1426 (lll_private_futex_wait, lll_private_futex_timed_wait,
1427 lll_private_futex_wake): Removed.
1428 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1429 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1430 (lll_private_futex_wait, lll_private_futex_timed_wait,
1431 lll_private_futex_wake): Removed.
1432 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1433 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1434 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1435 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1436 (lll_futex_wait): Add private argument, define as wrapper around
1437 lll_futex_timed_wait.
1438 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1439 use __lll_private_flag macro.
1440 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1441 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1443 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1445 (lll_futex_timed_wait, lll_futex_wake): Use it.
1446 (lll_private_futex_wait, lll_private_futex_timed_wait,
1447 lll_private_futex_wake): Removed.
1449 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1451 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1452 of the structure for sparc32.
1454 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1456 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1458 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1460 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1461 code used when private futexes are assumed.
1462 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1465 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1467 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1468 (__lll_private_flag): Define.
1469 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1470 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1472 (lll_private_futex_wait, lll_private_futex_timedwait,
1473 lll_private_futex_wake): Define as wrapper around non-_private
1475 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1476 (__lll_private_flag): Define.
1477 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1478 (lll_private_futex_wait, lll_private_futex_timedwait,
1479 lll_private_futex_wake): Define as wrapper around non-_private
1482 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1484 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1485 parameter to lll_futex_wait call.
1486 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1488 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1489 Replace lll_futex_wait with lll_private_futex_wait.
1490 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1491 Add LLL_SHARED parameter to lll_futex_wake().
1493 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1494 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1495 lll_private_futex_wake.
1496 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1497 bit from private parm before syscall.
1498 (lll_futex_timed_wait): Likewise.
1499 (lll_futex_wake): Likewise.
1500 (lll_futex_wake_unlock): Likewise.
1501 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1502 (lll_robust_mutex_unlock): Likewise.
1503 (lll_mutex_unlock_force): Likewise.
1504 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1506 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1508 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1509 compilation when unconditionally using private futexes.
1510 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1511 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1513 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1514 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1516 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1518 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1521 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1523 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1526 2007-05-16 Roland McGrath <roland@redhat.com>
1528 * init.c (__nptl_initial_report_events): New variable.
1529 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1532 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1534 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1535 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1537 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1539 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1542 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1544 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1545 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1546 * pthread_mutex_timedlock.c: Likewise.
1547 * pthread_mutex_trylock.c: Likewise.
1548 * pthread_mutex_unlock.c: Likewise.
1550 2007-06-17 Andreas Schwab <schwab@suse.de>
1552 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1555 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1557 * allocatestack.c (allocate_stack): Make code compile if
1558 __ASSUME_PRIVATE_FUTEX is set.
1560 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1562 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1563 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1564 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1565 (__pthread_rwlock_wrlock): Likewise.
1566 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1567 (pthread_rwlock_timedrdlock): Likewise.
1568 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1569 (pthread_rwlock_timedwrlock): Likewise.
1570 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1571 (__pthread_rwlock_unlock): Likewise.
1573 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1575 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1576 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1577 Split __flags into __flags, __shared, __pad1 and __pad2.
1578 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1579 futexes if they are available.
1580 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1581 in libc-lowlevellock.S allow using private futexes.
1582 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1583 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1584 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1585 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1586 lll_private_futex_timed_wait and lll_private_futex_wake.
1587 (lll_robust_mutex_unlock): Fix typo.
1588 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1589 field in futex command setup.
1590 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1591 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1592 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1593 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1594 if they are available. Remove clear_once_control.
1595 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1596 futexes if they are available.
1597 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1598 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1599 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1600 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1601 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1602 Wake only when there are waiters.
1603 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1604 support. Indicate that there are waiters. Remove unnecessary
1605 extra cancellation test.
1606 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1607 left-over duplication of __sem_wait_cleanup.
1609 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1611 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1612 parameter to lll_futex_wait, lll_futex_timed_wait, and
1613 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1614 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1615 lll_private_futex_wake.
1616 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1617 * allocatestack.c: Adjust use of lll_futex_* macros.
1619 * lowlevellock.h: Likewise.
1620 * pthread_barrier_wait.c: Likewise.
1621 * pthread_cond_broadcast.c: Likewise.
1622 * pthread_cond_destroy.c: Likewise.
1623 * pthread_cond_signal.c: Likewise.
1624 * pthread_cond_timedwait.c: Likewise.
1625 * pthread_cond_wait.c: Likewise.
1626 * pthread_create.c: Likewise.
1627 * pthread_mutex_lock.c: Likewise.
1628 * pthread_mutex_setprioceiling.c: Likewise.
1629 * pthread_mutex_timedlock.c: Likewise.
1630 * pthread_mutex_unlock.c: Likewise.
1631 * pthread_rwlock_timedrdlock.c: Likewise.
1632 * pthread_rwlock_timedwrlock.c: Likewise.
1633 * pthread_rwlock_unlock.c: Likewise.
1634 * sysdeps/alpha/tls.h: Likewise.
1635 * sysdeps/i386/tls.h: Likewise.
1636 * sysdeps/ia64/tls.h: Likewise.
1637 * sysdeps/powerpc/tls.h: Likewise.
1638 * sysdeps/pthread/aio_misc.h: Likewise.
1639 * sysdeps/pthread/gai_misc.h: Likewise.
1640 * sysdeps/s390/tls.h: Likewise.
1641 * sysdeps/sh/tls.h: Likewise.
1642 * sysdeps/sparc/tls.h: Likewise.
1643 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1644 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1645 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1646 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1647 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1648 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1649 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1650 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1651 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1652 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1654 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1655 * sysdeps/x86_64/tls.h: Likewise.
1657 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1659 * pthread_getattr_np.c: No need to install a cancellation handler,
1660 this is no cancellation point.
1661 * pthread_getschedparam.c: Likewise.
1662 * pthread_setschedparam.c: Likewise.
1663 * pthread_setschedprio.c: Likewise.
1664 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1666 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1667 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1668 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1669 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1670 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1671 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1672 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1673 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1674 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1675 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1676 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1677 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1679 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1680 whether there are more than one thread makes no sense here since
1681 we only call the slow path if the locks are taken.
1682 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1684 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1685 COND_NWAITERS_SHIFT.
1686 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1688 * pthread_cond_init.c: Likewise.
1689 * pthread_cond_timedwait.c: Likewise.
1690 * pthread_cond_wait.c: Likewise.
1691 * pthread_condattr_getclock.c: Likewise.
1692 * pthread_condattr_setclock.c: Likewise.
1693 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1694 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1695 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1697 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1699 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1701 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1704 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1706 (THREAD_GSCOPE_GET_FLAG): Remove.
1707 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1708 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1710 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1711 (THREAD_GSCOPE_GET_FLAG): Remove.
1712 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1713 instead of THREAD_GSCOPE_GET_FLAG.
1714 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1716 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1717 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1718 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1719 THREAD_GSCOPE_WAIT): Define.
1720 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1721 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1722 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1723 THREAD_GSCOPE_WAIT): Define.
1724 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1725 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1726 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1727 THREAD_GSCOPE_WAIT): Define.
1728 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1729 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1730 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1731 THREAD_GSCOPE_WAIT): Define.
1733 2007-05-24 Richard Henderson <rth@redhat.com>
1735 * descr.h (struct pthread): Add header.gscope_flag.
1736 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1737 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1738 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1739 THREAD_GSCOPE_WAIT): Define.
1741 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1743 * init.c: Make it compile with older kernel headers.
1745 * tst-initializers1.c: Show through exit code which test failed.
1747 * pthread_rwlock_init.c: Also initialize __shared field.
1748 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1749 element in rwlock structure into four byte elements. One of them is
1750 the new __shared element.
1751 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1753 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1754 __shared, adjust names of other padding elements.
1755 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1756 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1757 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1758 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1760 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1761 futex to use private operations if possible.
1762 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1764 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1766 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1767 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1768 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1769 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1771 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1773 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1774 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1776 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1778 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1779 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1780 * pthread_rwlock_timedrdlock.c: Likewise.
1781 * pthread_rwlock_tryrdlock.c: Likewise.
1783 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1786 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1787 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1788 duplication of __sem_wait_cleanup.
1790 * allocatestack.c: Revert last change.
1792 * sysdeps/i386/tls.h: Likewise.
1793 * sysdeps/x86_64/tls.h: Likewise.
1794 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1796 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1798 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1800 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1801 * pthread_barrier_init.c: Set private flag if pshared and private
1802 futexes are supported.
1803 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1804 private field in futex command setup.
1805 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1807 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1809 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1811 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1812 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1813 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1814 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1815 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1817 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1818 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1819 fields in the structure.
1820 (__old_sem_init): New function.
1821 * sem_open.c: Initialize all fields of the structure.
1822 * sem_getvalue.c: Adjust for renamed element.
1823 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1824 (gen-as-const-headers): Add structsem.sym.
1825 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1826 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1827 struct new_sem. Add struct old_sem.
1828 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1829 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1830 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1831 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1832 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1833 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1834 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1835 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1836 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1837 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1838 * tst-sem10.c: New file.
1839 * tst-sem11.c: New file.
1840 * tst-sem12.c: New file.
1841 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1844 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1845 Jakub Jelinek <jakub@redhat.com>
1847 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1848 Move __pthread_enable_asynccancel right before futex syscall.
1849 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1852 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1854 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1855 THREAD_COPY_PRIVATE_FUTEX): Define.
1856 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1857 THREAD_COPY_PRIVATE_FUTEX): Define.
1858 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1859 * init.c (__pthread_initialize_minimal_internal): Use
1860 THREAD_SET_PRIVATE_FUTEX.
1862 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1863 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1864 THREAD_GSCOPE_FLAG_WAIT): Define.
1865 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1866 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1867 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1869 (THREAD_GSCOPE_GET_FLAG): Define.
1870 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1871 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1872 instead of ->header.gscope_flag directly.
1874 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1876 * init.c (__pthread_initialize_minimal_internal): Check whether
1877 private futexes are available.
1878 * allocatestack.c (allocate_stack): Copy private_futex field from
1879 current thread into the new stack.
1880 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1881 futexes if they are available.
1882 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1883 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1884 in libc-lowlevellock.S allow using private futexes.
1885 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1886 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1888 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1889 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1890 if they are available.
1891 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1892 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1893 * sysdeps/i386/tcb-offsets.sym: Likewise.
1894 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1895 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1897 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1899 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1900 Remove ptr_wait_lookup_done again.
1901 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1902 (__pthread_initialize_minimal_internal): Initialize
1903 _dl_wait_lookup_done pointer in _rtld_global directly.
1904 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1905 Remove code to code _dl_wait_lookup_done.
1906 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1909 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1911 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1912 pthread_mutex_init failed with ENOTSUP.
1914 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1916 * allocatestack.c (__wait_lookup_done): New function.
1917 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1918 Add ptr_wait_lookup_done.
1919 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1920 * pthreadP.h: Declare __wait_lookup_done.
1921 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1922 Define macros to implement reference handling of global scope.
1923 * sysdeps/x86_64/tls.h: Likewise.
1924 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1925 Initialize GL(dl_wait_lookup_done).
1927 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1930 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1932 * pthread_mutex_timedlock.c: Likewise.
1933 * pthread_mutex_trylock.c: Likewise.
1934 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1936 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1937 * tst-robust9.c: New file.
1938 * tst-robustpi9.c: New file.
1940 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1941 unnecessary extra cancellation test.
1943 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1945 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1946 extra cancellation test.
1947 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1949 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1951 * descr.h (struct pthread): Rearrange members to fill hole in
1954 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1955 (__pthread_setaffinity_new): If syscall was successful and
1956 RESET_VGETCPU_CACHE is defined, use it before returning.
1957 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1959 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1962 * tst-align2.c: Include stackinfo.h.
1963 * tst-getpid1.c: Likewise.
1965 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1968 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1969 * tst-getpid1.c (do_test): Likewise.
1972 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1973 (allocate_stack): Likewise.
1975 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1977 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1978 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1979 (__lll_robust_timedlock_wait): Likewise.
1980 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1982 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1985 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1986 * tst-cancel4.c (tf_fdatasync): New test.
1988 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1991 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1992 check mutexes like normal mutexes.
1995 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1996 Initialize the whole sigevent structure to appease valgrind.
1998 2007-04-25 Ulrich Drepper <drepper@redhat.com>
2000 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2001 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2003 2007-04-06 Ulrich Drepper <drepper@redhat.com>
2005 * tst-locale1.c: Avoid warnings.
2006 * tst-locale2.c: Likewise.
2008 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
2010 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2011 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2013 2007-03-16 Jakub Jelinek <jakub@redhat.com>
2015 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2016 __extern_always_inline where appropriate.
2017 * sysdeps/pthread/pthread.h: Likewise.
2019 2007-03-13 Richard Henderson <rth@redhat.com>
2021 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2022 separate cfi regions for the two subsections.
2024 2007-02-25 Ulrich Drepper <drepper@redhat.com>
2026 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2027 new thread, don't just decrement it.
2028 Patch by Suzuki K P <suzuki@in.ibm.com>.
2030 2007-02-21 Ulrich Drepper <drepper@redhat.com>
2032 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2033 PTHFCT_CALL definition.
2035 2007-02-18 Ulrich Drepper <drepper@redhat.com>
2037 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2038 available, don't use it.
2040 2007-02-09 Jakub Jelinek <jakub@redhat.com>
2042 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2043 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2044 call into the kernel to delay.
2046 2007-01-18 Ulrich Drepper <drepper@redhat.com>
2048 * tst-initializers1.c: We want to test the initializers as seen
2049 outside of libc, so undefined _LIBC.
2051 * pthread_join.c (cleanup): Avoid warning.
2053 2007-01-17 Ulrich Drepper <drepper@redhat.com>
2055 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2056 (__lll_timedwait_tid): Add unwind info.
2058 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2059 function table, mangle the pointers.
2060 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2061 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2062 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2063 demangle pointers before use.
2064 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2066 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2067 * sysdeps/pthread/setxid.h: Likewise.
2069 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2071 * tst-rwlock7.c: Show some more information in case of correct
2074 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2076 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2077 (lll_futex_timed_wait): Undo part of last change, don't negate
2080 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2082 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2083 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2085 2006-12-28 David S. Miller <davem@davemloft.net>
2087 * shlib-versions: Fix sparc64 linux target specification.
2089 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2091 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2092 Adjust include path for pthread_barrier_wait.c move.
2094 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2096 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2097 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2099 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2101 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2102 6 argument cancellable syscalls.
2103 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2104 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2105 6 argument cancellable syscalls.
2106 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2108 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2110 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2111 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2113 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2115 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2116 __sync_lock_release instead of __sync_lock_release_si.
2118 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2120 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2122 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2123 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2124 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2125 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2126 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2127 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2128 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2129 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2130 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2131 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2132 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2134 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2136 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2137 * pthread_barrier_wait.c: ...here.
2138 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2139 * pthread_cond_broadcast.c: ...here.
2140 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2141 * pthread_cond_signal.c: ...here.
2142 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2143 * pthread_cond_timedwait.c: ...here.
2144 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2145 * pthread_cond_wait.c: ...here.
2146 * sysdeps/pthread/pthread_once.c: Move to...
2147 * pthread_once.c: ...here.
2148 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2149 * pthread_rwlock_rdlock.c: ...here.
2150 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2151 * pthread_rwlock_timedrdlock.c: ...here.
2152 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2153 * pthread_rwlock_timedwrlock.c: ...here.
2154 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2155 * pthread_rwlock_unlock.c: ...here.
2156 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2157 * pthread_rwlock_wrlock.c: ...here.
2158 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2159 * pthread_spin_destroy.c: ...here.
2160 * sysdeps/pthread/pthread_spin_init.c: Move to...
2161 * pthread_spin_init.c: ...here.
2162 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2163 * pthread_spin_unlock.c: ...here.
2164 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2165 * pthread_getcpuclockid.c: ...here.
2167 * init.c: USE_TLS support is now always enabled.
2168 * tst-tls5.h: Likewise.
2169 * sysdeps/alpha/tls.h: Likewise.
2170 * sysdeps/i386/tls.h: Likewise.
2171 * sysdeps/ia64/tls.h: Likewise.
2172 * sysdeps/powerpc/tls.h: Likewise.
2173 * sysdeps/s390/tls.h: Likewise.
2174 * sysdeps/sh/tls.h: Likewise.
2175 * sysdeps/sparc/tls.h: Likewise.
2176 * sysdeps/x86_64/tls.h: Likewise.
2178 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2180 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2181 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2184 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2185 Define to THREAD_SELF->header.multiple_threads.
2186 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2188 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2190 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2191 (SINGLE_THREAD_P): Likewise.
2192 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2193 (SINGLE_THREAD_P): Likewise.
2194 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2195 (SINGLE_THREAD_P): Likewise.
2196 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2197 (SINGLE_THREAD_P): Likewise.
2198 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2200 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2201 (SINGLE_THREAD_P): Likewise.
2202 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2203 (SINGLE_THREAD_P): Likewise.
2204 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2207 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2209 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2210 by default rather than 2_3_3.
2212 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2214 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2215 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2216 atomic_* instead of catomic_* macros.
2218 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2221 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2222 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2223 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2224 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2225 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2226 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2227 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2228 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2229 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2230 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2231 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2232 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2233 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2235 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2237 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2238 cancelable syscalls with six parameters.
2240 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2241 operations instead of atomic_*.
2243 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2245 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2247 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2249 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2250 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2251 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2253 * pthread_attr_setstack.c: Allow overwriting the version number of the
2255 * pthread_attr_setstacksize.c: Likewise.
2256 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2258 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2259 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2261 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2264 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2265 Patch by Petr Baudis.
2267 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2269 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2271 * tst-cancel2.c (tf): Loop as long as something was written.
2273 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2275 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2276 mutexes wake all mutexes.
2277 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2278 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2279 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2281 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2283 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2284 to guarantee the thread is always canceled.
2286 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2288 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2290 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2291 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2292 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2293 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2294 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2296 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2299 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2300 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2301 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2302 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2303 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2304 * Makefile (tests): Add tst-cond22.
2305 * tst-cond22.c: New file.
2307 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2310 * descr.h (struct pthread): Add parent_cancelhandling.
2311 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2312 cancelhandling value to child.
2313 * pthread_create.c (start_thread): If parent thread was canceled
2314 reset the SIGCANCEL mask.
2315 * Makefile (tests): Add tst-cancel25.
2316 * tst-cancel25.c: New file.
2318 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2319 Ulrich Drepper <drepper@redhat.com>
2321 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2322 counterp if it is already zero.
2323 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2325 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2326 Roland McGrath <roland@redhat.com>
2328 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2329 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2330 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2331 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2332 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2333 lll_robust_mutex_timedlock, lll_mutex_unlock,
2334 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2335 Add _L_*_ symbols around the subsection.
2336 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2337 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2339 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2340 Roland McGrath <roland@redhat.com>
2342 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2343 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2344 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2345 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2346 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2347 lll_robust_mutex_timedlock, lll_mutex_unlock,
2348 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2349 Add _L_*_ symbols around the subsection.
2350 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2351 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2353 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2355 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2356 change because it can disturb too much existing code. If real hard
2357 reader preference is needed we'll introduce another type.
2358 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2359 (pthread_rwlock_timedwrlock): Likewise.
2360 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2363 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2365 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2367 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2368 (pthread_rwlock_timedwrlock): Likewise.
2369 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2372 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2374 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2375 Only define ifdef SHARED.
2377 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2379 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2380 (free_stacks): ...here.
2381 (__free_stack_cache): New function.
2382 * pthreadP.h: Declare __free_stack_cache.
2383 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2385 * init.c (pthread_functions): Initialize ptr_freeres.
2386 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2387 New freeres function.
2389 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2392 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2394 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2396 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2397 _XOPEN_REALTIME_THREADS.
2399 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2401 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2402 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2403 HAVE_CLOCK_GETTIME_VSYSCALL.
2404 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2406 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2408 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2409 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2410 * descr.h (struct priority_protection_data): New type.
2411 (struct pthread): Add tpp field.
2412 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2413 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2414 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2415 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2417 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2418 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2419 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2420 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2422 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2424 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2425 * pthread_mutexattr_getprioceiling.c
2426 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2427 in the SCHED_FIFO priority range.
2428 * pthread_mutexattr_setprioceiling.c
2429 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2430 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2431 if mutex is not TPP. Ceiling is now in __data.__lock.
2432 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2433 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2434 is now in __data.__lock. Add locking.
2435 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2436 * Makefile (libpthread-routines): Add tpp.
2437 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2438 * tst-tpp.h: New file.
2439 * tst-mutexpp1.c: New file.
2440 * tst-mutexpp6.c: New file.
2441 * tst-mutexpp10.c: New file.
2442 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2443 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2445 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2448 * pthread_join.c (pthread_join): Account for self being canceled
2449 when checking for deadlocks.
2450 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2451 (tf1): Don't print anything after pthread_join returns, this would be
2452 another cancellation point.
2454 * tst-join6.c: New file.
2455 * Makefile (tests): Add tst-join6.
2457 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2460 * pthread_setspecific.c (__pthread_setspecific): Check
2461 out-of-range index before checking for unused key.
2463 * sysdeps/pthread/gai_misc.h: New file.
2465 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2467 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2468 file. Don't use sysctl.
2469 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2470 overwrite the file if this is likely not true.
2472 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2474 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2475 * Makefile (tests): Add tst-getpid3.
2476 * tst-getpid3.c: New file.
2478 2006-07-30 Roland McGrath <roland@redhat.com>
2480 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2482 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2483 (pause_not_cancel): New macro.
2484 (nanosleep_not_cancel): New macro.
2485 (sigsuspend_not_cancel): New macro.
2486 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2487 nanosleep_not_cancel macro from <not-cancel.h>.
2488 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2489 macro from <not-cancel.h>.
2491 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2492 Jakub Jelinek <jakub@redhat.com>
2494 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2495 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2496 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2497 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2498 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2499 * pthread_mutex_lock.c: Likewise.
2500 * pthread_mutex_timedlock.c: Likewise.
2501 * pthread_mutex_trylock.c: Likewise.
2502 * pthread_mutex_unlock.c: Likewise.
2503 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2505 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2506 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2507 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2508 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2509 pthread-pi-defines.sym.
2510 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2511 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2512 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2513 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2514 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2515 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2516 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2517 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2518 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2519 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2520 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2521 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2522 * tst-mutex2.c: Likewise.
2523 * tst-mutex3.c: Likewise.
2524 * tst-mutex4.c: Likewise.
2525 * tst-mutex5.c: Likewise.
2526 * tst-mutex6.c: Likewise.
2527 * tst-mutex7.c: Likewise.
2528 * tst-mutex7a.c: Likewise.
2529 * tst-mutex8.c: Likewise.
2530 * tst-mutex9.c: Likewise.
2531 * tst-robust1.c: Likewise.
2532 * tst-robust7.c: Likewise.
2533 * tst-robust8.c: Likewise.
2534 * tst-mutexpi1.c: New file.
2535 * tst-mutexpi2.c: New file.
2536 * tst-mutexpi3.c: New file.
2537 * tst-mutexpi4.c: New file.
2538 * tst-mutexpi5.c: New file.
2539 * tst-mutexpi6.c: New file.
2540 * tst-mutexpi7.c: New file.
2541 * tst-mutexpi7a.c: New file.
2542 * tst-mutexpi8.c: New file.
2543 * tst-mutexpi9.c: New file.
2544 * tst-robust1.c: New file.
2545 * tst-robust2.c: New file.
2546 * tst-robust3.c: New file.
2547 * tst-robust4.c: New file.
2548 * tst-robust5.c: New file.
2549 * tst-robust6.c: New file.
2550 * tst-robust7.c: New file.
2551 * tst-robust8.c: New file.
2552 * Makefile (tests): Add the new tests.
2554 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2555 * pthread_mutex_destroy.c: Remove unneeded label.
2557 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2559 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2560 computations to compile time.
2562 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2564 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2566 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2568 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2570 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2572 * pthread_key_create.c (__pthread_key_create): Do away with
2573 __pthread_keys_lock.
2575 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2576 (__kernel_cpumask_size): Mark as hidden.
2577 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2579 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2580 * semaphoreP.h (__sem_mappings_lock): Likewise.
2582 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2584 * pthread_atfork.c: Mark __dso_handle as hidden.
2586 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2589 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2590 the reload problem. Change the one path in pthread_cancel_init
2591 which causes the problem. Force gcc to reload. Simplify callers.
2592 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2593 (_Unwind_GetBSP): Undo last patch.
2595 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2597 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2598 function pointer is reloaded after pthread_cancel_init calls.
2601 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2602 pointers are reloaded after pthread_cancel_init calls.
2604 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2606 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2609 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2611 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2612 Allocate new object which is passed to timer_sigev_thread so that
2613 the timer can be deleted before the new thread is scheduled.
2615 2006-04-26 Roland McGrath <roland@redhat.com>
2617 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2619 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2621 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2622 suffix for conditional jumps.
2623 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2624 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2625 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2626 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2627 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2628 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2630 * init.c (sigcancel_handler): Compare with correct PID even if the
2631 thread is in the middle of a fork call.
2632 (sighandler_setxid): Likewise.
2633 Reported by Suzuki K P <suzuki@in.ibm.com> .
2635 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2637 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2639 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2641 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2642 fails [Coverity CID 105].
2644 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2646 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2648 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2651 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2652 Define __lll_rel_instr using lwsync.
2654 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2656 * allocatestack.c (allocate_stack): Always initialize robust_head.
2657 * descr.h: Define struct robust_list_head.
2658 (struct pthread): Use robust_list_head in robust mutex list definition.
2659 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2660 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2661 (__pthread_initialize_minimal_internal): Register robust_list with
2663 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2664 Declare __set_robust_list_avail.
2665 * pthread_create.c (start_thread): Register robust_list of new thread.
2666 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2668 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2669 number of users, it's unreliable.
2670 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2671 set_robust_list syscall is available.
2672 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2673 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2674 Set robust_head.list_op_pending before trying to lock a robust mutex.
2675 * pthread_mutex_timedlock.c: Likewise.
2676 * pthread_mutex_trylock.c: Likewise.
2677 * pthread_mutex_unlock.c: Likewise for unlocking.
2678 * Makefile (tests): Add tst-robust8.
2679 * tst-robust8.c: New file.
2681 2006-03-08 Andreas Schwab <schwab@suse.de>
2683 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2684 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2686 2006-03-05 Roland McGrath <roland@redhat.com>
2688 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2689 and $config_os doesn't match *linux*.
2691 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2693 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2694 Use __syscall_error.
2695 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2696 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2697 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2698 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2699 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2700 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2702 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2704 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2706 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2708 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2709 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2711 (__lll_robust_timedlock_wait): Likewise.
2712 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2713 (__lll_robust_lock_wait): Likewise.
2714 (__lll_robust_timedlock_wait): Likewise.
2715 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2716 (__lll_robust_lock_wait): Likewise.
2717 (__lll_robust_timedlock_wait): Likewise.
2719 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2721 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2722 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2723 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2724 lll_robust_mutex_unlock): Define.
2725 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2727 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2729 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2730 instead of <clone.S>.
2732 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2734 * Makefile (libpthread-routines): Add
2735 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2736 and pthread_mutex_[sg]etprioceiling.
2737 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2738 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2739 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2740 pthread_mutex_setprioceiling.
2741 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2742 PTHREAD_PRIO_PROTECT): New enum values.
2743 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2744 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2745 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2747 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2748 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2749 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2751 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2752 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2753 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2754 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2755 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2756 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2757 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2759 * pthread_mutex_getprioceiling.c: New file.
2760 * pthread_mutex_setprioceiling.c: New file.
2761 * pthread_mutexattr_getprioceiling.c: New file.
2762 * pthread_mutexattr_setprioceiling.c: New file.
2763 * pthread_mutexattr_getprotocol.c: New file.
2764 * pthread_mutexattr_setprotocol.c: New file.
2766 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2768 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2770 2006-02-27 Roland McGrath <roland@redhat.com>
2772 * sysdeps/pthread/Subdirs: List nptl here too.
2773 * configure (libc_add_on_canonical): New variable.
2775 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2777 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2778 self to get main source tree's file.
2779 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2780 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2781 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2782 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2783 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2784 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2785 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2786 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2787 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2788 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2789 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2790 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2791 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2793 * Makefile: Use $(sysdirs) in vpath directive.
2795 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2796 (CPPFLAGS-timer_routines.c): Likewise.
2798 * Makeconfig (includes): Variable removed.
2800 2006-02-26 Roland McGrath <roland@redhat.com>
2802 * sysdeps/generic/pt-raise.c: Moved to ...
2803 * pt-raise.c: ... here.
2804 * sysdeps/generic/lowlevellock.h: Moved to ...
2805 * lowlevellock.h: ... here.
2807 2006-02-23 Roland McGrath <roland@redhat.com>
2809 * descr.h (struct pthread): Add final member `end_padding'.
2810 (PTHREAD_STRUCT_END_PADDING): Use it.
2812 2006-02-20 Roland McGrath <roland@redhat.com>
2814 * sysdeps/mips: Directory removed, saved in ports repository.
2815 * sysdeps/unix/sysv/linux/mips: Likewise.
2817 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2819 * tst-robust1.c: Add second mutex to check that the mutex list is
2822 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2824 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2825 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2826 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2827 lll_robust_mutex_unlock): New macros.
2828 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2829 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2830 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2831 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2832 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2834 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2836 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2838 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2840 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2842 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2843 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2844 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2845 (lll_robust_mutex_unlock): Likewise.
2847 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2849 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2850 Set robust_list.__next rather than robust_list.
2851 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2852 (__pthread_list_t): New typedef.
2853 (pthread_mutex_t): Replace __next and __prev fields with __list.
2854 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2855 (__pthread_list_t): New typedef.
2856 (pthread_mutex_t): Replace __next and __prev fields with __list.
2857 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2858 (__pthread_list_t, __pthread_slist_t): New typedefs.
2859 (pthread_mutex_t): Replace __next and __prev fields with __list.
2860 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2861 (__pthread_list_t, __pthread_slist_t): New typedefs.
2862 (pthread_mutex_t): Replace __next and __prev fields with __list.
2863 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2864 (__pthread_list_t, __pthread_slist_t): New typedefs.
2865 (pthread_mutex_t): Replace __next and __prev fields with __list.
2866 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2867 (__pthread_slist_t): New typedef.
2868 (pthread_mutex_t): Replace __next field with __list.
2870 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2872 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2873 PTHREAD_MUTEX_OWNERDEAD.
2874 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2875 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2876 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2877 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2878 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2879 to PTHREAD_MUTEX_INCONSISTENT.
2880 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2881 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2882 * pthread_mutex_trylock.c: Likewise.
2883 * pthread_mutex_timedlock.c: Likewise.
2884 * pthread_mutex_unlock.c: Likewise.
2885 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2886 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2887 lowlevelrobustlock.sym.
2888 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2889 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2891 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2892 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2893 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2894 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2895 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2897 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2899 * allocatestack.c (allocate_stack): Initialize robust_list.
2900 * init.c (__pthread_initialize_minimal_internal): Likewise.
2901 * descr.h (struct xid_command): Pretty printing.
2902 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2903 robust_list. Adjust macros.
2904 * pthread_create.c (start_thread): Adjust robust_list handling.
2905 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2906 but the owner for all robust mutex types.
2907 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2908 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2909 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2910 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2912 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2913 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2915 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2918 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2920 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2922 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2924 (lll_futex_timed_wait): Define.
2926 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2928 * tst-cancel4.c: Test ppoll.
2930 2006-01-18 Andreas Jaeger <aj@suse.de>
2933 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2934 (pthread_mutex_t): Follow changes for other archs. Based on patch
2935 by Jim Gifford <patches@jg555.com>.
2937 2006-01-13 Richard Henderson <rth@redhat.com>
2939 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2941 2006-01-10 Roland McGrath <roland@redhat.com>
2943 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2944 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2945 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2946 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2947 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2948 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2949 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2950 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2951 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2952 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2954 2006-01-09 Roland McGrath <roland@redhat.com>
2956 * tst-initializers1-c89.c: New file.
2957 * tst-initializers1-c99.c: New file.
2958 * tst-initializers1-gnu89.c: New file.
2959 * tst-initializers1-gnu99.c: New file.
2960 * Makefile (tests): Add them.
2961 (CFLAGS-tst-initializers1-c89.c): New variable.
2962 (CFLAGS-tst-initializers1-c99.c): New variable.
2963 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2964 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2966 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2967 Use __extension__ on anonymous union definition.
2968 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2969 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2970 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2971 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2972 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2974 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2976 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2977 Don't give the union a name because it changes the mangled name.
2978 Instead name the struct for __data.
2979 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2981 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2984 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2986 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2987 stack bias to mc_ftp field.
2989 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2991 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2992 being too clever and reloading the futex value where it shouldn't.
2994 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2996 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2999 2006-01-06 Jakub Jelinek <jakub@redhat.com>
3001 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3004 2006-01-06 Ulrich Drepper <drepper@redhat.com>
3006 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3007 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3008 rename in tcbhead_t.
3010 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3011 Don't give the union a name because it changes the mangled name.
3012 Instead name the struct for __data.
3013 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3014 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3015 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3016 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3017 * pthread_create.c (start_thread): Adjust robust mutex free loop.
3018 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3020 2006-01-05 Ulrich Drepper <drepper@redhat.com>
3022 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3024 (lll_futex_timed_wait): Define.
3025 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3026 * sysdeps/pthread/aio_misc.h: New file.
3028 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
3030 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3032 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
3034 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3035 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3036 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3038 2006-01-04 Ulrich Drepper <drepper@redhat.com>
3040 * tst-cancel24.cc: Use C headers instead of C++ headers.
3042 2006-01-03 Jakub Jelinek <jakub@redhat.com>
3044 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3045 sparc-linux configured glibc.
3046 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3047 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3048 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3049 atomic_compare_and_exchange_val_24_acq instead of
3050 atomic_compare_and_exchange_val_acq.
3051 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3052 instead of atomic_exchange_rel.
3053 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3054 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3056 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3058 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3059 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3060 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3061 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3062 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3063 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3065 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3067 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3068 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3069 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3071 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3073 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3075 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3077 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3080 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3082 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3083 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3084 THREAD_COPY_POINTER_GUARD): Define.
3085 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3086 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3088 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3090 * version.c: Update copyright year.
3092 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3094 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3095 .eh_frame section, use cfi_* directives.
3096 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3098 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3100 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3103 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3105 * sysdeps/pthread/sigaction.c: Removed.
3106 * sigaction.c: New file.
3107 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3109 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3111 * Makefile (tests): Add tst-signal7.
3112 * tst-signal7.c: New file.
3114 2005-12-27 Roland McGrath <roland@redhat.com>
3116 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3117 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3118 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3119 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3120 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3121 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3122 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3123 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3124 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3125 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3126 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3128 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3130 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3131 and __prev field to pthread_mutex_t.
3132 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3133 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3134 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3135 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3136 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3139 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3141 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3142 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3143 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3144 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3145 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3146 and PTHREAD_MUTEXATTR_FLAG_BITS.
3147 * descr.h (struct pthread): Add robust_list field and define
3148 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3149 * pthread_mutexattr_getrobust.c: New file.
3150 * pthread_mutexattr_setrobust.c: New file.
3151 * pthread_mutex_consistent.c: New file.
3152 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3153 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3154 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3155 Adjust pthread_mutex_t initializers.
3156 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3157 field to pthread_mutex_t.
3158 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3159 and __prev field to pthread_mutex_t.
3160 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3161 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3162 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3163 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3164 * pthread_mutexattr_gettype.c: Likewise.
3165 * pthread_mutexattr_setpshared.c: Likewise.
3166 * pthread_mutexattr_settype.c: Likewise.
3167 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3168 Initialize mutex kind according to robust flag.
3169 * pthread_mutex_lock.c: Implement local robust mutex.
3170 * pthread_mutex_timedlock.c: Likewise.
3171 * pthread_mutex_trylock.c: Likewise.
3172 * pthread_mutex_unlock.c: Likewise.
3173 * pthread_create.c (start_thread): Mark robust mutexes which remained
3175 * tst-robust1.c: New file.
3176 * tst-robust2.c: New file.
3177 * tst-robust3.c: New file.
3178 * tst-robust4.c: New file.
3179 * tst-robust5.c: New file.
3180 * tst-robust6.c: New file.
3181 * tst-robust7.c: New file.
3182 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3183 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3184 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3185 tst-robust5, tst-robust6, and tst-robust7.
3187 * tst-typesizes.c: New file.
3188 * Makefile (tests): Add tst-typesizes.
3190 * tst-once3.c: More debug output.
3192 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3194 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3195 missing after last change.
3197 * version.c: Update copyright year.
3199 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3201 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3202 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3203 * pthread_mutex_trylock.c: Likewise.
3204 * pthread_mutex_timedlock.c: Likewise.
3205 * pthread_mutex_unlock.c: Likewise.
3207 2005-12-22 Roland McGrath <roland@redhat.com>
3209 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3210 so that #include_next's search location is not reset to the -I..
3211 directory where <nptl/...> can be found.
3213 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3216 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3217 Fix unwind info. Remove useless branch prediction prefix.
3218 * tst-cancel24.cc: New file.
3219 * Makefile: Add rules to build and run tst-cancel24.
3221 2005-12-21 Roland McGrath <roland@redhat.com>
3223 * libc-cancellation.c: Use <> rather than "" #includes.
3224 * pt-cleanup.c: Likewise.
3225 * pthread_create.c: Likewise.
3226 * pthread_join.c: Likewise.
3227 * pthread_timedjoin.c: Likewise.
3228 * pthread_tryjoin.c: Likewise.
3229 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3230 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3231 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3232 * unwind.c: Likewise.
3234 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3236 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3237 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3238 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3239 THREAD_COPY_POINTER_GUARD): Define.
3241 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3243 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3245 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3246 THREAD_COPY_POINTER_GUARD): Define.
3247 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3248 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3249 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3250 THREAD_COPY_POINTER_GUARD): Define.
3251 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3252 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3253 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3254 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3255 Use PTR_DEMANGLE for B0 if defined.
3257 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3259 * pthread_create.c (__pthread_create_2_1): Use
3260 THREAD_COPY_POINTER_GUARD if available.
3261 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3262 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3263 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3264 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3265 * sysdeps/x86_64/tls.h: Likewise.
3267 2005-12-15 Roland McGrath <roland@redhat.com>
3269 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3271 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3273 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3275 * errno-loc.c: New file.
3277 2005-12-12 Roland McGrath <roland@redhat.com>
3279 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3280 adjustments before choosing stack size. Update minimum stack size
3281 calculation to match allocate_stack change.
3283 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3285 * allocatestack.c (allocate_stack): Don't demand that there is an
3286 additional full page available on the stack beside guard, TLS, the
3289 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3291 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3292 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3294 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3295 compiling 32-bit code we must define __cleanup_fct_attribute.
3297 005-11-24 Jakub Jelinek <jakub@redhat.com>
3300 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3301 __attribute__ instead of __attribute.
3302 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3303 (__cleanup_fct_attribute): Likewise.
3305 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3307 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3308 a write barrier before writing libgcc_s_getcfa.
3310 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3312 * sysdeps/unix/sysv/linux/configure: Removed.
3314 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3316 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3317 optional init_array/fini_array support.
3319 2005-10-24 Roland McGrath <roland@redhat.com>
3321 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3322 versioned_symbol use.
3324 2005-10-16 Roland McGrath <roland@redhat.com>
3326 * init.c (__pthread_initialize_minimal_internal): Even when using a
3327 compile-time default stack size, apply the minimum that allocate_stack
3328 will require, and round up to page size.
3330 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3332 * Makefile ($(test-modules)): Remove static pattern rule.
3334 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3335 Ulrich Drepper <drepper@redhat.com>
3337 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3338 alignment in callback function.
3339 * Makefile: Add rules to build and run tst-align3.
3340 * tst-align3.c: New file.
3342 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3344 * allocatestack.c (setxid_signal_thread): Add
3345 INTERNAL_SYSCALL_DECL (err).
3347 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3349 * allocatestack.c (setxid_signal_thread): Need to use
3350 atomic_compare_and_exchange_bool_acq.
3352 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3353 Jakub Jelinek <jakub@redhat.com>
3355 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3357 (struct pthread): Move specific_used field to avoid padding.
3358 Add setxid_futex field.
3359 * init.c (sighandler_setxid): Reset setxid flag and release the
3361 * allocatestack.c (setxid_signal_thread): New function. Broken
3362 out of the bodies of the two loops in __nptl_setxid. For undetached
3363 threads check whether they are exiting and if yes, don't send a signal.
3364 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3365 * pthread_create.c (start_thread): For undetached threads, check
3366 whether setxid bit is set. If yes, wait until signal has been
3369 * allocatestack.c (STACK_VARIABLES): Initialize them.
3370 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3372 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3374 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3375 waiters, awake all waiters on the associated mutex.
3377 2005-09-22 Roland McGrath <roland@redhat.com>
3379 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3380 ../sysdeps/x86_64/hp-timing.h).
3382 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3384 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3385 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3386 (lll_futex_wake_unlock): Define.
3387 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3388 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3389 (lll_futex_wake_unlock): Define.
3390 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3391 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3392 (lll_futex_wake_unlock): Define.
3393 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3394 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3395 (lll_futex_wake_unlock): Define.
3396 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3397 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3398 (lll_futex_wake_unlock): Define.
3399 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3400 lll_futex_wake_unlock.
3401 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3402 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3403 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3404 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3405 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3406 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3408 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3410 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3411 Fix typo in register name.
3413 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3415 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3416 Use __sigfillset. Document that sigfillset does the right thing wrt
3419 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3422 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3423 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3424 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3425 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3426 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3427 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3429 * Makefile (tests): Add tst-initializers1.
3430 (CFLAGS-tst-initializers1.c): Set.
3431 * tst-initializers1.c: New test.
3433 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3435 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3436 Make sure __flags are located at offset 48 from the start of the
3439 2005-07-02 Roland McGrath <roland@redhat.com>
3441 * Makeconfig: Comment fix.
3443 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3445 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3446 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3447 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3448 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3449 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3450 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3451 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3452 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3453 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3454 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3456 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3458 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3459 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3460 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3462 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3463 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3464 field. Put in sysinfo field unconditionally.
3465 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3466 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3467 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3468 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3470 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3471 * pthread_create.c (__pthread_create_2_1): Use
3472 THREAD_COPY_STACK_GUARD macro.
3473 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3475 * tst-stackguard1.c: New file.
3476 * tst-stackguard1-static.c: New file.
3478 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3480 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3481 Invoke CGOTSETUP and CGOTRESTORE.
3482 (CGOTSETUP, CGOTRESTORE): Define.
3484 2005-05-29 Richard Henderson <rth@redhat.com>
3486 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3487 (tf_write, tf_writev): Use it.
3488 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3491 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3493 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3494 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3495 __librt_*_asynccancel@local.
3497 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3499 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3500 all occurrences of JUMPTARGET. Instead append @local to labels.
3502 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3504 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3505 size/alignment of struct pthread rather than tcbhead_t.
3506 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3508 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3510 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3513 2005-05-19 Richard Henderson <rth@redhat.com>
3515 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3516 __sync_val_compare_and_swap, not explicit _si variant.
3517 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3519 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3522 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3524 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3526 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3527 .eh_frame section, use cfi_* directives.
3529 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3531 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3534 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3537 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3540 2005-04-27 Roland McGrath <roland@redhat.com>
3542 * Makefile (tests): Remove tst-clock2.
3544 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3545 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3546 translating to the kernel clockid_t for our own process/thread clock.
3548 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3550 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3552 * old_pthread_cond_init.c: Include <errno.h>.
3553 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3554 process shared or uses clock other than CLOCK_REALTIME.
3555 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3557 2005-04-13 David S. Miller <davem@davemloft.net>
3559 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3560 * sysdeps/sparc/sparc64/clone.S: New file.
3562 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3565 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3566 __inline instead of inline.
3567 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3569 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3571 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3572 functionally equivalent, but shorter instructions.
3573 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3574 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3575 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3577 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3578 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3579 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3580 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3582 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3583 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3585 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3586 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3587 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3588 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3589 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3591 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3593 * sysdeps/mips/Makefile: New file.
3594 * sysdeps/mips/nptl-sysdep.S: New file.
3595 * sysdeps/mips/tcb-offsets.sym: New file.
3596 * sysdeps/mips/pthread_spin_lock.S: New file.
3597 * sysdeps/mips/pthread_spin_trylock.S: New file.
3598 * sysdeps/mips/pthreaddef.h: New file.
3599 * sysdeps/mips/tls.h: New file.
3600 * sysdeps/mips/jmpbuf-unwind.h: New file.
3601 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3602 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3603 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3604 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3605 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3606 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3607 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3608 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3609 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3610 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3612 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3615 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3618 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3620 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3622 2005-02-25 Roland McGrath <roland@redhat.com>
3624 * alloca_cutoff.c: Correct license text.
3625 * tst-unload.c: Likewise.
3626 * sysdeps/pthread/allocalim.h: Likewise.
3627 * sysdeps/pthread/pt-initfini.c: Likewise.
3628 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3629 * sysdeps/pthread/bits/sigthread.h: Likewise.
3630 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3631 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3633 2005-02-16 Roland McGrath <roland@redhat.com>
3635 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3636 Use unsigned int * for ptr_nthreads.
3638 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3641 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3644 2005-02-07 Richard Henderson <rth@redhat.com>
3647 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3650 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3652 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3653 order of arguments in invocation of atomic_add_zero.
3655 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3658 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3659 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3660 at least gotntpoff relocation and addition.
3661 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3663 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3665 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3668 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3670 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3671 entry for static tls deallocation fix.
3672 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3673 also contains information whether the memory pointed to is static
3675 * sysdeps/i386/tls.h: Likewise.
3676 * sysdeps/ia64/tls.h: Likewise.
3677 * sysdeps/powerpc/tls.h: Likewise.
3678 * sysdeps/s390/tls.h: Likewise.
3679 * sysdeps/sh/tls.h: Likewise.
3680 * sysdeps/sparc/tls.h: Likewise.
3681 * sysdeps/x86_64/tls.h: Likewise.
3683 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3685 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3687 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3689 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3691 * Makefile (tests): Add tst-align2.
3692 * tst-align2.c: New test.
3693 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3694 -mpreferred-stack-boundary=4.
3696 2004-12-18 Roland McGrath <roland@redhat.com>
3698 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3699 New file removed withdrawn for the moment.
3701 2004-12-17 Richard Henderson <rth@redhat.com>
3703 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3704 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3706 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3708 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3709 Increased PTHREAD_STACK_MIN.
3711 * tst-context1.c (stacks): Use bigger stack size.
3713 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3715 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3716 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3718 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3720 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3721 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3722 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3724 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3726 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3728 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3730 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3731 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3733 * tst-getpid1.c: If child crashes, report this first. Print which
3736 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3738 * init.c (__pthread_initialize_minimal_internal): Also unblock
3741 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3743 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3744 _POSIX_THREAD_CPUTIME): Define to 0.
3745 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3746 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3747 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3748 __timer_signal_thread_tclk): Remove.
3749 (init_module): Remove their initialization.
3750 (thread_cleanup): Remove their cleanup assertions.
3751 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3752 __timer_signal_thread_tclk): Remove.
3753 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3754 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3755 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3757 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3759 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3760 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3762 * Makefile (tests): Add tst-getpid2.
3763 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3764 (do_test): Use it. Use __clone2 instead of clone on ia64.
3765 * tst-getpid2.c: New test.
3767 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3769 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3771 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3773 * Makefile (tests): Add tst-getpid1.
3774 * tst-getpid1.c: New file.
3775 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3776 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3778 2004-12-02 Roland McGrath <roland@redhat.com>
3780 * Makefile (libpthread-nonshared): Variable removed.
3781 ($(objpfx)libpthread_nonshared.a): Target removed.
3782 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3783 These are now handled by generic magic from
3784 libpthread-static-only-routines being set.
3786 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3788 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3789 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3790 _POSIX_THREAD_PRIO_PROTECT): Define.
3791 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3792 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3793 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3795 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3797 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3798 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3799 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3800 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3801 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3802 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3803 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3805 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3807 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3809 * Makefile (libpthread-routines): Add pthread_setschedprio.
3810 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3811 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3812 * pthread_setschedprio.c: New file.
3814 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3816 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3817 * pthread_cancel.c (pthread_create): Likewise.
3819 * Makefile (libpthread-routines): Add vars.
3820 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3821 * init.c (__default_stacksize, __is_smp): Remove.
3823 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3824 and define a wrapper macro.
3825 (PTHREAD_STATIC_FN_REQUIRE): Define.
3826 * allocatestack.c (__find_thread_by_id): Undefine.
3827 * pthread_create (__pthread_keys): Remove.
3828 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3829 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3830 PTHREAD_STATIC_FN_REQUIRE.
3832 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3834 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3835 parameter to REGISTER macro.
3837 2004-11-17 Roland McGrath <roland@redhat.com>
3839 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3840 Make sure SIGCANCEL is blocked as well.
3842 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3844 * sysdeps/pthread/setxid.h: New file.
3845 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3846 (struct xid_command): Add forward decl.
3847 (struct pthread_functions): Change return type of __nptl_setxid hook
3849 * pthreadP.h (__nptl_setxid): Change return type to int.
3850 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3851 calling thread, return its return value and set errno on failure.
3852 * descr.h (struct xid_command): Change id type to long array.
3854 * Makefile: Add rules to build and test tst-setuid1 and
3856 * tst-setuid1.c: New test.
3857 * tst-setuid1-static.c: New test.
3859 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3861 * Makefile (tests): Add tst-exit3.
3862 * tst-exit3.c: New test.
3864 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3866 * Makefile (tests): Add tst-exit2.
3867 * tst-exit2.c: New file.
3869 2004-11-09 Roland McGrath <roland@redhat.com>
3872 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3873 here, before calling clone.
3874 * pthread_create.c (start_thread): Don't do it here.
3876 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3878 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3880 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3882 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3883 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3886 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3888 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3889 if sched_priority is not between minprio and maxprio.
3891 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3893 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3894 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3896 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3897 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3899 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3901 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3902 not-cancelable I/O functions.
3904 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3906 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3907 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3908 make sure 2 is stored in the futex and we looked at the old value.
3909 Fix a few other problems to return the correct value.
3911 2004-10-14 Richard Henderson <rth@redhat.com>
3913 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3916 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3918 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3919 of pthread-functions.h and pthreaddef.h.
3920 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3922 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3923 Change __data.__nwaiters from int to unsigned int.
3925 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3926 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3928 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3931 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3932 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3934 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3936 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3937 test fails, remove message queue.
3938 (tf_msgsnd): Likewise.
3940 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3942 * tst-clock1.c: Change #ifdef to #if defined.
3943 * tst-clock2.c: Likewise.
3944 * tst-cond11.c: Likewise.
3946 * sysdeps/pthread/timer_create.c (timer_create): Use
3947 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3948 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3951 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3953 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3954 _POSIX_THREAD_CPUTIME): Define to 0.
3956 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3958 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3959 and _POSIX_THREAD_CPUTIME to zero.
3960 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3961 * tst-barrier2.c: Fix testing for POSIX feature.
3962 * tst-clock1.c: Likewise.
3963 * tst-clock2.c: Likewise.
3964 * tst-cond11.c: Likewise.
3965 * tst-cond4.c: Likewise.
3966 * tst-cond6.c: Likewise.
3967 * tst-flock2.c: Likewise.
3968 * tst-mutex4.c: Likewise.
3969 * tst-mutex9.c: Likewise.
3970 * tst-rwlock12.c: Likewise.
3971 * tst-rwlock4.c: Likewise.
3972 * tst-signal1.c: Likewise.
3973 * tst-spin2.c: Likewise.
3974 * sysdeps/pthread/posix-timer.h: Likewise.
3975 * sysdeps/pthread/timer_create.c: Likewise.
3976 * sysdeps/pthread/timer_routines.c: Likewise.
3978 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3980 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3981 (__lll_mutex_timedlock_wait): Address futex correctly.
3983 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3984 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3985 make sure 2 is stored in the futex and we looked at the old value.
3986 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3987 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3988 which might very well made the code not working at all before.
3991 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3993 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3994 allow SIGSETXID to be sent.
3995 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3996 for SIGSETXID to be defined.
3997 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3998 SIGSETXID cannot be blocked.
4000 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4001 Add __extension__ to long long types.
4002 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4003 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4004 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4005 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4006 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4007 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4008 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4010 2004-09-25 Ulrich Drepper <drepper@redhat.com>
4012 * descr.h (struct pthread): Add stopped_start field.
4013 * sysdeps/pthread/createthread.c (create_thread): Set
4014 start_stopped flag in descriptor for new thread appropriately.
4015 * pthread_create.c (start_thread): Only take lock to be stopped on
4016 startup if stopped_start flag says so.
4018 2004-09-24 Ulrich Drepper <drepper@redhat.com>
4020 * pthread_create.c (__pthread_create_2_1): Remember whether thread
4021 is created detached and if yes, do not try to free the stack in case
4022 the thread creation failed.
4023 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4024 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4025 case there has been no error. [BZ #405]
4027 * pthread_create.c (start_thread): Don't wait for scheduler data
4028 etc to be set at the beginning of the function. The cancellation
4029 infrastructure must have been set up. And enable async
4030 cancellation before potentially going to sleep. [BZ #401]
4032 2004-09-20 Ulrich Drepper <drepper@redhat.com>
4034 * Versions: Remove exports for pthread_set*id_np functions.
4035 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4037 * Makefile: Don't build pthread_set*id code for now.
4039 2004-09-19 Ulrich Drepper <drepper@redhat.com>
4041 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4043 * allocatestack.c (__nptl_setxid): New function.
4044 * descr.h (struct xid_command): Define type.
4045 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4046 (sighandler_setxid): New function.
4047 (__pthread_initialize_minimal): Register sighandler_setxid for
4049 * pt-allocrtsig.c: Update comment.
4050 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
4051 Declare __nptl_setxid.
4052 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4053 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4054 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4055 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4056 and pthread_setresuid_np.
4057 * pthread_setgid_np.c: New file.
4058 * pthread_setuid_np.c: New file.
4059 * pthread_setegid_np.c: New file.
4060 * pthread_seteuid_np.c: New file.
4061 * pthread_setregid_np.c: New file.
4062 * pthread_setreuid_np.c: New file.
4063 * pthread_setresgid_np.c: New file.
4064 * pthread_setresuid_np.c: New file.
4065 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4066 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4067 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4068 and pthread_setresuid_np.
4069 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4070 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4071 pthread_setregid, and pthread_setresgid.
4073 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4075 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4076 ENOMEM when out of memory.
4078 2004-09-10 Roland McGrath <roland@redhat.com>
4081 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4082 code, since we don't try to use the broken CLONE_STOPPED any more.
4083 * pthread_create.c (start_thread): Likewise.
4085 2004-09-15 Richard Henderson <rth@redhat.com>
4087 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4089 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4091 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4092 (__libc_unwind_longjmp): Delete macro and declare as function.
4093 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4094 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4096 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4097 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4098 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4100 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4102 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4104 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4105 types also for __USE_XOPEN2K.
4106 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4107 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4108 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4109 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4110 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4111 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4112 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4115 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4117 * sysdeps/pthread/pthread.h
4118 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4119 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4120 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4121 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4124 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4126 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4127 PSEUDO to be used with . prefix.
4129 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4130 Use atomic_increment instead of atomic_exchange_and_add.
4131 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4133 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4135 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4138 * allocatestack.c (allocate_stack): Use atomic_increment_val
4139 instead of atomic_exchange_and_add.
4140 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4141 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4143 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4146 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4147 the initialization function might throw.
4149 2005-09-05 Richard Henderson <rth@redhat.com>
4151 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4152 Move definition inside libpthread, libc, librt check. Provide
4153 definition for rtld.
4155 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4157 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4158 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4159 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4160 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4161 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4162 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4163 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4164 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4167 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4168 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4169 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4171 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4172 Decrement __nwaiters. If pthread_cond_destroy has been called and
4173 this is the last waiter, signal pthread_cond_destroy caller and
4174 avoid using the pthread_cond_t structure after unlock.
4175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4176 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4177 Read clock type from the least significant bits of __nwaiters instead
4179 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4180 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4182 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4185 * Makefile (tests): Add tst-cond20 and tst-cond21.
4186 * tst-cond20.c: New test.
4187 * tst-cond21.c: New test.
4188 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4189 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4191 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4193 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4194 (pthread_cond_t): Likewise.
4195 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4197 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4199 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4201 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4202 (cond_nwaiters): New.
4204 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4205 if there are waiters not signalled yet.
4206 Wait until all already signalled waiters wake up.
4207 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4208 __nwaiters. If pthread_cond_destroy has been called and this is the
4209 last waiter, signal pthread_cond_destroy caller and avoid using
4210 the pthread_cond_t structure after unlock.
4211 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4212 decrement it when leaving. If pthread_cond_destroy has been called
4213 and this is the last waiter, signal pthread_cond_destroy caller.
4214 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4215 Likewise. Read clock type from the least significant bits of
4216 __nwaiters instead of __clock.
4217 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4218 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4219 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4220 clock type just from the last COND_CLOCK_BITS bits of value.
4221 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4222 instead of __clock, just from second bit of condattr's value.
4224 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4226 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4227 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4229 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4231 2004-08-15 Roland McGrath <roland@frob.com>
4233 * pthread_atfork.c: Update copyright terms including special exception
4234 for these trivial files, which are statically linked into executables
4235 that use dynamic linking for the significant library code.
4237 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4239 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4240 pthread_rwlock_rdlock.
4241 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4242 Decrease __nr_readers_queued after reacquiring lock.
4243 * sysdeps/pthread/pthread_rwlock_timedrdlock
4244 (pthread_rwlock_timedrdlock): Likewise.
4245 Reported by Bob Cook <bobcook47@hotmail.com>.
4247 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4249 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4250 before pthread_barrier_wait.
4252 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4255 Remove unnecessary exception handling data.
4257 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4260 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4261 instead of clockid_t.
4263 2004-07-21 Roland McGrath <roland@redhat.com>
4265 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4267 2004-07-19 Roland McGrath <roland@redhat.com>
4269 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4271 2004-07-02 Roland McGrath <roland@redhat.com>
4273 * configure: Don't exit.
4275 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4277 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4278 (__pthread_cond_timedwait): Check for invalid nanosecond in
4281 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4283 * Makefile: Add rules to build and run tst-fini1.
4284 * tst-fini1.c: New file.
4285 * tst-fini1mod.c: New file.
4287 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4289 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4290 if no cancellation support is needed.
4291 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4292 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4293 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4294 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4295 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4296 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4297 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4298 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4299 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4301 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4302 only if not already defined.
4304 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4306 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4307 constraint "m" instead of "0" for futex.
4309 * shlib-versions: Add powerpc64-.*-linux.*.
4311 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4313 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4314 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4316 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4317 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4320 2004-06-29 Roland McGrath <roland@redhat.com>
4322 * Banner: NPTL no longer has its own version number.
4323 * Makefile (nptl-version): Variable removed.
4324 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4325 using $(version), the glibc version number.
4327 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4329 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4330 Fix branch offset for a PLT entry.
4331 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4333 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4335 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4337 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4340 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4342 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4345 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4347 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4348 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4350 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4351 (pthread_rwlock_timedrdlock): Likewise.
4353 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4355 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4356 Set __r7 to val, not mutex.
4358 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4360 * Makefile: Add rules to build tst-rwlock14.
4361 * tst-rwlock14.c: New file.
4363 2004-06-24 Boris Hu <boris.hu@intel.com>
4365 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4367 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4369 2004-06-19 Andreas Jaeger <aj@suse.de>
4371 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4372 assembler in last patch.
4374 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4376 * sysdeps/pthread/pthread_cond_timedwait.c
4377 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4378 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4379 (__pthread_cond_timedwait): Check for invalid nanosecond in
4381 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4382 * tst-cond19.c: New file.
4383 * Makefile: Add rules to build and run tst-cond19.
4385 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4387 * tst-context1.c (GUARD_PATTERN): Defined.
4388 (tst_context_t): Define struct containing ucontext_t & guard words.
4389 (ctx): Declare as an array of tst_context_t.
4390 (fct): Verify uc_link & guard words are still valid.
4391 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4393 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4395 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4396 Add __data.__futex field, reshuffle __data.__clock.
4397 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4398 (__pthread_cond_signal): Increment __futex at the same time as
4399 __wakeup_seq or __total_seq. Pass address of __futex instead of
4400 address of low 32-bits of __wakeup_seq to futex syscall.
4401 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4402 (__pthread_cond_wait): Likewise. Pass __futex value from before
4403 releasing internal lock to FUTEX_WAIT.
4404 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4405 (__pthread_cond_timedwait): Likewise.
4406 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4407 (FUTEX_CMP_REQUEUE): Define.
4408 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4409 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4410 Pass __futex value from before the unlock and __futex address instead
4411 of address of low 32-bits of __wakeup_seq to futex syscall.
4412 Fallback to FUTEX_WAKE all on any errors.
4414 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4416 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4418 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4419 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4420 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4421 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4422 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4424 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4426 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4427 Add memory clobber to inline assembly.
4428 (__lll_mutex_trylock): Likewise.
4429 (__lll_mutex_cond_trylock): Likewise.
4431 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4433 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4434 Pass val argument as 6th system call argument in %r7.
4436 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4438 * Makefile (tests): Add tst-cond16.
4439 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4440 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4441 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4442 Add __data.__futex field, reshuffle __data.__clock.
4443 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4444 (__pthread_cond_signal): Increment __futex at the same time as
4445 __wakeup_seq or __total_seq. Pass address of __futex instead of
4446 address of low 32-bits of __wakeup_seq to futex syscall.
4447 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4448 (__pthread_cond_wait): Likewise. Pass __futex value from before
4449 releasing internal lock to FUTEX_WAIT.
4450 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4451 (__pthread_cond_timedwait): Likewise.
4452 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4453 (FUTEX_CMP_REQUEUE): Define.
4454 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4455 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4456 Pass __futex value from before the unlock and __futex address instead
4457 of address of low 32-bits of __wakeup_seq to futex syscall.
4458 Fallback to FUTEX_WAKE all on any errors.
4459 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4461 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4462 internally. Return non-zero if error, zero if success.
4463 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4464 Add __data.__futex field, reshuffle __data.__clock.
4465 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4467 (lll_futex_requeue): Add val argument, return 1 unconditionally
4469 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4470 Add __data.__futex field, reshuffle __data.__clock.
4471 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4473 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4474 internally. Return non-zero if error, zero if success.
4475 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4476 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4477 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4479 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4480 internally. Return non-zero if error, zero if success.
4481 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4482 Add __data.__futex field, reshuffle __data.__clock.
4483 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4485 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4486 internally. Return non-zero if error, zero if success.
4487 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4488 Add __data.__futex field, reshuffle __data.__clock.
4489 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4490 Add __data.__futex field, reshuffle __data.__clock.
4491 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4492 Increment __futex at the same time as __wakeup_seq or __total_seq.
4493 Pass address of __futex instead of address of low 32-bits of
4494 __wakeup_seq to futex syscall.
4495 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4496 Pass __futex value from before releasing internal lock
4498 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4499 Likewise. Avoid unnecessary shadowing of variables.
4500 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4501 Set __futex to 2 * __total_seq. Pass __futex value from before the
4502 unlock and __futex address instead of address of low 32-bits of
4503 __wakeup_seq to futex_requeue macro, adjust for new return value
4505 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4506 (__pthread_cond_signal): Increment __futex at the same time as
4507 __wakeup_seq or __total_seq. Pass address of __futex instead of
4508 address of low 32-bits of __wakeup_seq to futex syscall.
4509 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4510 (__pthread_cond_wait): Likewise. Pass __futex value from before
4511 releasing internal lock to FUTEX_WAIT.
4512 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4513 (__pthread_cond_timedwait): Likewise.
4514 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4515 (FUTEX_CMP_REQUEUE): Define.
4516 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4517 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4518 Pass __futex value from before the unlock and __futex address instead
4519 of address of low 32-bits of __wakeup_seq to futex syscall.
4520 Fallback to FUTEX_WAKE all on any errors.
4522 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4524 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4525 Add nop to align the end of critical section.
4526 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4528 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4530 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4531 Add __broadcast_seq field.
4532 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4533 all waiters as woken with woken_seq and bump broadcast counter.
4534 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4535 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4536 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4537 Comment typo fixes. Avoid returning -ETIMEDOUT.
4539 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4541 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4542 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4543 Reported by Kaz Kojima.
4545 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4547 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4549 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4551 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4552 __broadcast_seq with bc_seq after acquiring internal lock instead of
4555 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4557 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4559 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4560 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4561 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4562 (pthread_cond_t): Add __data.__broadcast_seq field.
4563 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4564 (FRAME_SIZE): Define.
4565 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4567 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4569 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4571 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4572 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4575 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4577 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4578 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4579 Add __broadcast_seq field.
4580 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4581 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4582 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4583 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4584 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4585 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4586 all waiters as woken with woken_seq and bump broadcast counter.
4587 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4589 __broadcast_seq field.
4590 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4591 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4592 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4593 * pthread_cond_init.c: Initialize __broadcast_seq field.
4594 * Makefile (tests): Add tst-cond17 and tst-cond18.
4595 Add .NOTPARALLEL goal.
4596 * tst-cond16.c: New file. From Jakub.
4597 * tst-cond17.c: New file. From Jakub.
4598 * tst-cond18.c: New file. From Jakub.
4600 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4602 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4606 Parametrize frame size. Correct some unwind info.
4607 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4609 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4611 * tst-stack3.c: Note testing functionality beyond POSIX.
4613 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4615 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4616 Change conditional from ifdef to if.
4618 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4620 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4621 SYSDEP_CANCEL_ERROR): Define.
4624 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4626 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4628 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4630 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4632 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4634 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4635 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4636 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4637 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4639 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4641 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4642 thread has all signals blocked.
4644 2004-04-18 Andreas Jaeger <aj@suse.de>
4646 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4647 (SEM_VALUE_MAX): Add missing brace.
4649 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4651 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4653 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4654 * sysdeps/pthread/tst-mqueue8x.c: New test.
4655 * tst-cancel4.c: Update comment about message queues.
4657 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4658 return it_value { 0, 0 }.
4659 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4661 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4662 assertion for SIGEV_NONE.
4663 (thread_attr_compare): Compare all attributes, not just a partial
4666 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4668 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4670 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4672 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4673 Just use a plain number.
4674 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4675 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4676 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4677 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4678 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4679 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4680 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4682 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4684 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4686 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4688 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4690 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4691 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4692 of calling sigwaitinfo.
4694 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4696 * allocatestack.c (allocate_stack): Set reported_guardsize
4698 * pthread_getattr_np.c (pthread_getattr_np): Use
4699 reported_guardsize instead of guardsize.
4700 * descr.h (struct pthread): Add reported_guardsize field.
4702 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4704 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4706 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4708 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4710 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4712 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4713 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4714 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4715 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4716 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4718 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4719 (_POSIX_MESSAGE_PASSING): Define.
4720 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4721 (_POSIX_MESSAGE_PASSING): Define.
4722 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4723 (_POSIX_MESSAGE_PASSING): Define.
4725 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4727 * tst-context1.c (fct): Check whether correct stack is used.
4729 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4731 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4732 matching constraints for asm mem parameters.
4734 * tst-clock2.c (tf): Don't define unless needed.
4736 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4738 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4741 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4743 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4744 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4745 * pthreadP.h: Declare __nptl_deallocate_tsd.
4746 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4749 * Makefile (tests): Add tst-tsd5.
4750 * tst-tsd5.c: New file.
4752 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4754 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4755 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4756 is SHLIB_COMPAT check.
4757 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4758 (__pthread_attr_getaffinity_old): Likewise.
4759 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4760 (__pthread_getaffinity_old): Likewise.
4761 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4762 (__pthread_setaffinity_old): Likewise.
4764 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4766 * allocatestack.c (_make_stacks_executable): Call
4767 _dl_make_stack_executable first.
4769 2004-03-24 Roland McGrath <roland@redhat.com>
4771 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4772 constraint instead of "0".
4774 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4776 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4777 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4779 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4780 code to avoid warning.
4782 2004-03-24 Andreas Jaeger <aj@suse.de>
4784 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4785 (__pthread_attr_setaffinity_old): Remove const.
4787 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4789 * sysdeps/unix/sysv/linux/smp.h: New file.
4790 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4791 * init.c: Define __is_smp.
4792 (__pthread_initialize_minimal_internal): Call is_smp_system to
4793 initialize __is_smp.
4794 * pthreadP.h: Declare __is_smp.
4795 Define MAX_ADAPTIVE_COUNT is necessary.
4796 * pthread_mutex_init.c: Add comment regarding __spins field.
4797 * pthread_mutex_lock.c: Implement adaptive mutex type.
4798 * pthread_mutex_timedlock.c: Likewise.
4799 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4800 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4802 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4803 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4804 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4805 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4806 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4807 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4808 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4809 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4810 lll_mutex_cond_trylock.
4811 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4812 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4813 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4814 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4815 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4816 Define BUSY_WAIT_NOP.
4817 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4818 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4820 * tst-mutex5.c: Add support for testing adaptive mutexes.
4821 * tst-mutex7.c: Likewise.
4822 * tst-mutex5a.c: New file.
4823 * tst-mutex7a.c: New file.
4824 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4826 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4827 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4828 vgettimeofday call might destroy the content.
4830 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4833 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4834 No need to restrict type of ret. Make it int. Add comment.
4836 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4837 Remove unnecessary setne instruction.
4839 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4841 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4842 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4843 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4844 If realloc fails, break out of the loop.
4846 2004-03-20 Andreas Jaeger <aj@suse.de>
4848 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4849 (__pthread_setaffinity_old): Fix interface.
4850 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4851 (__pthread_getaffinity_old): Likewise.
4853 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4854 (__pthread_setaffinity_new): Remove duplicate declaration.
4856 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4858 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4859 the return value to a safe register.
4860 (CDISABLE): Set the function argument correctly.
4862 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4864 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4865 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4866 Rewrite so that only one locked memory operation per round is needed.
4867 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4868 (pthread_barrier_wait): After wakeup, release lock only when the
4869 last thread stopped using the barrier object.
4870 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4871 (__pthread_cond_wait): Don't store mutex address if the current
4872 value is ~0l. Add correct cleanup support and unwind info.
4873 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4874 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4875 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4876 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4877 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4878 Add correct cleanup support and unwind info.
4879 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4880 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4881 information for syscall wrappers.
4883 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4885 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4886 cpusetsize field, remove next.
4887 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4888 parameter for size of the CPU set.
4889 (pthread_setaffinity_np): Likewise.
4890 (pthread_attr_getaffinity_np): Likewise.
4891 (pthread_attr_setaffinity_np): Likewise.
4892 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4893 interface change, keep compatibility code.
4894 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4895 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4896 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4897 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4898 __pthread_getaffinity_np.
4899 * Versions: Add version for changed interfaces.
4900 * tst-attr3.c: Adjust test for interface change.
4901 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4902 increasing buffer sizes.
4903 * pthread_attr_destroy.c: Remove unused list handling.
4904 * pthread_attr_init.c: Likewise.
4906 2004-03-17 Roland McGrath <roland@redhat.com>
4908 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4909 first argument to clock_getres so we ever enable kernel timers.
4911 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4913 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4915 2004-03-12 Richard Henderson <rth@redhat.com>
4917 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4918 oldvalue from CENABLE to CDISABLE.
4920 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4922 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4923 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4924 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4925 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4927 2004-03-11 Richard Henderson <rth@redhat.com>
4929 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4930 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4931 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4933 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4935 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4936 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4937 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4939 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4941 * forward.c (__pthread_cond_broadcast_2_0,
4942 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4943 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4944 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4946 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4948 * sysdeps/sh/tcb-offsets.sym: Add PID.
4949 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4950 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4952 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4954 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4955 include <sysdep-cancel.h>, vfork is no cancellation point.
4956 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4957 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4958 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4960 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4962 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4964 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4965 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4967 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4969 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4970 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4971 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4972 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4973 of DO_CALL_VIA_BREAK. Work around a gas problem.
4975 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4976 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4977 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4978 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4979 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4980 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4982 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4983 a local register for saving old PID. Negate PID in parent upon exit.
4985 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4987 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4988 before syscall, set to the old value in the parent afterwards.
4989 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4990 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4992 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4993 before syscall, set to the old value in the parent afterwards.
4994 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4995 * sysdeps/s390/tcb-offsets.sym: Add PID.
4997 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4998 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4999 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5000 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5001 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5002 * sysdeps/sparc/tcb-offsets.sym: Add PID.
5004 2004-03-10 Andreas Schwab <schwab@suse.de>
5006 * sysdeps/ia64/tcb-offsets.sym: Add PID.
5007 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5008 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5010 2004-03-09 Jakub Jelinek <jakub@redhat.com>
5012 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5013 * tst-cancel21.c (do_one_test): Likewise.
5014 Reported by Gordon Jin <gordon.jin@intel.com>.
5016 2004-02-09 Jakub Jelinek <jakub@redhat.com>
5018 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5019 if non-zero and set to INT_MIN if zero.
5020 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5021 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5022 (SAVE_PID, RESTORE_PID): Define.
5024 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5025 Use relative path to avoid including NPTL i386/vfork.S.
5026 (SAVE_PID, RESTORE_PID): Define.
5027 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5028 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5029 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5031 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5032 * tst-vfork1.c: New test.
5033 * tst-vfork2.c: New test.
5034 * tst-vfork1x.c: New test.
5035 * tst-vfork2x.c: New test.
5037 2004-03-08 Ulrich Drepper <drepper@redhat.com>
5039 * sysdeps/i386/tcb-offsets.sym: Add PID.
5040 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5041 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5042 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5044 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
5046 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5048 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
5050 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5053 2004-03-07 Ulrich Drepper <drepper@redhat.com>
5055 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5058 * tst-once4.c: Remove unnecessary macro definition.
5060 * tst-mutex7.c (do_test): Limit thread stack size.
5061 * tst-once2.c (do_test): Likewise.
5062 * tst-tls3.c (do_test): Likewise.
5063 * tst-tls1.c (do_test): Likewise.
5064 * tst-signal3.c (do_test): Likewise.
5065 * tst-kill6.c (do_test): Likewise.
5066 * tst-key4.c (do_test): Likewise.
5067 * tst-join4.c (do_test): Likewise.
5068 * tst-fork1.c (do_test): Likewise.
5069 * tst-context1.c (do_test): Likewise.
5070 * tst-cond2.c (do_test): Likewise.
5071 * tst-cond10.c (do_test): Likewise.
5072 * tst-clock2.c (do_test): Likewise.
5073 * tst-cancel10.c (do_test): Likewise.
5074 * tst-basic2.c (do_test): Likewise.
5075 * tst-barrier4.c (do_test): Likewise.
5077 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5079 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5081 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5083 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5084 (__pthread_cond_timedwait): Optimize wakeup test.
5085 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5086 (__pthread_cond_wait): Likewise.
5087 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5088 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5091 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5093 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5094 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5095 the atomic instruction needed.
5096 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5097 (__lll_mutex_lock_wait): Likewise.
5099 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5101 * Makefile (tests): Add tst-cond14 and tst-cond15.
5102 * tst-cond14.c: New file.
5103 * tst-cond15.c: New file.
5105 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5107 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5108 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5109 needs to be implemented differently to be useful.
5111 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5113 * pthread_attr_setschedparam.c: Don't test priority against limits
5114 here. Set ATTR_FLAG_SCHED_SET flag.
5115 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5116 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5117 from parent thread to child. If attribute is used and scheduling
5118 parameters are not inherited, copy parameters from attribute or
5119 compute them. Check priority value.
5120 * pthread_getschedparam.c: If the parameters aren't known yet get
5121 them from the kernel.
5122 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5123 ATTR_FLAG_POLICY_SET flag for thread.
5124 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5125 and ATTR_FLAG_POLICY_SET.
5127 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5129 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5130 fail if stack address hasn't been set. Just return 0.
5132 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5134 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5135 libpthread for the files in this list.
5136 (CFLAGS-tst-unload): Removed.
5137 * tst-unload.c (do_test): Don't use complete path for
5140 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5143 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5145 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5146 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5147 operation per round is needed.
5148 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5149 (__lll_mutex_lock_wait): Likewise.
5151 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5153 * tst-cancel9.c (cleanup): Don't print to stderr.
5155 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5157 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5159 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5161 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5162 (__syscall_error_handler2): Call CDISABLE.
5163 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5164 (__syscall_error_handler2): Call CDISABLE.
5166 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5167 Release lock before the loop, don't reacquire it.
5169 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5171 2004-02-19 Andreas Schwab <schwab@suse.de>
5173 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5176 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5178 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5179 (pthread_barrier_wait): After wakeup, release lock only when the
5180 last thread stopped using the barrier object.
5181 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5182 (pthread_barrier_wait): Likewise.
5183 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5185 * Makefile (tests): Add tst-barrier4.
5186 * tst-barrier4.c: New file.
5188 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5189 (__pthread_cond_timedwait): Perform timeout test while holding
5190 internal lock to prevent wakeup race.
5191 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5192 * sysdeps/pthread/pthread_cond_timedwait.c
5193 (__pthread_cond_timedwait): Likewise.
5194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5195 (__pthread_cond_timedwait): Likewise.
5197 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5199 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5200 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5201 * Makefile (tests): Add tst-rwlock13.
5202 * tst-rwlock13.c: New test.
5204 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5206 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5207 (__condvar_tw_cleanup): Little optimization.
5208 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5210 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5212 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5213 libpthread as "lib" parameter to SHLIB_COMPAT.
5214 (__novmx_siglongjmp): Fix typo in function name.
5215 (__novmx_longjmp): Fix typo in function name.
5217 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5219 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5222 * sysdeps/generic/pt-longjmp.c: Moved to...
5223 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5225 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5227 * Makefile (libpthread-routines): Add pt-cleanup.
5228 * pt-longjmp.c: Removed.
5229 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5230 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5231 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5232 Version longjmp, siglongjmp for GLIBC_2.3.4.
5233 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5235 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5237 * sysdeps/pthread/pthread_cond_timedwait.c
5238 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5239 Reuse code. Add __builtin_expects.
5241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5242 (__pthread_cond_timedwait): Get internal lock in case timeout has
5243 passed before the futex syscall.
5244 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5246 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5248 * allocatestack.c: Pretty printing.
5250 * sysdeps/pthread/createthread.c (create_thread): Don't add
5251 CLONE_DETACHED bit if it is not necessary.
5253 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5255 * pthread_getattr_np.c: Include ldsodefs.h.
5257 2004-01-16 Richard Henderson <rth@redhat.com>
5259 * allocatestack.c: Don't declare __libc_stack_end.
5260 * init.c (__pthread_initialize_minimal_internal): Likewise.
5261 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5263 2004-01-15 Richard Henderson <rth@redhat.com>
5265 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5266 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5267 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5268 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5269 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5270 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5271 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5272 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5274 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5276 * init.c (pthread_functions): Make array const.
5278 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5280 * allocatestack.c (__make_stacks_executable): Change interface.
5281 Check parameters. Pass parameter on to libc counterpart.
5282 * pthreadP.h: Change declaration.
5284 2004-01-13 Richard Henderson <rth@redhat.com>
5286 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5288 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5291 * sysdeps/alpha/Makefile: New file.
5292 * sysdeps/alpha/tcb-offsets.sym: New file.
5293 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5294 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5296 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5299 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5301 * Makefile (tests): Add tst-backtrace1.
5302 * tst-backtrace1.c: New test.
5304 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5306 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5307 register as second parameter to the REGISTER macro.
5308 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5309 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5310 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5311 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5312 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5313 of thread register as second parameter to REGISTER macro in 64 case.
5315 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5317 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5318 (CFLAGS-getpid.o): Defined.
5319 (CFLAGS-getpid.os): Defined.
5321 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5323 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5324 returned for main thread does not overlap with any other VMA.
5325 Patch by Jakub Jelinek.
5327 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5329 * tst-raise1.c: Include stdio.h.
5331 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5333 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5334 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5335 If pid is 0, set it to selftid.
5336 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5337 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5338 != 0, return self->tid without doing a syscall.
5339 * descr.h (struct pthread): Move pid field after tid.
5341 * Makefile (tests): Add tst-raise1.
5342 * tst-raise1.c: New file.
5344 2003-12-23 Roland McGrath <roland@redhat.com>
5346 * tst-oddstacklimit.c: New file.
5347 * Makefile (tests): Add it.
5348 (tst-oddstacklimit-ENV): New variable.
5350 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5351 value up to page size for __default_stacksize.
5353 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5355 * Makefile (tests): Add tst-eintr5.
5356 * tst-eintr5.c: New file.
5358 * eintr.c (eintr_source): Prevent sending signal to self.
5360 * tst-eintr2.c (tf1): Improve error message.
5362 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5364 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5365 * sysdeps/unix/sysv/linux/getpid.c: New file.
5366 * pthread_cancel.c: Add comment explaining use of PID field.
5367 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5368 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5369 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5370 temporarily to signal the field must not be relied on and updated
5372 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5373 temporarily negative.
5374 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5376 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5378 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5379 (eintr_source): If ARG != NULL, use pthread_kill.
5380 * tst-eintr1.c: Adjust for this change.
5381 * tst-eintr2.c: Likewise.
5382 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5383 * tst-eintr3.c: New file.
5384 * tst-eintr4.c: New file.
5386 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5388 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5389 if CANCELSTATE_BITMASK is set.
5390 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5393 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5394 (tests-reverse): Add tst-cancel23.
5395 * tst-cancel22.c: New test.
5396 * tst-cancel23.c: New test.
5398 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5400 * tst-eintr1.c: Better error messages.
5402 * Makefile (tests): Add tst-eintr2.
5403 * tst-eintr2.c: New file.
5405 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5407 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5408 (CFLAGS-tst-cancelx21.c): Set.
5409 * tst-cancel21.c: New test.
5410 * tst-cancelx21.c: New test.
5412 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5414 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5415 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5416 * pt-longjmp.c: Include jmpbuf-unwind.h.
5417 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5418 _JMPBUF_UNWINDS. Adjust compared pointers.
5419 * init.c (__pthread_initialize_minimal_internal): Initialize
5420 pd->stackblock_size.
5421 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5422 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5423 * sysdeps/i386/jmpbuf-unwind.h: New file.
5424 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5425 * sysdeps/s390/jmpbuf-unwind.h: New file.
5426 * sysdeps/sh/jmpbuf-unwind.h: New file.
5427 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5428 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5429 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5430 (_JMPBUF_CFA_UNWINDS): Remove.
5431 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5433 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5435 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5436 (CFLAGS-tst-cancelx20.c): Set.
5437 * tst-cancel20.c: New test.
5438 * tst-cancelx20.c: New test.
5440 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5442 * init.c (__pthread_initialize_minimal_internal): Don't treat
5443 architectures with separate register stack special here when
5444 computing default stack size.
5446 2003-12-17 Roland McGrath <roland@redhat.com>
5448 * Makefile (tst-cancelx7-ARGS): New variable.
5449 Reportd by Greg Schafer <gschafer@zip.com.au>.
5451 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5453 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5454 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5455 (tst-stack3-ENV): Set.
5456 ($(objpfx)tst-stack3-mem): New.
5457 * tst-stack3.c: New test.
5459 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5461 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5462 Add unwind directives. Drop unused .regstk directive.
5463 (_fini_EPILOG_BEGINS): Add unwind directives.
5465 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5467 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5468 Assume parameter is a pointer.
5469 (lll_futex_wake): Likewise.
5470 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5472 (lll_futex_wake): Likewise.
5473 Reported by Boris Hu.
5474 * sysdeps/unix/sysv/linux/unregister-atfork.c
5475 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5477 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5479 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5481 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5482 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5483 __rtld_lock_initialize for ld.so lock.
5484 Patch in part by Adam Li <adam.li@intel.com>.
5486 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5488 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5489 in $(gnulib). Also, remove stale comment.
5491 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5493 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5494 advantage of new syscall stub and optimize accordingly.
5496 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5497 from SYS_futex, to match expectations of
5498 sysdep.h:DO_INLINE_SYSCALL.
5499 (lll_futex_clobbers): Remove.
5500 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5501 (lll_futex_wake): Likewise.
5502 (lll_futex_requeue): Likewise.
5503 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5504 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5506 (__lll_mutex_lock): Likewise.
5507 (__lll_mutex_cond_lock): Likewise.
5508 (__lll_mutex_timed_lock): Likewise.
5509 (__lll_mutex_unlock): Likewise.
5510 (__lll_mutex_unlock_force): Likewise.
5512 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5513 comes before the include of <sysdep.h>.
5514 (THREAD_SELF_SYSINFO): New macro.
5515 (THREAD_SYSINFO): Likewise.
5516 (INIT_SYSINFO): New macro.
5517 (TLS_INIT_TP): Call INIT_SYSINFO.
5519 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5521 * sysdeps/pthread/createthread.c (create_thread): Use
5522 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5523 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5524 THREAD_SELF_SYSINFO instead of open code.
5525 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5526 (THREAD_SYSINFO): Likewise.
5528 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5530 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5532 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5534 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5535 instead of .init. Patch by David Mosberger.
5537 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5539 * sysdeps/pthread/configure.in: Remove broken declaration in C
5540 cleanup handling check.
5542 2003-11-30 Andreas Jaeger <aj@suse.de>
5544 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5545 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5548 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5550 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5551 * pthread_attr_destroy.c: Include shlib-compat.h.
5552 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5553 is set in iattr->flags.
5554 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5556 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5558 * Makefile (distribute): Add tst-cleanup4aux.c.
5560 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5563 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5565 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5566 pthread_cond_signal.
5568 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5569 store mutex address if the current value is ~0l.
5570 * sysdeps/pthread/pthread_cond_timedwait.c
5571 (__pthread_cond_timedwait): Likewise.
5572 * sysdeps/pthread/pthread_cond_broadcast.c
5573 (__pthread_cond_broadcast): Don't use requeue for pshared
5576 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5577 (__pthread_cond_wait): Don't store mutex address if the current
5579 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5580 (__pthread_cond_timedwait): Likewise.
5581 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5582 (__pthread_cond_broadcast): Don't use requeue for pshared
5585 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5586 element with ~0l for pshared condvars, with NULL otherwise.
5588 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5589 (__pthread_cond_wait): Don't store mutex address if the current
5591 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5592 (__pthread_cond_timedwait): Likewise.
5593 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5594 (__pthread_cond_broadcast): Don't use requeue for pshared
5597 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5598 * tst-cond12.c: New file.
5599 * tst-cond13.c: New file.
5601 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5603 * sysdeps/pthread/configure.in: Make missing forced unwind support
5606 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5608 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5610 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5612 * Makefile: Add magic to clean up correctly.
5614 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5616 * unwind.c (FRAME_LEFT): Define.
5617 (unwind_stop): Handle old style cleanups here.
5618 (__pthread_unwind): Handle old style cleanups only if
5619 !HAVE_FORCED_UNWIND.
5620 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5621 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5622 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5623 ($(objpfx)tst-cleanupx4): Likewise.
5624 * tst-cleanup4.c: New test.
5625 * tst-cleanup4aux.c: New.
5626 * tst-cleanupx4.c: New test.
5628 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5630 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5631 lll_mutex_*lock macros to skip atomic operations on some archs.
5633 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5635 * sysdeps/pthread/tst-timer.c (main): Initialize
5636 sigev2.sigev_value as well.
5638 2003-10-15 Roland McGrath <roland@redhat.com>
5640 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5642 * sysdeps/pthread/configure: Regenerated.
5644 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5646 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5647 locking macros. No distinction between normal and mutex locking
5649 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5650 Merge bits from lowlevelmutex.S we still need.
5651 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5652 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5653 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5654 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5655 new mutex implementation.
5656 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5657 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5658 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5659 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5660 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5661 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5662 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5663 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5664 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5665 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5666 symbol for entry point to avoid cancellation.
5668 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5670 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5672 (SAVE_OLDTYPE_0): Fix a typo.
5674 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5676 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5677 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5679 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5681 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5684 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5686 * Makefile (tests): Add tst-cancel19.
5687 * tst-cancel19.c: New test.
5689 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5691 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5692 restoring of the old cancellation type.
5694 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5696 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5698 2003-09-27 Wolfram Gloger <wg@malloc.de>
5700 * sysdeps/pthread/malloc-machine.h: New file
5702 2003-09-24 Roland McGrath <roland@redhat.com>
5704 * allocatestack.c (__make_stacks_executable): Don't ignore return
5705 value from _dl_make_stack_executable.
5707 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5709 * allocatestack.c (__make_stacks_executable): Also change
5710 permission of the currently unused stacks.
5712 * allocatestack.c (change_stack_perm): Split out from
5713 __make_stacks_executable.
5714 (allocate_stack): If the required permission changed between the time
5715 we started preparing the stack and queueing it, change the permission.
5716 (__make_stacks_executable): Call change_stack_perm.
5718 * Makefile: Build tst-execstack-mod locally.
5719 * tst-execstack-mod.c: New file.
5721 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5723 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5725 2003-09-23 Roland McGrath <roland@redhat.com>
5727 * tst-execstack.c: New file.
5728 * Makefile (tests): Add it.
5729 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5730 (LDFLAGS-tst-execstack): New variable.
5732 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5733 whether to use PROT_EXEC for stack mmap.
5734 (__make_stacks_executable): New function.
5735 * pthreadP.h: Declare it.
5736 * init.c (__pthread_initialize_minimal_internal): Set
5737 GL(dl_make_stack_executable_hook) to that.
5739 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5741 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5742 recommendation from AMD re avoidance of lock prefix.
5744 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5746 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5747 lll_futex_timed_wait instead of lll_futex_wait.
5748 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5749 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5750 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5751 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5752 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5753 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5754 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5755 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5756 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5757 Completely revamp the locking macros. No distinction between
5758 normal and mutex locking anymore.
5759 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5760 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5761 __lll_lock_timedwait): Fix prototypes.
5762 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5763 __lll_lock_timedwait): Likewise.
5764 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5765 macros, add __builtin_expect.
5766 (lll_mutex_timedlock): Likewise. Fix return value.
5767 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5768 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5769 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5770 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5771 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5772 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5773 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5774 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5776 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5778 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5779 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5780 operation if possible.
5782 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5783 like jumping over the lock prefix.
5785 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5787 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5788 locking macros. No distinction between normal and mutex locking
5790 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5791 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5792 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5793 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5794 locking. Merge bits from lowlevelmutex.S we still need.
5795 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5796 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5797 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5798 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5799 * Makefile (routines): Remove libc-lowlevelmutex.
5800 (libpthread-rountines): Remove lowlevelmutex.
5801 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5802 for new mutex implementation.
5803 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5804 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5805 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5806 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5807 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5809 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5811 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5812 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5813 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5814 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5815 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5816 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5817 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5818 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5820 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5822 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5823 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5824 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5826 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5827 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5829 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5831 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5832 in parameters of asm with output parameters.
5834 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5835 type of DECR parameter to int.
5836 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5838 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5840 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5841 guardsize for each thread.
5843 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5845 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5846 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5847 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5849 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5850 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5852 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5853 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5854 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5855 (pthread_getaffinity_np): Add hidden_def.
5857 * Makefile (tests): Add tst-attr3.
5858 * tst-attr3.c: New test.
5860 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5862 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5864 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5865 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5867 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5869 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5870 * tst-align.c: Include tst-stack-align.h.
5871 (tf, do_test): Use TEST_STACK_ALIGN macro.
5873 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5875 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5878 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5880 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5881 stack-related values for the initial thread.
5883 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5885 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5887 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5889 * pthread_mutex_lock.c: Minor code rearrangements.
5891 2003-09-05 Roland McGrath <roland@redhat.com>
5893 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5894 Instead, include ../nptl_db/db_info.c to do its magic.
5895 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5896 (__pthread_pthread_key_2ndlevel_size): Likewise.
5897 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5898 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5899 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5900 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5901 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5902 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5903 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5904 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5905 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5906 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5907 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5908 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5909 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5910 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5911 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5912 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5913 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5915 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5917 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5918 of pthread_t to be compatible with LT.
5919 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5920 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5921 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5922 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5923 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5924 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5925 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5927 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5929 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5931 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5933 * unwind-forcedunwind.c: Move to...
5934 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5935 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5936 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5937 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5938 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5939 * unwind.c: Include jmpbuf-unwind.h.
5940 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5942 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5944 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5945 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5946 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5947 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5948 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5949 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5950 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5951 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5952 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5953 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5954 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5956 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5957 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5958 * Makefile (tests): Add tst-stack2.
5959 * tst-stack2.c: New test.
5960 * tst-stack1.c: Include limits.h and sys/param.h.
5961 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5963 * pthread_condattr_setpshared.c: Include errno.h.
5964 (pthread_condattr_setpshared): Return EINVAL if pshared
5965 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5967 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5968 defined symbol for entry point to avoid cancellation.
5969 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5971 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5973 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5975 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5977 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5979 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5980 __close_nocancel, __read_nocancel, __write_nocancel,
5981 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5982 libpthread.so or librt.so, define to corresponding function
5983 without _nocancel suffix.
5984 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5985 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5986 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5988 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5990 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5992 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5993 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5995 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5996 in subsections has a symbol associated with it.
5998 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5999 defined symbol for entry point to avoid cancellation.
6000 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6002 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6004 * Makefile (tests): Add tst-tls5.
6005 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6006 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6007 ($(objpfx)tst-tls5): New.
6008 ($(objpfx)tst-tls6.out): Likewise.
6009 (tests): Depend on $(objpfx)tst-tls6.out.
6010 * tst-tls3.c: Include stdint.h and pthreaddef.h.
6011 (do_test): Check pthread_self () return value alignment.
6012 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6013 (tf): Check pthread_self () return value alignment.
6014 * tst-tls5.c: New test.
6016 * tst-tls5mod.c: New.
6017 * tst-tls5moda.c: New.
6018 * tst-tls5modb.c: New.
6019 * tst-tls5modc.c: New.
6020 * tst-tls5modd.c: New.
6021 * tst-tls5mode.c: New.
6022 * tst-tls5modf.c: New.
6023 * tst-tls6.sh: New test.
6025 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6026 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6027 * init.c (pthread_functions): Initialize them.
6028 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6029 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6030 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6031 pthread_cond_timedwait@@GLIBC_2.3.2.
6033 2003-09-01 Jakub Jelinek <jakub@redhat.com>
6035 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6036 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6037 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6038 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6039 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6040 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6042 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6044 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6045 _POSIX_THREAD_PRIORITY_SCHEDULING.
6046 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6048 2003-08-31 Ulrich Drepper <drepper@redhat.com>
6050 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6051 nested function, use static inline function from libio.h.
6052 Code by Richard Henderson.
6054 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6057 2003-08-30 Jakub Jelinek <jakub@redhat.com>
6059 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6060 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6061 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6062 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6063 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6064 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6065 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6066 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6067 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6068 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6069 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6070 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6071 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6072 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6073 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6074 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6075 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6076 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6077 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6078 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6079 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6080 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6081 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6082 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6083 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6084 * sysdeps/sparc/tls.h: New file.
6085 * sysdeps/sparc/tcb-offsets.sym: New file.
6086 * sysdeps/sparc/Makefile: New file.
6087 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6088 * init.c [__sparc__] (__NR_set_tid_address): Define.
6090 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6092 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6093 _IO_release_lock): Define.
6095 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6097 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6098 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6100 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6102 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6103 (__pthread_cleanup_class): Add missing return types of member
6106 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6108 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6109 (lll_mutex_unlock_force): Add memory barrier between store and futex
6112 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6114 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6115 tempmsg in first loop.
6117 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6119 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6120 _POSIX_THREAD_PRIORITY_SCHEDULING.
6121 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6123 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6125 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6126 (__rtld_lock_default_lock_recursive,
6127 __rtld_lock_default_unlock_recursive): Define.
6128 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6129 __rtld_lock_unlock_recursive): Define using
6130 GL(_dl_rtld_*lock_recursive).
6131 * init.c (__pthread_initialize_minimal_internal): Initialize
6132 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6133 Lock GL(_dl_load_lock) the same number of times as
6134 GL(_dl_load_lock) using non-mt implementation was nested.
6136 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6137 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6139 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6141 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6144 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6146 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6148 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6150 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6151 to first syscall error check. Move syscall error check for tkill
6152 into __ASSUME_CLONE_STOPPED #ifdef.
6154 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6156 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6157 is not defined, do explicit synchronization.
6158 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6159 is not defined also unlock pd->lock for non-debugging case in case
6161 * pthread_create.c (start_thread): Always get and release pd->lock
6162 if __ASSUME_CLONE_STOPPED is not defined.
6163 (start_thread_debug): Removed. Adjust users.
6164 * allocatestack.c (allocate_stack): Always initialize lock if
6165 __ASSUME_CLONE_STOPPED is not defined.
6166 * Makefile (tests): Add tst-sched1.
6167 * tst-sched1.c: New file.
6169 * sysdeps/pthread/createthread.c (do_clone): Only use
6170 sched_setschduler and pass correct parameters.
6172 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6174 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6175 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6176 PTHREAD_STACK_MIN in comments.
6178 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6180 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6181 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6183 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6184 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6185 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6186 (__pthread_cleanup_upto): Fix prototype.
6187 (_longjmp_unwind): Adjust caller.
6188 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6189 Change second argument to const struct pointer.
6190 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6191 * tst-sem9.c (main): Likewise.
6192 * unwind.c: Include string.h for strlen prototype.
6194 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6196 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6197 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6198 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6200 Patch by Nicholas Miell <nmiell@attbi.com>.
6202 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6204 * init.c (__pthread_initialize_minimal_internal): Initialize
6205 GL(dl_init_static_tls).
6206 * pthreadP.h (__pthread_init_static_tls): New prototype.
6207 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6209 * Makefile (tests): Add tst-tls4.
6210 (modules-names): Add tst-tls4moda and tst-tls4modb.
6211 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6212 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6214 * tst-tls4.c: New file.
6215 * tst-tls4moda.c: New file.
6216 * tst-tls4modb.c: New file.
6218 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6220 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6221 before __timer_dealloc.
6222 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6223 Don't call list_unlink.
6225 2003-07-29 Roland McGrath <roland@redhat.com>
6227 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6229 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6231 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6232 Don't reuse struct aiocb A if it failed.
6233 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6234 not just one byte, as that does not block.
6236 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6238 * sysdeps/pthread/unwind-resume.c: New file.
6239 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6240 unwind-resume in csu subdir.
6241 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6243 (librt-sysdep_routines, librt-shared-only-routines): Add
6245 * sysdeps/pthread/rt-unwind-resume.c: New file.
6246 * unwind-forcedunwind.c: New file.
6247 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6248 (libpthread-shared-only-routines): Likewise.
6249 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6250 * pthreadP.h (pthread_cancel_init): New prototype.
6251 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6253 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6254 attr argument const struct pthread_attr *.
6256 * res.c (__res_state): Return __resp.
6257 * descr.h: Include resolv.h.
6258 (struct pthread): Add res field.
6259 * pthread_create.c: Include resolv.h.
6260 (start_thread): Initialize __resp.
6261 * Makefile (tests): Add tst-_res1.
6262 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6263 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6264 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6266 * tst-_res1.c: New file.
6267 * tst-_res1mod1.c: New file.
6268 * tst-_res1mod2.c: New file.
6270 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6272 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6274 * Makefile: Define various *-no-z-defs variables for test DSOs
6275 which has undefined symbols.
6277 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6279 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6280 Retry if the stwcx fails to store once_control.
6282 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6284 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6285 pthread_attr_setaffinity.
6286 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6287 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6288 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6289 * pthread_attr_destroy.c: Free cpuset element if allocated.
6290 * pthread_create.c: Pass iattr as additional parameter to
6292 * sysdeps/pthread/createthread.c: If attribute is provided and
6293 a new thread is created with affinity set or scheduling parameters,
6294 start thread with CLONE_STOPPED.
6295 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6296 pthread_attr_setaffinity.
6297 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6300 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6302 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6304 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6306 * sysdeps/pthread/configure.in: Require CFI directives also for
6309 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6311 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6314 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6316 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6318 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6319 registers as variables. Call __pthread_mutex_unlock_usercnt.
6320 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6321 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6322 not self pointer in __writer. Compare with TID to determine
6324 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6325 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6327 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6329 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6330 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6331 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6332 macros also when compiling librt.
6334 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6336 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6337 -fasynchronous-unwind-tables.
6338 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6339 (PSEUDO): Add cfi directives.
6340 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6342 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6345 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6347 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6348 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6349 * unwind.c (__pthread_unwind_next): Add hidden_def.
6350 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6352 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6353 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6354 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6356 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6357 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6359 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6360 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6361 __pthread_unregister_cancel and __pthread_unwind_next.
6363 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6365 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6366 different symbol for the cancellation syscall wrapper and
6367 non-cancellation syscall wrapper.
6368 (PSEUDO_END): Define.
6370 2003-07-05 Richard Henderson <rth@redhat.com>
6372 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6373 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6374 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6375 return actual return value from the syscall, not 0.
6377 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6379 * descr.h (struct pthread): Add pid field.
6380 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6381 (__reclaim_stacks): Likewise.
6382 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6383 also check for PID of the signal source.
6384 (__pthread_initialize_minimal_internal): Also initialize pid field
6385 of initial thread's descriptor.
6386 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6387 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6388 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6389 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6390 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6392 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6394 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6395 Fix use of parameter.
6396 (__libc_cleanup_pop): Likewise.
6398 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6400 * init.c (sigcancel_handler): Change parameters to match handler
6401 for SA_SIGACTION. Check signal number and code to recognize
6402 invalid invocations.
6404 2003-07-03 Roland McGrath <roland@redhat.com>
6406 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6407 Apply sizeof (struct pthread) bias to r13 value.
6409 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6411 * sysdeps/pthread/configure.in: Require CFI directives.
6413 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6415 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6416 libpthread compilation.
6417 * unwind.c (__pthread_unwind): Add hidden_def.
6418 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6420 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6422 * libc-cancellation.c (__libc_cleanup_routine): Define.
6423 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6424 (__pthread_cleanup_pop): Define.
6426 2003-07-01 Richard Henderson <rth@redhat.com>
6428 * sysdeps/alpha/elf/pt-initfini.c: New file.
6429 * sysdeps/alpha/pthread_spin_lock.S: New file.
6430 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6431 * sysdeps/alpha/pthreaddef.h: New file.
6432 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6433 * sysdeps/alpha/tls.h: New file.
6434 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6435 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6436 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6437 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6438 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6439 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6440 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6441 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6442 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6443 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6445 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6447 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6448 cleanup support and unwind info.
6450 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6452 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6453 Use correct cleanup handler registration. Add unwind info.
6454 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6455 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6456 * tst-once3.c: Add cleanup handler and check it is called.
6457 * tst-once4.c: Likewise.
6458 * tst-oncex3.c: New file.
6459 * tst-oncex4.c: New file.
6460 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6462 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6464 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6466 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6468 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6469 (tf_msgsnd): Likewise.
6471 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6472 premature returns a bit more.
6474 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6476 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6477 definition to the front.
6479 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6480 the cleanup functions to make the names unique. Fix dwarf opcode
6482 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6483 functions to make the names unique. Fix CFA offset for two blocks.
6485 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6487 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6488 missing closing braces.
6489 Patch by Christophe Saout <christophe@saout.de>.
6491 2003-06-24 Roland McGrath <roland@redhat.com>
6493 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6495 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6497 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6498 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6500 * pthreadP.h: Declare __find_thread_by_id.
6501 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6502 * pthread_clock_gettime.c: Allow using other thread's clock.
6503 * pthread_clock_settime.c: Likewise.
6504 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6505 * Makefile: Add rules to build and run tst-clock2.
6506 * tst-clock2.c: New file.
6508 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6510 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6511 to use exception-based cleanup handler.
6512 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6514 * tst-cond8.c (ch): Announce that we are done.
6516 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6518 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6519 Also test aio_suspend with timeout value.
6521 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6523 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6524 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6527 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6528 (__pthread_mutex_lock_internal): Likewise.
6529 (__pthread_mutex_unlock_internal): Likewise.
6530 (__pthread_mutex_unlock_usercnt): Declare.
6531 * pthread_mutex_destroy.c: Always fail if used in any way.
6532 * pthread_mutex_init.c: Update comment.
6533 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6534 * pthread_mutex_timedlock.c: Adjust __nusers.
6535 * pthread_mutex_trylock.c: Adjust __nusers.
6536 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6537 and public interfaces are wrapper with pass additional parameter.
6538 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6540 * tst-mutex8.c: New file.
6541 * Makefile (tests): Add tst-mutex8.
6542 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6543 __pthread_mutex_unlock_usercnt.
6544 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6547 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6548 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6549 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6550 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6552 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6553 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6554 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6555 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6556 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6558 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6559 * pthread_mutex_timedlock.c: Likewise.
6560 * pthread_mutex_trylock.c: Adjust __nusers.
6561 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6562 * tst-mutex9.c: New file.
6563 * Makefile (tests): Add tst-mutex9.
6564 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6565 * sysdeps/ia64/tls.h: Likewise.
6566 * sysdeps/powerpc/tls.h: Likewise.
6567 * sysdeps/s390/tls.h: Likewise.
6568 * sysdeps/sh/tls.h: Likewise.
6569 * sysdeps/x86_64/tls.h: Likewise.
6570 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6571 Change type of __owner.
6572 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6573 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6574 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6575 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6576 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6578 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6580 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6581 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6583 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6584 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6585 instead of nr to lll_futex_wake. Only set errno and return -1
6588 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6589 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6590 return actual return value from the syscall, not 0.
6592 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6594 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6595 find a random value.
6596 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6599 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6600 compat_timer_settime.
6601 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6602 compat_timer_gettime.
6603 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6604 compat_timer_getoverrun.
6605 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6606 compat_timer_delete.
6608 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6609 error-checking mutex detect busy mutexes.
6611 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6613 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6614 Add ax to clobber list.
6615 (lll_mutex_cond_lock): Likewise.
6616 (lll_mutex_unlock): Likewise.
6617 (lll_lock): Likewise.
6618 (lll_unlock): Likewise.
6620 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6621 * tst-cancel18.c: New file.
6622 * tst-cancelx18.c: New file.
6624 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6627 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6628 * tst-cancel17.c: New file.
6629 * tst-cancelx17.c: New file.
6631 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6632 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6633 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6635 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6637 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6639 * sysdeps/pthread/createthread.c (create_thread): Set
6640 header.multiple_threads unconditionally.
6641 * allocatestack.c (allocate_stack): Likewise.
6642 * descr.h (struct pthread): Add header.multiple_threads
6644 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6645 Define for librt. #error if neither libpthread, libc nor librt.
6646 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6648 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6649 CDISABLE): Likewise.
6650 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6651 CDISABLE): Likewise.
6652 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6653 CDISABLE): Likewise.
6654 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6655 CDISABLE): Likewise. Access header.multiple_threads outside of
6656 libc and libpthread.
6657 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6659 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6660 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6662 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6664 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6665 Also test early cancellation before the thread reaches the cancellation
6668 * Makefile: Compile forward.c with exceptions.
6670 * sysdeps/unix/sysv/linux/sleep.c: New file.
6672 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6674 * Makefile: Add CFLAGS definition to compile function wrappers
6675 duplicated from libc with exceptions.
6676 * tst-cancel4.c: Also check cancellation handlers.
6678 * Makefile: Add rules to build and run tst-cancel16 and
6679 tst-cancelx16. Add missing CFLAGS definitions.
6680 * tst-cancel16.c: New file.
6681 * tst-cancelx16.c: New file.
6683 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6685 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6686 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6687 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6688 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6690 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6691 (LIBC_CANCEL_RESET): Likewise.
6692 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6693 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6695 (CFLAGS-libcrt-cancellation.c): Define.
6696 * sysdeps/pthread/librt-cancellation.c: New file.
6697 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6698 macros also when compiling librt.
6699 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6700 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6701 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6702 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6703 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6704 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6705 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6707 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6708 compat_timer_create.
6710 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6712 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6714 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6716 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6717 Add libc_hidden_def.
6719 2003-06-13 Roland McGrath <roland@redhat.com>
6721 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6722 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6724 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6726 * allocatestack.c (queue_stack): Always inline.
6727 * ptreadhP.h (__do_cancel): Likewise.
6729 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6731 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6734 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6736 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6737 (__pthread_cond_signal): Remove incorrect second addition for
6740 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6742 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6743 (__pthread_cond_signal): Use correct futex pointer in
6744 __lll_mutex_lock_wait call.
6746 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6747 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6749 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6751 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6753 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6756 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6757 hand-written CFI generation code. Since ENTRY/END also initiated
6758 CFI frames this caused two CFI sets to be generated.
6760 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6762 * cleanup_routine.c: New file.
6763 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6764 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6766 * Makefile (libpthread-routines): Add cleanup_routine.
6767 Add more CFLAGS variables to compile with exceptions. Add comments
6768 why which file needs unwind tables.
6769 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6771 * tst-cancelx1.c: New file.
6772 * tst-cancelx2.c: New file.
6773 * tst-cancelx3.c: New file.
6774 * tst-cancelx4.c: New file.
6775 * tst-cancelx5.c: New file.
6776 * tst-cancelx6.c: New file.
6777 * tst-cancelx7.c: New file.
6778 * tst-cancelx8.c: New file.
6779 * tst-cancelx9.c: New file.
6780 * tst-cancelx10.c: New file.
6781 * tst-cancelx11.c: New file.
6782 * tst-cancelx12.c: New file.
6783 * tst-cancelx13.c: New file.
6784 * tst-cancelx14.c: New file.
6785 * tst-cancelx15.c: New file.
6786 * tst-cleanupx0.c: New file.
6787 * tst-cleanupx0.expect: New file.
6788 * tst-cleanupx1.c: New file.
6789 * tst-cleanupx2.c: New file.
6790 * tst-cleanupx3.c: New file.
6792 * tst-cleanup0.c: Make standard compliant.
6793 * tst-cleanup1.c: Likewise.
6795 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6796 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6797 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6798 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6799 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6800 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6801 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6803 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6804 * tst-cancel12.c: New file.
6805 * tst-cancel13.c: New file.
6806 * tst-cancel14.c: New file.
6807 * tst-cancel15.c: New file.
6808 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6811 * tst-cancel1.c: Add some comments.
6813 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6816 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6818 * Makefile (CFLAGS-pthread_cancel.c): Define.
6820 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6822 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6823 Change type of __writer element to int.
6824 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6825 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6826 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6827 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6828 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6829 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6830 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6831 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6832 Compare with TID to determine deadlocks.
6833 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6834 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6835 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6836 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6837 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6838 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6840 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6842 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6843 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6844 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6846 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6848 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6849 * Makefile (tests): Add tst-rwlock12.
6850 * tst-rwlock12.c: New file.
6852 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6854 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6855 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6856 Remove bogus hidden_proto.
6857 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6859 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6860 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6861 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6862 ___lll_mutex_timedlock): Likewise.
6864 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6867 (__pthread_cond_signal): Add some code to eventually handle
6870 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6872 * Makefile (tests): Add tst-exec4.
6873 (tst-exec4-ARGS): Define.
6874 * tst-exec4.c: New file.
6876 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6878 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6879 Also fail if tv_nsec < 0.
6880 (__lll_timedwait_tid): Likewise.
6881 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6882 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6884 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6886 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6888 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6890 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6892 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6895 * Makefile (tests): Add tst-sem8 and tst-sem9.
6896 * tst-sem8.c: New file.
6897 * tst-sem9.c: New file.
6898 * sem_open.c: Fix creation of in_use record if the file exists but
6901 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6904 * sysdeps/pthread/timer_create.c (timer_create): In case
6905 evp==NULL, assign timer ID to sival_ptr.
6907 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6908 struct pthread_unwind_buf *.
6909 (struct pthread): Likewise for cleanup_jmp_buf element.
6911 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6912 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6913 * unwind.c (__pthread_unwind_next): Likewise.
6915 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6917 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6918 (lll_futex_timed_wait): Use int for futex value parameter.
6919 (lll_futex_wake): Likewise.
6920 (lll_futex_requeue): Likewise.
6922 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6923 Replace one memory operation with one register operation.
6925 * tst-join4.c (do_test): Fix error message.
6927 * tst-rwlock6.c (do_test): Use correct format specifier.
6929 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6930 (__lll_mutex_lock_wait): Replace one memory operation with one
6932 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6933 (__lll_mutex_lock_wait): Likewise.
6935 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6936 (__lll_mutex_cond_lock): Add one to value parameter of
6937 __lll_lock_wait to reflect reality in the futex syscall.
6938 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6939 (lll_mutex_cond_lock): Likewise.
6941 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6943 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6945 (lll_mutex_cond_lock): Define.
6947 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6949 * Makefile (tests): Add tst-signal6.
6950 * tst-signal6.c: New file.
6952 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6953 (__lll_mutex_unlock_force): New function
6954 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6956 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6957 (__lll_mutex_unlock_force): New function.
6958 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6960 * tst-rwlock7.c (do_test): Use correct format specifier.
6962 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6963 Find break parameter in correct asm argument.
6965 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6967 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6969 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6971 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6973 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6974 lll_futex_requeue, lll_mutex_unlock_force): Define.
6976 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6978 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6979 (pthread_cond_t): Add __mutex.
6980 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6981 lll_futex_requeue, lll_mutex_unlock_force): Define.
6983 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6985 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6986 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6988 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6990 (lll_futex_wait, lll_futex_wake): Define.
6991 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6992 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6993 FUTEX_REQUEUE instead of FUTEX_WAIT.
6994 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6995 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6996 mutex which was used in condvar structure. Call
6997 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6998 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7001 include tcb-offsets.h. Read wakeup value in locked region.
7002 Use the value of gbr register as THREAD_ID.
7003 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7004 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7005 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7007 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7010 2003-05-28 Ulrich Drepper <drepper@redhat.com>
7012 * sysdeps/pthread/pthread_cond_broadcast.c
7013 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7015 2003-05-26 Ulrich Drepper <drepper@redhat.com>
7017 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7018 typo in register name.
7019 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7020 correctly. Actually use requeue. Little optimization.
7021 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7022 mutex address early. Handle cancellation state as 32-bit value.
7023 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7024 Remove unnecessary label.
7026 2003-05-25 Ulrich Drepper <drepper@redhat.com>
7028 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7029 instead of FUTEX_WAIT.
7030 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7032 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7033 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7034 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7035 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7036 used in condvar structure. Call __pthread_mutex_cond_lock instead
7037 of __pthread_mutex_lock_internal.
7038 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7039 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7040 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7041 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7042 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7043 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7044 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7045 Add pthread_mutex_cond_lock.
7046 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7047 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7048 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7049 lll_mutex_cond_lock.
7050 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7051 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7052 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7054 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7055 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7057 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7058 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7060 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7061 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7062 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7063 macro don't define aliases.
7065 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7066 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7067 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7068 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7070 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7071 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7073 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7075 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7077 * sem_open.c: Fix one endless loop. Implement correct semantics
7078 wrt opening the same semaphore more then once.
7079 * sem_close.c: Adjust for sem_open change.
7080 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7081 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7082 * Makefile (tests): Add tst-sem7.
7083 * tst-sem7.c: New file.
7085 2003-05-16 Roland McGrath <roland@redhat.com>
7087 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7088 uninitialized variable braino.
7090 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7092 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7093 test for syscall availability.
7095 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7096 __no_posix_timers to -1 if the syscalls don't exist.
7098 * pthread_join.c (pthread_join): Set tid field of the joined
7099 thread to -1. This isn't necessary but helps to recognize some
7100 error conditions with almost no cost.
7102 * allocatestack.c (FREE_P): Also negative values indicate an
7105 * unwind.c: Include <unistd.h>.
7107 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7109 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7111 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7113 * Makefile (crti-objs, crtn-objs): New variables.
7114 (omit-deps, extra-objs): Add crtn.
7115 ($(objpfx)libpthread.so): Depend on both crti and crtn
7116 and links to them in multidir.
7117 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7119 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7121 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7122 (lll_mutex_unlock): Use atomic_exchange_rel.
7124 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7126 * cond-perf.c (cons): Add missing locking around setting of alldone.
7128 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7130 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7132 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7134 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7136 * tst-sem6.c: New file.
7137 * Makefile (tests): Add tst-sem6.
7139 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7140 Use atomic_exchange_rel instead of atomic_exchange.
7141 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7144 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7145 code for lll_futex_wait and lll_futex_wake in static apps. Use
7146 vsyscall is possible.
7148 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7149 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7150 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7151 pthread_setaffinity_np.
7152 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7153 and pthread_setaffinity_np.
7154 * Makefile (libpthread-routines): Add pthread_getaffinity and
7155 pthread_setaffinity.
7157 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7158 use it in case mmap to allocate the stack fails.
7159 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7160 ARCH_MAP_FLAGS here.
7161 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7164 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7166 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7167 handler implementation. It is now lockless in fork().
7168 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7169 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7170 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7171 declare the __fork_*_lists.
7172 (struct fork_handler): Include pointers to all three functions.
7173 Add next, refcntr and need_signal elements.
7174 (__fork_handlers): New declaration.
7175 (__register_atfork_malloc): Remove declaration.
7176 (HAVE_register_atfork_malloc): Remove definition.
7177 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7178 __pthread_child_handler variable.
7179 (__libc_pthread_init): Use __register_atfork instead of explicitly
7181 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7183 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7185 * unwind.c (unwind_cleanup): Print error message and then abort. This
7186 function must never be reached.
7188 * cond-perf.c: New file.
7190 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7192 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7194 2003-05-04 Roland McGrath <roland@redhat.com>
7196 * Makefile ($(objpfx)../libc.so): New target.
7198 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7200 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7201 (pthread_condattr_t): Size is only an int, don't use long for
7203 (pthread_mutexattr_t): Likewise.
7204 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7205 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7206 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7208 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7210 * sysdeps/i386/tls.h: Define THREAD_ID.
7211 * sysdeps/ia64/tls.h: Likewise.
7212 * sysdeps/powerpc/tls.h: Likewise.
7213 * sysdeps/s390/tls.h: Likewise.
7214 * sysdeps/sh/tls.h: Likewise.
7215 * sysdeps/x86_64/tls.h: Likewise.
7216 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7218 * pthread_mutex_timedlock.c: Likewise.
7219 * pthread_mutex_trylock.c: Likewise.
7220 * pthread_mutex_unlock.c: Likewise.
7221 * pthread_rwlock_trywrlock.c: Likewise.
7222 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7223 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7224 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7225 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7227 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7230 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7232 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7233 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7234 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7235 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7236 Make __align long long instead of long.
7237 (pthread_rwlock_t): Formatting.
7238 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7239 (pthread_rwlock_t): Formatting.
7240 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7241 (pthread_cond_t): Make __align long long instead of long.
7242 (pthread_rwlock_t): Move __flags field to the same position as in
7245 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7247 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7248 * tst-rwlock7.c (do_test): Likewise.
7250 2003-04-26 Roland McGrath <roland@redhat.com>
7252 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7254 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7256 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7257 sizeof (struct pthread).
7258 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7260 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7262 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7264 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7266 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7268 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7270 (NO_TLS_OFFSET): Define.
7271 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7272 add TLS_TCB_SIZE unnecessarily.
7274 2003-04-22 Roland McGrath <roland@redhat.com>
7276 * Makeconfig (shared-thread-library): Reverse link order to work
7279 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7281 * semaphore.h: Fix typo in comment.
7283 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7285 * sysdeps/pthread/sigfillset.c: New file.
7287 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7288 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7289 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7290 * sysdeps/pthread/sigaction.c: Likewise.
7291 * sysdeps/pthread/sigprocmask.c: New file.
7292 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7294 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7295 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7298 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7300 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7301 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7303 * sysdeps/unix/sysv/linux/unregister-atfork.c
7304 (__unregister_atfork): Don't free memory not allocated dynamically.
7306 * semaphore.h: Remove __THROW marker from cancellation points.
7307 * nptl/sysdeps/pthread/pthread.h: Likewise.
7309 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7311 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7312 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7315 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7317 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7319 2003-04-15 Roland McGrath <roland@redhat.com>
7321 * forward.c (__pthread_unwind): Tweak to avoid warning.
7323 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7325 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7327 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7329 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7330 overflow CFA advance instructions.
7331 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7333 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7335 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7336 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7337 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7340 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7341 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7342 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7343 DW_CFA_advance_loc for .Laddl-.Lsubl.
7345 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7347 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7348 position-independent unwind data for static libraries.
7349 Add missing unwind info. Add comments.
7351 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7352 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7353 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7354 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7356 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7358 * Makefile: Make sure all cancellation points are compiled with
7359 exception and asynchronous unwind tables.
7361 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7362 which mishandles loading of global object addresses in PIC.
7363 (THREAD_SETMEM_NC): Likewise.
7365 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7367 * pthread.h: Define new data structure for cleanup buffer. Declare
7368 new cleanup handler interfaces.
7369 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7370 (struct pthread): Add cleanup_jmp_buf pointer. Define
7371 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7372 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7373 it. Declare old cleanup handler installation functions.
7374 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7376 * cleanup_defer.c: Likewise.
7377 * cleanup_compat.c: New file. Old cleanup code.
7378 * cleanup_def_compat.c: New file. Old cleanup code.
7379 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7380 if own thread descriptor.
7381 * unwind.c: New file.
7382 * forward.c: Add __pthread_unwind.
7383 * init.c (pthread_functions): Add __pthread_unwind.
7384 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7385 Add ptr___pthread_unwind.
7386 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7387 and unwind function.
7388 * Makefile (libpthread-routines): Add cleanup_compat,
7389 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7390 table generation if necessary.
7391 * version.c: Record whether unwind support is compiled in.
7392 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7393 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7395 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7396 complication to generate unwind information for syscall wrappers.
7397 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7398 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7399 __cleanup_fct_attribute.
7401 * Makefile: Add rules to build and run tst-cleanup0.
7402 * tst-cleanup0.c: New file.
7403 * tst-cleanup0.expect: New file.
7405 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7406 caller. Optimize to avoid often unecessary local variable.
7408 2003-04-11 Roland McGrath <roland@redhat.com>
7410 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7411 sets variable `multidir'; include that.
7412 (generated): Add it.
7413 ($(objpfx)$(multidir)/crti.o): New target.
7414 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7416 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7418 * tst-attr2.c (do_test): Add cast to avoid warning.
7419 * tst-mutex4.c (do_test): Likewise.
7421 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7423 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7426 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7428 * Makefile (tests): Add tst-detach1.
7429 * tst-detach1.c: New file.
7431 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7433 * sysdeps/pthread/pthread.h: Remove duplicate
7434 pthread_cleanup_{push,pop} definitions.
7436 * tst-barrier2.c: Eliminate warnings.
7437 * tst-cancel4.c: Likewise.
7438 * tst-cond4.c: Likewise.
7439 * tst-cond6.c: Likewise.
7440 * tst-detach1.c: Likewise.
7441 * tst-rwlock4.c: Likewise.
7442 * tst-rwlock6.c: Likewise.
7443 * tst-rwlock7.c: Likewise.
7444 * tst-sem3.c: Likewise.
7445 * tst-spin2.c: Likewise.
7446 * tst-umask1.c: Likewise.
7448 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7450 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7452 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7454 * descr.h (struct pthread): Move cancelhandling member to the front.
7456 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7458 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7459 malloc_parent, and malloc_child statically.
7460 (__register_atfork_malloc): New function.
7461 (free_mem): Don't free any of the malloc_* variables on the list.
7462 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7463 Define HAVE_register_atfork_malloc.
7465 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7467 * sysdeps/pthread/createthread.c (create_thread): Add some more
7468 comments explaining when to set multiple_threads and when not.
7470 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7471 THREAD_ATOMIC_BIT_SET if not already defined.
7472 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7473 THREAD_ATOMIC_BIT_SET:
7474 * sysdeps/x86_64/tls.h: Likewise.
7475 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7476 THREAD_ATOMIC_CMPXCHG_VAL.
7477 (_pthread_cleanup_pop_restore): Likewise.
7478 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7479 (__pthread_enable_asynccancel_2): Likewise.
7480 (__pthread_disable_asynccancel): Likewise.
7481 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7482 (__libc_disable_asynccancel): Likewise.
7483 * init.c (sigcancel_handler): Likewise.
7484 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7485 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7487 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7489 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7490 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7491 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7492 * Makefile (tests): Add tst-cancel11.
7493 * tst-cancel11.c: New file.
7495 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7497 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7498 round, not the first. Use specific_used flag instead of local
7499 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7500 (__free_tcb): Don't call deallocate_tsd here.
7501 (start_thread): Call deallocate_tsd here.
7502 * pthread_setspecific.c: Set specific_used flag really only when
7504 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7505 * tst-tsd3.c: New file.
7506 * tst-tsd4.c: New file.
7508 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7510 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7511 Use atomic_exchange_and_add instead of __lll_add.
7512 (__lll_mutex_timedlock): Likewise.
7513 Patch by Ian Wienand.
7515 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7517 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7518 (SINGLE_THREAD_P): Fix typo.
7519 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7521 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7523 * Makefile (tests): Add tst-align.
7524 * tst-align.c: New file.
7525 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7527 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7530 * tst-tsd2.c: Add casts to avoid warnings.
7532 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7534 * descr.h (struct pthread): Move most often used elements to the front.
7536 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7538 * Makefile (libpthread-routines): Add pthread_atfork.
7539 (libpthread-static-only-routines): Add pthread_atfork.
7541 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7543 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7545 (INSTALL_DTV): Add parens.
7546 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7547 Use passed descr instead of THREAD_SELF.
7548 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7549 (__lll_mutex_timedlock_wait): Correct expected value after
7551 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7552 Release lock before waking up the waiters.
7553 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7554 criteria. Reorderstruct passed to cleanup handler. Fix
7555 handling of cancellation and failung pthread_mutex_unlock call.
7556 Use __pthread_enable_asynccancel_2 instead of
7557 __pthread_enable_asynccancel.
7558 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7559 Return result of lock re-get if it fails.
7560 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7561 for __pthread_cleanup_push.
7562 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7563 completely broken rwlock implementation.
7564 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7565 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7566 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7567 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7568 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7569 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7570 versioned_symbol macro.
7571 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7572 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7574 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7576 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7577 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7579 (struct timer): Remove th and bar field.
7580 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7581 debugging code. Create only one helper thread.
7582 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7584 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7585 Renamed. Define statically. Use thread info from siginfo.
7586 (__helper_once): New variable.
7587 (__helper_tid): New variable.
7588 (__reset_helper_control): New function.
7589 (__start_helper_thread): New function.
7591 * pthread_create.c (start_thread): Don't use setjmp inside
7592 __builtin_expect to work around gcc bug.
7594 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7595 timer_delete syscall fails, but not with ENOSYS, set
7598 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7599 (timer_settime): Fix typo.
7600 * sysdeps/unix/sysv/linux/timer_getoverr.c
7601 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7603 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7606 offset of cleanupbuf.__prev.
7608 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7610 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7613 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7615 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7616 NULL provide default definition to syscall.
7618 2003-03-25 Roland McGrath <roland@redhat.com>
7620 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7621 (timer_id2ptr): Fix typo.
7623 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7625 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7626 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7627 * sysdeps/ia64/pthreaddef.h: Likewise.
7628 * sysdeps/powerpc/pthreaddef.h: Likewise.
7629 * sysdeps/s390/pthreaddef.h: Likewise.
7630 * sysdeps/sh/pthreaddef.h: Likewise.
7631 * sysdeps/x86_64/pthreaddef.h: Likewise.
7632 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7633 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7635 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7636 SIGTIMER is not unblocked.
7637 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7639 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7641 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7642 pass pointer through as ID.
7643 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7644 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7645 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7646 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7647 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7648 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7649 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7650 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7651 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7652 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7653 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7654 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7655 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7656 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7657 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7658 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7659 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7660 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7661 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7662 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7663 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7664 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7665 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7666 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7667 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7668 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7669 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7670 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7671 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7672 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7673 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7674 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7675 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7677 * pthreadP.h: Remove FRAME_LEFT definition.
7678 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7679 already left frame. Programs which have this problem are not POSIX
7681 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7683 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7685 * sysdeps/pthread/tst-timer.c: Check return values of the
7688 2003-03-23 Roland McGrath <roland@redhat.com>
7690 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7691 * tst-tls3mod.c: Likewise.
7692 * tst-tls1.c: Likewise.
7693 * tst-tls2.c: Likewise.
7695 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7698 * tst-join5.c (tf1, tf2): Add a cast.
7700 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7702 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7703 Don't test anything.
7704 * tst-cond4.c: Likewise.
7705 * tst-cond6.c: Likewise.
7706 * tst-flock2.c: Likewise.
7707 * tst-mutex4.c: Likewise.
7708 * tst-rwlock4.c: Likewise.
7709 * tst-signal1.c: Likewise.
7710 * tst-spin2.c: Likewise.
7711 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7713 * tst-mutex4.c: Use test-skeleton.c.
7714 * tst-spin2.c: Likewise.
7715 * tst-sysconf.c: Likewise.
7716 * tst-barrier2.c: Likewise.
7717 * tst-cond4.c: Likewise.
7718 * tst-cond6.c: Likewise.
7719 * tst-rwlock4.c: Likewise.
7720 * tst-unload.c: Likewise.
7721 * tst-flock2.c (do_test): Use return instead of exit.
7723 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7725 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7727 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7729 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7730 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7731 instead of __lll_compare_and_swap.
7732 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7734 Removed definition if __lll_compare_and_swap.
7736 * cancellation.c: Adjust for new form of compare&exchange macros.
7737 * cleanup_defer.c: Likewise.
7739 * libc-cancellation.c: Likewise.
7740 * old_pthread_cond_broadcast.c: Likewise.
7741 * old_pthread_cond_signal.c: Likewise.
7742 * old_pthread_cond_timedwait.c: Likewise.
7743 * old_pthread_cond_wait.c: Likewise.
7744 * pthread_cancel.c: Likewise.
7745 * pthread_create.c: Likewise.
7746 * pthread_detach.c: Likewise.
7747 * pthread_join.c: Likewise.
7748 * pthread_key_delete.c: Likewise.
7749 * pthread_setcancelstate.c: Likewise.
7750 * pthread_setcanceltype.c: Likewise.
7751 * pthread_timedjoin.c: Likewise.
7752 * pthread_tryjoin.c: Likewise.
7753 * sysdeps/pthread/createthread.c: Likewise.
7755 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7757 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7758 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7759 definitions. Replace uses with calls to atomic_* functions.
7760 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7761 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7762 __lll_test_and_set calls with atomic_exchange_and_add and
7763 atomic_exchange calls respectively.
7764 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7765 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7766 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7767 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7768 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7769 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7770 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7772 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7773 returns the old value.
7775 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7777 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7778 int for variable OLDVAL and correct inline assembler contraint.
7779 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7780 type int for variable OLD.
7782 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7784 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7785 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7786 instead of multiple_threads field in the TCB.
7788 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7790 * sysdeps/i386/i686/bits/atomic.h: Removed.
7791 * sysdeps/i386/i586/bits/atomic.h: Removed.
7792 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7793 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7794 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7795 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7796 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7797 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7798 * atomic.h: Removed. Moved to glibc.
7800 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7801 support for clock selection.
7803 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7806 2003-03-18 Roland McGrath <roland@redhat.com>
7808 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7809 Add __lll_rel_instr first. Add memory clobber.
7810 (lll_mutex_unlock): Use __lll_test_and_set.
7811 From Paul Mackerras <paulus@samba.org>.
7813 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7815 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7816 (SINGLE_THREAD_P): Add `header.' prefix.
7817 From Paul Mackerras <paulus@samba.org>.
7819 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7820 pthread_timedjoin_np to ...
7821 (libpthread: GLIBC_2.3.3): ... here.
7822 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7824 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7825 Avoid shadowing VAL variable.
7827 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7830 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7832 * Makefile (tests): Add tst-cond11.
7833 * tst-cond11.c: New file.
7835 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7836 struct passed to cleanup handler to eliminate one more
7838 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7840 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7841 (pthrad_cond_t): Replace __unused field with __clock.
7843 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7844 waken all waiters in cleanup handler.
7845 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7846 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7848 * pthread_condattr_getclock.c: New file.
7849 * pthread_condattr_setclock.c: New file.
7850 * sysdeps/pthread/pthread.h: Declare these new functions.
7851 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7852 * Makefile (libpthread-routines): Add the new functions.
7853 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7854 Renamed field to value. Document use of the bits.
7855 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7857 * pthread_condattr_setpshared.c: Likewise.
7858 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7859 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7860 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7862 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7863 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7864 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7865 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7866 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7867 Implement clock selection.
7868 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7869 * pthread-errnos.sym: Add ENOSYS.
7870 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7871 _POSIX_CLOCK_SELECTION.
7872 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7874 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7875 invalid .size directive.
7877 2003-03-17 Roland McGrath <roland@redhat.com>
7879 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7882 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7884 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7885 Use __lll_add instead of spelling it out. Use protected symbol names.
7886 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7888 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7889 Renamed from lll_compare_and_swap. Use new name where necessary.
7890 (__lll_add): Defined.
7891 (__lll_dec_if_positive): Defined.
7892 (__lll_test_and_set): Defined.
7893 * sysdeps/ia64/pthread_spin_init.c: Removed.
7894 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7895 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7896 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7897 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7898 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7899 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7900 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7901 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7902 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7903 __sync_lock_release_si.
7904 Patch by Jakub Jelinek.
7906 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7907 Fix timeout handling.
7908 (__lll_timedwait_tid): Likewise.
7909 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7910 Patch by Jakub Jelinek.
7912 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7914 2003-03-17 Roland McGrath <roland@redhat.com>
7916 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7917 * sysdeps/pthread/pthread_spin_init.c: New file.
7918 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7919 * sysdeps/powerpc/Makefile: New file.
7920 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7921 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7922 * sysdeps/powerpc/pthreaddef.h: New file.
7923 * sysdeps/powerpc/tcb-offsets.sym: New file.
7924 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7925 * sysdeps/powerpc/tls.h: New file.
7926 * sysdeps/powerpc/bits/atomic.h: New file.
7927 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7928 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7929 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7931 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7932 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7933 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7934 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7935 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7936 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7937 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7938 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7939 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7940 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7941 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7942 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7943 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7944 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7945 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7947 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7949 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7950 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7951 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7952 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7953 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7955 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7957 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7958 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7959 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7960 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7961 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7963 2003-03-16 Roland McGrath <roland@redhat.com>
7965 * tst-fork4.c: Include <string.h>.
7966 * tst-signal2.c: Likewise.
7967 * tst-mutex5.c (do_test): exit -> return.
7968 * tst-mutex2.c: Include <stdlib.h>.
7970 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7972 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7973 (__lll_mutex_timedlock_wait): Correct expected value after
7974 spurious wakeup. Otherwise we would never wait again.
7976 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7977 zone versus inline asm stupidity. Use correct instructions.
7979 * tst-rwlock6.c: Add some more status output.
7981 2003-03-15 Roland McGrath <roland@redhat.com>
7983 * sysdeps/pthread/configure.in: New file.
7984 * sysdeps/pthread/configure: New file (generated).
7986 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7988 * allocatestack.c (allocate_stack): Store the exact stack size of
7989 user allocated stacks.
7991 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7993 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7994 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7995 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7996 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7997 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7998 Use `header.' prefix.
7999 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8001 2003-03-15 Ulrich Drepper <drepper@redhat.com>
8003 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8004 __builtin_frame_address, use stack pointer.
8006 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8007 instead of __builtin_frame_pointer.
8009 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8011 * tst-basic1.c (do_test): Add cast to avoid warning.
8012 * tst-basic2.c (do_test): Likewise.
8014 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8015 amount of stack correction.
8017 * tst-fork4.c: Use test-skeleton.c.
8019 2003-03-14 Roland McGrath <roland@redhat.com>
8021 * init.c: Fix typo "#eli" for "#else".
8023 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
8025 * allocatestack.c (__stack_user): Use hidden_data_def.
8026 * pthread_create.c (__pthread_keys): Likewise.
8028 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8030 2003-03-14 Roland McGrath <roland@redhat.com>
8032 * tst-fork4.c: New file.
8033 * Makefile (tests): Add it.
8035 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8036 we always define the padding space.
8037 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8038 stopped supporting its own extensions fully.
8039 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8040 struct also called `header', so `header.multiple_threads' is the field
8041 name to use on all machines.
8042 * allocatestack.c (allocate_stack): Use `header.' prefix.
8043 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8044 * pthread_create.c (__pthread_create_2_1): Likewise.
8045 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8046 (THREAD_SELF): Likewise.
8047 * sysdeps/x86_64/tls.h: Likewise.
8048 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8049 (SINGLE_THREAD_P): Likewise.
8050 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8051 (SINGLE_THREAD_P): Likewise.
8052 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8053 (SINGLE_THREAD_P): Likewise.
8055 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8058 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8060 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8061 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8063 * pthread_create.c (start_thread): setjmp is expected to return 0.
8065 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8066 (THREAD_GETMEM_NC): Likewise.
8068 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8070 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8071 and the size of the stack which must be allocated is a multiple,
8072 allocate one more page.
8073 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8074 MULTI_PAGE_ALIASING.
8076 2003-03-13 Roland McGrath <roland@redhat.com>
8078 * pthread_create.c (start_thread): Set EXITING_BIT after the
8079 event-reporting (and destructors), not before.
8081 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8083 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8084 lll_futex_wake): Declare register variables as long int instead of
8085 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8086 Make syscall arguments clobbered by the syscall.
8087 (lll_futex_wait): Define using lll_futex_timed_wait.
8089 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8092 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8095 * allocatestack.c (nptl_ncreated): Only declare if
8096 COLORING_INCREMENT != 0.
8098 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8099 (__libc_enable_asynccancel_2): Remove prototype.
8101 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8102 ctid to match kernel.
8104 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8106 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8107 libc_multiple_threads.
8108 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8109 __libc_multiple_threads to...
8110 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8112 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8114 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8115 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8117 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8118 (__pthread_once_internal): Define.
8120 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8121 macros instead of .symver directly.
8122 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8123 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8125 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8126 * sysdeps/x86_64/tcb-offsets.sym: New file.
8127 * sysdeps/x86_64/Makefile: New file.
8129 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8130 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8131 to access own pthread_t in TCB.
8132 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8134 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8136 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8138 2003-03-12 Roland McGrath <roland@redhat.com>
8140 * pthread-errnos.sym: New file.
8141 * Makefile (gen-as-const-headers): New variable, list that file.
8142 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8143 header <pthread-errnos.h> instead of defining errno values here.
8144 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8145 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8146 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8147 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8148 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8150 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8153 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8154 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8155 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8156 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8157 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8158 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8159 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8160 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8161 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8162 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8163 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8164 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8165 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8166 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8167 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8168 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8169 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8170 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8171 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8172 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8173 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8174 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8175 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8176 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8177 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8178 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8180 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8181 CLONE_CHILD_SETTID worked.
8183 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8185 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8187 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8190 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8191 (pthread_cond_t): Add padding.
8193 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8194 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8195 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8197 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8198 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8199 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8200 (__pthread_rwlock_timedrdlock): Likewise.
8201 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8202 (__pthread_rwlock_wrlock): Likewise.
8203 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8204 (__pthread_rwlock_rdlock): Likewise.
8206 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8208 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8209 result of lock re-get if it fails.
8211 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8213 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8214 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8215 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8216 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8217 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8218 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8219 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8220 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8221 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8222 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8224 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8225 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8227 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8228 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8229 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8230 (create_thread): Likewise.
8231 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8232 * init.c (__pthread_initialize_minimal_internal): Initialize
8233 __libc_multiple_threads_ptr if necessary.
8234 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8235 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8236 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8237 __libc_multiple_threads.
8238 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8241 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8242 (THREAD_SETMEM_NC): Likewise.
8244 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8245 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8246 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8247 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8249 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8250 Eliminate one entire instruction.
8252 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8253 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8254 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8255 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8256 instead of __pthread_enable_asynccancel.
8257 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8258 (__pthread_cond_wait): Likewise.
8259 * sysdeps/pthread/pthread_cond_timedwait.c
8260 (__pthread_cond_timedwait): Likewise.
8261 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8263 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8264 (__condvar_cleanup): Wake up all waiters in case we got signaled
8265 after being woken up but before disabling asynchronous
8267 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8268 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8269 (__condvar_cleanup): Likewise.
8271 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8272 Make it an error if architecture has no #if case. Add x86-64.
8274 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8275 pt-initfini.s generation.
8277 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8278 (TLS_INIT_TP): Fix typo.
8280 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8282 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8283 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8285 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8286 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8287 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8288 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8289 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8290 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8291 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8292 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8294 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8296 * sysdeps/pthread/pthread_cond_timedwait.c
8297 (__pthread_cond_timedwait): Return the result of the final
8298 locking. If it succeeds, the regular function return value.
8300 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8301 Return result of the final locking.
8302 * version.c (__nptl_main): Work around problems with the strange
8303 INTERNAL_SYSCALL macro on ppc32.
8304 * init.c (__pthread_initialize_minimal_internal): Unblock
8305 SIGCANCEL in case the parent blocked it.
8306 Reported by Paul Mackerras <paulus@samba.org>.
8308 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8309 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8310 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8312 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8314 * sysdeps/pthread/pthread_cond_timedwait.c
8315 (__pthread_cond_timedwait): Unlock and fail if
8316 __pthread_mutex_unlock_internal failed.
8318 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8319 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8321 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8322 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8323 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8324 ALLOCATE_STACK): New macros.
8325 (TLS_TPADJ): New macro.
8326 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8327 (allocate_stack): Handle TLS_DTV_AT_TP and
8328 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8329 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8331 * init.c [__ia64__] (__NR_set_tid_address): Define.
8333 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8334 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8335 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8336 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8337 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8338 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8339 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8340 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8341 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8342 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8343 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8344 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8345 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8346 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8347 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8348 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8349 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8350 * sysdeps/ia64/bits/atomic.h: New file.
8351 * sysdeps/ia64/Makefile: New file.
8352 * sysdeps/ia64/pthread_spin_init.c: New file.
8353 * sysdeps/ia64/pthread_spin_lock.c: New file.
8354 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8355 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8356 * sysdeps/ia64/pthreaddef.h: New file.
8357 * sysdeps/ia64/tcb-offsets.sym: New file.
8358 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8359 * sysdeps/ia64/tls.h: New file.
8361 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8362 to syscall instead of no arguments.
8364 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8366 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8367 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8368 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8369 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8371 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8374 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8376 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8377 lowlevelbarrier.sym.
8378 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8379 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8380 Include lowlevelbarrier.h and don't define offsets locally.
8381 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8383 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8384 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8385 (__lll_mutex_timedlock_wait): Likewise.
8386 (lll_mutex_lock): Adjust asm for that.
8387 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8388 (lll_lock): Adjust asm for operand order change.
8389 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8390 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8392 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8393 Reverse order of parameters.
8394 (__lll_timedwait_tid): Remove regparms attribute.
8395 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8396 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8398 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8399 (__lll_timedwait_tid): Remove one unnecessary instruction.
8401 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8402 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8403 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8406 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8407 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8409 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8412 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8413 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8415 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8416 define LOCK here (if UP is not defined). The actual code is in
8419 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8420 LOCK is already defined. Don't define lll_unlock_wake_cb and
8421 __lll_timedwait_tid for libc.so.
8422 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8423 define LOCK here (if UP is not defined). The actual code is in
8426 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8427 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8428 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8429 instead of lowlevelsem.h.
8430 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8431 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8432 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8434 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8436 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8437 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8438 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8440 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8442 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8445 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8447 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8448 of __libc_locking_needed.
8449 (lll_trylock): Initialize %eax to zero.
8451 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8452 pthread_cond_t definition.
8454 2003-03-10 Roland McGrath <roland@redhat.com>
8456 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8457 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8458 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8459 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8460 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8462 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8463 Instead of setting PD->multiple_threads, set globals
8464 __pthread_multiple_threads and __libc_multiple_threads.
8465 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8466 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8467 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8469 * descr.h (struct pthread): Conditionalize first member on
8470 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8471 containing an anonymous tcbhead_t. Move `list' member out.
8472 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8473 * allocatestack.c: Remove use of `header.data.' prefix.
8474 * pthread_create.c: Likewise.
8475 * init.c (__pthread_initialize_minimal_internal): Likewise.
8476 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8477 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8478 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8479 * sysdeps/x86_64/tls.h: Likewise.
8480 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8481 (SINGLE_THREAD_P): Likewise.
8482 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8483 (SINGLE_THREAD_P): Likewise.
8484 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8485 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8487 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8489 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8491 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8492 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8494 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8495 leftovers from the ia32 code.
8497 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8499 (clear_once_control): Don't load %esi.
8501 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8504 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8506 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8507 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8509 * Makefile (tests): Add tst-cond10.
8510 * tst-cond10.c: New file.
8512 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8514 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8515 * tst-signal3.c (do_test): Likewise.
8516 * tst-sem5.c (do_test): Likewise.
8517 * tst-kill6.c (do_test): Likewise.
8518 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8520 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8522 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8523 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8524 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8525 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8526 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8527 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8528 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8530 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8532 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8534 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8535 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8536 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8537 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8538 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8539 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8541 * allocatestack.c (allocate_stack): If mprotect() fails free the
8544 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8546 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8549 lll_wake_tid. This was used only to work around kernel limits in
8551 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8552 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8553 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8554 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8556 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8557 (__pthread_initialize_minimal_internal): Change initialization of
8558 __static_tls_align_m1 appropriately.
8559 * pthreadP.h (__static_tls_align_m1): Renamed from
8561 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8562 instead of __static_tls_align-1.
8564 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8566 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8568 * pthread_create.c: Define __pthread_keys using nocommon
8569 attribute, not by placing it explicitly in bss.
8570 Remove DEFINE_DEALLOC definition. Not needed anymore.
8572 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8573 Use it in mmap call to allocate stacks.
8575 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8577 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8578 result of the thread function.
8580 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8582 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8583 version is just fine.
8585 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8586 (__pthread_child_handler): Renamed from pthread_child_handler,
8587 exported, and marked hidden. Change all users.
8588 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8589 free __pthread_child_handler from child list.
8591 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8593 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8595 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8596 Fix handling of cancellation and failing pthread_mutex_unlock call.
8597 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8598 (__pthread_cond_wait): Likewise.
8600 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8601 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8602 lll_futex_timed_wait call.
8603 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8604 (pthread_rwlock_timedwrlock): Likewise.
8606 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8607 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8608 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8610 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8611 check of lll_futex_wake return value.
8613 2003-03-03 Roland McGrath <roland@redhat.com>
8615 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8617 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8618 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8619 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8621 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8623 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8624 error for CPU clocks.
8626 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8627 _POSIX_MONOTONIC_CLOCK.
8628 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8630 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8633 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8635 * descr.h (struct pthread): Move cleanup field to the front.
8637 2003-03-01 Roland McGrath <roland@redhat.com>
8639 * sem_open.c (sem_open): Braino fix.
8641 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8643 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8644 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8645 __pthread_cleanup_pop functionality.
8646 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8648 * descr.h (struct pthread): Move tid field to the front now that
8651 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8652 (__lll_mutex_timedlock_wait): Remove.
8653 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8654 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8655 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8656 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8657 (lll_unlock_wake_cb): Don't save and restore %esi.
8658 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8660 (__lll_timedwait_tid): Add alignment.
8661 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8662 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8664 (__lll_timedwait_tid): Removed.
8665 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8666 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8667 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8668 (pthread_barrier_wait): Don't save, load, and restore %esi for
8670 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8671 (__pthread_cond_signal): Don't save, load, and restore %esi.
8672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8673 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8674 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8675 Don't save, load, and restore %esi.
8677 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8679 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8680 Release lock before waking up the waiters.
8682 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8684 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8685 (reader_thread): Likewise.
8687 * sysdeps/pthread/pthread_rwlock_unlock.c
8688 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8689 to wake up readers if there are none.
8691 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8692 Release internal lock before wake threads.
8694 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8696 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8697 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8699 * tst-rwlock9.c: Likewise.
8700 * tst-rwlock10.c: New file.
8701 * tst-rwlock11.c: New file.
8703 * Makefile (tests): Add tst-dlsym1.
8704 * tst-dlsym1.c: New file.
8706 * init.c (__pthread_initialize_minimal_internal): Set
8707 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8708 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8710 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8712 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8714 * tst-cond2.c: Fix sychronization with child.
8716 * tst-rwlock8.c (reader_thread): Remove unused variable.
8718 * Makefile: Add rules to build and run tst-tls3.
8719 * tst-tls3.c: New file.
8720 * tst-tls3mod.c: New file.
8722 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8723 * tst-rwlock8.c: New file.
8724 * tst-rwlock9.c: New file.
8725 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8726 complete broken rwlock implementation.
8727 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8729 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8731 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8732 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8733 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8734 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8735 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8736 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8737 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8739 2003-02-23 Roland McGrath <roland@redhat.com>
8741 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8743 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8745 * Makefile (tests): Add tst-context1.
8746 * tst-context1.c: New file.
8748 * Makefile (tests): Add tst-tls1 and tst-tls2.
8749 * tst-tls1.c: New file.
8750 * tst-tls2.c: New file.
8752 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8755 * pthread_create.c (start_thread): Set EXITING_BIT early.
8757 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8758 (THREAD_GETMEM_NC): Likewise.
8760 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8762 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8763 off 3 more bytes by using offset-less instructions when possible.
8765 * Makefile: Add dependency for $(objpfx)version.d.
8767 * eintr.c (eintr_source): Add unnecessary return but the compiler
8770 * tst-kill3.c: Include <unistd.h>.
8772 2003-02-21 Roland McGrath <roland@redhat.com>
8774 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8776 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8778 * Makefile (tests): Add tst-eintr1.
8779 (distribute): Add eintr.c.
8780 * tst-eintr1.c: New file.
8781 * eintr.c: New file.
8783 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8785 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8786 Disallow sending SIGCANCEL.
8788 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8789 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8790 * tst-kill1.c: New file.
8791 * tst-kill2.c: New file.
8792 * tst-kill3.c: New file.
8793 * tst-kill5.c: New file.
8794 * tst-kill6.c: New file.
8795 * tst-basic7.c: Renamed to...
8796 * tst-kill4.c: ...this.
8798 2003-02-21 Roland McGrath <roland@redhat.com>
8800 * Makefile (install-lib-ldscripts): New variable.
8802 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8804 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8805 * pthread_cancel.c: Use INVALID_TD_P.
8806 * pthread_detach.c: Likewise.
8807 * pthread_getschedparam.c: Likewise.
8808 * pthread_setschedparam.c: Likewise.
8809 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8810 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8811 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8812 * pthread_timedjoin.c: Likewise.
8814 * tst-basic7.c: Include <signal.h>.
8816 * pthread_join.c (pthread_join): Limited checking for invalid
8818 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8820 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8822 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8823 beginning of the loop. Clear the entire first block of TSD.
8824 * Makefile (tests): Add tst-key4.
8825 * tst-key4.c: New file.
8827 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8829 * Makefile (tests): Add tst-basic7.
8830 * tst-basic7.c: New file.
8832 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8833 Add some more __builtin_expect.
8835 * pthreadP.h: Define dummy version of DEBUGGING_P.
8837 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8839 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8840 _POSIX_THREAD_PRIORITY_SCHEDULING.
8841 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8842 _XOPEN_REALTIME_THREADS.
8843 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8845 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8846 kernel returns EINVAL for PID <= 0, work around it.
8848 * Makefile (tests): Add tst-signal5.
8849 * tst-signal5.c: New file.
8851 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8854 * tst-cancel1.c (tf): Block all signals.
8856 * Makefile (tests): Add tst-basic6.
8857 * tst-basic6.c: New file.
8859 * tst-basic1.c: Add test for process ID.
8861 * Makefile (tests): Add tst-cancel10.
8862 * tst-cancel10.c: New file.
8864 * Makefile (tests): Add tst-signal4.
8865 * tst-signal4.c: New file.
8867 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8868 __sigismember instead of sigismember. Add __builtin_expect.
8870 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8872 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8873 pthread_setcancelstate, and pthread_rwlock_setpshared.
8875 * tst-cancel7.c (do_test): Make sure the pid file exists before
8876 canceling the thread.
8878 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8879 pthread_rwlock_timedrdlock tests.
8880 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8881 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8882 Check for invalid tv_nsec field.
8883 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8886 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8887 recursive mutex of overflow.
8889 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8891 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8892 going into an endless loop.
8893 * Makefile (tests): Add tst-cancel9.
8894 * tst-cancel9.c: New file.
8896 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8898 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8900 * tst-mutex5.c (do_test): Add more timedlock tests.
8902 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8903 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8905 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8906 use INLINE_SYSCALL. Error number is returned, not -1.
8908 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8909 and __deallocate_stack with internal_function.
8910 * pthread_create.c: Adjust definitions appropriately.
8911 * allocatestack.c: Likewise.
8913 * pthread_join.c: Add one more __builtin_expect.
8914 * pthread_timedjoin.c: Likewise.
8916 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8917 not data of sequence number does not match.
8918 Add one __builtin_expect.
8920 * Makefile (tests): Add tst-clock1.
8921 * tst-clock1.c: New file.
8923 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8925 * Makefile (tests): Add tst-basic5.
8926 * tst-basic5.c: New file.
8928 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8930 * Makefile (tests): Add tst-basic4.
8931 * tst-basic4.c: New file.
8933 * pthreadP.h: Add declaraction for __nptl_nthreads.
8934 * pthread_create.c: Define __nptl_nthreads
8935 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8936 after thread is done. If then zero, call exit(0).
8937 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8938 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8939 * init.c (pthread_functions): Initialize ptr_nthreads.
8940 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8941 (__reclaim_stacks): Decrement __nptl_nthreads.
8942 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8944 * Makefile (tests): Add tst-basic3.
8945 * tst-basic3.c: New file.
8947 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8948 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8949 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8950 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8951 if asynchronous canceling is enabled.
8952 * pthread_join.c (pthread_join): When recognizing circular joins,
8953 take into account the other thread might be already canceled.
8954 * Makefile (tests): Add tst-join5.
8955 * tst-join5.c: New file.
8957 * Makefile (tests): Add tst-join4.
8958 * tst-join4.c: New file.
8960 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8962 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8964 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8966 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8967 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8968 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8970 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8972 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8973 error if lll_futex_wake failed.
8975 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8978 handling of cancellation and failung pthread_mutex_unlock call.
8979 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8980 * Makefile (tests): Add tst-cond8 and tst-cond9.
8981 * tst-cond8.c: New file.
8982 * tst-cond9.c: New file.
8984 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8986 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8987 non-standard initializers with __USE_GNU.
8989 * Makefile (tests): Add tst-cleanup3.
8990 * tst-cleanup3.c: New file.
8992 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8994 * Makefile (tests): Add tst-attr1 and tst-attr2.
8995 * tst-attr1.c: New file.
8996 * tst-attr2.c: New file.
8998 * Makefile: Add rules to build and run tst-atfork2 test.
8999 * tst-atfork2.c: New file.
9000 * tst-atfork2mod.c: New file.
9002 * sysdeps/unix/sysv/linux/unregister-atfork.c
9003 (__unregister_atfork): Free the memory allocated for the handlers
9004 after removing them from the lists.
9006 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9009 * tst-atfork1.c (do_test): Wait for the child we forked.
9010 Report error in child.
9012 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9014 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9016 2003-02-10 Ulrich Drepper <drepper@redhat.com>
9018 * Makefile (tests): Add tst-cancel8.
9019 * tst-cancel8.c: New file.
9021 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9022 clearing of control variable.
9023 * Makefile (tests): Add tst-once3 and tst-once4.
9024 * tst-once3.c: New file.
9025 * tst-once4.c: New file.
9027 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
9029 * sysdeps/sh/Makefile: New file.
9030 * sysdeps/sh/bits/atomic.h: New file.
9031 * sysdeps/sh/pthread_spin_init.c: New file.
9032 * sysdeps/sh/pthread_spin_lock.c: New file.
9033 * sysdeps/sh/pthread_spin_trylock.S: New file.
9034 * sysdeps/sh/pthread_spin_unlock.S: New file.
9035 * sysdeps/sh/pthreaddef.h: New file.
9036 * sysdeps/sh/tcb-offsets.sym: New file.
9037 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9038 * sysdeps/sh/tls.h: New file.
9039 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9040 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9041 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9042 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9043 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9044 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9045 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9046 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9047 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9048 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9049 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9050 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9051 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9052 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9053 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9054 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9055 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9056 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9057 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9058 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9059 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9060 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9061 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9062 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9063 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9064 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9065 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9066 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9067 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9068 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9070 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9072 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9075 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9077 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9079 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9080 (TLS_GET_FS): New #define.
9081 (TLS_SET_FS): New #define.
9082 Correct value of __NR_set_thread_area.
9084 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9086 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9088 * Makefile (tests): Add tst-popen1.
9089 * tst-popen1.c: New file.
9091 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9092 but inactive generalization.
9093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9094 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9095 Minor optimization, remove one instruction.
9096 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9098 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9100 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9102 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9104 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9105 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9106 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9107 * sysdeps/pthread/pthread_cond_signal.c: New file.
9108 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9109 * sysdeps/pthread/pthread_cond_wait.c: New file.
9110 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9111 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9112 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9113 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9114 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9115 * sysdeps/s390/Makefile: New file.
9116 * sysdeps/s390/bits/atomic.h: New file.
9117 * sysdeps/s390/pthread_spin_init.c: New file.
9118 * sysdeps/s390/pthread_spin_lock.c: New file.
9119 * sysdeps/s390/pthread_spin_trylock.c: New file.
9120 * sysdeps/s390/pthread_spin_unlock.c: New file.
9121 * sysdeps/s390/pthreaddef.h: New file.
9122 * sysdeps/s390/tcb-offsets.sym: New file.
9123 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9124 * sysdeps/s390/tls.h: New file.
9125 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9126 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9127 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9128 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9129 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9130 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9131 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9132 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9133 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9134 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9135 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9136 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9137 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9138 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9139 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9140 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9141 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9142 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9143 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9144 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9145 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9146 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9147 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9149 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9151 * atomic.h: Add a couple more default implementations.
9152 (atomic_compare_and_exchange_acq): Use
9153 __arch_compare_and_exchange_32_acq in return value definition. It
9155 (atomic_bit_set): Renamed from atomic_set_bit.
9156 Add missing atomic_ prefixes.
9158 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9159 thread library is available, use correct value to mark initialized
9162 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9164 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9165 __sysconf to determine pagesize.
9167 * pthread_create.c: Include <atomic.h>.
9168 * allocatestack.c (allocate_stack): Implement coloring of the
9169 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9170 size minus one. Adjust users.
9171 * sysdeps/i386/i686/Makefile: New file.
9173 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9175 * allocatestack.c: Improve comment throughout the file.
9177 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9178 (__lll_lock_wait): Add branch prediction.
9179 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9180 (__lll_lock_wait): Likewise.
9181 (lll_unlock_wake_cb): Removed.
9183 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9185 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9186 _POSIX_THREAD_PRIORITY_SCHEDULING.
9188 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9190 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9191 Fix return type of ptr___pthread_getspecific.
9193 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9195 * Makefile (tests): Add tst-umask1.
9196 (tst-umask1-ARGS): Define.
9197 * tst-umask1.c: New file.
9199 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9201 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9202 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9203 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9204 pthread_rwlock_unlock.
9205 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9206 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9207 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9208 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9209 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9211 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9212 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9214 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9215 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9216 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9218 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9219 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9221 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9222 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9223 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9225 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9226 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9228 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9230 * Makefile (libpthread-routines): Remove lowlevelcond and
9231 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9232 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9233 and pthread_cond_broadcast.
9234 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9235 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9236 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9237 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9238 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9239 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9240 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9241 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9242 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9243 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9244 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9245 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9246 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9247 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9248 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9249 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9250 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9251 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9252 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9253 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9254 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9255 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9256 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9257 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9258 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9259 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9260 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9261 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9262 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9263 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9264 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9266 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9267 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9268 of the code is moved to ...
9269 * sysdeps/pthread/createthread.c: ...here. New file.
9271 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9273 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9274 (__new_sem_post): Clear %eax before returning.
9275 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9277 * Makefile (tests): Add tst-cleanup2.
9278 * tst-cleanup2.c: New file.
9280 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9281 Interpret first parameter correctly.
9283 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9285 * Makefile (headers): Add bits/semaphore.h.
9287 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9289 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9292 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9294 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9295 must be used and mapping failed.
9296 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9298 * Makefile (CFLAGS-pthread_self.os): Define this, not
9299 CFLAGS-pthread_self.c.
9301 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9303 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9306 * Makefile (libpthread-routines): Add version. Add rules to build
9307 version.os and banner.h.
9308 * version.c: New file.
9310 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9312 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9313 the alias unconditional.
9314 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9316 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9318 * Makefile (CFLAGS-pthread_self.c): New definition.
9320 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9322 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9323 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9324 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9325 * init.c (__pthread_initialize_minimal_internal): Likewise.
9327 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9329 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9331 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9332 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9333 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9334 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9335 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9336 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9338 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9340 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9341 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9342 * tst-cancel-wrappers.sh: Remove all exceptions.
9344 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9346 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9347 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9349 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9350 Use __libc_pthread_functions array if SHARED.
9352 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9353 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9355 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9356 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9357 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9358 __libc_ptf_call instead of __libc_maybe_call.
9360 (__libc_cleanup_region_start): Wrap function name with PTF call.
9361 (__libc_cleanup_region_end): Likewise.
9362 (__libc_cleanup_end): Likewise.
9364 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9365 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9366 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9367 * pthreadP.h: Add prototypes.
9369 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9370 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9371 __pthread_rwlock_unlock aliases.
9372 * pthreadP.h: Add prototypes for new aliases.
9374 * pthreadP.h (struct pthead_functions): Moved to...
9375 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9376 * init.c (pthread_functions): Add initializers for new elements.
9378 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9379 __pthread_cleanup_pop_restore aliases.
9380 * pthreadP.h: Add prototypes.
9382 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9383 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9384 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9385 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9386 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9387 * pthreadP.h: Adjust prototypes and callers.
9389 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9391 * Makefile (tests): Add tst-cancel7.
9392 (tst-cancel7-ARGS): New variable.
9393 * tst-cancel7.c: New file.
9395 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9396 around gcc defficiencies.
9397 * old_pthread_cond_signal.c: Likewise.
9398 * old_pthread_cond_timedwait.c: Likewise.
9399 * old_pthread_cond_wait.c: Likewise.
9401 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9403 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9405 * Makefile (tests): Add tst-cond7.
9406 * tst-cond7.c: New file.
9408 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9409 (condvar_cleanup): Get condvar address from the right place.
9411 * atomic.h: Correct definitions of atomic_full_barrier,
9412 atomic_read_barrier, atomic_write_barrier.
9414 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9416 * old_pthread_cond_signal.c: Likewise.
9417 * old_pthread_cond_timedwait.c: Likewise.
9418 * old_pthread_cond_wait.c: Likewise.
9420 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9422 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9424 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9426 * pthreadP.h (pthread_cond_2_0_t): New type.
9427 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9428 Use new type for the 2.0 condvar function prototypes.
9429 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9430 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9432 * old_pthread_cond_destroy.c: Likewise.
9433 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9434 * old_pthread_cond_signal.c: Likewise.
9435 * old_pthread_cond_timedwait.c: Likewise.
9436 * old_pthread_cond_wait.c: Likewise.
9438 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9439 (__pthread_cond_wait): Don't save cancellation mode and seq value
9442 * herrno.c (__h_errno_location): Don't define as weak.
9444 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9446 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9447 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9448 and pthread_cond_wait.
9449 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9451 (__pthread_cond_broadcast_2_0): ... this.
9452 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9454 (__pthread_cond_destroy_2_0): ... this.
9455 * old_pthread_cond_init.c (__old_pthread_cond_init):
9457 (__pthread_cond_init_2_0): ... this.
9458 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9460 (__pthread_cond_signal_2_0): ... this.
9461 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9463 (__pthread_cond_wait_2_0): ... this.
9464 * pthread_cond_destroy.c: Include shlib-compat.h.
9465 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9466 * pthread_cond_init.c: Include shlib-compat.h.
9467 (pthread_cond_init): Change strong_alias into versioned_symbol.
9468 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9469 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9471 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9472 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9473 __pthread_cond_wait_2_0): New prototypes.
9474 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9475 __old_pthread_cond_init, __old_pthread_cond_signal,
9476 __old_pthread_cond_wait): Removed.
9477 * init.c: Include shlib-compat.h.
9478 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9479 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9480 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9481 ptr___pthread_cond_*_2_0 fields.
9482 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9483 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9485 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9486 LIBC_SIGACTION was not yet defined.
9487 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9488 [!defined LIBC_SIGACTION] (__sigaction): New function and
9490 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9491 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9493 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9495 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9497 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9499 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9500 New, larger type definition.
9501 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9503 * Versions [libpthread]: Add definitions for new pthread_cond_*
9504 interfaces for version GLIBC_2.3.2.
9505 * pthread_cond_init.c: Update initialization for new type definition.
9506 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9507 pthread_cond_timedwait, pthread_cond_signal, and
9508 pthread_cond_broadcast. Add old_pthread_cond_init,
9509 old_pthread_cond_destroy, old_pthread_cond_wait,
9510 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9511 old_pthread_cond_broadcast.
9512 * old_pthread_cond_broadcast.c: New file.
9513 * old_pthread_cond_destroy.c: New file.
9514 * old_pthread_cond_init.c: New file.
9515 * old_pthread_cond_signal.c: New file.
9516 * old_pthread_cond_timedwait.c: New file.
9517 * old_pthread_cond_wait.c: New file.
9518 * pthreadP.h: Add prototypes for the compatibility interfaces.
9520 * pthread_cond_destroy.c: Don't include <errno.h>.
9522 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9524 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9525 unnecessary zero offset when addressing MUTEX.
9527 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9529 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9531 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9532 for __register_atfork.
9534 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9536 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9537 instead of ASSEMBLER test macro.
9539 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9540 __libc_current_sigrtmax): Add libc_hidden_def.
9542 * sysdeps/pthread/list.h: Remove assert.h include.
9544 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9546 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9547 __pthread_initialize_minimal_internal not
9548 __pthread_initialize_minimal.
9550 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9552 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9553 __pthread_initialize_minimal as hidden.
9555 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9558 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9560 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9561 $(common-objpfx)format.lds, include that into the output script.
9563 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9565 2002-12-28 Andreas Jaeger <aj@suse.de>
9567 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9568 nsec resolution changes.
9569 (xstat64_conv): Likewise.
9570 (xstat32_conv): Likewise.
9571 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9573 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9574 structs stat and stat64.
9575 * time/time.h (__timespec_defined): Define for __USE_MISC.
9576 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9578 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9580 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9582 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9583 (pthread_exit): Use strong_alias to avoid warnings.
9584 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9585 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9586 ptr___pthread_attr_init_2_*.
9587 * init.c (pthread_functions): Adjust.
9589 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9591 * forward.c: Make all functions available by default again. It
9592 caused too much trouble.
9594 * pt-siglongjmp.c: Removed.
9596 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9598 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9599 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9600 * sysdeps/i386/Makefile: New file.
9601 * sysdeps/i386/tcb-offsets.sym: New file.
9602 * sysdeps/pthread/tcb-offsets.h: New file.
9603 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9604 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9606 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9607 __register_atfork...
9608 (GLIBC_2.3.2): ...here.
9610 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9612 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9613 pthread_attr_setstackaddr with __attribute_deprecated__.
9615 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9617 * pt-system.c (system): Remove cancellation handling.
9618 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9619 cancellation routines.
9621 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9623 * descr.h: Include <dl-sysdep.h>.
9624 (struct pthread): Move header.data.list to the back of the struct.
9625 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9626 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9627 (SYSINFO_OFFSEET): Likewise.
9629 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9631 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9633 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9634 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9635 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9636 (USE_DL_SYSINFO): Undef.
9638 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9640 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9641 $(common-objpfx)libc.so.
9642 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9643 it is bigger than pipe buffer size even on arches with bigger
9645 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9647 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9649 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9650 correct errno access for case that USE___THREAD is not defined.
9652 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9654 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9655 Patch by Marijn Ros <marijn@mad.scientist.com>.
9657 2002-12-22 Roland McGrath <roland@redhat.com>
9659 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9661 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9663 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9665 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9667 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9668 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9669 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9671 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9673 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9674 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9675 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9676 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9677 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9678 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9679 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9680 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9682 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9684 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9686 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9688 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9690 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9691 that sysinfo is properly initialized.
9692 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9693 to 1 only for ld.so.
9695 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9696 RTLD_CORRECT_DYNAMIC_WEAK.
9698 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9700 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9701 Use return 0 as 6th argument to FORWARD4.
9702 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9704 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9706 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9707 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9708 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9709 (INIT_SYSINFO): New #define.
9710 (TLS_TP_INIT): Use INIT_SYSINFO.
9711 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9712 At test to make sure SYSINFO_OFFSET value is correct.
9713 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9715 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9717 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9718 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9719 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9720 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9721 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9722 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9723 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9725 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9727 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9728 macro instead of using int $0x80 directly.
9730 * sysdeps/pthread/bits/stdio-lock.h: New file.
9731 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9732 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9733 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9734 * Makefile (routines): Add libc-lowlevelmutex.
9736 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9737 __i686.get_pc_thunk.dx.
9739 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9741 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9742 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9743 ($(objpfx)tst-cancel-wrappers.out): New rule.
9744 * tst-cancel-wrappers.sh: New test.
9745 * tst-locale1.c: Include signal.h.
9746 (uselocale): Test static linking of __libc_current_sigrt*.
9748 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9750 * Makefile (tests): Add tst-cancel6.
9751 * tst-cancel6.c: New file
9753 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9755 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9756 Define meaningfully for assembler as well.
9757 * pthreadP.h (struct pthread_functions): Remove
9758 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9759 and ptr_pthread_attr_init_2_1 fields.
9760 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9761 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9762 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9763 (FORWARD3): Define using FORWARD4.
9764 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9766 * pt-system.c: Remove duplicate stdlib.h include.
9768 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9770 * sem_init.c: Define sem_init@GLIBC_2.0.
9771 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9772 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9774 * flockfile.c: Moved to...
9775 * sysdeps/pthread/flockfile.c: ...here. New file.
9776 * funlockfile.c: Moved to...
9777 * sysdeps/pthread/funlockfile.c: ...here. New file.
9778 * ftrylockfile.c: Moved to...
9779 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9781 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9783 * libc-cancellation.c: Guard both function with
9784 #if !defined NOT_IN_libc.
9785 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9786 automatically provided pthread wrappers.
9787 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9788 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9790 * pt-open.c: Removed.
9791 * pt-fcntl.c: Removed.
9792 * pt-fsync.c: Removed.
9793 * pt-lseek.c: Removed.
9794 * pt-msgrcv.c: Removed.
9795 * pt-msgsnd.c: Removed.
9796 * pt-msync.c: Removed.
9797 * pt-nanosleep.c: Removed.
9798 * pt-open64.c: Removed.
9799 * pt-pause.c: Removed.
9800 * pt-pread.c: Removed.
9801 * pt-pread64.c: Removed.
9802 * pt-pwrite.c: Removed.
9803 * pt-pwrite64.c: Removed.
9804 * pt-read.c: Removed.
9805 * pt-recv.c: Removed.
9806 * pt-recvfrom.c: Removed.
9807 * pt-recvmsg.c: Removed.
9808 * pt-send.c: Removed.
9809 * pt-sendto.c: Removed.
9810 * pt-sigtimedwait.c: Removed.
9811 * pt-sigwait.c: Removed.
9812 * pt-wait.c: Removed.
9813 * pt-waitpid.c: Removed.
9814 * pt-write.c: Removed.
9815 * pt-accept.c: Removed.
9816 * pt-close.c: Removed.
9817 * pt-connect.c: Removed.
9818 * pt-lseek64.c: Removed.
9819 * pt-sendmsg.c: Removed.
9820 * pt-tcdrain.c: Removed.
9822 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9824 * init.c (__pthread_initialize_minimal_internal): Renamed from
9825 __pthread_initialize_minimal. Make old name an alias. This
9826 converts a normal relocation into a relative relocation.
9828 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9830 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9831 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9832 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9833 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9834 pt-sigwaitinfo, pt-waitid, and pt-writev.
9835 * pt-creat.c: Removed.
9836 * pt-poll.c: Removed.
9837 * pt-pselect.c: Removed.
9838 * pt-readv.c: Removed.
9839 * pt-select.c: Removed.
9840 * pt-sigpause.c: Removed.
9841 * pt-sigsuspend.c: Removed.
9842 * pt-sigwaitinfo.c: Removed.
9843 * pt-waitid.c: Removed.
9844 * pt-writev.c: Removed.
9846 * init.c (pthread_functions): New variable.
9847 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9848 (or NULL) to __libc_pthread_init.
9849 * forward.c: Rewrite to use __libc:pthread_functions array to get
9851 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9853 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9854 Take new parameter. Copy content of variable pointed to by it
9855 to __libc_pthread_init.
9857 * pthreadP.h (struct pthread_functions): New type.
9858 (__libc_pthread_init): Declare.
9860 * pthread_attr_destroy.c: Add namespace protected alias.
9861 * pthread_attr_getdetachstate.c: Likewise.
9862 * pthread_attr_getinheritsched.c: Likewise.
9863 * pthread_attr_getschedparam.c: Likewise.
9864 * pthread_attr_getschedpolicy.c: Likewise.
9865 * pthread_attr_getscope.c: Likewise.
9866 * pthread_attr_setdetachstate.c: Likewise.
9867 * pthread_attr_setinheritsched.c: Likewise.
9868 * pthread_attr_setschedparam.c: Likewise.
9869 * pthread_attr_setschedpolicy.c: Likewise.
9870 * pthread_attr_setscope.c: Likewise.
9871 * pthread_cond_broadcast.c: Likewise.
9872 * pthread_cond_destroy.c: Likewise.
9873 * pthread_cond_init.c: Likewise.
9874 * pthread_cond_signal.c: Likewise.
9875 * pthread_cond_wait.c: Likewise.
9876 * pthread_condattr_destroy.c: Likewise.
9877 * pthread_condattr_init.c: Likewise.
9878 * pthread_equal.c: Likewise.
9879 * pthread_exit.c: Likewise.
9880 * pthread_getschedparam.c: Likewise.
9881 * pthread_self.c: Likewise.
9882 * pthread_setcancelstate.c: Likewise.
9883 * pthread_setschedparam.c: Likewise.
9884 * pthread_mutex_destroy.c: Likewise.
9885 * pthread_mutex_init.c: Likewise.
9886 * pthreadP.h: Add prototypes for the aliases.
9888 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9889 multiple_threads member in correct TCB to 1.
9891 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9892 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9893 member of thread decriptor, otherwise return unconditionally 1.
9895 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9897 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9898 regular Linux version. Remove file.
9899 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9900 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9901 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9902 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9903 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9904 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9905 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9906 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9907 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9908 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9909 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9910 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9911 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9912 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9913 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9914 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9915 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9916 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9917 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9918 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9919 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9920 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9921 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9922 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9923 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9924 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9925 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9926 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9927 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9928 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9930 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9932 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9933 * sysdeps/unix/sysv/linux/open.c: Removed.
9934 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9935 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9936 * sysdeps/unix/sysv/linux/msync.c: Removed.
9937 * sysdeps/unix/sysv/linux/read.c: Removed.
9938 * sysdeps/unix/sysv/linux/close.c: Removed.
9939 * sysdeps/unix/sysv/linux/creat.c: Removed.
9940 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9941 * sysdeps/unix/sysv/linux/pause.c: Removed.
9942 * sysdeps/unix/sysv/linux/select.c: Removed.
9943 * sysdeps/unix/sysv/linux/write.c: Removed.
9945 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9947 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9948 element in TCB to see whether locking is needed.
9950 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9951 MULTIPLE_THREADS_OFFSET value is correct.
9953 * sysdeps/unix/sysv/linux/close.c: New file.
9954 * sysdeps/unix/sysv/linux/connect.S: New file.
9955 * sysdeps/unix/sysv/linux/creat.c: New file.
9956 * sysdeps/unix/sysv/linux/fsync.c: New file.
9957 * sysdeps/unix/sysv/linux/llseek.c: New file.
9958 * sysdeps/unix/sysv/linux/lseek.c: New file.
9959 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9960 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9961 * sysdeps/unix/sysv/linux/msync.c: New file.
9962 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9963 * sysdeps/unix/sysv/linux/open.c: New file.
9964 * sysdeps/unix/sysv/linux/open64.c: New file.
9965 * sysdeps/unix/sysv/linux/pause.c: New file.
9966 * sysdeps/unix/sysv/linux/poll.c: New file.
9967 * sysdeps/unix/sysv/linux/pread.c: New file.
9968 * sysdeps/unix/sysv/linux/pread64.c: New file.
9969 * sysdeps/unix/sysv/linux/pselect.c: New file.
9970 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9971 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9972 * sysdeps/unix/sysv/linux/readv.c: New file.
9973 * sysdeps/unix/sysv/linux/recv.S: New file.
9974 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9975 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9976 * sysdeps/unix/sysv/linux/select.c: New file.
9977 * sysdeps/unix/sysv/linux/send.S: New file.
9978 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9979 * sysdeps/unix/sysv/linux/sendto.S: New file.
9980 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9981 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9982 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9983 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9984 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9985 * sysdeps/unix/sysv/linux/system.c: New file.
9986 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9987 * sysdeps/unix/sysv/linux/wait.c: New file.
9988 * sysdeps/unix/sysv/linux/waitid.c: New file.
9989 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9990 * sysdeps/unix/sysv/linux/writev.c: New file.
9991 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9993 * pt-readv.c: Fix comment.
9995 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9997 * tst-cleanup1.c: Include stdlib.h.
9999 * tst-cancel5.c: New test.
10000 * Makefile (tests): Add tst-cancel5.
10001 (tst-cancel5): Link against libc.so libpthread.so in that order.
10003 2002-12-13 Ulrich Drepper <drepper@redhat.com>
10005 * forward.c (test_loaded): Prevent recursive calls.
10007 * Makefile (routines): Add libc-cancellation.
10008 * libc-cancellation.c: New file.
10009 * descr.h (struct pthread): Add multiple_threads field.
10010 * allocatestack.c (allocate_stack): Initialize multiple_header field of
10011 new thread descriptor to 1.
10012 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10013 Initialize multiple_thread field after successful thread creation.
10014 * cancellation.c (__do_cancel): Move to pthreadP.h.
10015 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10016 (__pthread_disable_asynccancel): Add internal_function attribute.
10017 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10018 * pthread_setcancelstate.c: Likewise.
10019 * pthread_setcanceltype.c: Likewise.
10020 * pthread_exit.c: Likewise.
10021 * pthreadP.h (CANCELLATION_P): Likewise.
10022 (__do_cancel): Define as static inline.
10023 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10024 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10026 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10027 fields. Define MULTIPLE_THREADS_OFFSET.
10028 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10030 * sysdeps/unix/sysv/linux/accept.S: New file.
10031 * sysdeps/unix/sysv/linux/read.c: New file.
10032 * sysdeps/unix/sysv/linux/write.c: New file.
10033 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10034 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10035 initialization of __libc_locking_needed.
10036 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10037 __libc_locking_needed, use multiple_threads field in TCB.
10038 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10040 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10042 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10044 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10046 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10047 access to __libc_locking_needed for PIC.
10049 2002-12-12 Jakub Jelinek <jakub@redhat.com>
10051 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10052 declare for libc.so.
10053 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10055 (__libc_lock_lock): Put into statement expression.
10056 (__libc_lock_unlock): Remove trailing semicolon.
10057 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10059 2002-12-12 Roland McGrath <roland@redhat.com>
10061 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10062 "m" constraint to refer to __libc_locking_needed. Declare it here.
10064 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10066 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10067 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10068 Initialize __libc_locking_needed.
10069 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10070 instead of __register_pthread_fork_handler.
10071 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10072 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10073 fork-gen with libc_pthread_init.
10074 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10075 of __register_pthread_fork_handler.
10076 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10077 of __register_pthread_fork_handler.
10078 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10079 __libc_locking_needed to determine whether lock prefix can be avoided.
10080 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10082 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10084 * Makefile (tests): Add tst-cleanup1.
10085 * tst-cleanup1.c: New file.
10086 * cancellation.c (__cleanup_thread): Removed.
10087 (__do_cancel): Remove call to __cleanup_thread.
10088 * pthreadP.h: Remove __cleanup_thread prorotype.
10090 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10091 Remember function and argument even if cancellation handler
10092 function is not available.
10093 (__libc_cleanup_region_end): Execute registered function directly if
10094 pthread functions are not available.
10095 (__libc_cleanup_end): Likewise.
10097 * init.c (__pthread_initialize_minimal): Fix initialization in
10098 static lib by preventing gcc from being too clever.
10100 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10102 * init.c (__pthread_initialize_minimal): Remove unneccesary
10105 * Makefile (tests): We can run tst-locale2 now.
10107 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10109 * Versions: Remove duplicated sigwait entry.
10111 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10113 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10116 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10118 * pthreadP.h: Declare __pthread_enable_asynccancel and
10119 __pthread_disable_asynccancel.
10120 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10121 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10122 * cancellation.c (__pthread_enable_asynccancel): New function.
10123 (__pthread_disable_asynccancel): New function.
10124 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10125 * pt-close.c: Likewise.
10126 * pt-connect.c: Likewise.
10127 * pt-creat.c: Likewise.
10128 * pt-fcntl.c: Likewise.
10129 * pt-fsync.c: Likewise.
10130 * pt-lseek.c: Likewise.
10131 * pt-lseek64.c: Likewise.
10132 * pt-msgrcv.c: Likewise.
10133 * pt-msgsnd.c: Likewise.
10134 * pt-msync.c: Likewise.
10135 * pt-nanosleep.c: Likewise.
10136 * pt-open.c: Likewise.
10137 * pt-open64.c: Likewise.
10138 * pt-pause.c: Likewise.
10139 * pt-poll.c: Likewise.
10140 * pt-pread.c: Likewise.
10141 * pt-pread64.c: Likewise.
10142 * pt-pselect.c: Likewise.
10143 * pt-pwrite.c: Likewise.
10144 * pt-pwrite64.c: Likewise.
10145 * pt-read.c: Likewise.
10146 * pt-readv.c: Likewise.
10147 * pt-recv.c: Likewise.
10148 * pt-recvfrom.c: Likewise.
10149 * pt-recvmsg.c: Likewise.
10150 * pt-select.c: Likewise.
10151 * pt-send.c: Likewise.
10152 * pt-sendmsg.c: Likewise.
10153 * pt-sendto.c: Likewise.
10154 * pt-sigpause.c: Likewise.
10155 * pt-sigsuspend.c: Likewise.
10156 * pt-sigtimedwait.c: Likewise.
10157 * pt-sigwait.c: Likewise.
10158 * pt-sigwaitinfo.c: Likewise.
10159 * pt-system.c: Likewise.
10160 * pt-tcdrain.c: Likewise.
10161 * pt-wait.c: Likewise.
10162 * pt-waitid.c: Likewise.
10163 * pt-waitpid.c: Likewise.
10164 * pt-write.c: Likewise.
10165 * pt-writev.c: Likewise.
10166 * pthread_join.c: Likewise.
10167 * pthread_timedjoin.c: Likewise.
10169 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10170 (__xpg_sigpause): New function.
10171 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10173 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10175 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10177 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10178 _GI_pthread_cleanup_pop to pthreadP.h.
10180 * ftrylockfile.c: Use _IO_lock_trylock instead of
10181 pthread_mutex_trylock.
10183 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10184 (CANCEL_RESET): Likewise.
10185 (__pthread_setcanceltype_): Declare.
10186 (__pthread_mutex_lock_internal): Declare.
10187 (__pthread_mutex_unlock_internal): Declare.
10188 (__pthread_once_internal): Declare.
10189 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10190 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10192 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10193 and pthread_mutex_unlock.
10194 * pthread_cond_wait.c: Likewise.
10195 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10196 * pthread_mutex_unlock.c: Likewise.
10198 * pthread_setcanceltype.c: Add additional alias
10199 __pthread_setcanceltype.
10201 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10202 * sem_open.c (sem_open): Likewise.
10203 Use __libc_open, __libc_write, and __libc_close instead of
10204 open, write, and close respectively.
10206 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10207 Rewrite as statement expression since it must return a value.
10209 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10210 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10213 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10214 alias __pthread_once_internal.
10216 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10218 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10220 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10221 * tst-stdio1.c: New file.
10222 * tst-stdio2.c: New file.
10224 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10226 * Makefile (tests): Comment out tst-locale2 for now.
10227 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10229 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10231 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10232 Use _IO_lock_init instead of explicit assignment.
10234 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10235 Define __libc_lock_* and __libc_lock_recursive macros with
10236 lowlevellock macros, not pthread mutexes.
10238 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10239 of pthread_mutex_lock.
10240 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10241 instead of pthread_mutex_unlock.
10243 2002-12-06 Roland McGrath <roland@redhat.com>
10245 * allocatestack.c (__stack_user): Use uninitialized defn.
10246 * init.c (__pthread_initialize_minimal): Initialize it here.
10248 2002-12-05 Roland McGrath <roland@redhat.com>
10250 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10252 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10254 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10255 missing & here too.
10257 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10259 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10261 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10262 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10263 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10264 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10265 for __libc_lock_* macros.
10266 * Makefile (routines): Add libc-lowlevellock.
10268 2002-10-09 Roland McGrath <roland@redhat.com>
10270 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10271 Under [__PIC__], call the function via the pointer fetched for
10272 comparison rather than a call by name that uses the PLT.
10273 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10274 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10275 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10276 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10277 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10279 2002-12-04 Roland McGrath <roland@redhat.com>
10281 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10283 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10284 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10286 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10288 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10290 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10291 a completely opaque, non-integer type.
10292 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10294 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10296 * sysdeps/i386/tls.h: Include stdlib.h.
10297 * sysdeps/x86_64/tls.h: Likewise.
10299 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10301 * Makefile (tests): Add tst-locale2.
10302 (tests-static): Likewise.
10303 * tst-locale2.c: New file.
10305 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10306 volatile and add memory clobbers to lock operations.
10308 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10310 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10311 * sysdeps/i386/i486/bits/atomic.h: New file.
10312 * sysdeps/i386/i586/bits/atomic.h: New file.
10313 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10314 include i486 version.
10315 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10316 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10317 Patch by Marijn Ros <marijn@mad.scientist.com>.
10319 * allocatestack.c (get_cached_stack): Don't crash if we first
10320 found a stack with a larger size then needed.
10321 Reported by Hui Huang <hui.huang@sun.com>.
10323 * Makefile (tests): Add tst-sysconf.
10324 * tst-sysconf.c: New file.
10326 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10327 PTHREAD_THREADS_MAX.
10329 2002-12-02 Roland McGrath <roland@redhat.com>
10331 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10332 Declare using hidden_proto instead of attribute_hidden, so there are
10333 non-.hidden static symbols for gdb to find.
10334 (__pthread_keys): Likewise.
10335 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10336 * allocatestack.c (__stack_user): Likewise.
10337 * pthread_create.c (__pthread_keys): Likewise.
10338 (__nptl_threads_events, __nptl_last_event): Make these static instead
10340 * pthread_key_create.c (__pthread_pthread_keys_max,
10341 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10343 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10345 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10347 * tst-locale1.c: New file.
10349 * pthread_cond_timedwait.c: Include <stdlib.h>.
10351 * Makefile (tests): Add tst-fork2 and tst-fork3.
10352 * tst-fork2.c: New file.
10353 * tst-fork3.c: New file.
10355 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10357 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10359 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10360 require it to 200112L.
10362 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10363 instruction only if HAVE_CMOV is defined.
10364 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10366 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10368 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10370 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10372 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10374 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10376 * sysdeps/x86_64/bits/atomic.h: New file.
10378 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10381 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10382 possible since gettid cannot fail.
10384 * sysdeps/x86_64/pthreaddef.h: New file.
10386 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10388 * sysdeps/x86_64/pthread_spin_init.c: New file.
10389 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10390 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10391 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10393 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10394 Add missing lock prefix. Minute optimization.
10396 * tst-spin2.c (main): Also check successful trylock call.
10398 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10399 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10401 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10402 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10404 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10405 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10406 value in case of an error. Add support for INTERNAL_SYSCALL.
10408 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10409 value in case of an error.
10411 * sysdeps/x86_64/tls.h: New file.
10413 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10415 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10416 takes the array member name and the index as parameters.
10417 (THREAD_SETMEM_NC): Likewise.
10418 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10419 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10422 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10423 to decide which code to use.
10424 (THREAD_SETMEM_NC): Likewise.
10426 * allocatestack.c (queue_stack): Don't remove stack from list here.
10427 Do it in the caller. Correct condition to prematurely terminate
10428 loop to free stacks.
10429 (__deallocate_stack): Remove stack from list here.
10431 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10433 * Makefile (tests): Add tst-stack1.
10434 * tst-stack1.c: New file.
10436 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10439 * pthread_attr_getstack.c: Return bottom of the thread area.
10441 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10443 * Makefile (libpthread-routines): Add pt-allocrtsig and
10444 pthread_kill_other_threads.
10445 * pt-allocrtsig.c: New file.
10446 * pthread_kill_other_threads.c: New file.
10447 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10448 all three functions.
10449 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10451 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10452 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10453 and __libc_allocate_rtsig_private.
10454 * Versions (libpthread): Export pthread_kill_other_threads_np,
10455 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10457 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10459 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10460 the end of the stack. Adjust computations.
10461 When mprotect call fails dequeue stack and free it.
10462 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10464 * pthread_getattr_np.c: Likewise.
10466 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10469 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10471 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10472 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10474 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10476 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10477 * pthread_setspecific.c: Likewise.
10479 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10481 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10482 definitions. Get them from the official place.
10483 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10485 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10486 Use new CLONE_ flags in clone() calls.
10488 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10489 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10491 * Versions: Add pthread_* functions for libc.
10492 * forward.c: New file.
10494 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10496 * herrno.c: New file.
10499 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10500 sem_trywait, and sem_timedwait. Add herrno and res.
10501 * sem_init.c: Don't initialize lock and waiters members.
10502 * sem_open.c: Likewise.
10503 * sem_post.c: Removed.
10504 * sem_wait.c: Removed.
10505 * sem_trywait.c: Removed.
10506 * sem_timedwait.c: Removed.
10507 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10508 Includes full implementations of sem_post, sem_wait, sem_trywait,
10510 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10511 for new implementation.
10512 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10513 and waiters fields.
10515 * tst-sem3.c: Improve error message.
10516 * tst-signal3.c: Likewise.
10518 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10519 to tell the kernel about the termination futex and to initialize tid
10520 member. Don't initialize main_thread.
10521 * descr.h (struct pthread): Remove main_thread member.
10522 * cancelllation.c (__do_cancel): Remove code handling main thread.
10523 The main thread is not special anymore.
10525 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10526 size of the stacks to stack_cache_actsize.
10528 * pt-readv.c: Add missing "defined".
10529 * pt-sigwait.c: Likewise.
10530 * pt-writev.c: Likewise.
10532 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10534 * Versions: Export __connect from libpthread.
10535 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10537 * Makefile (libpthread-routines): Add pt-raise.
10538 * sysdeps/unix/sysv/linux/raise.c: New file.
10539 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10540 * sysdeps/generic/pt-raise.c: New file.
10542 * pthread_cond_init.c: Initialize all data elements of the condvar
10543 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10545 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10546 * pthread_create.c: Likewise.
10548 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10549 * tst-key1.c: New file.
10550 * tst-key2.c: New file.
10551 * tst-key3.c: New file.
10553 * Versions: Export pthread_detach for version GLIBC_2.0.
10554 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10556 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10558 * pthread_key_create.c: Terminate search after an unused key was found.
10559 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10561 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10562 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10564 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10566 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10567 dynamic lookup for errno in PIC.
10569 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10570 release the stack lock as soon as possible.
10571 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10572 the static TLS block.
10573 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10575 * cancellation.c: Renamed from cancelation.c.
10576 * Makefile: Adjust accordingly.
10577 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10578 * cleanup_defer.c: Use CANCELLATION_P.
10579 * pthread_testcancel.c: Likewise.
10580 * descr.h: Fix spelling in comments.
10581 * init.c: Likewise.
10582 * pthread_getattr_np.c: Likewise.
10583 * pthread_getschedparam.c: Likewise.
10584 * pthread_setschedparam.c: Likewise.
10585 * Versions: Likewise.
10587 * pt-pselect.c: New file.
10588 * Makefile (libpthread-routines): Add pt-pselect.
10589 * Versions: Add pselect.
10591 * tst-cancel4.c: New file.
10592 * Makefile (tests): Add tst-cancel4.
10594 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10596 * pthread_mutex_lock.c: Always record lock ownership.
10597 * pthread_mutex_timedlock.c: Likewise.
10598 * pthread_mutex_trylock.c: Likewise.
10600 * pt-readv.c: New file.
10601 * pt-writev.c: New file.
10602 * pt-creat.c: New file.
10603 * pt-msgrcv.c: New file.
10604 * pt-msgsnd.c: New file.
10605 * pt-poll.c: New file.
10606 * pt-select.c: New file.
10607 * pt-sigpause.c: New file.
10608 * pt-sigsuspend.c: New file.
10609 * pt-sigwait.c: New file.
10610 * pt-sigwaitinfo.c: New file.
10611 * pt-waitid.c: New file.
10612 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10613 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10614 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10615 * Versions: Add all the new functions.
10617 * tst-exit1.c: New file.
10618 * Makefile (tests): Add tst-exit1.
10620 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10622 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10624 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10626 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10627 call. pthread_join is an official cancellation point.
10628 * pthread_timedjoin.c: Likewise.
10630 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10631 and the condvar's mutex are retrieved.
10632 * pthread_cond_timedwait.c: Likewise.
10633 Reported by dice@saros.East.Sun.COM.
10635 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10637 * pthreadP.h: Cut out all type definitions and move them...
10638 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10639 * pthreadP.h: Include <internaltypes.h>.
10641 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10642 performance tweaks.
10644 * sem_trywait.c: Shuffle #includes around to get right order.
10645 * sem_timedwait.c: Likewise.
10646 * sem_post.c: Likewise.
10647 * sem_wait.c: Likewise.
10649 * nptl 0.3 released.
10651 * Makefile (tests): Add tst-signal3.
10652 * tst-signal3.c: New file.
10654 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10656 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10657 the asms modify the sem object.
10658 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10660 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10661 the actual members.
10662 * pthreadP.h (struct sem): New type. Actual semaphore type.
10663 * semaphoreP.h: Include pthreadP.h.
10664 * sem_getvalue.c: Adjust to sem_t change.
10665 * sem_init.c: Likewise.
10666 * sem_open.c: Likewise.
10667 * sem_post.c: Likewise.
10668 * sem_timedwait.c: Likewise.
10669 * sem_trywait.c: Likewise.
10670 * sem_wait.c: Likewise.
10672 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10674 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10675 * tst-basic2.c: New file.
10676 * tst-exec1.c: New file.
10677 * tst-exec2.c: New file.
10678 * tst-exec3.c: New file.
10680 * tst-fork1.c: Remove extra */.
10682 * nptl 0.2 released. The API for IA-32 is complete.