1 2009-01-02 Ulrich Drepper <drepper@redhat.com>
3 * init.c (__pthread_initialize_minimal_internal): Check for
4 FUTEX_CLOCK_REALTIME flag.
5 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
6 Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_READTIME instead of computing
9 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
10 FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
11 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
12 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
13 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
14 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
16 2008-12-09 Ulrich Drepper <drepper@redhat.com>
18 * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
19 loop body instead of ; to avoid gcc warnings.
20 (pthread_cleanup_pop_restore_np): Likewise.
21 Patch by Caolán McNamara <caolanm@redhat.com>.
23 2008-12-09 Jakub Jelinek <jakub@redhat.com>
25 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
26 fast path here, for robust/PI/PP mutexes call
27 __pthread_mutex_lock_full. Don't use switch, instead use a series
28 of ifs according to their probability.
29 (__pthread_mutex_lock_full): New function.
30 * pthread_mutex_unlock.c: Include assert.h.
31 (__pthread_mutex_unlock_usercnt): Handle only the
32 fast path here, for robust/PI/PP mutexes call
33 __pthread_mutex_unlock_full. Don't use switch, instead use a series
34 of ifs according to their probability.
35 (__pthread_mutex_unlock_full): New function.
36 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
37 (__pthread_mutex_lock_full): Define.
39 2008-12-08 Ulrich Drepper <drepper@redhat.com>
41 * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
42 implementation. Add necessary padding and.
43 * descr.h (struct pthread): Increase padding for tcbhead_t to 24
46 2008-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
48 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
49 and FUTEX_WAKE_BITSET.
51 2008-12-02 Ulrich Drepper <drepper@redhat.com>
53 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
54 and FUTEX_WAKE_BITSET.
55 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
56 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
57 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
58 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
60 2008-11-25 Roland McGrath <roland@redhat.com>
62 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
63 Subdirectories moved to ports repository as
64 sysdeps/.../nptl subdirectories.
66 2008-11-12 Jakub Jelinek <jakub@redhat.com>
69 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
71 * pthread_cond_init.c (__pthread_cond_init): Fix
72 cond->__data.__nwaiters initialization.
73 * Makefile (tests): Add tst-cond23.
74 * tst-cond23.c: New test.
76 2008-11-07 Jakub Jelinek <jakub@redhat.com>
78 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
80 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
83 2008-11-01 Ulrich Drepper <drepper@redhat.com>
86 * pthread_mutex_lock.c: Add support for private PI mutexes.
87 * pthread_mutex_timedlock.c: Likewise.
88 * pthread_mutex_trylock.c: Likewise.
89 * pthread_mutex_unlock.c: Likewise.
90 Patch mostly by Ben Jackson <ben@ben.com>.
92 2008-10-31 Ulrich Drepper <drepper@redhat.com>
95 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
96 Increase stack size for helper thread.
98 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
100 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
101 assembly with a clobber list for access registers a0 and a1.
103 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
105 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
106 to force runp->refcntr to be read from memory.
108 2008-09-08 Richard Guenther <rguenther@suse.de>
110 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
111 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
112 lll_timedlock, lll_robust_timedlock, lll_unlock,
113 lll_robust_unlock): Promote private to int.
115 2008-08-15 Ulrich Drepper <drepper@redhat.com>
117 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
118 ARCH_RETRY_MMAP definitions.
119 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
120 Define MAP_STACK when not defined.
121 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
122 handling of ARCH_RETRY_MMAP.
124 2008-07-30 Ulrich Drepper <drepper@redhat.com>
126 * tst-align2.c (f): Print message that f is reached.
128 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
131 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
132 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
134 2008-07-25 Ulrich Drepper <drepper@redhat.com>
136 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
137 SOCK_CLOEXEC if possible.
139 2008-05-29 Ulrich Drepper <drepper@redhat.com>
141 * Makefile (tests): Add tst-rwlock2a.
142 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
143 * tst-rwlock2a.c: New file.
145 2008-06-12 Ulrich Drepper <drepper@redhat.com>
147 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
149 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
151 * sysdeps/pthread/pthread.h: Fix typo in comment.
153 2008-05-28 Ulrich Drepper <drepper@redhat.com>
155 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
156 of CPU set to the kernel.
158 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
160 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
162 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
163 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
164 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
165 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
166 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
167 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
169 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
171 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
173 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
175 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
177 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
180 2008-05-26 Ulrich Drepper <drepper@redhat.com>
182 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
184 2008-05-20 Jakub Jelinek <jakub@redhat.com>
186 David S. Miller <davem@davemloft.net>
188 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
190 2008-05-10 Ulrich Drepper <drepper@redhat.com>
192 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
194 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
196 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
198 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
200 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
202 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
204 2008-04-14 David S. Miller <davem@davemloft.net>
206 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
207 (__old_sem_wait): Fix argument to lll_futex_wait().
209 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
211 * pthread_create.c: Require pthread_mutex_trylock and
212 pthread_key_delete for libgcc.
214 2008-04-08 Jakub Jelinek <jakub@redhat.com>
217 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
218 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
219 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
221 2008-03-27 Ulrich Drepper <drepper@redhat.com>
223 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
224 <linux/limits.h> has defined it.
225 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
226 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
227 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
228 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
230 2008-03-18 Jakub Jelinek <jakub@redhat.com>
232 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
234 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
235 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
237 2008-03-14 Ulrich Drepper <drepper@redhat.com>
239 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
240 HAVE_DL_DISCOVER_OSVERSION.
241 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
242 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
244 2008-03-07 Ulrich Drepper <drepper@redhat.com>
247 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
248 _POSIX_CHOWN_RESTRICTED value to zero.
250 2008-01-31 Roland McGrath <roland@redhat.com>
252 * Makefile (omit-deps): Variable removed.
254 2008-01-30 Ulrich Drepper <drepper@redhat.com>
256 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
257 unnecessary addr32 prefix.
259 2008-01-29 Roland McGrath <roland@redhat.com>
261 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
263 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
265 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
267 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
269 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
271 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
272 (__lll_lock_wait_private): Fix typo.
273 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
274 (pthread_barrier_wait): Likewise. Adjust XADD use.
275 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
277 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
278 (pthread_rwlock_timedrdlock): Return correct return value.
279 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
280 (pthread_rwlock_timedwrlock): Likewise.
282 2008-01-15 Ulrich Drepper <drepper@redhat.com>
284 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
285 thread returns the program exits with an error code.
287 2008-01-10 Ulrich Drepper <drepper@redhat.com>
289 * pthread-errnos.sym: Add EOVERFLOW.
290 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
291 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
292 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
293 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
295 2007-12-14 Ulrich Drepper <drepper@redhat.com>
297 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
298 parameter. Passed it as permission to mmap.
299 * allocatestack.c (allocate_stack): Pass prot as second parameter
302 2007-12-12 Ulrich Drepper <drepper@redhat.com>
304 * tst-basic7.c: Allocate memory for the stack.
307 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
308 (__pthread_cond_timedwait): Don't use VDSO.
309 Patch by Michal Januszewski.
311 2007-12-07 Ulrich Drepper <drepper@redhat.com>
314 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
315 Allow label before pthread_cleanup_pop.
316 (pthread_cleanup_pop_restore_np): Likewise.
318 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
320 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
321 Store 2 before returning ETIMEDOUT.
323 2007-11-23 Ulrich Drepper <drepper@redhat.com>
325 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
326 Store 2 before returning ETIMEDOUT.
327 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
328 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
329 (__lll_lock_wait_private): Optimize.
330 (__lll_lock_wait): Likewise.
332 2007-11-20 Jakub Jelinek <jakub@redhat.com>
334 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
335 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
336 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
338 2007-11-08 Ulrich Drepper <drepper@redhat.com>
341 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
342 If we time out, try one last time to lock the futex to avoid
343 losing a wakeup signal.
344 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
345 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
348 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
351 2007-11-07 Ulrich Drepper <drepper@redhat.com>
354 * allocatestack.c (allocate_stack): Change ENOMEM error in case
355 mmap failed to EAGAIN.
356 * Makefile (tests): Add tst-basic7.
357 * tst-basic7.c: New file.
359 2007-11-05 Ulrich Drepper <drepper@redhat.com>
361 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
364 2007-11-03 Mike Frysinger <vapier@gentoo.org>
366 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
367 missing line continuations.
368 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
369 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
371 2007-10-28 Ulrich Drepper <drepper@redhat.com>
374 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
375 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
376 (struct timer): Add next element.
377 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
378 enqueue timer structure into __active_timer_sigev_thread list.
379 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
380 remove timer struct from __active_timer_sigev_thread.
381 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
382 Before using timer structure make sure it is still on the
383 __active_timer_sigev_thread list. Keep lock until done.
384 Define __active_timer_sigev_thread and
385 __active_timer_sigev_thread_lock.
387 2007-10-27 Ulrich Drepper <drepper@redhat.com>
389 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
390 Redefine thread_atfork for use of ATFORK_MEM.
391 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
392 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
394 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
395 Use atomic operation when removing first element of list.
397 2007-10-17 Jakub Jelinek <jakub@redhat.com>
399 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
400 routine instead of an alias to __new_sem_post.
402 2007-10-15 Jakub Jelinek <jakub@redhat.com>
404 * init.c (__pthread_initialize_minimal): Initialize word to appease
407 2007-10-10 Jakub Jelinek <jakub@redhat.com>
409 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
410 libc.so just clear NAME.
411 (__libc_rwlock_fini): Nop inside of libc.so.
412 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
415 2007-09-02 Ulrich Drepper <drepper@redhat.com>
417 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
418 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
420 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
422 2007-08-21 Ulrich Drepper <drepper@redhat.com>
425 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
426 reclaimed stack if necessary.
427 * Makefile (tests): Add tst-tsd6.
428 * tst-tsd6.c: New file.
430 2007-08-21 Jakub Jelinek <jakub@redhat.com>
432 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
433 Add private argument.
435 2007-08-20 Ulrich Drepper <drepper@redhat.com>
437 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
438 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
440 2007-08-16 Jakub Jelinek <jakub@redhat.com>
442 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
443 (__lll_robust_timedlock): Pass private as last argument to
444 __lll_robust_timedlock_wait.
445 (__lll_unlock): Fix a pasto.
447 2007-08-15 Jakub Jelinek <jakub@redhat.com>
449 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
450 sparc_old_sem): New structs.
451 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
452 (__sem_wait_cleanup): New function.
453 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
454 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
455 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
457 (__old_sem_wait): New function.
458 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
459 nptl/sysdeps/unix/sysv/linux/sparc version.
460 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
462 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
463 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
464 (__new_sem_trywait): Use sparc_old_sem structure.
465 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
466 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
467 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
468 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
469 lll_futex_timed_wait.
470 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
471 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
472 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
474 (__old_sem_post): New function.
475 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
476 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
477 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
478 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
479 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
480 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
482 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
484 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
485 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
486 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
487 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
488 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
489 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
490 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
492 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
493 kernel-features.h and tcb-offsets.h.
494 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
495 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
497 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
499 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
500 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
502 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
503 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
504 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
505 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
510 2007-08-14 Jakub Jelinek <jakub@redhat.com>
512 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
513 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
514 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
515 lll_futex_timed_wait.
517 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
518 __lll_robust_unlock): Rewrite as macros instead of inline functions.
519 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
520 __lll_robust_unlock, __lll_wait_tid): Likewise.
522 2007-08-13 Jakub Jelinek <jakub@redhat.com>
524 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
526 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
527 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
528 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
529 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
531 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
532 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
535 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
536 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
537 process private. Switch DW_CFA_advance_loc1 and some
538 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
539 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
540 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
541 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
542 process private. Switch DW_CFA_advance_loc{1,2} and some
543 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
544 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
545 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
546 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
548 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
549 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
550 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
553 (__pthread_cond_broadcast): Compare %r8 instead of
554 dep_mutex-cond_*(%rdi) with $-1.
555 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
556 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
559 2007-08-13 Ulrich Drepper <drepper@redhat.com>
561 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
563 2007-08-13 Jakub Jelinek <jakub@redhat.com>
565 * allocatestack.c: Include kernel-features.h.
566 * pthread_create.c: Likewise.
567 * pthread_mutex_init.c: Likewise.
569 * pthread_cond_timedwait.c: Likewise.
570 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
571 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
573 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
574 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
576 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
578 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
580 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
581 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
582 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
583 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
585 2007-08-12 Jakub Jelinek <jakub@redhat.com>
587 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
588 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
589 byte elements. One of them is the new __shared element.
590 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
591 adjust names of other padding elements.
592 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
593 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
594 byte elements. One of them is the new __shared element.
595 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
596 adjust names of other padding elements.
597 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
598 Renamed __pad1 element to __shared, adjust names of other padding
600 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
601 (pthread_rwlock_t): Likewise.
602 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
605 2007-08-09 Anton Blanchard <anton@samba.org>
607 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
609 2007-08-12 Ulrich Drepper <drepper@redhat.com>
611 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
613 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
615 2007-08-11 Ulrich Drepper <drepper@redhat.com>
617 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
618 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
619 dealing with robust mutexes.
620 * pthread_mutex_timedlock.c: Likewise.
621 * pthread_mutex_trylock.c: Likewise.
622 * pthread_mutex_unlock.c: Likewise.
623 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
625 2007-08-06 Jakub Jelinek <jakub@redhat.com>
627 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
628 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
629 (PTHREAD_MUTEX_PSHARED): Define.
630 * pthread_mutex_init.c (__pthread_mutex_init): Set
631 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
633 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
634 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
635 as second argument to lll_lock.
636 (LLL_MUTEX_TRYLOCK): Take mutex as argument
637 instead of its __data.__lock field.
638 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
639 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
641 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
642 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
643 instead of mutex->__data.__kind directly, pass
644 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
645 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
646 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
647 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
648 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
649 to lll_timedlock, lll_robust_timedlock, lll_unlock and
650 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
651 of mutex->__data.__kind directly.
652 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
653 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
654 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
655 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
656 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
657 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
659 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
660 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
661 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
663 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
664 Take mutex as argument instead of its __data.__lock field, pass
665 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
666 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
668 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
669 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
670 to lll_robust_cond_lock.
671 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
672 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
673 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
674 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
675 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
676 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
678 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
679 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
681 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
682 pshared variable, pass it to lll_lock, lll_unlock,
683 lll_futex_timedwait and lll_futex_wake.
684 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
685 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
687 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
688 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
690 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
691 lll_futex_wake_unlock): Likewise.
692 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
694 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
695 lll_futex_wake_unlock): Likewise.
696 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
698 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
699 lll_futex_wake_unlock): Likewise.
700 (lll_futex_wake): Fix a typo.
701 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
702 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
703 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
704 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
705 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
706 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
707 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
708 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
709 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
710 (__pthread_cond_timedwait): Likewise.
711 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
712 (__condvar_cleanup, __pthread_cond_wait): Likewise.
714 2007-08-05 Jakub Jelinek <jakub@redhat.com>
716 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
717 Don't use CGOTSETUP and CGOTRESTORE macros.
718 (CGOTSETUP, CGOTRESTORE): Remove.
719 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
722 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
724 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
725 definitions for private futexes.
726 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
727 kernel-features.h and lowlevellock.h. Use private futexes if
729 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
730 (__lll_mutex_lock_wait): Rename to
731 (__lll_lock_wait): ... this. Don't compile in for libc.so.
732 (__lll_mutex_timedlock_wait): Rename to ...
733 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
734 Don't compile in for libc.so.
735 (__lll_mutex_unlock_wake): Rename to ...
736 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
737 (__lll_timedwait_tid): Use __NR_gettimeofday.
738 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
739 the header from assembler. Renamed all lll_mutex_* resp.
740 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
741 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
742 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
744 (__lll_lock_wait_private): Add prototype.
745 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
746 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
747 __lll_unlock_wake): Likewise.
748 (lll_lock): Add private argument. Call __lll_lock_wait_private
749 if private is constant LLL_PRIVATE.
750 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
751 lll_timedlock, lll_robust_timedlock): Add private argument.
752 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
753 if private is constant LLL_PRIVATE.
754 (lll_robust_unlock, lll_robust_dead): Add private argument.
755 (lll_lock_t): Remove.
756 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
757 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
758 lll_cond_wake, lll_cond_broadcast): Remove.
759 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
760 kernel-features.h and lowlevellock.h.
761 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
762 (LOAD_FUTEX_WAIT): Define.
763 (__lll_robust_mutex_lock_wait): Rename to ...
764 (__lll_robust_lock_wait): ... this. Add private argument.
765 Use LOAD_FUTEX_WAIT macro.
766 (__lll_robust_mutex_timedlock_wait): Rename to ...
767 (__lll_robust_timedlock_wait): ... this. Add private argument.
768 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
769 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
771 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
772 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
773 __lll_mutex_{lock,unlock}_*.
774 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
775 lowlevellock.h and pthread-errnos.h.
776 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
777 FUTEX_CMP_REQUEUE, EINVAL): Remove.
778 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
779 __lll_mutex_{lock,unlock}_*.
780 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
781 lowlevellock.h and pthread-errnos.h.
782 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
783 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
784 __lll_mutex_{lock,unlock}_*.
785 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
787 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
788 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
789 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
790 (__condvar_tw_cleanup): Likewise.
791 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
793 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
794 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
795 __lll_mutex_{lock,unlock}_*.
796 ( __condvar_w_cleanup): Likewise.
797 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
798 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
799 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
801 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
802 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
803 __lll_mutex_{lock,unlock}_*.
804 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
806 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
807 FUTEX_PRIVATE_FLAG): Remove.
808 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
809 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
810 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
812 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
813 FUTEX_PRIVATE_FLAG): Remove.
814 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
815 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
816 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
818 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
819 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
820 __lll_mutex_{lock,unlock}_*.
821 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
823 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
824 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
825 __lll_mutex_{lock,unlock}_*.
826 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
827 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
828 (__new_sem_post): Use standard initial exec code sequences.
829 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
831 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
832 FUTEX_PRIVATE_FLAG): Remove.
833 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
835 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
836 (__new_sem_trywait): Use standard initial exec code sequences.
837 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
838 (__new_sem_wait): Use standard initial exec code sequences.
840 2007-07-31 Anton Blanchard <anton@samba.org>
842 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
843 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
846 2007-07-31 Jakub Jelinek <jakub@redhat.com>
848 * allocatestack.c (stack_cache_lock): Change type to int.
849 (get_cached_stack, allocate_stack, __deallocate_stack,
850 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
851 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
852 as second argument to lll_lock and lll_unlock macros on
854 * pthread_create.c (__find_in_stack_list): Likewise.
855 (start_thread): Similarly with pd->lock. Use lll_robust_dead
856 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
858 * descr.h (struct pthread): Change lock and setxid_futex field
860 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
861 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
862 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
863 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
865 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
866 * pthread_cond_init.c (__pthread_cond_init): Likewise.
867 * pthreadP.h (__attr_list_lock): Change type to int.
868 * pthread_attr_init.c (__attr_list_lock): Likewise.
869 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
870 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
872 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
873 also for lll_futex_{wake,wait}.
874 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
876 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
877 LLL_SHARED as second argument to lll_{,un}lock.
878 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
879 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
880 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
881 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
883 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
884 as second argument to lll_{,un}lock macros on pd->lock.
885 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
886 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
887 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
888 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
890 * sysdeps/pthread/createthread.c (do_clone, create_thread):
892 * pthread_once.c (once_lock): Change type to int.
893 (__pthread_once): Pass LLL_PRIVATE as second argument to
894 lll_{,un}lock macros on once_lock.
895 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
896 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
897 rwlock->__data.__shared as second argument to them and similarly
899 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
901 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
903 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
904 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
905 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
906 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
907 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
908 to lll_{,un}lock macros on __sem_mappings_lock.
909 * sem_open.c (check_add_mapping): Likewise.
910 (__sem_mappings_lock): Change type to int.
911 * semaphoreP.h (__sem_mappings_lock): Likewise.
912 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
913 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
914 instead of lll_*mutex_*, pass LLL_SHARED as last
916 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
917 pass LLL_SHARED as last argument.
918 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
919 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
920 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
921 pass LLL_SHARED as last argument.
922 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
923 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
924 LLL_SHARED as last argument.
925 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
926 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
928 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
929 __libc_lock_lock_recursive, __libc_lock_unlock,
930 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
931 argument to lll_{,un}lock.
932 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
933 _IO_lock_unlock): Likewise.
934 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
936 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
937 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
939 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
941 (__fork_lock): Change type to int.
942 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
943 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
944 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
946 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
947 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
948 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
950 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
951 pass it through to lll_futex_*wait, only compile in when
953 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
954 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
955 argument and pass it through to lll_futex_*wait.
956 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
957 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
958 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
959 inline functions to __lll_* resp. __lll_robust_*.
960 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
961 (lll_mutex_dead): Add private argument.
962 (__lll_lock_wait_private): New prototype.
963 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
964 __lll_robust_lock_timedwait): Add private argument to prototypes.
965 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
966 call __lll_lock_wait_private, otherwise pass private to
968 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
969 __lll_robust_timedlock): Add private argument, pass it to
970 __lll_*wait functions.
971 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
972 call __lll_unlock_wake_private, otherwise pass private to
974 (__lll_robust_unlock): Add private argument, pass it to
975 __lll_robust_unlock_wake.
976 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
977 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
978 argument, pass it through to __lll_* inline function.
979 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
980 (lll_lock_t): Remove.
981 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
982 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
983 lll_cond_wake, lll_cond_broadcast): Remove.
984 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
985 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
986 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
987 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
988 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
989 the header from assembler. Renamed all lll_mutex_* resp.
990 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
991 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
992 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
993 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
994 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
995 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
996 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
998 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
999 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1000 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1001 (lll_trylock): Likewise, use __lll_trylock_asm, pass
1002 MULTIPLE_THREADS_OFFSET as another asm operand.
1003 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1004 MULTIPLE_THREADS_OFFSET as last asm operand, call
1005 __lll_lock_wait_private if private is constant LLL_PRIVATE,
1006 otherwise pass private as another argument to __lll_lock_wait.
1007 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1008 lll_timedlock, lll_robust_timedlock): Add private argument, pass
1009 private as another argument to __lll_*lock_wait call.
1010 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1011 MULTIPLE_THREADS_OFFSET as another asm operand, call
1012 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1013 otherwise pass private as another argument to __lll_unlock_wake.
1014 (lll_robust_unlock): Add private argument, pass private as another
1015 argument to __lll_unlock_wake.
1016 (lll_robust_dead): Add private argument, use __lll_private_flag
1018 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1019 LLL_MUTEX_LOCK_INITIALIZER.
1020 (lll_lock_t): Remove.
1021 (LLL_LOCK_INITIALIZER_WAITERS): Define.
1022 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1023 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1024 lll_cond_wake, lll_cond_broadcast): Remove.
1025 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1026 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1027 2007-05-2{3,9} changes.
1028 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1029 kernel-features.h and lowlevellock.h.
1030 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1031 (LOAD_FUTEX_WAIT): Rewritten.
1032 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1034 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1035 (__lll_mutex_lock_wait): Rename to ...
1036 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
1037 %ecx, %ecx is now private argument. Don't compile in for libc.so.
1038 (__lll_mutex_timedlock_wait): Rename to ...
1039 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
1040 contains private argument. Don't compile in for libc.so.
1041 (__lll_mutex_unlock_wake): Rename to ...
1042 (__lll_unlock_wake): ... this. %ecx contains private argument.
1043 Don't compile in for libc.so.
1044 (__lll_timedwait_tid): Use __NR_gettimeofday.
1045 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1046 kernel-features.h and lowlevellock.h.
1047 (LOAD_FUTEX_WAIT): Define.
1048 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1050 (__lll_robust_mutex_lock_wait): Rename to ...
1051 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
1052 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
1054 (__lll_robust_mutex_timedlock_wait): Rename to ...
1055 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
1056 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1057 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1059 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1060 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1061 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1062 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1063 to __lll_lock_wait in %edx.
1064 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1065 Include lowlevellock.h and pthread-errnos.h.
1066 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1067 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1068 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1069 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1070 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1072 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1073 Include lowlevellock.h and pthread-errnos.h.
1074 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1075 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1076 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1077 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1078 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1080 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1081 Include lowlevellock.h.
1082 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1084 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1085 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1086 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1087 __lll_unlock_wake. Use __NR_gettimeofday.
1088 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1089 Include lowlevellock.h.
1090 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1091 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1092 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1093 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1094 and __lll_unlock_wake.
1095 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1096 Include lowlevellock.h.
1097 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1098 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1099 MUTEX(%ebx) address in %edx rather than %ecx to
1100 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1101 and __lll_unlock_wake. Move return value from %ecx to %edx
1103 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1104 Include lowlevellock.h.
1105 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1107 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1108 MUTEX(%ebp) address in %edx rather than %ecx to
1109 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1110 and __lll_unlock_wake. Move return value from %ecx to %edx
1111 register. Use __NR_gettimeofday.
1112 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1113 Include lowlevellock.h.
1114 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1116 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1117 MUTEX(%ebp) address in %edx rather than %ecx to
1118 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1119 and __lll_unlock_wake. Move return value from %ecx to %edx
1120 register. Use __NR_gettimeofday.
1121 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1122 Include lowlevellock.h.
1123 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1124 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1125 MUTEX(%edi) address in %edx rather than %ecx to
1126 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1127 and __lll_unlock_wake.
1128 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1129 Include lowlevellock.h.
1130 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1131 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1132 MUTEX(%ebx) address in %edx rather than %ecx to
1133 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1134 and __lll_unlock_wake. Move return value from %ecx to %edx
1136 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1138 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1140 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1141 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1142 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1144 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1145 (sem_timedwait): Use __NR_gettimeofday.
1146 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1148 (LOCK): Don't define.
1149 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1151 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1152 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1154 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1155 2007-05-2{3,9} changes.
1156 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1157 kernel-features.h and lowlevellock.h.
1158 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1159 (LOAD_FUTEX_WAIT): Rewritten.
1160 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1161 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1162 (__lll_mutex_lock_wait): Rename to ...
1163 (__lll_lock_wait): ... this. %esi is now private argument.
1164 Don't compile in for libc.so.
1165 (__lll_mutex_timedlock_wait): Rename to ...
1166 (__lll_timedlock_wait): ... this. %esi contains private argument.
1167 Don't compile in for libc.so.
1168 (__lll_mutex_unlock_wake): Rename to ...
1169 (__lll_unlock_wake): ... this. %esi contains private argument.
1170 Don't compile in for libc.so.
1171 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1172 kernel-features.h and lowlevellock.h.
1173 (LOAD_FUTEX_WAIT): Define.
1174 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1175 (__lll_robust_mutex_lock_wait): Rename to ...
1176 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1177 Use LOAD_FUTEX_WAIT macro.
1178 (__lll_robust_mutex_timedlock_wait): Rename to ...
1179 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1180 private, use LOAD_FUTEX_WAIT macro.
1181 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1183 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1184 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1185 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1186 __lll_lock_wait and __lll_unlock_wake.
1187 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1188 Include lowlevellock.h and pthread-errnos.h.
1189 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1190 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1191 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1192 pass LLL_SHARED in %esi to both __lll_lock_wait and
1194 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1195 Include lowlevellock.h and pthread-errnos.h.
1196 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1197 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1198 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1199 pass LLL_SHARED in %esi to both __lll_lock_wait and
1201 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1202 Include lowlevellock.h.
1203 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1204 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1205 pass LLL_SHARED in %esi to both __lll_lock_wait and
1207 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1208 Include lowlevellock.h.
1209 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1210 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1211 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1212 and __lll_unlock_wake.
1213 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1214 Include lowlevellock.h.
1215 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1217 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1218 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1219 and __lll_unlock_wake.
1220 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1221 Include lowlevellock.h.
1222 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1224 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1225 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1226 and __lll_unlock_wake.
1227 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1228 Include lowlevellock.h.
1229 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1231 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1232 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1233 and __lll_unlock_wake.
1234 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1235 Include lowlevellock.h.
1236 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1238 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1239 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1240 and __lll_unlock_wake.
1241 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1242 Include lowlevellock.h.
1243 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1245 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1246 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1247 and __lll_unlock_wake.
1248 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1250 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1252 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1253 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1254 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1256 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1257 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1259 (LOCK): Don't define.
1260 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1262 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1263 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1264 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1265 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1266 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1267 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1268 (__lll_lock_wait_private): New function.
1269 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1270 it to lll_futex_*wait. Don't compile in for libc.so.
1271 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1273 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1274 (struct sparc_pthread_barrier): Remove.
1275 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1276 struct sparc_pthread_barrier. Pass
1277 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1278 and lll_futex_wait macros.
1279 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1281 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1282 Include sparc pthread_barrier_wait.c instead of generic one.
1284 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1286 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1288 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1289 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1291 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1292 (pthread_rwlock_timedwrlock): Likewise.
1293 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1294 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1296 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1298 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1300 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1302 * tst-locale2.c (useless): Add return statement.
1304 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1306 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1307 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1308 * pthread_create.c (start_thread): Likewise.
1309 * init.c (sighandler_setxid): Likewise.
1310 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1311 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1312 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1313 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1314 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1315 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1316 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1317 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1318 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1320 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1322 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1324 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1325 __rtld_notify): Likewise.
1326 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1327 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1328 __pthread_once): Likewise.
1329 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1330 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1331 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1332 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1333 (lll_futex_wait): Add private argument, define as wrapper around
1334 lll_futex_timed_wait.
1335 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1336 use __lll_private_flag macro.
1337 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1338 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1339 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1340 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1341 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1342 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1343 (lll_futex_wait): Add private argument, define as wrapper around
1344 lll_futex_timed_wait.
1345 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1346 use __lll_private_flag macro.
1347 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1348 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1349 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1351 (lll_futex_timed_wait, lll_futex_wake): Use it.
1352 (lll_private_futex_wait, lll_private_futex_timed_wait,
1353 lll_private_futex_wake): Removed.
1354 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1355 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1356 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1357 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1358 (lll_futex_wait): Add private argument, define as wrapper around
1359 lll_futex_timed_wait.
1360 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1361 use __lll_private_flag macro.
1362 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1363 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1365 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1366 (lll_private_futex_wait, lll_private_futex_timed_wait,
1367 lll_private_futex_wake): Removed.
1368 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1369 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1370 (lll_private_futex_wait, lll_private_futex_timed_wait,
1371 lll_private_futex_wake): Removed.
1372 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1373 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1374 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1375 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1376 (lll_futex_wait): Add private argument, define as wrapper around
1377 lll_futex_timed_wait.
1378 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1379 use __lll_private_flag macro.
1380 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1381 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1383 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1385 (lll_futex_timed_wait, lll_futex_wake): Use it.
1386 (lll_private_futex_wait, lll_private_futex_timed_wait,
1387 lll_private_futex_wake): Removed.
1389 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1391 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1392 of the structure for sparc32.
1394 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1396 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1398 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1400 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1401 code used when private futexes are assumed.
1402 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1405 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1407 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1408 (__lll_private_flag): Define.
1409 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1410 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1412 (lll_private_futex_wait, lll_private_futex_timedwait,
1413 lll_private_futex_wake): Define as wrapper around non-_private
1415 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1416 (__lll_private_flag): Define.
1417 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1418 (lll_private_futex_wait, lll_private_futex_timedwait,
1419 lll_private_futex_wake): Define as wrapper around non-_private
1422 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1424 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1425 parameter to lll_futex_wait call.
1426 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1428 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1429 Replace lll_futex_wait with lll_private_futex_wait.
1430 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1431 Add LLL_SHARED parameter to lll_futex_wake().
1433 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1434 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1435 lll_private_futex_wake.
1436 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1437 bit from private parm before syscall.
1438 (lll_futex_timed_wait): Likewise.
1439 (lll_futex_wake): Likewise.
1440 (lll_futex_wake_unlock): Likewise.
1441 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1442 (lll_robust_mutex_unlock): Likewise.
1443 (lll_mutex_unlock_force): Likewise.
1444 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1446 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1448 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1449 compilation when unconditionally using private futexes.
1450 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1451 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1453 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1454 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1456 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1458 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1461 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1463 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1466 2007-05-16 Roland McGrath <roland@redhat.com>
1468 * init.c (__nptl_initial_report_events): New variable.
1469 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1472 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1474 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1475 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1477 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1479 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1482 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1484 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1485 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1486 * pthread_mutex_timedlock.c: Likewise.
1487 * pthread_mutex_trylock.c: Likewise.
1488 * pthread_mutex_unlock.c: Likewise.
1490 2007-06-17 Andreas Schwab <schwab@suse.de>
1492 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1495 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1497 * allocatestack.c (allocate_stack): Make code compile if
1498 __ASSUME_PRIVATE_FUTEX is set.
1500 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1502 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1503 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1504 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1505 (__pthread_rwlock_wrlock): Likewise.
1506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1507 (pthread_rwlock_timedrdlock): Likewise.
1508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1509 (pthread_rwlock_timedwrlock): Likewise.
1510 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1511 (__pthread_rwlock_unlock): Likewise.
1513 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1515 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1516 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1517 Split __flags into __flags, __shared, __pad1 and __pad2.
1518 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1519 futexes if they are available.
1520 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1521 in libc-lowlevellock.S allow using private futexes.
1522 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1523 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1524 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1525 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1526 lll_private_futex_timed_wait and lll_private_futex_wake.
1527 (lll_robust_mutex_unlock): Fix typo.
1528 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1529 field in futex command setup.
1530 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1531 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1532 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1533 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1534 if they are available. Remove clear_once_control.
1535 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1536 futexes if they are available.
1537 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1538 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1539 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1540 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1541 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1542 Wake only when there are waiters.
1543 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1544 support. Indicate that there are waiters. Remove unnecessary
1545 extra cancellation test.
1546 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1547 left-over duplication of __sem_wait_cleanup.
1549 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1551 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1552 parameter to lll_futex_wait, lll_futex_timed_wait, and
1553 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1554 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1555 lll_private_futex_wake.
1556 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1557 * allocatestack.c: Adjust use of lll_futex_* macros.
1559 * lowlevellock.h: Likewise.
1560 * pthread_barrier_wait.c: Likewise.
1561 * pthread_cond_broadcast.c: Likewise.
1562 * pthread_cond_destroy.c: Likewise.
1563 * pthread_cond_signal.c: Likewise.
1564 * pthread_cond_timedwait.c: Likewise.
1565 * pthread_cond_wait.c: Likewise.
1566 * pthread_create.c: Likewise.
1567 * pthread_mutex_lock.c: Likewise.
1568 * pthread_mutex_setprioceiling.c: Likewise.
1569 * pthread_mutex_timedlock.c: Likewise.
1570 * pthread_mutex_unlock.c: Likewise.
1571 * pthread_rwlock_timedrdlock.c: Likewise.
1572 * pthread_rwlock_timedwrlock.c: Likewise.
1573 * pthread_rwlock_unlock.c: Likewise.
1574 * sysdeps/alpha/tls.h: Likewise.
1575 * sysdeps/i386/tls.h: Likewise.
1576 * sysdeps/ia64/tls.h: Likewise.
1577 * sysdeps/powerpc/tls.h: Likewise.
1578 * sysdeps/pthread/aio_misc.h: Likewise.
1579 * sysdeps/pthread/gai_misc.h: Likewise.
1580 * sysdeps/s390/tls.h: Likewise.
1581 * sysdeps/sh/tls.h: Likewise.
1582 * sysdeps/sparc/tls.h: Likewise.
1583 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1584 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1585 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1586 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1587 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1588 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1589 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1590 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1591 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1592 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1594 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1595 * sysdeps/x86_64/tls.h: Likewise.
1597 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1599 * pthread_getattr_np.c: No need to install a cancellation handler,
1600 this is no cancellation point.
1601 * pthread_getschedparam.c: Likewise.
1602 * pthread_setschedparam.c: Likewise.
1603 * pthread_setschedprio.c: Likewise.
1604 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1606 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1607 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1608 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1609 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1610 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1611 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1612 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1613 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1614 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1615 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1616 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1617 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1619 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1620 whether there are more than one thread makes no sense here since
1621 we only call the slow path if the locks are taken.
1622 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1624 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1625 COND_NWAITERS_SHIFT.
1626 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1628 * pthread_cond_init.c: Likewise.
1629 * pthread_cond_timedwait.c: Likewise.
1630 * pthread_cond_wait.c: Likewise.
1631 * pthread_condattr_getclock.c: Likewise.
1632 * pthread_condattr_setclock.c: Likewise.
1633 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1634 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1635 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1636 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1637 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1639 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1641 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1644 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1646 (THREAD_GSCOPE_GET_FLAG): Remove.
1647 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1648 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1650 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1651 (THREAD_GSCOPE_GET_FLAG): Remove.
1652 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1653 instead of THREAD_GSCOPE_GET_FLAG.
1654 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1656 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1657 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1658 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1659 THREAD_GSCOPE_WAIT): Define.
1660 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1661 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1662 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1663 THREAD_GSCOPE_WAIT): Define.
1664 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1665 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1666 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1667 THREAD_GSCOPE_WAIT): Define.
1668 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1669 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1670 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1671 THREAD_GSCOPE_WAIT): Define.
1673 2007-05-24 Richard Henderson <rth@redhat.com>
1675 * descr.h (struct pthread): Add header.gscope_flag.
1676 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1677 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1678 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1679 THREAD_GSCOPE_WAIT): Define.
1681 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1683 * init.c: Make it compile with older kernel headers.
1685 * tst-initializers1.c: Show through exit code which test failed.
1687 * pthread_rwlock_init.c: Also initialize __shared field.
1688 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1689 element in rwlock structure into four byte elements. One of them is
1690 the new __shared element.
1691 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1693 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1694 __shared, adjust names of other padding elements.
1695 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1696 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1697 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1698 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1700 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1701 futex to use private operations if possible.
1702 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1706 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1707 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1708 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1709 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1711 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1713 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1714 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1716 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1718 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1719 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1720 * pthread_rwlock_timedrdlock.c: Likewise.
1721 * pthread_rwlock_tryrdlock.c: Likewise.
1723 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1726 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1727 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1728 duplication of __sem_wait_cleanup.
1730 * allocatestack.c: Revert last change.
1732 * sysdeps/i386/tls.h: Likewise.
1733 * sysdeps/x86_64/tls.h: Likewise.
1734 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1736 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1738 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1740 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1741 * pthread_barrier_init.c: Set private flag if pshared and private
1742 futexes are supported.
1743 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1744 private field in futex command setup.
1745 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1747 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1749 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1751 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1752 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1753 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1754 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1755 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1757 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1758 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1759 fields in the structure.
1760 (__old_sem_init): New function.
1761 * sem_open.c: Initialize all fields of the structure.
1762 * sem_getvalue.c: Adjust for renamed element.
1763 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1764 (gen-as-const-headers): Add structsem.sym.
1765 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1766 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1767 struct new_sem. Add struct old_sem.
1768 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1769 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1770 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1771 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1772 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1773 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1774 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1775 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1776 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1777 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1778 * tst-sem10.c: New file.
1779 * tst-sem11.c: New file.
1780 * tst-sem12.c: New file.
1781 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1784 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1785 Jakub Jelinek <jakub@redhat.com>
1787 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1788 Move __pthread_enable_asynccancel right before futex syscall.
1789 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1792 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1794 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1795 THREAD_COPY_PRIVATE_FUTEX): Define.
1796 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1797 THREAD_COPY_PRIVATE_FUTEX): Define.
1798 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1799 * init.c (__pthread_initialize_minimal_internal): Use
1800 THREAD_SET_PRIVATE_FUTEX.
1802 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1803 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1804 THREAD_GSCOPE_FLAG_WAIT): Define.
1805 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1806 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1807 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1809 (THREAD_GSCOPE_GET_FLAG): Define.
1810 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1811 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1812 instead of ->header.gscope_flag directly.
1814 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1816 * init.c (__pthread_initialize_minimal_internal): Check whether
1817 private futexes are available.
1818 * allocatestack.c (allocate_stack): Copy private_futex field from
1819 current thread into the new stack.
1820 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1821 futexes if they are available.
1822 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1823 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1824 in libc-lowlevellock.S allow using private futexes.
1825 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1826 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1828 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1829 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1830 if they are available.
1831 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1832 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1833 * sysdeps/i386/tcb-offsets.sym: Likewise.
1834 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1835 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1837 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1839 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1840 Remove ptr_wait_lookup_done again.
1841 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1842 (__pthread_initialize_minimal_internal): Initialize
1843 _dl_wait_lookup_done pointer in _rtld_global directly.
1844 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1845 Remove code to code _dl_wait_lookup_done.
1846 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1849 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1851 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1852 pthread_mutex_init failed with ENOTSUP.
1854 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1856 * allocatestack.c (__wait_lookup_done): New function.
1857 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1858 Add ptr_wait_lookup_done.
1859 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1860 * pthreadP.h: Declare __wait_lookup_done.
1861 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1862 Define macros to implement reference handling of global scope.
1863 * sysdeps/x86_64/tls.h: Likewise.
1864 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1865 Initialize GL(dl_wait_lookup_done).
1867 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1870 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1872 * pthread_mutex_timedlock.c: Likewise.
1873 * pthread_mutex_trylock.c: Likewise.
1874 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1876 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1877 * tst-robust9.c: New file.
1878 * tst-robustpi9.c: New file.
1880 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1881 unnecessary extra cancellation test.
1883 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1885 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1886 extra cancellation test.
1887 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1889 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1891 * descr.h (struct pthread): Rearrange members to fill hole in
1894 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1895 (__pthread_setaffinity_new): If syscall was successful and
1896 RESET_VGETCPU_CACHE is defined, use it before returning.
1897 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1899 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1902 * tst-align2.c: Include stackinfo.h.
1903 * tst-getpid1.c: Likewise.
1905 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1908 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1909 * tst-getpid1.c (do_test): Likewise.
1912 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1913 (allocate_stack): Likewise.
1915 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1917 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1918 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1919 (__lll_robust_timedlock_wait): Likewise.
1920 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1922 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1925 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1926 * tst-cancel4.c (tf_fdatasync): New test.
1928 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1931 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1932 check mutexes like normal mutexes.
1935 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1936 Initialize the whole sigevent structure to appease valgrind.
1938 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1940 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1941 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1943 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1945 * tst-locale1.c: Avoid warnings.
1946 * tst-locale2.c: Likewise.
1948 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1950 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1951 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1953 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1955 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1956 __extern_always_inline where appropriate.
1957 * sysdeps/pthread/pthread.h: Likewise.
1959 2007-03-13 Richard Henderson <rth@redhat.com>
1961 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1962 separate cfi regions for the two subsections.
1964 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1966 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1967 new thread, don't just decrement it.
1968 Patch by Suzuki K P <suzuki@in.ibm.com>.
1970 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1972 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1973 PTHFCT_CALL definition.
1975 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1977 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1978 available, don't use it.
1980 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1982 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1983 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1984 call into the kernel to delay.
1986 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1988 * tst-initializers1.c: We want to test the initializers as seen
1989 outside of libc, so undefined _LIBC.
1991 * pthread_join.c (cleanup): Avoid warning.
1993 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1995 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1996 (__lll_timedwait_tid): Add unwind info.
1998 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1999 function table, mangle the pointers.
2000 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2001 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2002 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2003 demangle pointers before use.
2004 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2006 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2007 * sysdeps/pthread/setxid.h: Likewise.
2009 2007-01-12 Ulrich Drepper <drepper@redhat.com>
2011 * tst-rwlock7.c: Show some more information in case of correct
2014 2007-01-11 Ulrich Drepper <drepper@redhat.com>
2016 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2017 (lll_futex_timed_wait): Undo part of last change, don't negate
2020 2007-01-10 Ulrich Drepper <drepper@redhat.com>
2022 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
2023 FUTEX_CMP_REQUEUE and lll_futex_requeue.
2025 2006-12-28 David S. Miller <davem@davemloft.net>
2027 * shlib-versions: Fix sparc64 linux target specification.
2029 2007-01-10 Jakub Jelinek <jakub@redhat.com>
2031 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2032 Adjust include path for pthread_barrier_wait.c move.
2034 2006-12-21 Jakub Jelinek <jakub@redhat.com>
2036 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2037 tid isn't reread from pd->tid in between ESRCH test and the syscall.
2039 2006-12-06 Jakub Jelinek <jakub@redhat.com>
2041 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2042 6 argument cancellable syscalls.
2043 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2044 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2045 6 argument cancellable syscalls.
2046 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2048 2006-12-09 Ulrich Drepper <drepper@redhat.com>
2050 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2051 (__rtld_mrlock_initialize): Add missing closing parenthesis.
2053 2006-10-30 Jakub Jelinek <jakub@redhat.com>
2055 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2056 __sync_lock_release instead of __sync_lock_release_si.
2058 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2060 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2062 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2063 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2064 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2065 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2066 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2067 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2068 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2069 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2070 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2071 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2072 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2074 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2076 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2077 * pthread_barrier_wait.c: ...here.
2078 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2079 * pthread_cond_broadcast.c: ...here.
2080 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2081 * pthread_cond_signal.c: ...here.
2082 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2083 * pthread_cond_timedwait.c: ...here.
2084 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2085 * pthread_cond_wait.c: ...here.
2086 * sysdeps/pthread/pthread_once.c: Move to...
2087 * pthread_once.c: ...here.
2088 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2089 * pthread_rwlock_rdlock.c: ...here.
2090 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2091 * pthread_rwlock_timedrdlock.c: ...here.
2092 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2093 * pthread_rwlock_timedwrlock.c: ...here.
2094 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2095 * pthread_rwlock_unlock.c: ...here.
2096 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2097 * pthread_rwlock_wrlock.c: ...here.
2098 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2099 * pthread_spin_destroy.c: ...here.
2100 * sysdeps/pthread/pthread_spin_init.c: Move to...
2101 * pthread_spin_init.c: ...here.
2102 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2103 * pthread_spin_unlock.c: ...here.
2104 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2105 * pthread_getcpuclockid.c: ...here.
2107 * init.c: USE_TLS support is now always enabled.
2108 * tst-tls5.h: Likewise.
2109 * sysdeps/alpha/tls.h: Likewise.
2110 * sysdeps/i386/tls.h: Likewise.
2111 * sysdeps/ia64/tls.h: Likewise.
2112 * sysdeps/powerpc/tls.h: Likewise.
2113 * sysdeps/s390/tls.h: Likewise.
2114 * sysdeps/sh/tls.h: Likewise.
2115 * sysdeps/sparc/tls.h: Likewise.
2116 * sysdeps/x86_64/tls.h: Likewise.
2118 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2120 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2121 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2124 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2125 Define to THREAD_SELF->header.multiple_threads.
2126 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2128 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2130 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2131 (SINGLE_THREAD_P): Likewise.
2132 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2133 (SINGLE_THREAD_P): Likewise.
2134 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2135 (SINGLE_THREAD_P): Likewise.
2136 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2137 (SINGLE_THREAD_P): Likewise.
2138 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2140 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2141 (SINGLE_THREAD_P): Likewise.
2142 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2143 (SINGLE_THREAD_P): Likewise.
2144 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2147 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2149 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2150 by default rather than 2_3_3.
2152 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2154 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2155 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2156 atomic_* instead of catomic_* macros.
2158 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2161 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2162 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2163 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2164 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2165 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2166 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2167 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2168 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2169 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2170 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2171 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2172 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2173 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2175 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2177 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2178 cancelable syscalls with six parameters.
2180 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2181 operations instead of atomic_*.
2183 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2185 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2187 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2189 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2190 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2191 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2193 * pthread_attr_setstack.c: Allow overwriting the version number of the
2195 * pthread_attr_setstacksize.c: Likewise.
2196 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2198 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2199 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2201 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2204 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2205 Patch by Petr Baudis.
2207 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2209 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2211 * tst-cancel2.c (tf): Loop as long as something was written.
2213 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2215 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2216 mutexes wake all mutexes.
2217 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2218 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2219 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2221 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2223 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2224 to guarantee the thread is always canceled.
2226 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2228 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2230 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2231 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2232 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2233 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2234 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2236 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2239 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2240 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2241 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2242 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2243 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2244 * Makefile (tests): Add tst-cond22.
2245 * tst-cond22.c: New file.
2247 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2250 * descr.h (struct pthread): Add parent_cancelhandling.
2251 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2252 cancelhandling value to child.
2253 * pthread_create.c (start_thread): If parent thread was canceled
2254 reset the SIGCANCEL mask.
2255 * Makefile (tests): Add tst-cancel25.
2256 * tst-cancel25.c: New file.
2258 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2259 Ulrich Drepper <drepper@redhat.com>
2261 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2262 counterp if it is already zero.
2263 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2265 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2266 Roland McGrath <roland@redhat.com>
2268 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2269 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2270 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2271 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2272 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2273 lll_robust_mutex_timedlock, lll_mutex_unlock,
2274 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2275 Add _L_*_ symbols around the subsection.
2276 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2277 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2279 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2280 Roland McGrath <roland@redhat.com>
2282 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2283 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2284 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2285 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2286 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2287 lll_robust_mutex_timedlock, lll_mutex_unlock,
2288 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2289 Add _L_*_ symbols around the subsection.
2290 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2291 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2293 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2295 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2296 change because it can disturb too much existing code. If real hard
2297 reader preference is needed we'll introduce another type.
2298 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2299 (pthread_rwlock_timedwrlock): Likewise.
2300 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2303 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2305 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2307 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2308 (pthread_rwlock_timedwrlock): Likewise.
2309 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2312 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2314 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2315 Only define ifdef SHARED.
2317 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2319 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2320 (free_stacks): ...here.
2321 (__free_stack_cache): New function.
2322 * pthreadP.h: Declare __free_stack_cache.
2323 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2325 * init.c (pthread_functions): Initialize ptr_freeres.
2326 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2327 New freeres function.
2329 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2332 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2334 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2336 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2337 _XOPEN_REALTIME_THREADS.
2339 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2341 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2342 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2343 HAVE_CLOCK_GETTIME_VSYSCALL.
2344 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2346 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2348 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2349 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2350 * descr.h (struct priority_protection_data): New type.
2351 (struct pthread): Add tpp field.
2352 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2353 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2354 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2355 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2357 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2358 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2359 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2360 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2362 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2364 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2365 * pthread_mutexattr_getprioceiling.c
2366 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2367 in the SCHED_FIFO priority range.
2368 * pthread_mutexattr_setprioceiling.c
2369 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2370 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2371 if mutex is not TPP. Ceiling is now in __data.__lock.
2372 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2373 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2374 is now in __data.__lock. Add locking.
2375 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2376 * Makefile (libpthread-routines): Add tpp.
2377 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2378 * tst-tpp.h: New file.
2379 * tst-mutexpp1.c: New file.
2380 * tst-mutexpp6.c: New file.
2381 * tst-mutexpp10.c: New file.
2382 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2383 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2385 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2388 * pthread_join.c (pthread_join): Account for self being canceled
2389 when checking for deadlocks.
2390 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2391 (tf1): Don't print anything after pthread_join returns, this would be
2392 another cancellation point.
2394 * tst-join6.c: New file.
2395 * Makefile (tests): Add tst-join6.
2397 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2400 * pthread_setspecific.c (__pthread_setspecific): Check
2401 out-of-range index before checking for unused key.
2403 * sysdeps/pthread/gai_misc.h: New file.
2405 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2407 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2408 file. Don't use sysctl.
2409 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2410 overwrite the file if this is likely not true.
2412 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2414 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2415 * Makefile (tests): Add tst-getpid3.
2416 * tst-getpid3.c: New file.
2418 2006-07-30 Roland McGrath <roland@redhat.com>
2420 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2422 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2423 (pause_not_cancel): New macro.
2424 (nanosleep_not_cancel): New macro.
2425 (sigsuspend_not_cancel): New macro.
2426 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2427 nanosleep_not_cancel macro from <not-cancel.h>.
2428 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2429 macro from <not-cancel.h>.
2431 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2432 Jakub Jelinek <jakub@redhat.com>
2434 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2435 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2436 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2437 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2438 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2439 * pthread_mutex_lock.c: Likewise.
2440 * pthread_mutex_timedlock.c: Likewise.
2441 * pthread_mutex_trylock.c: Likewise.
2442 * pthread_mutex_unlock.c: Likewise.
2443 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2445 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2446 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2447 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2448 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2449 pthread-pi-defines.sym.
2450 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2451 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2452 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2453 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2454 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2455 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2456 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2457 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2458 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2459 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2460 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2461 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2462 * tst-mutex2.c: Likewise.
2463 * tst-mutex3.c: Likewise.
2464 * tst-mutex4.c: Likewise.
2465 * tst-mutex5.c: Likewise.
2466 * tst-mutex6.c: Likewise.
2467 * tst-mutex7.c: Likewise.
2468 * tst-mutex7a.c: Likewise.
2469 * tst-mutex8.c: Likewise.
2470 * tst-mutex9.c: Likewise.
2471 * tst-robust1.c: Likewise.
2472 * tst-robust7.c: Likewise.
2473 * tst-robust8.c: Likewise.
2474 * tst-mutexpi1.c: New file.
2475 * tst-mutexpi2.c: New file.
2476 * tst-mutexpi3.c: New file.
2477 * tst-mutexpi4.c: New file.
2478 * tst-mutexpi5.c: New file.
2479 * tst-mutexpi6.c: New file.
2480 * tst-mutexpi7.c: New file.
2481 * tst-mutexpi7a.c: New file.
2482 * tst-mutexpi8.c: New file.
2483 * tst-mutexpi9.c: New file.
2484 * tst-robust1.c: New file.
2485 * tst-robust2.c: New file.
2486 * tst-robust3.c: New file.
2487 * tst-robust4.c: New file.
2488 * tst-robust5.c: New file.
2489 * tst-robust6.c: New file.
2490 * tst-robust7.c: New file.
2491 * tst-robust8.c: New file.
2492 * Makefile (tests): Add the new tests.
2494 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2495 * pthread_mutex_destroy.c: Remove unneeded label.
2497 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2499 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2500 computations to compile time.
2502 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2504 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2506 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2508 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2510 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2512 * pthread_key_create.c (__pthread_key_create): Do away with
2513 __pthread_keys_lock.
2515 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2516 (__kernel_cpumask_size): Mark as hidden.
2517 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2519 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2520 * semaphoreP.h (__sem_mappings_lock): Likewise.
2522 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2524 * pthread_atfork.c: Mark __dso_handle as hidden.
2526 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2529 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2530 the reload problem. Change the one path in pthread_cancel_init
2531 which causes the problem. Force gcc to reload. Simplify callers.
2532 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2533 (_Unwind_GetBSP): Undo last patch.
2535 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2537 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2538 function pointer is reloaded after pthread_cancel_init calls.
2541 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2542 pointers are reloaded after pthread_cancel_init calls.
2544 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2546 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2549 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2551 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2552 Allocate new object which is passed to timer_sigev_thread so that
2553 the timer can be deleted before the new thread is scheduled.
2555 2006-04-26 Roland McGrath <roland@redhat.com>
2557 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2559 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2561 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2562 suffix for conditional jumps.
2563 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2564 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2565 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2566 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2567 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2568 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2570 * init.c (sigcancel_handler): Compare with correct PID even if the
2571 thread is in the middle of a fork call.
2572 (sighandler_setxid): Likewise.
2573 Reported by Suzuki K P <suzuki@in.ibm.com> .
2575 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2577 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2579 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2581 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2582 fails [Coverity CID 105].
2584 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2586 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2588 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2591 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2592 Define __lll_rel_instr using lwsync.
2594 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2596 * allocatestack.c (allocate_stack): Always initialize robust_head.
2597 * descr.h: Define struct robust_list_head.
2598 (struct pthread): Use robust_list_head in robust mutex list definition.
2599 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2600 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2601 (__pthread_initialize_minimal_internal): Register robust_list with
2603 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2604 Declare __set_robust_list_avail.
2605 * pthread_create.c (start_thread): Register robust_list of new thread.
2606 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2608 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2609 number of users, it's unreliable.
2610 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2611 set_robust_list syscall is available.
2612 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2613 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2614 Set robust_head.list_op_pending before trying to lock a robust mutex.
2615 * pthread_mutex_timedlock.c: Likewise.
2616 * pthread_mutex_trylock.c: Likewise.
2617 * pthread_mutex_unlock.c: Likewise for unlocking.
2618 * Makefile (tests): Add tst-robust8.
2619 * tst-robust8.c: New file.
2621 2006-03-08 Andreas Schwab <schwab@suse.de>
2623 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2624 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2626 2006-03-05 Roland McGrath <roland@redhat.com>
2628 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2629 and $config_os doesn't match *linux*.
2631 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2633 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2634 Use __syscall_error.
2635 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2636 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2637 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2638 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2639 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2640 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2642 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2644 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2646 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2648 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2649 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2651 (__lll_robust_timedlock_wait): Likewise.
2652 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2653 (__lll_robust_lock_wait): Likewise.
2654 (__lll_robust_timedlock_wait): Likewise.
2655 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2656 (__lll_robust_lock_wait): Likewise.
2657 (__lll_robust_timedlock_wait): Likewise.
2659 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2661 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2662 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2663 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2664 lll_robust_mutex_unlock): Define.
2665 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2667 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2669 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2670 instead of <clone.S>.
2672 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2674 * Makefile (libpthread-routines): Add
2675 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2676 and pthread_mutex_[sg]etprioceiling.
2677 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2678 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2679 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2680 pthread_mutex_setprioceiling.
2681 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2682 PTHREAD_PRIO_PROTECT): New enum values.
2683 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2684 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2685 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2687 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2688 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2689 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2691 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2692 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2693 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2694 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2695 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2696 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2697 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2699 * pthread_mutex_getprioceiling.c: New file.
2700 * pthread_mutex_setprioceiling.c: New file.
2701 * pthread_mutexattr_getprioceiling.c: New file.
2702 * pthread_mutexattr_setprioceiling.c: New file.
2703 * pthread_mutexattr_getprotocol.c: New file.
2704 * pthread_mutexattr_setprotocol.c: New file.
2706 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2708 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2710 2006-02-27 Roland McGrath <roland@redhat.com>
2712 * sysdeps/pthread/Subdirs: List nptl here too.
2713 * configure (libc_add_on_canonical): New variable.
2715 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2717 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2718 self to get main source tree's file.
2719 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2720 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2721 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2722 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2723 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2724 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2725 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2726 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2727 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2728 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2729 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2730 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2731 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2733 * Makefile: Use $(sysdirs) in vpath directive.
2735 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2736 (CPPFLAGS-timer_routines.c): Likewise.
2738 * Makeconfig (includes): Variable removed.
2740 2006-02-26 Roland McGrath <roland@redhat.com>
2742 * sysdeps/generic/pt-raise.c: Moved to ...
2743 * pt-raise.c: ... here.
2744 * sysdeps/generic/lowlevellock.h: Moved to ...
2745 * lowlevellock.h: ... here.
2747 2006-02-23 Roland McGrath <roland@redhat.com>
2749 * descr.h (struct pthread): Add final member `end_padding'.
2750 (PTHREAD_STRUCT_END_PADDING): Use it.
2752 2006-02-20 Roland McGrath <roland@redhat.com>
2754 * sysdeps/mips: Directory removed, saved in ports repository.
2755 * sysdeps/unix/sysv/linux/mips: Likewise.
2757 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2759 * tst-robust1.c: Add second mutex to check that the mutex list is
2762 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2764 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2765 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2766 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2767 lll_robust_mutex_unlock): New macros.
2768 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2769 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2770 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2771 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2772 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2774 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2776 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2778 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2780 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2782 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2783 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2784 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2785 (lll_robust_mutex_unlock): Likewise.
2787 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2789 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2790 Set robust_list.__next rather than robust_list.
2791 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2792 (__pthread_list_t): New typedef.
2793 (pthread_mutex_t): Replace __next and __prev fields with __list.
2794 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2795 (__pthread_list_t): New typedef.
2796 (pthread_mutex_t): Replace __next and __prev fields with __list.
2797 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2798 (__pthread_list_t, __pthread_slist_t): New typedefs.
2799 (pthread_mutex_t): Replace __next and __prev fields with __list.
2800 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2801 (__pthread_list_t, __pthread_slist_t): New typedefs.
2802 (pthread_mutex_t): Replace __next and __prev fields with __list.
2803 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2804 (__pthread_list_t, __pthread_slist_t): New typedefs.
2805 (pthread_mutex_t): Replace __next and __prev fields with __list.
2806 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2807 (__pthread_slist_t): New typedef.
2808 (pthread_mutex_t): Replace __next field with __list.
2810 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2812 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2813 PTHREAD_MUTEX_OWNERDEAD.
2814 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2815 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2816 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2817 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2818 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2819 to PTHREAD_MUTEX_INCONSISTENT.
2820 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2821 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2822 * pthread_mutex_trylock.c: Likewise.
2823 * pthread_mutex_timedlock.c: Likewise.
2824 * pthread_mutex_unlock.c: Likewise.
2825 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2826 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2827 lowlevelrobustlock.sym.
2828 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2829 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2831 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2832 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2833 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2834 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2835 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2837 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2839 * allocatestack.c (allocate_stack): Initialize robust_list.
2840 * init.c (__pthread_initialize_minimal_internal): Likewise.
2841 * descr.h (struct xid_command): Pretty printing.
2842 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2843 robust_list. Adjust macros.
2844 * pthread_create.c (start_thread): Adjust robust_list handling.
2845 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2846 but the owner for all robust mutex types.
2847 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2848 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2849 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2850 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2852 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2853 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2855 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2857 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2858 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2860 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2862 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2864 (lll_futex_timed_wait): Define.
2866 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2868 * tst-cancel4.c: Test ppoll.
2870 2006-01-18 Andreas Jaeger <aj@suse.de>
2873 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2874 (pthread_mutex_t): Follow changes for other archs. Based on patch
2875 by Jim Gifford <patches@jg555.com>.
2877 2006-01-13 Richard Henderson <rth@redhat.com>
2879 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2881 2006-01-10 Roland McGrath <roland@redhat.com>
2883 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2884 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2885 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2886 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2887 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2888 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2889 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2890 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2891 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2892 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2894 2006-01-09 Roland McGrath <roland@redhat.com>
2896 * tst-initializers1-c89.c: New file.
2897 * tst-initializers1-c99.c: New file.
2898 * tst-initializers1-gnu89.c: New file.
2899 * tst-initializers1-gnu99.c: New file.
2900 * Makefile (tests): Add them.
2901 (CFLAGS-tst-initializers1-c89.c): New variable.
2902 (CFLAGS-tst-initializers1-c99.c): New variable.
2903 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2904 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2906 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2907 Use __extension__ on anonymous union definition.
2908 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2909 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2910 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2911 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2912 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2914 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2916 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2917 Don't give the union a name because it changes the mangled name.
2918 Instead name the struct for __data.
2919 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2921 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2924 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2926 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2927 stack bias to mc_ftp field.
2929 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2931 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2932 being too clever and reloading the futex value where it shouldn't.
2934 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2936 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2939 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2941 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2944 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2946 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2947 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2948 rename in tcbhead_t.
2950 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2951 Don't give the union a name because it changes the mangled name.
2952 Instead name the struct for __data.
2953 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2954 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2955 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2956 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2957 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2958 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2960 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2962 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2964 (lll_futex_timed_wait): Define.
2965 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2966 * sysdeps/pthread/aio_misc.h: New file.
2968 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2970 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2972 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2974 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2975 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2976 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2978 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2980 * tst-cancel24.cc: Use C headers instead of C++ headers.
2982 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2984 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2985 sparc-linux configured glibc.
2986 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2987 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2988 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2989 atomic_compare_and_exchange_val_24_acq instead of
2990 atomic_compare_and_exchange_val_acq.
2991 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2992 instead of atomic_exchange_rel.
2993 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2994 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2996 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2998 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2999 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3000 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3001 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3002 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3003 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3005 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3007 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3008 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3009 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3011 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3013 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3015 2006-01-03 Ulrich Drepper <drepper@redhat.com>
3017 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3020 2006-01-02 Jakub Jelinek <jakub@redhat.com>
3022 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3023 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3024 THREAD_COPY_POINTER_GUARD): Define.
3025 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3026 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3028 2006-01-01 Ulrich Drepper <drepper@redhat.com>
3030 * version.c: Update copyright year.
3032 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3034 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3035 .eh_frame section, use cfi_* directives.
3036 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3038 2005-12-30 Ulrich Drepper <drepper@redhat.com>
3040 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3043 2005-12-29 Ulrich Drepper <drepper@redhat.com>
3045 * sysdeps/pthread/sigaction.c: Removed.
3046 * sigaction.c: New file.
3047 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3049 2005-12-28 Ulrich Drepper <drepper@redhat.com>
3051 * Makefile (tests): Add tst-signal7.
3052 * tst-signal7.c: New file.
3054 2005-12-27 Roland McGrath <roland@redhat.com>
3056 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3057 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3058 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3059 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3060 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3061 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3062 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3063 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3064 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3065 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3066 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3068 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3070 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3071 and __prev field to pthread_mutex_t.
3072 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3073 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3074 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3075 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3076 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3079 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3081 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3082 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3083 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3084 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3085 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3086 and PTHREAD_MUTEXATTR_FLAG_BITS.
3087 * descr.h (struct pthread): Add robust_list field and define
3088 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3089 * pthread_mutexattr_getrobust.c: New file.
3090 * pthread_mutexattr_setrobust.c: New file.
3091 * pthread_mutex_consistent.c: New file.
3092 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3093 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3094 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3095 Adjust pthread_mutex_t initializers.
3096 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3097 field to pthread_mutex_t.
3098 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3099 and __prev field to pthread_mutex_t.
3100 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3101 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3102 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3103 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3104 * pthread_mutexattr_gettype.c: Likewise.
3105 * pthread_mutexattr_setpshared.c: Likewise.
3106 * pthread_mutexattr_settype.c: Likewise.
3107 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3108 Initialize mutex kind according to robust flag.
3109 * pthread_mutex_lock.c: Implement local robust mutex.
3110 * pthread_mutex_timedlock.c: Likewise.
3111 * pthread_mutex_trylock.c: Likewise.
3112 * pthread_mutex_unlock.c: Likewise.
3113 * pthread_create.c (start_thread): Mark robust mutexes which remained
3115 * tst-robust1.c: New file.
3116 * tst-robust2.c: New file.
3117 * tst-robust3.c: New file.
3118 * tst-robust4.c: New file.
3119 * tst-robust5.c: New file.
3120 * tst-robust6.c: New file.
3121 * tst-robust7.c: New file.
3122 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3123 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3124 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3125 tst-robust5, tst-robust6, and tst-robust7.
3127 * tst-typesizes.c: New file.
3128 * Makefile (tests): Add tst-typesizes.
3130 * tst-once3.c: More debug output.
3132 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3134 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3135 missing after last change.
3137 * version.c: Update copyright year.
3139 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3141 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3142 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3143 * pthread_mutex_trylock.c: Likewise.
3144 * pthread_mutex_timedlock.c: Likewise.
3145 * pthread_mutex_unlock.c: Likewise.
3147 2005-12-22 Roland McGrath <roland@redhat.com>
3149 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3150 so that #include_next's search location is not reset to the -I..
3151 directory where <nptl/...> can be found.
3153 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3156 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3157 Fix unwind info. Remove useless branch prediction prefix.
3158 * tst-cancel24.cc: New file.
3159 * Makefile: Add rules to build and run tst-cancel24.
3161 2005-12-21 Roland McGrath <roland@redhat.com>
3163 * libc-cancellation.c: Use <> rather than "" #includes.
3164 * pt-cleanup.c: Likewise.
3165 * pthread_create.c: Likewise.
3166 * pthread_join.c: Likewise.
3167 * pthread_timedjoin.c: Likewise.
3168 * pthread_tryjoin.c: Likewise.
3169 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3170 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3171 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3172 * unwind.c: Likewise.
3174 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3176 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3177 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3178 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3179 THREAD_COPY_POINTER_GUARD): Define.
3181 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3183 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3185 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3186 THREAD_COPY_POINTER_GUARD): Define.
3187 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3188 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3189 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3190 THREAD_COPY_POINTER_GUARD): Define.
3191 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3192 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3193 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3194 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3195 Use PTR_DEMANGLE for B0 if defined.
3197 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3199 * pthread_create.c (__pthread_create_2_1): Use
3200 THREAD_COPY_POINTER_GUARD if available.
3201 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3202 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3203 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3204 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3205 * sysdeps/x86_64/tls.h: Likewise.
3207 2005-12-15 Roland McGrath <roland@redhat.com>
3209 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3211 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3213 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3215 * errno-loc.c: New file.
3217 2005-12-12 Roland McGrath <roland@redhat.com>
3219 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3220 adjustments before choosing stack size. Update minimum stack size
3221 calculation to match allocate_stack change.
3223 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3225 * allocatestack.c (allocate_stack): Don't demand that there is an
3226 additional full page available on the stack beside guard, TLS, the
3229 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3231 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3232 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3234 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3235 compiling 32-bit code we must define __cleanup_fct_attribute.
3237 005-11-24 Jakub Jelinek <jakub@redhat.com>
3240 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3241 __attribute__ instead of __attribute.
3242 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3243 (__cleanup_fct_attribute): Likewise.
3245 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3247 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3248 a write barrier before writing libgcc_s_getcfa.
3250 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3252 * sysdeps/unix/sysv/linux/configure: Removed.
3254 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3256 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3257 optional init_array/fini_array support.
3259 2005-10-24 Roland McGrath <roland@redhat.com>
3261 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3262 versioned_symbol use.
3264 2005-10-16 Roland McGrath <roland@redhat.com>
3266 * init.c (__pthread_initialize_minimal_internal): Even when using a
3267 compile-time default stack size, apply the minimum that allocate_stack
3268 will require, and round up to page size.
3270 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3272 * Makefile ($(test-modules)): Remove static pattern rule.
3274 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3275 Ulrich Drepper <drepper@redhat.com>
3277 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3278 alignment in callback function.
3279 * Makefile: Add rules to build and run tst-align3.
3280 * tst-align3.c: New file.
3282 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3284 * allocatestack.c (setxid_signal_thread): Add
3285 INTERNAL_SYSCALL_DECL (err).
3287 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3289 * allocatestack.c (setxid_signal_thread): Need to use
3290 atomic_compare_and_exchange_bool_acq.
3292 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3293 Jakub Jelinek <jakub@redhat.com>
3295 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3297 (struct pthread): Move specific_used field to avoid padding.
3298 Add setxid_futex field.
3299 * init.c (sighandler_setxid): Reset setxid flag and release the
3301 * allocatestack.c (setxid_signal_thread): New function. Broken
3302 out of the bodies of the two loops in __nptl_setxid. For undetached
3303 threads check whether they are exiting and if yes, don't send a signal.
3304 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3305 * pthread_create.c (start_thread): For undetached threads, check
3306 whether setxid bit is set. If yes, wait until signal has been
3309 * allocatestack.c (STACK_VARIABLES): Initialize them.
3310 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3312 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3314 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3315 waiters, awake all waiters on the associated mutex.
3317 2005-09-22 Roland McGrath <roland@redhat.com>
3319 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3320 ../sysdeps/x86_64/hp-timing.h).
3322 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3324 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3325 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3326 (lll_futex_wake_unlock): Define.
3327 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3328 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3329 (lll_futex_wake_unlock): Define.
3330 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3331 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3332 (lll_futex_wake_unlock): Define.
3333 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3334 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3335 (lll_futex_wake_unlock): Define.
3336 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3337 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3338 (lll_futex_wake_unlock): Define.
3339 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3340 lll_futex_wake_unlock.
3341 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3342 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3343 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3344 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3345 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3346 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3348 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3350 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3351 Fix typo in register name.
3353 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3355 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3356 Use __sigfillset. Document that sigfillset does the right thing wrt
3359 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3362 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3363 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3364 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3365 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3366 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3367 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3369 * Makefile (tests): Add tst-initializers1.
3370 (CFLAGS-tst-initializers1.c): Set.
3371 * tst-initializers1.c: New test.
3373 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3375 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3376 Make sure __flags are located at offset 48 from the start of the
3379 2005-07-02 Roland McGrath <roland@redhat.com>
3381 * Makeconfig: Comment fix.
3383 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3385 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3386 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3387 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3388 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3389 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3390 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3391 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3392 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3393 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3394 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3396 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3398 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3399 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3400 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3402 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3403 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3404 field. Put in sysinfo field unconditionally.
3405 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3406 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3407 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3408 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3410 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3411 * pthread_create.c (__pthread_create_2_1): Use
3412 THREAD_COPY_STACK_GUARD macro.
3413 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3415 * tst-stackguard1.c: New file.
3416 * tst-stackguard1-static.c: New file.
3418 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3420 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3421 Invoke CGOTSETUP and CGOTRESTORE.
3422 (CGOTSETUP, CGOTRESTORE): Define.
3424 2005-05-29 Richard Henderson <rth@redhat.com>
3426 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3427 (tf_write, tf_writev): Use it.
3428 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3431 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3433 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3434 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3435 __librt_*_asynccancel@local.
3437 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3439 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3440 all occurrences of JUMPTARGET. Instead append @local to labels.
3442 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3444 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3445 size/alignment of struct pthread rather than tcbhead_t.
3446 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3448 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3450 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3453 2005-05-19 Richard Henderson <rth@redhat.com>
3455 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3456 __sync_val_compare_and_swap, not explicit _si variant.
3457 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3459 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3462 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3464 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3466 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3467 .eh_frame section, use cfi_* directives.
3469 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3471 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3474 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3477 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3480 2005-04-27 Roland McGrath <roland@redhat.com>
3482 * Makefile (tests): Remove tst-clock2.
3484 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3485 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3486 translating to the kernel clockid_t for our own process/thread clock.
3488 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3490 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3492 * old_pthread_cond_init.c: Include <errno.h>.
3493 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3494 process shared or uses clock other than CLOCK_REALTIME.
3495 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3497 2005-04-13 David S. Miller <davem@davemloft.net>
3499 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3500 * sysdeps/sparc/sparc64/clone.S: New file.
3502 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3505 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3506 __inline instead of inline.
3507 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3509 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3511 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3512 functionally equivalent, but shorter instructions.
3513 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3514 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3515 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3517 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3518 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3519 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3520 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3522 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3523 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3525 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3526 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3527 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3528 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3529 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3531 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3533 * sysdeps/mips/Makefile: New file.
3534 * sysdeps/mips/nptl-sysdep.S: New file.
3535 * sysdeps/mips/tcb-offsets.sym: New file.
3536 * sysdeps/mips/pthread_spin_lock.S: New file.
3537 * sysdeps/mips/pthread_spin_trylock.S: New file.
3538 * sysdeps/mips/pthreaddef.h: New file.
3539 * sysdeps/mips/tls.h: New file.
3540 * sysdeps/mips/jmpbuf-unwind.h: New file.
3541 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3542 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3543 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3544 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3545 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3546 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3547 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3548 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3549 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3550 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3552 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3555 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3558 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3560 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3562 2005-02-25 Roland McGrath <roland@redhat.com>
3564 * alloca_cutoff.c: Correct license text.
3565 * tst-unload.c: Likewise.
3566 * sysdeps/pthread/allocalim.h: Likewise.
3567 * sysdeps/pthread/pt-initfini.c: Likewise.
3568 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3569 * sysdeps/pthread/bits/sigthread.h: Likewise.
3570 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3571 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3573 2005-02-16 Roland McGrath <roland@redhat.com>
3575 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3576 Use unsigned int * for ptr_nthreads.
3578 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3581 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3584 2005-02-07 Richard Henderson <rth@redhat.com>
3587 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3590 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3592 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3593 order of arguments in invocation of atomic_add_zero.
3595 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3598 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3599 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3600 at least gotntpoff relocation and addition.
3601 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3603 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3605 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3608 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3610 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3611 entry for static tls deallocation fix.
3612 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3613 also contains information whether the memory pointed to is static
3615 * sysdeps/i386/tls.h: Likewise.
3616 * sysdeps/ia64/tls.h: Likewise.
3617 * sysdeps/powerpc/tls.h: Likewise.
3618 * sysdeps/s390/tls.h: Likewise.
3619 * sysdeps/sh/tls.h: Likewise.
3620 * sysdeps/sparc/tls.h: Likewise.
3621 * sysdeps/x86_64/tls.h: Likewise.
3623 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3625 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3627 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3629 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3631 * Makefile (tests): Add tst-align2.
3632 * tst-align2.c: New test.
3633 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3634 -mpreferred-stack-boundary=4.
3636 2004-12-18 Roland McGrath <roland@redhat.com>
3638 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3639 New file removed withdrawn for the moment.
3641 2004-12-17 Richard Henderson <rth@redhat.com>
3643 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3644 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3646 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3648 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3649 Increased PTHREAD_STACK_MIN.
3651 * tst-context1.c (stacks): Use bigger stack size.
3653 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3655 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3656 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3658 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3660 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3661 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3662 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3664 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3666 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3668 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3670 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3671 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3673 * tst-getpid1.c: If child crashes, report this first. Print which
3676 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3678 * init.c (__pthread_initialize_minimal_internal): Also unblock
3681 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3683 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3684 _POSIX_THREAD_CPUTIME): Define to 0.
3685 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3686 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3687 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3688 __timer_signal_thread_tclk): Remove.
3689 (init_module): Remove their initialization.
3690 (thread_cleanup): Remove their cleanup assertions.
3691 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3692 __timer_signal_thread_tclk): Remove.
3693 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3694 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3695 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3697 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3699 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3700 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3702 * Makefile (tests): Add tst-getpid2.
3703 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3704 (do_test): Use it. Use __clone2 instead of clone on ia64.
3705 * tst-getpid2.c: New test.
3707 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3709 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3711 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3713 * Makefile (tests): Add tst-getpid1.
3714 * tst-getpid1.c: New file.
3715 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3716 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3718 2004-12-02 Roland McGrath <roland@redhat.com>
3720 * Makefile (libpthread-nonshared): Variable removed.
3721 ($(objpfx)libpthread_nonshared.a): Target removed.
3722 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3723 These are now handled by generic magic from
3724 libpthread-static-only-routines being set.
3726 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3728 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3729 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3730 _POSIX_THREAD_PRIO_PROTECT): Define.
3731 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3732 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3733 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3735 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3737 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3738 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3739 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3740 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3741 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3742 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3743 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3745 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3747 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3749 * Makefile (libpthread-routines): Add pthread_setschedprio.
3750 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3751 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3752 * pthread_setschedprio.c: New file.
3754 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3756 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3757 * pthread_cancel.c (pthread_create): Likewise.
3759 * Makefile (libpthread-routines): Add vars.
3760 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3761 * init.c (__default_stacksize, __is_smp): Remove.
3763 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3764 and define a wrapper macro.
3765 (PTHREAD_STATIC_FN_REQUIRE): Define.
3766 * allocatestack.c (__find_thread_by_id): Undefine.
3767 * pthread_create (__pthread_keys): Remove.
3768 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3769 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3770 PTHREAD_STATIC_FN_REQUIRE.
3772 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3774 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3775 parameter to REGISTER macro.
3777 2004-11-17 Roland McGrath <roland@redhat.com>
3779 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3780 Make sure SIGCANCEL is blocked as well.
3782 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3784 * sysdeps/pthread/setxid.h: New file.
3785 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3786 (struct xid_command): Add forward decl.
3787 (struct pthread_functions): Change return type of __nptl_setxid hook
3789 * pthreadP.h (__nptl_setxid): Change return type to int.
3790 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3791 calling thread, return its return value and set errno on failure.
3792 * descr.h (struct xid_command): Change id type to long array.
3794 * Makefile: Add rules to build and test tst-setuid1 and
3796 * tst-setuid1.c: New test.
3797 * tst-setuid1-static.c: New test.
3799 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3801 * Makefile (tests): Add tst-exit3.
3802 * tst-exit3.c: New test.
3804 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3806 * Makefile (tests): Add tst-exit2.
3807 * tst-exit2.c: New file.
3809 2004-11-09 Roland McGrath <roland@redhat.com>
3812 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3813 here, before calling clone.
3814 * pthread_create.c (start_thread): Don't do it here.
3816 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3818 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3820 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3822 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3823 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3826 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3828 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3829 if sched_priority is not between minprio and maxprio.
3831 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3833 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3834 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3836 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3837 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3839 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3841 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3842 not-cancelable I/O functions.
3844 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3846 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3847 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3848 make sure 2 is stored in the futex and we looked at the old value.
3849 Fix a few other problems to return the correct value.
3851 2004-10-14 Richard Henderson <rth@redhat.com>
3853 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3856 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3858 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3859 of pthread-functions.h and pthreaddef.h.
3860 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3862 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3863 Change __data.__nwaiters from int to unsigned int.
3865 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3866 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3868 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3871 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3872 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3874 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3876 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3877 test fails, remove message queue.
3878 (tf_msgsnd): Likewise.
3880 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3882 * tst-clock1.c: Change #ifdef to #if defined.
3883 * tst-clock2.c: Likewise.
3884 * tst-cond11.c: Likewise.
3886 * sysdeps/pthread/timer_create.c (timer_create): Use
3887 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3888 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3891 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3893 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3894 _POSIX_THREAD_CPUTIME): Define to 0.
3896 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3898 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3899 and _POSIX_THREAD_CPUTIME to zero.
3900 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3901 * tst-barrier2.c: Fix testing for POSIX feature.
3902 * tst-clock1.c: Likewise.
3903 * tst-clock2.c: Likewise.
3904 * tst-cond11.c: Likewise.
3905 * tst-cond4.c: Likewise.
3906 * tst-cond6.c: Likewise.
3907 * tst-flock2.c: Likewise.
3908 * tst-mutex4.c: Likewise.
3909 * tst-mutex9.c: Likewise.
3910 * tst-rwlock12.c: Likewise.
3911 * tst-rwlock4.c: Likewise.
3912 * tst-signal1.c: Likewise.
3913 * tst-spin2.c: Likewise.
3914 * sysdeps/pthread/posix-timer.h: Likewise.
3915 * sysdeps/pthread/timer_create.c: Likewise.
3916 * sysdeps/pthread/timer_routines.c: Likewise.
3918 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3920 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3921 (__lll_mutex_timedlock_wait): Address futex correctly.
3923 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3924 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3925 make sure 2 is stored in the futex and we looked at the old value.
3926 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3927 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3928 which might very well made the code not working at all before.
3931 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3933 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3934 allow SIGSETXID to be sent.
3935 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3936 for SIGSETXID to be defined.
3937 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3938 SIGSETXID cannot be blocked.
3940 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3941 Add __extension__ to long long types.
3942 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3943 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3944 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3945 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3946 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3947 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3948 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3950 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3952 * descr.h (struct pthread): Add stopped_start field.
3953 * sysdeps/pthread/createthread.c (create_thread): Set
3954 start_stopped flag in descriptor for new thread appropriately.
3955 * pthread_create.c (start_thread): Only take lock to be stopped on
3956 startup if stopped_start flag says so.
3958 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3960 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3961 is created detached and if yes, do not try to free the stack in case
3962 the thread creation failed.
3963 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3964 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3965 case there has been no error. [BZ #405]
3967 * pthread_create.c (start_thread): Don't wait for scheduler data
3968 etc to be set at the beginning of the function. The cancellation
3969 infrastructure must have been set up. And enable async
3970 cancellation before potentially going to sleep. [BZ #401]
3972 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3974 * Versions: Remove exports for pthread_set*id_np functions.
3975 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3977 * Makefile: Don't build pthread_set*id code for now.
3979 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3981 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3983 * allocatestack.c (__nptl_setxid): New function.
3984 * descr.h (struct xid_command): Define type.
3985 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3986 (sighandler_setxid): New function.
3987 (__pthread_initialize_minimal): Register sighandler_setxid for
3989 * pt-allocrtsig.c: Update comment.
3990 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3991 Declare __nptl_setxid.
3992 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3993 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3994 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3995 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3996 and pthread_setresuid_np.
3997 * pthread_setgid_np.c: New file.
3998 * pthread_setuid_np.c: New file.
3999 * pthread_setegid_np.c: New file.
4000 * pthread_seteuid_np.c: New file.
4001 * pthread_setregid_np.c: New file.
4002 * pthread_setreuid_np.c: New file.
4003 * pthread_setresgid_np.c: New file.
4004 * pthread_setresuid_np.c: New file.
4005 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4006 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4007 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4008 and pthread_setresuid_np.
4009 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4010 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4011 pthread_setregid, and pthread_setresgid.
4013 2004-09-18 Ulrich Drepper <drepper@redhat.com>
4015 * allocatestack.c (allocate_stack): Return EAGAIN instead of
4016 ENOMEM when out of memory.
4018 2004-09-10 Roland McGrath <roland@redhat.com>
4021 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4022 code, since we don't try to use the broken CLONE_STOPPED any more.
4023 * pthread_create.c (start_thread): Likewise.
4025 2004-09-15 Richard Henderson <rth@redhat.com>
4027 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4029 2004-09-01 David Mosberger <davidm@hpl.hp.com>
4031 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4032 (__libc_unwind_longjmp): Delete macro and declare as function.
4033 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4034 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4036 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4037 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4038 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4040 2004-09-12 Ulrich Drepper <drepper@redhat.com>
4042 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4044 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4045 types also for __USE_XOPEN2K.
4046 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4047 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4048 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4049 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4050 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4051 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4052 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4055 2004-09-08 Ulrich Drepper <drepper@redhat.com>
4057 * sysdeps/pthread/pthread.h
4058 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4059 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4060 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4061 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4064 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4066 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4067 PSEUDO to be used with . prefix.
4069 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4070 Use atomic_increment instead of atomic_exchange_and_add.
4071 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4073 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4075 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4078 * allocatestack.c (allocate_stack): Use atomic_increment_val
4079 instead of atomic_exchange_and_add.
4080 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4081 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4083 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4086 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4087 the initialization function might throw.
4089 2005-09-05 Richard Henderson <rth@redhat.com>
4091 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4092 Move definition inside libpthread, libc, librt check. Provide
4093 definition for rtld.
4095 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4097 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4098 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4099 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4100 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4101 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4102 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4103 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4104 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4107 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4108 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4109 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4111 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4112 Decrement __nwaiters. If pthread_cond_destroy has been called and
4113 this is the last waiter, signal pthread_cond_destroy caller and
4114 avoid using the pthread_cond_t structure after unlock.
4115 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4116 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4117 Read clock type from the least significant bits of __nwaiters instead
4119 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4120 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4122 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4125 * Makefile (tests): Add tst-cond20 and tst-cond21.
4126 * tst-cond20.c: New test.
4127 * tst-cond21.c: New test.
4128 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4129 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4131 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4133 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4134 (pthread_cond_t): Likewise.
4135 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4137 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4139 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4141 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4142 (cond_nwaiters): New.
4144 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4145 if there are waiters not signalled yet.
4146 Wait until all already signalled waiters wake up.
4147 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4148 __nwaiters. If pthread_cond_destroy has been called and this is the
4149 last waiter, signal pthread_cond_destroy caller and avoid using
4150 the pthread_cond_t structure after unlock.
4151 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4152 decrement it when leaving. If pthread_cond_destroy has been called
4153 and this is the last waiter, signal pthread_cond_destroy caller.
4154 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4155 Likewise. Read clock type from the least significant bits of
4156 __nwaiters instead of __clock.
4157 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4158 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4159 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4160 clock type just from the last COND_CLOCK_BITS bits of value.
4161 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4162 instead of __clock, just from second bit of condattr's value.
4164 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4166 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4167 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4169 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4171 2004-08-15 Roland McGrath <roland@frob.com>
4173 * pthread_atfork.c: Update copyright terms including special exception
4174 for these trivial files, which are statically linked into executables
4175 that use dynamic linking for the significant library code.
4177 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4179 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4180 pthread_rwlock_rdlock.
4181 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4182 Decrease __nr_readers_queued after reacquiring lock.
4183 * sysdeps/pthread/pthread_rwlock_timedrdlock
4184 (pthread_rwlock_timedrdlock): Likewise.
4185 Reported by Bob Cook <bobcook47@hotmail.com>.
4187 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4189 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4190 before pthread_barrier_wait.
4192 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4195 Remove unnecessary exception handling data.
4197 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4200 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4201 instead of clockid_t.
4203 2004-07-21 Roland McGrath <roland@redhat.com>
4205 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4207 2004-07-19 Roland McGrath <roland@redhat.com>
4209 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4211 2004-07-02 Roland McGrath <roland@redhat.com>
4213 * configure: Don't exit.
4215 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4217 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4218 (__pthread_cond_timedwait): Check for invalid nanosecond in
4221 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4223 * Makefile: Add rules to build and run tst-fini1.
4224 * tst-fini1.c: New file.
4225 * tst-fini1mod.c: New file.
4227 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4229 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4230 if no cancellation support is needed.
4231 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4232 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4233 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4234 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4235 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4236 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4237 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4238 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4239 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4241 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4242 only if not already defined.
4244 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4246 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4247 constraint "m" instead of "0" for futex.
4249 * shlib-versions: Add powerpc64-.*-linux.*.
4251 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4253 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4254 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4256 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4257 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4260 2004-06-29 Roland McGrath <roland@redhat.com>
4262 * Banner: NPTL no longer has its own version number.
4263 * Makefile (nptl-version): Variable removed.
4264 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4265 using $(version), the glibc version number.
4267 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4269 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4270 Fix branch offset for a PLT entry.
4271 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4273 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4275 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4277 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4280 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4282 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4285 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4287 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4288 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4290 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4291 (pthread_rwlock_timedrdlock): Likewise.
4293 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4295 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4296 Set __r7 to val, not mutex.
4298 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4300 * Makefile: Add rules to build tst-rwlock14.
4301 * tst-rwlock14.c: New file.
4303 2004-06-24 Boris Hu <boris.hu@intel.com>
4305 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4307 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4309 2004-06-19 Andreas Jaeger <aj@suse.de>
4311 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4312 assembler in last patch.
4314 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4316 * sysdeps/pthread/pthread_cond_timedwait.c
4317 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4318 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4319 (__pthread_cond_timedwait): Check for invalid nanosecond in
4321 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4322 * tst-cond19.c: New file.
4323 * Makefile: Add rules to build and run tst-cond19.
4325 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4327 * tst-context1.c (GUARD_PATTERN): Defined.
4328 (tst_context_t): Define struct containing ucontext_t & guard words.
4329 (ctx): Declare as an array of tst_context_t.
4330 (fct): Verify uc_link & guard words are still valid.
4331 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4333 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4335 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4336 Add __data.__futex field, reshuffle __data.__clock.
4337 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4338 (__pthread_cond_signal): Increment __futex at the same time as
4339 __wakeup_seq or __total_seq. Pass address of __futex instead of
4340 address of low 32-bits of __wakeup_seq to futex syscall.
4341 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4342 (__pthread_cond_wait): Likewise. Pass __futex value from before
4343 releasing internal lock to FUTEX_WAIT.
4344 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4345 (__pthread_cond_timedwait): Likewise.
4346 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4347 (FUTEX_CMP_REQUEUE): Define.
4348 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4349 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4350 Pass __futex value from before the unlock and __futex address instead
4351 of address of low 32-bits of __wakeup_seq to futex syscall.
4352 Fallback to FUTEX_WAKE all on any errors.
4354 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4356 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4358 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4359 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4360 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4361 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4362 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4364 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4366 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4367 Add memory clobber to inline assembly.
4368 (__lll_mutex_trylock): Likewise.
4369 (__lll_mutex_cond_trylock): Likewise.
4371 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4373 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4374 Pass val argument as 6th system call argument in %r7.
4376 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4378 * Makefile (tests): Add tst-cond16.
4379 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4380 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4381 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4382 Add __data.__futex field, reshuffle __data.__clock.
4383 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4384 (__pthread_cond_signal): Increment __futex at the same time as
4385 __wakeup_seq or __total_seq. Pass address of __futex instead of
4386 address of low 32-bits of __wakeup_seq to futex syscall.
4387 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4388 (__pthread_cond_wait): Likewise. Pass __futex value from before
4389 releasing internal lock to FUTEX_WAIT.
4390 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4391 (__pthread_cond_timedwait): Likewise.
4392 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4393 (FUTEX_CMP_REQUEUE): Define.
4394 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4395 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4396 Pass __futex value from before the unlock and __futex address instead
4397 of address of low 32-bits of __wakeup_seq to futex syscall.
4398 Fallback to FUTEX_WAKE all on any errors.
4399 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4401 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4402 internally. Return non-zero if error, zero if success.
4403 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4404 Add __data.__futex field, reshuffle __data.__clock.
4405 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4407 (lll_futex_requeue): Add val argument, return 1 unconditionally
4409 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4410 Add __data.__futex field, reshuffle __data.__clock.
4411 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4413 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4414 internally. Return non-zero if error, zero if success.
4415 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4416 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4417 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4419 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4420 internally. Return non-zero if error, zero if success.
4421 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4422 Add __data.__futex field, reshuffle __data.__clock.
4423 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4425 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4426 internally. Return non-zero if error, zero if success.
4427 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4428 Add __data.__futex field, reshuffle __data.__clock.
4429 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4430 Add __data.__futex field, reshuffle __data.__clock.
4431 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4432 Increment __futex at the same time as __wakeup_seq or __total_seq.
4433 Pass address of __futex instead of address of low 32-bits of
4434 __wakeup_seq to futex syscall.
4435 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4436 Pass __futex value from before releasing internal lock
4438 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4439 Likewise. Avoid unnecessary shadowing of variables.
4440 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4441 Set __futex to 2 * __total_seq. Pass __futex value from before the
4442 unlock and __futex address instead of address of low 32-bits of
4443 __wakeup_seq to futex_requeue macro, adjust for new return value
4445 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4446 (__pthread_cond_signal): Increment __futex at the same time as
4447 __wakeup_seq or __total_seq. Pass address of __futex instead of
4448 address of low 32-bits of __wakeup_seq to futex syscall.
4449 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4450 (__pthread_cond_wait): Likewise. Pass __futex value from before
4451 releasing internal lock to FUTEX_WAIT.
4452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4453 (__pthread_cond_timedwait): Likewise.
4454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4455 (FUTEX_CMP_REQUEUE): Define.
4456 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4457 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4458 Pass __futex value from before the unlock and __futex address instead
4459 of address of low 32-bits of __wakeup_seq to futex syscall.
4460 Fallback to FUTEX_WAKE all on any errors.
4462 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4464 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4465 Add nop to align the end of critical section.
4466 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4468 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4470 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4471 Add __broadcast_seq field.
4472 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4473 all waiters as woken with woken_seq and bump broadcast counter.
4474 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4475 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4476 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4477 Comment typo fixes. Avoid returning -ETIMEDOUT.
4479 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4481 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4482 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4483 Reported by Kaz Kojima.
4485 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4487 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4489 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4491 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4492 __broadcast_seq with bc_seq after acquiring internal lock instead of
4495 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4497 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4499 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4500 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4501 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4502 (pthread_cond_t): Add __data.__broadcast_seq field.
4503 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4504 (FRAME_SIZE): Define.
4505 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4507 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4509 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4511 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4512 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4515 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4517 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4518 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4519 Add __broadcast_seq field.
4520 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4521 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4522 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4523 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4524 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4526 all waiters as woken with woken_seq and bump broadcast counter.
4527 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4528 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4529 __broadcast_seq field.
4530 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4531 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4532 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4533 * pthread_cond_init.c: Initialize __broadcast_seq field.
4534 * Makefile (tests): Add tst-cond17 and tst-cond18.
4535 Add .NOTPARALLEL goal.
4536 * tst-cond16.c: New file. From Jakub.
4537 * tst-cond17.c: New file. From Jakub.
4538 * tst-cond18.c: New file. From Jakub.
4540 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4542 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4546 Parametrize frame size. Correct some unwind info.
4547 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4549 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4551 * tst-stack3.c: Note testing functionality beyond POSIX.
4553 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4555 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4556 Change conditional from ifdef to if.
4558 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4560 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4561 SYSDEP_CANCEL_ERROR): Define.
4564 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4566 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4568 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4570 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4572 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4574 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4575 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4576 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4577 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4579 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4581 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4582 thread has all signals blocked.
4584 2004-04-18 Andreas Jaeger <aj@suse.de>
4586 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4587 (SEM_VALUE_MAX): Add missing brace.
4589 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4591 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4593 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4594 * sysdeps/pthread/tst-mqueue8x.c: New test.
4595 * tst-cancel4.c: Update comment about message queues.
4597 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4598 return it_value { 0, 0 }.
4599 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4601 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4602 assertion for SIGEV_NONE.
4603 (thread_attr_compare): Compare all attributes, not just a partial
4606 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4608 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4610 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4612 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4613 Just use a plain number.
4614 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4615 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4616 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4617 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4618 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4619 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4620 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4622 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4624 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4626 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4628 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4630 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4631 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4632 of calling sigwaitinfo.
4634 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4636 * allocatestack.c (allocate_stack): Set reported_guardsize
4638 * pthread_getattr_np.c (pthread_getattr_np): Use
4639 reported_guardsize instead of guardsize.
4640 * descr.h (struct pthread): Add reported_guardsize field.
4642 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4644 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4646 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4648 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4650 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4652 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4653 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4654 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4655 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4656 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4658 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4659 (_POSIX_MESSAGE_PASSING): Define.
4660 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4661 (_POSIX_MESSAGE_PASSING): Define.
4662 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4663 (_POSIX_MESSAGE_PASSING): Define.
4665 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4667 * tst-context1.c (fct): Check whether correct stack is used.
4669 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4671 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4672 matching constraints for asm mem parameters.
4674 * tst-clock2.c (tf): Don't define unless needed.
4676 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4678 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4681 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4683 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4684 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4685 * pthreadP.h: Declare __nptl_deallocate_tsd.
4686 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4689 * Makefile (tests): Add tst-tsd5.
4690 * tst-tsd5.c: New file.
4692 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4694 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4695 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4696 is SHLIB_COMPAT check.
4697 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4698 (__pthread_attr_getaffinity_old): Likewise.
4699 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4700 (__pthread_getaffinity_old): Likewise.
4701 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4702 (__pthread_setaffinity_old): Likewise.
4704 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4706 * allocatestack.c (_make_stacks_executable): Call
4707 _dl_make_stack_executable first.
4709 2004-03-24 Roland McGrath <roland@redhat.com>
4711 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4712 constraint instead of "0".
4714 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4716 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4717 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4719 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4720 code to avoid warning.
4722 2004-03-24 Andreas Jaeger <aj@suse.de>
4724 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4725 (__pthread_attr_setaffinity_old): Remove const.
4727 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4729 * sysdeps/unix/sysv/linux/smp.h: New file.
4730 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4731 * init.c: Define __is_smp.
4732 (__pthread_initialize_minimal_internal): Call is_smp_system to
4733 initialize __is_smp.
4734 * pthreadP.h: Declare __is_smp.
4735 Define MAX_ADAPTIVE_COUNT is necessary.
4736 * pthread_mutex_init.c: Add comment regarding __spins field.
4737 * pthread_mutex_lock.c: Implement adaptive mutex type.
4738 * pthread_mutex_timedlock.c: Likewise.
4739 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4740 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4742 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4743 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4744 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4745 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4746 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4747 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4748 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4749 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4750 lll_mutex_cond_trylock.
4751 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4752 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4753 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4754 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4755 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4756 Define BUSY_WAIT_NOP.
4757 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4758 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4760 * tst-mutex5.c: Add support for testing adaptive mutexes.
4761 * tst-mutex7.c: Likewise.
4762 * tst-mutex5a.c: New file.
4763 * tst-mutex7a.c: New file.
4764 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4766 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4767 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4768 vgettimeofday call might destroy the content.
4770 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4773 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4774 No need to restrict type of ret. Make it int. Add comment.
4776 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4777 Remove unnecessary setne instruction.
4779 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4781 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4782 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4783 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4784 If realloc fails, break out of the loop.
4786 2004-03-20 Andreas Jaeger <aj@suse.de>
4788 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4789 (__pthread_setaffinity_old): Fix interface.
4790 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4791 (__pthread_getaffinity_old): Likewise.
4793 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4794 (__pthread_setaffinity_new): Remove duplicate declaration.
4796 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4798 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4799 the return value to a safe register.
4800 (CDISABLE): Set the function argument correctly.
4802 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4804 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4805 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4806 Rewrite so that only one locked memory operation per round is needed.
4807 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4808 (pthread_barrier_wait): After wakeup, release lock only when the
4809 last thread stopped using the barrier object.
4810 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4811 (__pthread_cond_wait): Don't store mutex address if the current
4812 value is ~0l. Add correct cleanup support and unwind info.
4813 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4814 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4815 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4816 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4817 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4818 Add correct cleanup support and unwind info.
4819 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4820 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4821 information for syscall wrappers.
4823 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4825 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4826 cpusetsize field, remove next.
4827 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4828 parameter for size of the CPU set.
4829 (pthread_setaffinity_np): Likewise.
4830 (pthread_attr_getaffinity_np): Likewise.
4831 (pthread_attr_setaffinity_np): Likewise.
4832 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4833 interface change, keep compatibility code.
4834 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4835 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4836 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4837 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4838 __pthread_getaffinity_np.
4839 * Versions: Add version for changed interfaces.
4840 * tst-attr3.c: Adjust test for interface change.
4841 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4842 increasing buffer sizes.
4843 * pthread_attr_destroy.c: Remove unused list handling.
4844 * pthread_attr_init.c: Likewise.
4846 2004-03-17 Roland McGrath <roland@redhat.com>
4848 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4849 first argument to clock_getres so we ever enable kernel timers.
4851 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4853 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4855 2004-03-12 Richard Henderson <rth@redhat.com>
4857 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4858 oldvalue from CENABLE to CDISABLE.
4860 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4862 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4863 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4864 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4865 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4867 2004-03-11 Richard Henderson <rth@redhat.com>
4869 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4870 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4871 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4873 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4875 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4876 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4877 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4879 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4881 * forward.c (__pthread_cond_broadcast_2_0,
4882 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4883 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4884 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4886 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4888 * sysdeps/sh/tcb-offsets.sym: Add PID.
4889 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4890 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4892 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4894 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4895 include <sysdep-cancel.h>, vfork is no cancellation point.
4896 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4897 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4898 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4900 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4902 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4904 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4905 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4907 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4909 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4910 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4911 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4912 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4913 of DO_CALL_VIA_BREAK. Work around a gas problem.
4915 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4916 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4917 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4918 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4919 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4920 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4922 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4923 a local register for saving old PID. Negate PID in parent upon exit.
4925 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4927 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4928 before syscall, set to the old value in the parent afterwards.
4929 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4930 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4932 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4933 before syscall, set to the old value in the parent afterwards.
4934 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4935 * sysdeps/s390/tcb-offsets.sym: Add PID.
4937 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4938 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4939 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4940 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4941 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4942 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4944 2004-03-10 Andreas Schwab <schwab@suse.de>
4946 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4947 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4948 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4950 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4952 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4953 * tst-cancel21.c (do_one_test): Likewise.
4954 Reported by Gordon Jin <gordon.jin@intel.com>.
4956 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4958 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4959 if non-zero and set to INT_MIN if zero.
4960 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4961 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4962 (SAVE_PID, RESTORE_PID): Define.
4964 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4965 Use relative path to avoid including NPTL i386/vfork.S.
4966 (SAVE_PID, RESTORE_PID): Define.
4967 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4968 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4969 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4971 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4972 * tst-vfork1.c: New test.
4973 * tst-vfork2.c: New test.
4974 * tst-vfork1x.c: New test.
4975 * tst-vfork2x.c: New test.
4977 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4979 * sysdeps/i386/tcb-offsets.sym: Add PID.
4980 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4981 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4982 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4984 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4986 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4988 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4990 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4993 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4995 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4998 * tst-once4.c: Remove unnecessary macro definition.
5000 * tst-mutex7.c (do_test): Limit thread stack size.
5001 * tst-once2.c (do_test): Likewise.
5002 * tst-tls3.c (do_test): Likewise.
5003 * tst-tls1.c (do_test): Likewise.
5004 * tst-signal3.c (do_test): Likewise.
5005 * tst-kill6.c (do_test): Likewise.
5006 * tst-key4.c (do_test): Likewise.
5007 * tst-join4.c (do_test): Likewise.
5008 * tst-fork1.c (do_test): Likewise.
5009 * tst-context1.c (do_test): Likewise.
5010 * tst-cond2.c (do_test): Likewise.
5011 * tst-cond10.c (do_test): Likewise.
5012 * tst-clock2.c (do_test): Likewise.
5013 * tst-cancel10.c (do_test): Likewise.
5014 * tst-basic2.c (do_test): Likewise.
5015 * tst-barrier4.c (do_test): Likewise.
5017 2004-03-05 Ulrich Drepper <drepper@redhat.com>
5019 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5021 2004-03-01 Ulrich Drepper <drepper@redhat.com>
5023 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5024 (__pthread_cond_timedwait): Optimize wakeup test.
5025 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5026 (__pthread_cond_wait): Likewise.
5027 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5028 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5031 2004-02-29 Ulrich Drepper <drepper@redhat.com>
5033 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5034 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
5035 the atomic instruction needed.
5036 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5037 (__lll_mutex_lock_wait): Likewise.
5039 2004-02-28 Ulrich Drepper <drepper@redhat.com>
5041 * Makefile (tests): Add tst-cond14 and tst-cond15.
5042 * tst-cond14.c: New file.
5043 * tst-cond15.c: New file.
5045 2004-02-27 Ulrich Drepper <drepper@redhat.com>
5047 * sysdeps/pthread/createthread.c (create_thread): Remove use of
5048 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
5049 needs to be implemented differently to be useful.
5051 2004-02-26 Ulrich Drepper <drepper@redhat.com>
5053 * pthread_attr_setschedparam.c: Don't test priority against limits
5054 here. Set ATTR_FLAG_SCHED_SET flag.
5055 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5056 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5057 from parent thread to child. If attribute is used and scheduling
5058 parameters are not inherited, copy parameters from attribute or
5059 compute them. Check priority value.
5060 * pthread_getschedparam.c: If the parameters aren't known yet get
5061 them from the kernel.
5062 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5063 ATTR_FLAG_POLICY_SET flag for thread.
5064 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5065 and ATTR_FLAG_POLICY_SET.
5067 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5069 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5070 fail if stack address hasn't been set. Just return 0.
5072 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5074 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5075 libpthread for the files in this list.
5076 (CFLAGS-tst-unload): Removed.
5077 * tst-unload.c (do_test): Don't use complete path for
5080 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5083 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5085 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5086 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5087 operation per round is needed.
5088 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5089 (__lll_mutex_lock_wait): Likewise.
5091 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5093 * tst-cancel9.c (cleanup): Don't print to stderr.
5095 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5097 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5099 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5101 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5102 (__syscall_error_handler2): Call CDISABLE.
5103 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5104 (__syscall_error_handler2): Call CDISABLE.
5106 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5107 Release lock before the loop, don't reacquire it.
5109 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5111 2004-02-19 Andreas Schwab <schwab@suse.de>
5113 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5116 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5118 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5119 (pthread_barrier_wait): After wakeup, release lock only when the
5120 last thread stopped using the barrier object.
5121 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5122 (pthread_barrier_wait): Likewise.
5123 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5125 * Makefile (tests): Add tst-barrier4.
5126 * tst-barrier4.c: New file.
5128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5129 (__pthread_cond_timedwait): Perform timeout test while holding
5130 internal lock to prevent wakeup race.
5131 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5132 * sysdeps/pthread/pthread_cond_timedwait.c
5133 (__pthread_cond_timedwait): Likewise.
5134 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5135 (__pthread_cond_timedwait): Likewise.
5137 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5139 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5140 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5141 * Makefile (tests): Add tst-rwlock13.
5142 * tst-rwlock13.c: New test.
5144 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5146 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5147 (__condvar_tw_cleanup): Little optimization.
5148 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5150 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5152 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5153 libpthread as "lib" parameter to SHLIB_COMPAT.
5154 (__novmx_siglongjmp): Fix typo in function name.
5155 (__novmx_longjmp): Fix typo in function name.
5157 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5159 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5162 * sysdeps/generic/pt-longjmp.c: Moved to...
5163 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5165 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5167 * Makefile (libpthread-routines): Add pt-cleanup.
5168 * pt-longjmp.c: Removed.
5169 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5170 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5171 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5172 Version longjmp, siglongjmp for GLIBC_2.3.4.
5173 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5175 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5177 * sysdeps/pthread/pthread_cond_timedwait.c
5178 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5179 Reuse code. Add __builtin_expects.
5181 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5182 (__pthread_cond_timedwait): Get internal lock in case timeout has
5183 passed before the futex syscall.
5184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5186 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5188 * allocatestack.c: Pretty printing.
5190 * sysdeps/pthread/createthread.c (create_thread): Don't add
5191 CLONE_DETACHED bit if it is not necessary.
5193 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5195 * pthread_getattr_np.c: Include ldsodefs.h.
5197 2004-01-16 Richard Henderson <rth@redhat.com>
5199 * allocatestack.c: Don't declare __libc_stack_end.
5200 * init.c (__pthread_initialize_minimal_internal): Likewise.
5201 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5203 2004-01-15 Richard Henderson <rth@redhat.com>
5205 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5206 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5207 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5208 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5209 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5210 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5211 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5212 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5214 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5216 * init.c (pthread_functions): Make array const.
5218 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5220 * allocatestack.c (__make_stacks_executable): Change interface.
5221 Check parameters. Pass parameter on to libc counterpart.
5222 * pthreadP.h: Change declaration.
5224 2004-01-13 Richard Henderson <rth@redhat.com>
5226 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5228 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5231 * sysdeps/alpha/Makefile: New file.
5232 * sysdeps/alpha/tcb-offsets.sym: New file.
5233 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5234 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5236 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5239 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5241 * Makefile (tests): Add tst-backtrace1.
5242 * tst-backtrace1.c: New test.
5244 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5246 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5247 register as second parameter to the REGISTER macro.
5248 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5249 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5250 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5251 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5252 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5253 of thread register as second parameter to REGISTER macro in 64 case.
5255 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5257 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5258 (CFLAGS-getpid.o): Defined.
5259 (CFLAGS-getpid.os): Defined.
5261 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5263 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5264 returned for main thread does not overlap with any other VMA.
5265 Patch by Jakub Jelinek.
5267 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5269 * tst-raise1.c: Include stdio.h.
5271 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5273 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5274 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5275 If pid is 0, set it to selftid.
5276 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5277 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5278 != 0, return self->tid without doing a syscall.
5279 * descr.h (struct pthread): Move pid field after tid.
5281 * Makefile (tests): Add tst-raise1.
5282 * tst-raise1.c: New file.
5284 2003-12-23 Roland McGrath <roland@redhat.com>
5286 * tst-oddstacklimit.c: New file.
5287 * Makefile (tests): Add it.
5288 (tst-oddstacklimit-ENV): New variable.
5290 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5291 value up to page size for __default_stacksize.
5293 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5295 * Makefile (tests): Add tst-eintr5.
5296 * tst-eintr5.c: New file.
5298 * eintr.c (eintr_source): Prevent sending signal to self.
5300 * tst-eintr2.c (tf1): Improve error message.
5302 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5304 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5305 * sysdeps/unix/sysv/linux/getpid.c: New file.
5306 * pthread_cancel.c: Add comment explaining use of PID field.
5307 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5308 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5309 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5310 temporarily to signal the field must not be relied on and updated
5312 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5313 temporarily negative.
5314 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5316 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5318 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5319 (eintr_source): If ARG != NULL, use pthread_kill.
5320 * tst-eintr1.c: Adjust for this change.
5321 * tst-eintr2.c: Likewise.
5322 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5323 * tst-eintr3.c: New file.
5324 * tst-eintr4.c: New file.
5326 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5328 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5329 if CANCELSTATE_BITMASK is set.
5330 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5333 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5334 (tests-reverse): Add tst-cancel23.
5335 * tst-cancel22.c: New test.
5336 * tst-cancel23.c: New test.
5338 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5340 * tst-eintr1.c: Better error messages.
5342 * Makefile (tests): Add tst-eintr2.
5343 * tst-eintr2.c: New file.
5345 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5347 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5348 (CFLAGS-tst-cancelx21.c): Set.
5349 * tst-cancel21.c: New test.
5350 * tst-cancelx21.c: New test.
5352 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5354 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5355 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5356 * pt-longjmp.c: Include jmpbuf-unwind.h.
5357 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5358 _JMPBUF_UNWINDS. Adjust compared pointers.
5359 * init.c (__pthread_initialize_minimal_internal): Initialize
5360 pd->stackblock_size.
5361 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5362 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5363 * sysdeps/i386/jmpbuf-unwind.h: New file.
5364 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5365 * sysdeps/s390/jmpbuf-unwind.h: New file.
5366 * sysdeps/sh/jmpbuf-unwind.h: New file.
5367 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5368 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5369 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5370 (_JMPBUF_CFA_UNWINDS): Remove.
5371 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5373 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5375 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5376 (CFLAGS-tst-cancelx20.c): Set.
5377 * tst-cancel20.c: New test.
5378 * tst-cancelx20.c: New test.
5380 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5382 * init.c (__pthread_initialize_minimal_internal): Don't treat
5383 architectures with separate register stack special here when
5384 computing default stack size.
5386 2003-12-17 Roland McGrath <roland@redhat.com>
5388 * Makefile (tst-cancelx7-ARGS): New variable.
5389 Reportd by Greg Schafer <gschafer@zip.com.au>.
5391 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5393 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5394 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5395 (tst-stack3-ENV): Set.
5396 ($(objpfx)tst-stack3-mem): New.
5397 * tst-stack3.c: New test.
5399 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5401 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5402 Add unwind directives. Drop unused .regstk directive.
5403 (_fini_EPILOG_BEGINS): Add unwind directives.
5405 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5407 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5408 Assume parameter is a pointer.
5409 (lll_futex_wake): Likewise.
5410 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5412 (lll_futex_wake): Likewise.
5413 Reported by Boris Hu.
5414 * sysdeps/unix/sysv/linux/unregister-atfork.c
5415 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5417 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5419 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5421 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5422 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5423 __rtld_lock_initialize for ld.so lock.
5424 Patch in part by Adam Li <adam.li@intel.com>.
5426 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5428 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5429 in $(gnulib). Also, remove stale comment.
5431 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5433 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5434 advantage of new syscall stub and optimize accordingly.
5436 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5437 from SYS_futex, to match expectations of
5438 sysdep.h:DO_INLINE_SYSCALL.
5439 (lll_futex_clobbers): Remove.
5440 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5441 (lll_futex_wake): Likewise.
5442 (lll_futex_requeue): Likewise.
5443 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5444 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5446 (__lll_mutex_lock): Likewise.
5447 (__lll_mutex_cond_lock): Likewise.
5448 (__lll_mutex_timed_lock): Likewise.
5449 (__lll_mutex_unlock): Likewise.
5450 (__lll_mutex_unlock_force): Likewise.
5452 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5453 comes before the include of <sysdep.h>.
5454 (THREAD_SELF_SYSINFO): New macro.
5455 (THREAD_SYSINFO): Likewise.
5456 (INIT_SYSINFO): New macro.
5457 (TLS_INIT_TP): Call INIT_SYSINFO.
5459 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5461 * sysdeps/pthread/createthread.c (create_thread): Use
5462 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5463 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5464 THREAD_SELF_SYSINFO instead of open code.
5465 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5466 (THREAD_SYSINFO): Likewise.
5468 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5470 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5472 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5474 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5475 instead of .init. Patch by David Mosberger.
5477 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5479 * sysdeps/pthread/configure.in: Remove broken declaration in C
5480 cleanup handling check.
5482 2003-11-30 Andreas Jaeger <aj@suse.de>
5484 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5485 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5488 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5490 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5491 * pthread_attr_destroy.c: Include shlib-compat.h.
5492 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5493 is set in iattr->flags.
5494 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5496 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5498 * Makefile (distribute): Add tst-cleanup4aux.c.
5500 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5503 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5505 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5506 pthread_cond_signal.
5508 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5509 store mutex address if the current value is ~0l.
5510 * sysdeps/pthread/pthread_cond_timedwait.c
5511 (__pthread_cond_timedwait): Likewise.
5512 * sysdeps/pthread/pthread_cond_broadcast.c
5513 (__pthread_cond_broadcast): Don't use requeue for pshared
5516 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5517 (__pthread_cond_wait): Don't store mutex address if the current
5519 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5520 (__pthread_cond_timedwait): Likewise.
5521 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5522 (__pthread_cond_broadcast): Don't use requeue for pshared
5525 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5526 element with ~0l for pshared condvars, with NULL otherwise.
5528 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5529 (__pthread_cond_wait): Don't store mutex address if the current
5531 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5532 (__pthread_cond_timedwait): Likewise.
5533 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5534 (__pthread_cond_broadcast): Don't use requeue for pshared
5537 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5538 * tst-cond12.c: New file.
5539 * tst-cond13.c: New file.
5541 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5543 * sysdeps/pthread/configure.in: Make missing forced unwind support
5546 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5548 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5550 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5552 * Makefile: Add magic to clean up correctly.
5554 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5556 * unwind.c (FRAME_LEFT): Define.
5557 (unwind_stop): Handle old style cleanups here.
5558 (__pthread_unwind): Handle old style cleanups only if
5559 !HAVE_FORCED_UNWIND.
5560 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5561 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5562 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5563 ($(objpfx)tst-cleanupx4): Likewise.
5564 * tst-cleanup4.c: New test.
5565 * tst-cleanup4aux.c: New.
5566 * tst-cleanupx4.c: New test.
5568 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5570 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5571 lll_mutex_*lock macros to skip atomic operations on some archs.
5573 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5575 * sysdeps/pthread/tst-timer.c (main): Initialize
5576 sigev2.sigev_value as well.
5578 2003-10-15 Roland McGrath <roland@redhat.com>
5580 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5582 * sysdeps/pthread/configure: Regenerated.
5584 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5586 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5587 locking macros. No distinction between normal and mutex locking
5589 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5590 Merge bits from lowlevelmutex.S we still need.
5591 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5592 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5593 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5594 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5595 new mutex implementation.
5596 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5597 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5598 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5599 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5600 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5601 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5602 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5603 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5604 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5605 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5606 symbol for entry point to avoid cancellation.
5608 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5610 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5612 (SAVE_OLDTYPE_0): Fix a typo.
5614 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5616 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5617 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5619 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5621 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5624 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5626 * Makefile (tests): Add tst-cancel19.
5627 * tst-cancel19.c: New test.
5629 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5631 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5632 restoring of the old cancellation type.
5634 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5636 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5638 2003-09-27 Wolfram Gloger <wg@malloc.de>
5640 * sysdeps/pthread/malloc-machine.h: New file
5642 2003-09-24 Roland McGrath <roland@redhat.com>
5644 * allocatestack.c (__make_stacks_executable): Don't ignore return
5645 value from _dl_make_stack_executable.
5647 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5649 * allocatestack.c (__make_stacks_executable): Also change
5650 permission of the currently unused stacks.
5652 * allocatestack.c (change_stack_perm): Split out from
5653 __make_stacks_executable.
5654 (allocate_stack): If the required permission changed between the time
5655 we started preparing the stack and queueing it, change the permission.
5656 (__make_stacks_executable): Call change_stack_perm.
5658 * Makefile: Build tst-execstack-mod locally.
5659 * tst-execstack-mod.c: New file.
5661 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5663 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5665 2003-09-23 Roland McGrath <roland@redhat.com>
5667 * tst-execstack.c: New file.
5668 * Makefile (tests): Add it.
5669 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5670 (LDFLAGS-tst-execstack): New variable.
5672 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5673 whether to use PROT_EXEC for stack mmap.
5674 (__make_stacks_executable): New function.
5675 * pthreadP.h: Declare it.
5676 * init.c (__pthread_initialize_minimal_internal): Set
5677 GL(dl_make_stack_executable_hook) to that.
5679 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5681 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5682 recommendation from AMD re avoidance of lock prefix.
5684 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5686 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5687 lll_futex_timed_wait instead of lll_futex_wait.
5688 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5689 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5690 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5691 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5692 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5693 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5694 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5695 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5696 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5697 Completely revamp the locking macros. No distinction between
5698 normal and mutex locking anymore.
5699 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5700 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5701 __lll_lock_timedwait): Fix prototypes.
5702 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5703 __lll_lock_timedwait): Likewise.
5704 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5705 macros, add __builtin_expect.
5706 (lll_mutex_timedlock): Likewise. Fix return value.
5707 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5708 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5709 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5710 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5711 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5712 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5713 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5714 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5716 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5718 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5719 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5720 operation if possible.
5722 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5723 like jumping over the lock prefix.
5725 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5727 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5728 locking macros. No distinction between normal and mutex locking
5730 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5731 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5732 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5733 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5734 locking. Merge bits from lowlevelmutex.S we still need.
5735 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5736 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5737 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5738 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5739 * Makefile (routines): Remove libc-lowlevelmutex.
5740 (libpthread-rountines): Remove lowlevelmutex.
5741 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5742 for new mutex implementation.
5743 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5744 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5745 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5746 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5747 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5749 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5751 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5752 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5753 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5754 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5756 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5757 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5758 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5760 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5762 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5763 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5764 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5766 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5767 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5769 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5771 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5772 in parameters of asm with output parameters.
5774 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5775 type of DECR parameter to int.
5776 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5778 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5780 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5781 guardsize for each thread.
5783 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5785 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5786 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5787 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5789 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5790 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5792 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5793 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5794 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5795 (pthread_getaffinity_np): Add hidden_def.
5797 * Makefile (tests): Add tst-attr3.
5798 * tst-attr3.c: New test.
5800 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5802 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5804 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5805 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5807 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5809 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5810 * tst-align.c: Include tst-stack-align.h.
5811 (tf, do_test): Use TEST_STACK_ALIGN macro.
5813 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5815 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5818 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5820 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5821 stack-related values for the initial thread.
5823 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5825 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5827 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5829 * pthread_mutex_lock.c: Minor code rearrangements.
5831 2003-09-05 Roland McGrath <roland@redhat.com>
5833 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5834 Instead, include ../nptl_db/db_info.c to do its magic.
5835 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5836 (__pthread_pthread_key_2ndlevel_size): Likewise.
5837 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5838 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5839 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5840 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5841 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5842 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5843 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5844 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5845 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5846 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5847 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5848 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5849 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5850 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5851 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5852 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5853 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5855 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5857 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5858 of pthread_t to be compatible with LT.
5859 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5860 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5861 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5862 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5863 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5864 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5865 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5867 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5869 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5871 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5873 * unwind-forcedunwind.c: Move to...
5874 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5875 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5876 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5877 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5878 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5879 * unwind.c: Include jmpbuf-unwind.h.
5880 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5882 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5884 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5885 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5886 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5887 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5888 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5889 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5890 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5891 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5892 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5893 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5894 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5896 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5897 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5898 * Makefile (tests): Add tst-stack2.
5899 * tst-stack2.c: New test.
5900 * tst-stack1.c: Include limits.h and sys/param.h.
5901 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5903 * pthread_condattr_setpshared.c: Include errno.h.
5904 (pthread_condattr_setpshared): Return EINVAL if pshared
5905 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5907 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5908 defined symbol for entry point to avoid cancellation.
5909 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5911 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5913 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5915 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5917 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5919 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5920 __close_nocancel, __read_nocancel, __write_nocancel,
5921 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5922 libpthread.so or librt.so, define to corresponding function
5923 without _nocancel suffix.
5924 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5925 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5926 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5928 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5930 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5932 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5933 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5935 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5936 in subsections has a symbol associated with it.
5938 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5939 defined symbol for entry point to avoid cancellation.
5940 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5942 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5944 * Makefile (tests): Add tst-tls5.
5945 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5946 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5947 ($(objpfx)tst-tls5): New.
5948 ($(objpfx)tst-tls6.out): Likewise.
5949 (tests): Depend on $(objpfx)tst-tls6.out.
5950 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5951 (do_test): Check pthread_self () return value alignment.
5952 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5953 (tf): Check pthread_self () return value alignment.
5954 * tst-tls5.c: New test.
5956 * tst-tls5mod.c: New.
5957 * tst-tls5moda.c: New.
5958 * tst-tls5modb.c: New.
5959 * tst-tls5modc.c: New.
5960 * tst-tls5modd.c: New.
5961 * tst-tls5mode.c: New.
5962 * tst-tls5modf.c: New.
5963 * tst-tls6.sh: New test.
5965 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5966 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5967 * init.c (pthread_functions): Initialize them.
5968 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5969 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5970 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5971 pthread_cond_timedwait@@GLIBC_2.3.2.
5973 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5975 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5976 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5977 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5978 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5979 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5980 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5982 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5984 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5985 _POSIX_THREAD_PRIORITY_SCHEDULING.
5986 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5988 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5990 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5991 nested function, use static inline function from libio.h.
5992 Code by Richard Henderson.
5994 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5997 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5999 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6000 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6001 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6002 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6003 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6004 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6005 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6006 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6007 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6008 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6009 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6010 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6011 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6012 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6013 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6014 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6015 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6016 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6017 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6018 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6019 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6020 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6021 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6022 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6023 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6024 * sysdeps/sparc/tls.h: New file.
6025 * sysdeps/sparc/tcb-offsets.sym: New file.
6026 * sysdeps/sparc/Makefile: New file.
6027 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6028 * init.c [__sparc__] (__NR_set_tid_address): Define.
6030 2003-08-29 Jakub Jelinek <jakub@redhat.com>
6032 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6033 _IO_release_lock): Define.
6035 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
6037 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6038 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
6040 2003-08-27 Ulrich Drepper <drepper@redhat.com>
6042 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6043 (__pthread_cleanup_class): Add missing return types of member
6046 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
6048 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6049 (lll_mutex_unlock_force): Add memory barrier between store and futex
6052 2003-08-25 Ulrich Drepper <drepper@redhat.com>
6054 * tst-cancel4.c (do_test): Also unlink tempfname and remove
6055 tempmsg in first loop.
6057 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6059 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6060 _POSIX_THREAD_PRIORITY_SCHEDULING.
6061 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6063 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6065 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6066 (__rtld_lock_default_lock_recursive,
6067 __rtld_lock_default_unlock_recursive): Define.
6068 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6069 __rtld_lock_unlock_recursive): Define using
6070 GL(_dl_rtld_*lock_recursive).
6071 * init.c (__pthread_initialize_minimal_internal): Initialize
6072 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6073 Lock GL(_dl_load_lock) the same number of times as
6074 GL(_dl_load_lock) using non-mt implementation was nested.
6076 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6077 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6079 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6081 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6084 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6086 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6088 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6090 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6091 to first syscall error check. Move syscall error check for tkill
6092 into __ASSUME_CLONE_STOPPED #ifdef.
6094 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6096 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6097 is not defined, do explicit synchronization.
6098 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6099 is not defined also unlock pd->lock for non-debugging case in case
6101 * pthread_create.c (start_thread): Always get and release pd->lock
6102 if __ASSUME_CLONE_STOPPED is not defined.
6103 (start_thread_debug): Removed. Adjust users.
6104 * allocatestack.c (allocate_stack): Always initialize lock if
6105 __ASSUME_CLONE_STOPPED is not defined.
6106 * Makefile (tests): Add tst-sched1.
6107 * tst-sched1.c: New file.
6109 * sysdeps/pthread/createthread.c (do_clone): Only use
6110 sched_setschduler and pass correct parameters.
6112 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6114 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6115 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6116 PTHREAD_STACK_MIN in comments.
6118 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6120 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6121 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6123 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6124 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6125 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6126 (__pthread_cleanup_upto): Fix prototype.
6127 (_longjmp_unwind): Adjust caller.
6128 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6129 Change second argument to const struct pointer.
6130 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6131 * tst-sem9.c (main): Likewise.
6132 * unwind.c: Include string.h for strlen prototype.
6134 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6136 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6137 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6138 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6140 Patch by Nicholas Miell <nmiell@attbi.com>.
6142 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6144 * init.c (__pthread_initialize_minimal_internal): Initialize
6145 GL(dl_init_static_tls).
6146 * pthreadP.h (__pthread_init_static_tls): New prototype.
6147 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6149 * Makefile (tests): Add tst-tls4.
6150 (modules-names): Add tst-tls4moda and tst-tls4modb.
6151 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6152 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6154 * tst-tls4.c: New file.
6155 * tst-tls4moda.c: New file.
6156 * tst-tls4modb.c: New file.
6158 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6160 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6161 before __timer_dealloc.
6162 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6163 Don't call list_unlink.
6165 2003-07-29 Roland McGrath <roland@redhat.com>
6167 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6169 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6171 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6172 Don't reuse struct aiocb A if it failed.
6173 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6174 not just one byte, as that does not block.
6176 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6178 * sysdeps/pthread/unwind-resume.c: New file.
6179 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6180 unwind-resume in csu subdir.
6181 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6183 (librt-sysdep_routines, librt-shared-only-routines): Add
6185 * sysdeps/pthread/rt-unwind-resume.c: New file.
6186 * unwind-forcedunwind.c: New file.
6187 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6188 (libpthread-shared-only-routines): Likewise.
6189 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6190 * pthreadP.h (pthread_cancel_init): New prototype.
6191 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6193 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6194 attr argument const struct pthread_attr *.
6196 * res.c (__res_state): Return __resp.
6197 * descr.h: Include resolv.h.
6198 (struct pthread): Add res field.
6199 * pthread_create.c: Include resolv.h.
6200 (start_thread): Initialize __resp.
6201 * Makefile (tests): Add tst-_res1.
6202 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6203 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6204 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6206 * tst-_res1.c: New file.
6207 * tst-_res1mod1.c: New file.
6208 * tst-_res1mod2.c: New file.
6210 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6212 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6214 * Makefile: Define various *-no-z-defs variables for test DSOs
6215 which has undefined symbols.
6217 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6219 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6220 Retry if the stwcx fails to store once_control.
6222 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6224 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6225 pthread_attr_setaffinity.
6226 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6227 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6228 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6229 * pthread_attr_destroy.c: Free cpuset element if allocated.
6230 * pthread_create.c: Pass iattr as additional parameter to
6232 * sysdeps/pthread/createthread.c: If attribute is provided and
6233 a new thread is created with affinity set or scheduling parameters,
6234 start thread with CLONE_STOPPED.
6235 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6236 pthread_attr_setaffinity.
6237 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6240 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6242 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6244 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6246 * sysdeps/pthread/configure.in: Require CFI directives also for
6249 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6251 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6254 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6256 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6258 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6259 registers as variables. Call __pthread_mutex_unlock_usercnt.
6260 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6261 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6262 not self pointer in __writer. Compare with TID to determine
6264 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6265 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6267 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6269 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6270 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6271 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6272 macros also when compiling librt.
6274 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6276 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6277 -fasynchronous-unwind-tables.
6278 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6279 (PSEUDO): Add cfi directives.
6280 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6282 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6285 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6287 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6288 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6289 * unwind.c (__pthread_unwind_next): Add hidden_def.
6290 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6292 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6293 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6294 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6296 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6297 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6299 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6300 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6301 __pthread_unregister_cancel and __pthread_unwind_next.
6303 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6305 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6306 different symbol for the cancellation syscall wrapper and
6307 non-cancellation syscall wrapper.
6308 (PSEUDO_END): Define.
6310 2003-07-05 Richard Henderson <rth@redhat.com>
6312 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6313 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6314 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6315 return actual return value from the syscall, not 0.
6317 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6319 * descr.h (struct pthread): Add pid field.
6320 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6321 (__reclaim_stacks): Likewise.
6322 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6323 also check for PID of the signal source.
6324 (__pthread_initialize_minimal_internal): Also initialize pid field
6325 of initial thread's descriptor.
6326 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6327 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6328 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6329 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6330 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6332 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6334 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6335 Fix use of parameter.
6336 (__libc_cleanup_pop): Likewise.
6338 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6340 * init.c (sigcancel_handler): Change parameters to match handler
6341 for SA_SIGACTION. Check signal number and code to recognize
6342 invalid invocations.
6344 2003-07-03 Roland McGrath <roland@redhat.com>
6346 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6347 Apply sizeof (struct pthread) bias to r13 value.
6349 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6351 * sysdeps/pthread/configure.in: Require CFI directives.
6353 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6355 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6356 libpthread compilation.
6357 * unwind.c (__pthread_unwind): Add hidden_def.
6358 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6360 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6362 * libc-cancellation.c (__libc_cleanup_routine): Define.
6363 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6364 (__pthread_cleanup_pop): Define.
6366 2003-07-01 Richard Henderson <rth@redhat.com>
6368 * sysdeps/alpha/elf/pt-initfini.c: New file.
6369 * sysdeps/alpha/pthread_spin_lock.S: New file.
6370 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6371 * sysdeps/alpha/pthreaddef.h: New file.
6372 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6373 * sysdeps/alpha/tls.h: New file.
6374 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6375 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6376 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6377 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6378 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6379 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6380 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6381 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6382 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6383 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6385 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6387 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6388 cleanup support and unwind info.
6390 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6392 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6393 Use correct cleanup handler registration. Add unwind info.
6394 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6395 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6396 * tst-once3.c: Add cleanup handler and check it is called.
6397 * tst-once4.c: Likewise.
6398 * tst-oncex3.c: New file.
6399 * tst-oncex4.c: New file.
6400 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6402 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6404 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6406 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6408 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6409 (tf_msgsnd): Likewise.
6411 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6412 premature returns a bit more.
6414 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6416 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6417 definition to the front.
6419 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6420 the cleanup functions to make the names unique. Fix dwarf opcode
6422 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6423 functions to make the names unique. Fix CFA offset for two blocks.
6425 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6427 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6428 missing closing braces.
6429 Patch by Christophe Saout <christophe@saout.de>.
6431 2003-06-24 Roland McGrath <roland@redhat.com>
6433 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6435 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6437 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6438 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6440 * pthreadP.h: Declare __find_thread_by_id.
6441 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6442 * pthread_clock_gettime.c: Allow using other thread's clock.
6443 * pthread_clock_settime.c: Likewise.
6444 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6445 * Makefile: Add rules to build and run tst-clock2.
6446 * tst-clock2.c: New file.
6448 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6450 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6451 to use exception-based cleanup handler.
6452 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6454 * tst-cond8.c (ch): Announce that we are done.
6456 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6458 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6459 Also test aio_suspend with timeout value.
6461 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6463 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6464 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6467 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6468 (__pthread_mutex_lock_internal): Likewise.
6469 (__pthread_mutex_unlock_internal): Likewise.
6470 (__pthread_mutex_unlock_usercnt): Declare.
6471 * pthread_mutex_destroy.c: Always fail if used in any way.
6472 * pthread_mutex_init.c: Update comment.
6473 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6474 * pthread_mutex_timedlock.c: Adjust __nusers.
6475 * pthread_mutex_trylock.c: Adjust __nusers.
6476 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6477 and public interfaces are wrapper with pass additional parameter.
6478 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6480 * tst-mutex8.c: New file.
6481 * Makefile (tests): Add tst-mutex8.
6482 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6483 __pthread_mutex_unlock_usercnt.
6484 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6485 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6487 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6488 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6489 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6490 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6492 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6493 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6494 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6495 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6496 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6498 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6499 * pthread_mutex_timedlock.c: Likewise.
6500 * pthread_mutex_trylock.c: Adjust __nusers.
6501 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6502 * tst-mutex9.c: New file.
6503 * Makefile (tests): Add tst-mutex9.
6504 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6505 * sysdeps/ia64/tls.h: Likewise.
6506 * sysdeps/powerpc/tls.h: Likewise.
6507 * sysdeps/s390/tls.h: Likewise.
6508 * sysdeps/sh/tls.h: Likewise.
6509 * sysdeps/x86_64/tls.h: Likewise.
6510 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6511 Change type of __owner.
6512 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6513 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6514 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6515 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6516 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6518 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6520 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6521 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6523 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6524 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6525 instead of nr to lll_futex_wake. Only set errno and return -1
6528 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6529 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6530 return actual return value from the syscall, not 0.
6532 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6534 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6535 find a random value.
6536 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6539 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6540 compat_timer_settime.
6541 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6542 compat_timer_gettime.
6543 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6544 compat_timer_getoverrun.
6545 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6546 compat_timer_delete.
6548 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6549 error-checking mutex detect busy mutexes.
6551 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6553 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6554 Add ax to clobber list.
6555 (lll_mutex_cond_lock): Likewise.
6556 (lll_mutex_unlock): Likewise.
6557 (lll_lock): Likewise.
6558 (lll_unlock): Likewise.
6560 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6561 * tst-cancel18.c: New file.
6562 * tst-cancelx18.c: New file.
6564 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6567 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6568 * tst-cancel17.c: New file.
6569 * tst-cancelx17.c: New file.
6571 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6572 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6573 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6575 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6577 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6579 * sysdeps/pthread/createthread.c (create_thread): Set
6580 header.multiple_threads unconditionally.
6581 * allocatestack.c (allocate_stack): Likewise.
6582 * descr.h (struct pthread): Add header.multiple_threads
6584 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6585 Define for librt. #error if neither libpthread, libc nor librt.
6586 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6588 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6589 CDISABLE): Likewise.
6590 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6591 CDISABLE): Likewise.
6592 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6593 CDISABLE): Likewise.
6594 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6595 CDISABLE): Likewise. Access header.multiple_threads outside of
6596 libc and libpthread.
6597 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6599 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6600 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6602 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6604 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6605 Also test early cancellation before the thread reaches the cancellation
6608 * Makefile: Compile forward.c with exceptions.
6610 * sysdeps/unix/sysv/linux/sleep.c: New file.
6612 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6614 * Makefile: Add CFLAGS definition to compile function wrappers
6615 duplicated from libc with exceptions.
6616 * tst-cancel4.c: Also check cancellation handlers.
6618 * Makefile: Add rules to build and run tst-cancel16 and
6619 tst-cancelx16. Add missing CFLAGS definitions.
6620 * tst-cancel16.c: New file.
6621 * tst-cancelx16.c: New file.
6623 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6625 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6626 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6627 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6628 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6630 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6631 (LIBC_CANCEL_RESET): Likewise.
6632 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6633 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6635 (CFLAGS-libcrt-cancellation.c): Define.
6636 * sysdeps/pthread/librt-cancellation.c: New file.
6637 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6638 macros also when compiling librt.
6639 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6640 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6641 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6642 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6643 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6644 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6645 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6647 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6648 compat_timer_create.
6650 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6652 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6654 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6656 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6657 Add libc_hidden_def.
6659 2003-06-13 Roland McGrath <roland@redhat.com>
6661 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6662 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6664 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6666 * allocatestack.c (queue_stack): Always inline.
6667 * ptreadhP.h (__do_cancel): Likewise.
6669 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6671 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6674 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6676 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6677 (__pthread_cond_signal): Remove incorrect second addition for
6680 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6682 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6683 (__pthread_cond_signal): Use correct futex pointer in
6684 __lll_mutex_lock_wait call.
6686 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6687 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6689 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6691 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6693 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6696 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6697 hand-written CFI generation code. Since ENTRY/END also initiated
6698 CFI frames this caused two CFI sets to be generated.
6700 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6702 * cleanup_routine.c: New file.
6703 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6704 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6706 * Makefile (libpthread-routines): Add cleanup_routine.
6707 Add more CFLAGS variables to compile with exceptions. Add comments
6708 why which file needs unwind tables.
6709 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6711 * tst-cancelx1.c: New file.
6712 * tst-cancelx2.c: New file.
6713 * tst-cancelx3.c: New file.
6714 * tst-cancelx4.c: New file.
6715 * tst-cancelx5.c: New file.
6716 * tst-cancelx6.c: New file.
6717 * tst-cancelx7.c: New file.
6718 * tst-cancelx8.c: New file.
6719 * tst-cancelx9.c: New file.
6720 * tst-cancelx10.c: New file.
6721 * tst-cancelx11.c: New file.
6722 * tst-cancelx12.c: New file.
6723 * tst-cancelx13.c: New file.
6724 * tst-cancelx14.c: New file.
6725 * tst-cancelx15.c: New file.
6726 * tst-cleanupx0.c: New file.
6727 * tst-cleanupx0.expect: New file.
6728 * tst-cleanupx1.c: New file.
6729 * tst-cleanupx2.c: New file.
6730 * tst-cleanupx3.c: New file.
6732 * tst-cleanup0.c: Make standard compliant.
6733 * tst-cleanup1.c: Likewise.
6735 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6736 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6737 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6738 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6739 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6740 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6741 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6743 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6744 * tst-cancel12.c: New file.
6745 * tst-cancel13.c: New file.
6746 * tst-cancel14.c: New file.
6747 * tst-cancel15.c: New file.
6748 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6751 * tst-cancel1.c: Add some comments.
6753 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6756 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6758 * Makefile (CFLAGS-pthread_cancel.c): Define.
6760 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6762 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6763 Change type of __writer element to int.
6764 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6765 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6766 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6767 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6768 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6769 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6770 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6771 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6772 Compare with TID to determine deadlocks.
6773 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6774 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6775 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6776 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6777 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6778 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6780 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6782 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6783 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6784 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6786 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6788 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6789 * Makefile (tests): Add tst-rwlock12.
6790 * tst-rwlock12.c: New file.
6792 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6794 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6795 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6796 Remove bogus hidden_proto.
6797 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6799 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6800 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6801 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6802 ___lll_mutex_timedlock): Likewise.
6804 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6807 (__pthread_cond_signal): Add some code to eventually handle
6810 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6812 * Makefile (tests): Add tst-exec4.
6813 (tst-exec4-ARGS): Define.
6814 * tst-exec4.c: New file.
6816 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6818 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6819 Also fail if tv_nsec < 0.
6820 (__lll_timedwait_tid): Likewise.
6821 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6822 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6824 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6826 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6828 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6830 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6832 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6835 * Makefile (tests): Add tst-sem8 and tst-sem9.
6836 * tst-sem8.c: New file.
6837 * tst-sem9.c: New file.
6838 * sem_open.c: Fix creation of in_use record if the file exists but
6841 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6844 * sysdeps/pthread/timer_create.c (timer_create): In case
6845 evp==NULL, assign timer ID to sival_ptr.
6847 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6848 struct pthread_unwind_buf *.
6849 (struct pthread): Likewise for cleanup_jmp_buf element.
6851 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6852 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6853 * unwind.c (__pthread_unwind_next): Likewise.
6855 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6857 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6858 (lll_futex_timed_wait): Use int for futex value parameter.
6859 (lll_futex_wake): Likewise.
6860 (lll_futex_requeue): Likewise.
6862 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6863 Replace one memory operation with one register operation.
6865 * tst-join4.c (do_test): Fix error message.
6867 * tst-rwlock6.c (do_test): Use correct format specifier.
6869 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6870 (__lll_mutex_lock_wait): Replace one memory operation with one
6872 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6873 (__lll_mutex_lock_wait): Likewise.
6875 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6876 (__lll_mutex_cond_lock): Add one to value parameter of
6877 __lll_lock_wait to reflect reality in the futex syscall.
6878 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6879 (lll_mutex_cond_lock): Likewise.
6881 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6883 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6885 (lll_mutex_cond_lock): Define.
6887 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6889 * Makefile (tests): Add tst-signal6.
6890 * tst-signal6.c: New file.
6892 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6893 (__lll_mutex_unlock_force): New function
6894 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6896 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6897 (__lll_mutex_unlock_force): New function.
6898 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6900 * tst-rwlock7.c (do_test): Use correct format specifier.
6902 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6903 Find break parameter in correct asm argument.
6905 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6907 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6909 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6911 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6913 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6914 lll_futex_requeue, lll_mutex_unlock_force): Define.
6916 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6918 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6919 (pthread_cond_t): Add __mutex.
6920 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6921 lll_futex_requeue, lll_mutex_unlock_force): Define.
6923 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6925 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6926 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6928 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6930 (lll_futex_wait, lll_futex_wake): Define.
6931 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6932 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6933 FUTEX_REQUEUE instead of FUTEX_WAIT.
6934 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6935 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6936 mutex which was used in condvar structure. Call
6937 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6938 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6940 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6941 include tcb-offsets.h. Read wakeup value in locked region.
6942 Use the value of gbr register as THREAD_ID.
6943 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6944 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6945 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6947 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6950 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6952 * sysdeps/pthread/pthread_cond_broadcast.c
6953 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6955 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6957 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6958 typo in register name.
6959 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6960 correctly. Actually use requeue. Little optimization.
6961 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6962 mutex address early. Handle cancellation state as 32-bit value.
6963 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6964 Remove unnecessary label.
6966 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6968 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6969 instead of FUTEX_WAIT.
6970 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6971 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6973 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6974 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6975 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6976 used in condvar structure. Call __pthread_mutex_cond_lock instead
6977 of __pthread_mutex_lock_internal.
6978 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6979 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6980 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6981 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6982 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6983 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6984 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6985 Add pthread_mutex_cond_lock.
6986 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6987 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6988 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6989 lll_mutex_cond_lock.
6990 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6991 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6992 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6994 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6995 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6997 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6998 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7000 * pthreadP.h: Declare __pthread_mutex_cond_lock.
7001 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7002 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
7003 macro don't define aliases.
7005 * cancellation.c: Remove __pthread_enable_asynccancel_2.
7006 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7007 * sysdeps/pthread/pthread_cond_timedwait.c: Use
7008 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7009 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7010 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7011 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7012 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7013 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7015 2003-05-17 Ulrich Drepper <drepper@redhat.com>
7017 * sem_open.c: Fix one endless loop. Implement correct semantics
7018 wrt opening the same semaphore more then once.
7019 * sem_close.c: Adjust for sem_open change.
7020 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
7021 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7022 * Makefile (tests): Add tst-sem7.
7023 * tst-sem7.c: New file.
7025 2003-05-16 Roland McGrath <roland@redhat.com>
7027 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7028 uninitialized variable braino.
7030 2003-05-16 Ulrich Drepper <drepper@redhat.com>
7032 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7033 test for syscall availability.
7035 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7036 __no_posix_timers to -1 if the syscalls don't exist.
7038 * pthread_join.c (pthread_join): Set tid field of the joined
7039 thread to -1. This isn't necessary but helps to recognize some
7040 error conditions with almost no cost.
7042 * allocatestack.c (FREE_P): Also negative values indicate an
7045 * unwind.c: Include <unistd.h>.
7047 2003-05-14 Ulrich Drepper <drepper@redhat.com>
7049 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7051 2003-05-14 Jakub Jelinek <jakub@redhat.com>
7053 * Makefile (crti-objs, crtn-objs): New variables.
7054 (omit-deps, extra-objs): Add crtn.
7055 ($(objpfx)libpthread.so): Depend on both crti and crtn
7056 and links to them in multidir.
7057 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7059 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7061 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7062 (lll_mutex_unlock): Use atomic_exchange_rel.
7064 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7066 * cond-perf.c (cons): Add missing locking around setting of alldone.
7068 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7070 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7072 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7074 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7076 * tst-sem6.c: New file.
7077 * Makefile (tests): Add tst-sem6.
7079 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7080 Use atomic_exchange_rel instead of atomic_exchange.
7081 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7084 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7085 code for lll_futex_wait and lll_futex_wake in static apps. Use
7086 vsyscall is possible.
7088 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7089 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7090 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7091 pthread_setaffinity_np.
7092 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7093 and pthread_setaffinity_np.
7094 * Makefile (libpthread-routines): Add pthread_getaffinity and
7095 pthread_setaffinity.
7097 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7098 use it in case mmap to allocate the stack fails.
7099 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7100 ARCH_MAP_FLAGS here.
7101 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7104 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7106 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7107 handler implementation. It is now lockless in fork().
7108 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7109 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7110 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7111 declare the __fork_*_lists.
7112 (struct fork_handler): Include pointers to all three functions.
7113 Add next, refcntr and need_signal elements.
7114 (__fork_handlers): New declaration.
7115 (__register_atfork_malloc): Remove declaration.
7116 (HAVE_register_atfork_malloc): Remove definition.
7117 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7118 __pthread_child_handler variable.
7119 (__libc_pthread_init): Use __register_atfork instead of explicitly
7121 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7123 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7125 * unwind.c (unwind_cleanup): Print error message and then abort. This
7126 function must never be reached.
7128 * cond-perf.c: New file.
7130 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7132 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7134 2003-05-04 Roland McGrath <roland@redhat.com>
7136 * Makefile ($(objpfx)../libc.so): New target.
7138 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7140 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7141 (pthread_condattr_t): Size is only an int, don't use long for
7143 (pthread_mutexattr_t): Likewise.
7144 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7145 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7146 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7148 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7150 * sysdeps/i386/tls.h: Define THREAD_ID.
7151 * sysdeps/ia64/tls.h: Likewise.
7152 * sysdeps/powerpc/tls.h: Likewise.
7153 * sysdeps/s390/tls.h: Likewise.
7154 * sysdeps/sh/tls.h: Likewise.
7155 * sysdeps/x86_64/tls.h: Likewise.
7156 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7158 * pthread_mutex_timedlock.c: Likewise.
7159 * pthread_mutex_trylock.c: Likewise.
7160 * pthread_mutex_unlock.c: Likewise.
7161 * pthread_rwlock_trywrlock.c: Likewise.
7162 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7163 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7164 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7165 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7167 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7170 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7172 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7173 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7174 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7175 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7176 Make __align long long instead of long.
7177 (pthread_rwlock_t): Formatting.
7178 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7179 (pthread_rwlock_t): Formatting.
7180 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7181 (pthread_cond_t): Make __align long long instead of long.
7182 (pthread_rwlock_t): Move __flags field to the same position as in
7185 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7187 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7188 * tst-rwlock7.c (do_test): Likewise.
7190 2003-04-26 Roland McGrath <roland@redhat.com>
7192 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7194 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7196 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7197 sizeof (struct pthread).
7198 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7200 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7202 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7204 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7206 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7208 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7210 (NO_TLS_OFFSET): Define.
7211 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7212 add TLS_TCB_SIZE unnecessarily.
7214 2003-04-22 Roland McGrath <roland@redhat.com>
7216 * Makeconfig (shared-thread-library): Reverse link order to work
7219 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7221 * semaphore.h: Fix typo in comment.
7223 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7225 * sysdeps/pthread/sigfillset.c: New file.
7227 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7228 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7229 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7230 * sysdeps/pthread/sigaction.c: Likewise.
7231 * sysdeps/pthread/sigprocmask.c: New file.
7232 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7234 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7235 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7238 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7240 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7241 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7243 * sysdeps/unix/sysv/linux/unregister-atfork.c
7244 (__unregister_atfork): Don't free memory not allocated dynamically.
7246 * semaphore.h: Remove __THROW marker from cancellation points.
7247 * nptl/sysdeps/pthread/pthread.h: Likewise.
7249 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7251 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7252 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7255 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7257 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7259 2003-04-15 Roland McGrath <roland@redhat.com>
7261 * forward.c (__pthread_unwind): Tweak to avoid warning.
7263 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7265 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7267 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7269 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7270 overflow CFA advance instructions.
7271 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7273 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7275 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7276 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7277 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7280 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7281 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7283 DW_CFA_advance_loc for .Laddl-.Lsubl.
7285 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7287 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7288 position-independent unwind data for static libraries.
7289 Add missing unwind info. Add comments.
7291 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7292 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7293 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7294 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7296 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7298 * Makefile: Make sure all cancellation points are compiled with
7299 exception and asynchronous unwind tables.
7301 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7302 which mishandles loading of global object addresses in PIC.
7303 (THREAD_SETMEM_NC): Likewise.
7305 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7307 * pthread.h: Define new data structure for cleanup buffer. Declare
7308 new cleanup handler interfaces.
7309 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7310 (struct pthread): Add cleanup_jmp_buf pointer. Define
7311 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7312 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7313 it. Declare old cleanup handler installation functions.
7314 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7316 * cleanup_defer.c: Likewise.
7317 * cleanup_compat.c: New file. Old cleanup code.
7318 * cleanup_def_compat.c: New file. Old cleanup code.
7319 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7320 if own thread descriptor.
7321 * unwind.c: New file.
7322 * forward.c: Add __pthread_unwind.
7323 * init.c (pthread_functions): Add __pthread_unwind.
7324 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7325 Add ptr___pthread_unwind.
7326 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7327 and unwind function.
7328 * Makefile (libpthread-routines): Add cleanup_compat,
7329 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7330 table generation if necessary.
7331 * version.c: Record whether unwind support is compiled in.
7332 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7333 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7335 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7336 complication to generate unwind information for syscall wrappers.
7337 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7338 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7339 __cleanup_fct_attribute.
7341 * Makefile: Add rules to build and run tst-cleanup0.
7342 * tst-cleanup0.c: New file.
7343 * tst-cleanup0.expect: New file.
7345 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7346 caller. Optimize to avoid often unecessary local variable.
7348 2003-04-11 Roland McGrath <roland@redhat.com>
7350 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7351 sets variable `multidir'; include that.
7352 (generated): Add it.
7353 ($(objpfx)$(multidir)/crti.o): New target.
7354 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7356 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7358 * tst-attr2.c (do_test): Add cast to avoid warning.
7359 * tst-mutex4.c (do_test): Likewise.
7361 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7363 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7366 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7368 * Makefile (tests): Add tst-detach1.
7369 * tst-detach1.c: New file.
7371 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7373 * sysdeps/pthread/pthread.h: Remove duplicate
7374 pthread_cleanup_{push,pop} definitions.
7376 * tst-barrier2.c: Eliminate warnings.
7377 * tst-cancel4.c: Likewise.
7378 * tst-cond4.c: Likewise.
7379 * tst-cond6.c: Likewise.
7380 * tst-detach1.c: Likewise.
7381 * tst-rwlock4.c: Likewise.
7382 * tst-rwlock6.c: Likewise.
7383 * tst-rwlock7.c: Likewise.
7384 * tst-sem3.c: Likewise.
7385 * tst-spin2.c: Likewise.
7386 * tst-umask1.c: Likewise.
7388 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7390 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7392 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7394 * descr.h (struct pthread): Move cancelhandling member to the front.
7396 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7398 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7399 malloc_parent, and malloc_child statically.
7400 (__register_atfork_malloc): New function.
7401 (free_mem): Don't free any of the malloc_* variables on the list.
7402 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7403 Define HAVE_register_atfork_malloc.
7405 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7407 * sysdeps/pthread/createthread.c (create_thread): Add some more
7408 comments explaining when to set multiple_threads and when not.
7410 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7411 THREAD_ATOMIC_BIT_SET if not already defined.
7412 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7413 THREAD_ATOMIC_BIT_SET:
7414 * sysdeps/x86_64/tls.h: Likewise.
7415 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7416 THREAD_ATOMIC_CMPXCHG_VAL.
7417 (_pthread_cleanup_pop_restore): Likewise.
7418 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7419 (__pthread_enable_asynccancel_2): Likewise.
7420 (__pthread_disable_asynccancel): Likewise.
7421 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7422 (__libc_disable_asynccancel): Likewise.
7423 * init.c (sigcancel_handler): Likewise.
7424 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7425 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7427 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7429 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7430 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7431 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7432 * Makefile (tests): Add tst-cancel11.
7433 * tst-cancel11.c: New file.
7435 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7437 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7438 round, not the first. Use specific_used flag instead of local
7439 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7440 (__free_tcb): Don't call deallocate_tsd here.
7441 (start_thread): Call deallocate_tsd here.
7442 * pthread_setspecific.c: Set specific_used flag really only when
7444 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7445 * tst-tsd3.c: New file.
7446 * tst-tsd4.c: New file.
7448 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7450 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7451 Use atomic_exchange_and_add instead of __lll_add.
7452 (__lll_mutex_timedlock): Likewise.
7453 Patch by Ian Wienand.
7455 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7457 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7458 (SINGLE_THREAD_P): Fix typo.
7459 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7461 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7463 * Makefile (tests): Add tst-align.
7464 * tst-align.c: New file.
7465 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7467 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7470 * tst-tsd2.c: Add casts to avoid warnings.
7472 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7474 * descr.h (struct pthread): Move most often used elements to the front.
7476 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7478 * Makefile (libpthread-routines): Add pthread_atfork.
7479 (libpthread-static-only-routines): Add pthread_atfork.
7481 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7483 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7485 (INSTALL_DTV): Add parens.
7486 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7487 Use passed descr instead of THREAD_SELF.
7488 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7489 (__lll_mutex_timedlock_wait): Correct expected value after
7491 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7492 Release lock before waking up the waiters.
7493 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7494 criteria. Reorderstruct passed to cleanup handler. Fix
7495 handling of cancellation and failung pthread_mutex_unlock call.
7496 Use __pthread_enable_asynccancel_2 instead of
7497 __pthread_enable_asynccancel.
7498 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7499 Return result of lock re-get if it fails.
7500 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7501 for __pthread_cleanup_push.
7502 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7503 completely broken rwlock implementation.
7504 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7505 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7506 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7507 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7508 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7509 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7510 versioned_symbol macro.
7511 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7512 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7514 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7516 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7517 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7519 (struct timer): Remove th and bar field.
7520 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7521 debugging code. Create only one helper thread.
7522 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7524 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7525 Renamed. Define statically. Use thread info from siginfo.
7526 (__helper_once): New variable.
7527 (__helper_tid): New variable.
7528 (__reset_helper_control): New function.
7529 (__start_helper_thread): New function.
7531 * pthread_create.c (start_thread): Don't use setjmp inside
7532 __builtin_expect to work around gcc bug.
7534 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7535 timer_delete syscall fails, but not with ENOSYS, set
7538 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7539 (timer_settime): Fix typo.
7540 * sysdeps/unix/sysv/linux/timer_getoverr.c
7541 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7543 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7545 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7546 offset of cleanupbuf.__prev.
7548 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7550 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7553 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7555 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7556 NULL provide default definition to syscall.
7558 2003-03-25 Roland McGrath <roland@redhat.com>
7560 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7561 (timer_id2ptr): Fix typo.
7563 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7565 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7566 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7567 * sysdeps/ia64/pthreaddef.h: Likewise.
7568 * sysdeps/powerpc/pthreaddef.h: Likewise.
7569 * sysdeps/s390/pthreaddef.h: Likewise.
7570 * sysdeps/sh/pthreaddef.h: Likewise.
7571 * sysdeps/x86_64/pthreaddef.h: Likewise.
7572 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7573 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7575 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7576 SIGTIMER is not unblocked.
7577 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7579 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7581 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7582 pass pointer through as ID.
7583 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7584 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7585 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7586 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7587 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7588 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7589 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7590 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7591 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7592 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7593 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7594 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7595 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7596 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7597 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7598 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7599 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7600 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7601 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7602 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7603 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7604 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7605 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7606 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7607 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7608 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7609 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7610 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7611 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7612 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7613 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7614 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7615 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7617 * pthreadP.h: Remove FRAME_LEFT definition.
7618 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7619 already left frame. Programs which have this problem are not POSIX
7621 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7623 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7625 * sysdeps/pthread/tst-timer.c: Check return values of the
7628 2003-03-23 Roland McGrath <roland@redhat.com>
7630 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7631 * tst-tls3mod.c: Likewise.
7632 * tst-tls1.c: Likewise.
7633 * tst-tls2.c: Likewise.
7635 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7638 * tst-join5.c (tf1, tf2): Add a cast.
7640 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7642 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7643 Don't test anything.
7644 * tst-cond4.c: Likewise.
7645 * tst-cond6.c: Likewise.
7646 * tst-flock2.c: Likewise.
7647 * tst-mutex4.c: Likewise.
7648 * tst-rwlock4.c: Likewise.
7649 * tst-signal1.c: Likewise.
7650 * tst-spin2.c: Likewise.
7651 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7653 * tst-mutex4.c: Use test-skeleton.c.
7654 * tst-spin2.c: Likewise.
7655 * tst-sysconf.c: Likewise.
7656 * tst-barrier2.c: Likewise.
7657 * tst-cond4.c: Likewise.
7658 * tst-cond6.c: Likewise.
7659 * tst-rwlock4.c: Likewise.
7660 * tst-unload.c: Likewise.
7661 * tst-flock2.c (do_test): Use return instead of exit.
7663 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7665 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7667 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7669 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7670 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7671 instead of __lll_compare_and_swap.
7672 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7674 Removed definition if __lll_compare_and_swap.
7676 * cancellation.c: Adjust for new form of compare&exchange macros.
7677 * cleanup_defer.c: Likewise.
7679 * libc-cancellation.c: Likewise.
7680 * old_pthread_cond_broadcast.c: Likewise.
7681 * old_pthread_cond_signal.c: Likewise.
7682 * old_pthread_cond_timedwait.c: Likewise.
7683 * old_pthread_cond_wait.c: Likewise.
7684 * pthread_cancel.c: Likewise.
7685 * pthread_create.c: Likewise.
7686 * pthread_detach.c: Likewise.
7687 * pthread_join.c: Likewise.
7688 * pthread_key_delete.c: Likewise.
7689 * pthread_setcancelstate.c: Likewise.
7690 * pthread_setcanceltype.c: Likewise.
7691 * pthread_timedjoin.c: Likewise.
7692 * pthread_tryjoin.c: Likewise.
7693 * sysdeps/pthread/createthread.c: Likewise.
7695 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7697 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7698 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7699 definitions. Replace uses with calls to atomic_* functions.
7700 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7701 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7702 __lll_test_and_set calls with atomic_exchange_and_add and
7703 atomic_exchange calls respectively.
7704 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7705 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7706 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7707 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7708 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7709 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7710 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7712 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7713 returns the old value.
7715 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7717 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7718 int for variable OLDVAL and correct inline assembler contraint.
7719 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7720 type int for variable OLD.
7722 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7724 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7725 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7726 instead of multiple_threads field in the TCB.
7728 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7730 * sysdeps/i386/i686/bits/atomic.h: Removed.
7731 * sysdeps/i386/i586/bits/atomic.h: Removed.
7732 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7733 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7734 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7735 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7736 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7737 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7738 * atomic.h: Removed. Moved to glibc.
7740 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7741 support for clock selection.
7743 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7746 2003-03-18 Roland McGrath <roland@redhat.com>
7748 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7749 Add __lll_rel_instr first. Add memory clobber.
7750 (lll_mutex_unlock): Use __lll_test_and_set.
7751 From Paul Mackerras <paulus@samba.org>.
7753 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7755 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7756 (SINGLE_THREAD_P): Add `header.' prefix.
7757 From Paul Mackerras <paulus@samba.org>.
7759 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7760 pthread_timedjoin_np to ...
7761 (libpthread: GLIBC_2.3.3): ... here.
7762 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7764 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7765 Avoid shadowing VAL variable.
7767 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7770 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7772 * Makefile (tests): Add tst-cond11.
7773 * tst-cond11.c: New file.
7775 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7776 struct passed to cleanup handler to eliminate one more
7778 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7780 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7781 (pthrad_cond_t): Replace __unused field with __clock.
7783 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7784 waken all waiters in cleanup handler.
7785 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7786 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7788 * pthread_condattr_getclock.c: New file.
7789 * pthread_condattr_setclock.c: New file.
7790 * sysdeps/pthread/pthread.h: Declare these new functions.
7791 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7792 * Makefile (libpthread-routines): Add the new functions.
7793 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7794 Renamed field to value. Document use of the bits.
7795 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7797 * pthread_condattr_setpshared.c: Likewise.
7798 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7799 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7800 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7802 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7804 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7805 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7806 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7807 Implement clock selection.
7808 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7809 * pthread-errnos.sym: Add ENOSYS.
7810 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7811 _POSIX_CLOCK_SELECTION.
7812 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7814 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7815 invalid .size directive.
7817 2003-03-17 Roland McGrath <roland@redhat.com>
7819 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7822 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7824 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7825 Use __lll_add instead of spelling it out. Use protected symbol names.
7826 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7828 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7829 Renamed from lll_compare_and_swap. Use new name where necessary.
7830 (__lll_add): Defined.
7831 (__lll_dec_if_positive): Defined.
7832 (__lll_test_and_set): Defined.
7833 * sysdeps/ia64/pthread_spin_init.c: Removed.
7834 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7835 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7836 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7837 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7838 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7839 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7840 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7841 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7842 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7843 __sync_lock_release_si.
7844 Patch by Jakub Jelinek.
7846 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7847 Fix timeout handling.
7848 (__lll_timedwait_tid): Likewise.
7849 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7850 Patch by Jakub Jelinek.
7852 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7854 2003-03-17 Roland McGrath <roland@redhat.com>
7856 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7857 * sysdeps/pthread/pthread_spin_init.c: New file.
7858 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7859 * sysdeps/powerpc/Makefile: New file.
7860 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7861 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7862 * sysdeps/powerpc/pthreaddef.h: New file.
7863 * sysdeps/powerpc/tcb-offsets.sym: New file.
7864 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7865 * sysdeps/powerpc/tls.h: New file.
7866 * sysdeps/powerpc/bits/atomic.h: New file.
7867 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7868 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7869 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7871 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7872 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7873 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7874 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7875 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7876 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7877 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7878 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7879 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7880 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7881 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7882 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7883 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7884 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7885 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7887 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7889 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7890 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7891 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7892 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7893 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7895 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7897 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7898 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7899 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7900 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7901 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7903 2003-03-16 Roland McGrath <roland@redhat.com>
7905 * tst-fork4.c: Include <string.h>.
7906 * tst-signal2.c: Likewise.
7907 * tst-mutex5.c (do_test): exit -> return.
7908 * tst-mutex2.c: Include <stdlib.h>.
7910 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7912 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7913 (__lll_mutex_timedlock_wait): Correct expected value after
7914 spurious wakeup. Otherwise we would never wait again.
7916 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7917 zone versus inline asm stupidity. Use correct instructions.
7919 * tst-rwlock6.c: Add some more status output.
7921 2003-03-15 Roland McGrath <roland@redhat.com>
7923 * sysdeps/pthread/configure.in: New file.
7924 * sysdeps/pthread/configure: New file (generated).
7926 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7928 * allocatestack.c (allocate_stack): Store the exact stack size of
7929 user allocated stacks.
7931 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7933 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7934 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7935 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7936 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7937 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7938 Use `header.' prefix.
7939 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7941 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7943 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7944 __builtin_frame_address, use stack pointer.
7946 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7947 instead of __builtin_frame_pointer.
7949 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7951 * tst-basic1.c (do_test): Add cast to avoid warning.
7952 * tst-basic2.c (do_test): Likewise.
7954 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7955 amount of stack correction.
7957 * tst-fork4.c: Use test-skeleton.c.
7959 2003-03-14 Roland McGrath <roland@redhat.com>
7961 * init.c: Fix typo "#eli" for "#else".
7963 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7965 * allocatestack.c (__stack_user): Use hidden_data_def.
7966 * pthread_create.c (__pthread_keys): Likewise.
7968 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7970 2003-03-14 Roland McGrath <roland@redhat.com>
7972 * tst-fork4.c: New file.
7973 * Makefile (tests): Add it.
7975 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7976 we always define the padding space.
7977 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7978 stopped supporting its own extensions fully.
7979 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7980 struct also called `header', so `header.multiple_threads' is the field
7981 name to use on all machines.
7982 * allocatestack.c (allocate_stack): Use `header.' prefix.
7983 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7984 * pthread_create.c (__pthread_create_2_1): Likewise.
7985 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7986 (THREAD_SELF): Likewise.
7987 * sysdeps/x86_64/tls.h: Likewise.
7988 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7989 (SINGLE_THREAD_P): Likewise.
7990 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7991 (SINGLE_THREAD_P): Likewise.
7992 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7993 (SINGLE_THREAD_P): Likewise.
7995 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7998 2003-03-14 Ulrich Drepper <drepper@redhat.com>
8000 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8001 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8003 * pthread_create.c (start_thread): setjmp is expected to return 0.
8005 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8006 (THREAD_GETMEM_NC): Likewise.
8008 2003-03-13 Ulrich Drepper <drepper@redhat.com>
8010 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8011 and the size of the stack which must be allocated is a multiple,
8012 allocate one more page.
8013 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8014 MULTI_PAGE_ALIASING.
8016 2003-03-13 Roland McGrath <roland@redhat.com>
8018 * pthread_create.c (start_thread): Set EXITING_BIT after the
8019 event-reporting (and destructors), not before.
8021 2003-03-13 Jakub Jelinek <jakub@redhat.com>
8023 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8024 lll_futex_wake): Declare register variables as long int instead of
8025 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8026 Make syscall arguments clobbered by the syscall.
8027 (lll_futex_wait): Define using lll_futex_timed_wait.
8029 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8032 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8035 * allocatestack.c (nptl_ncreated): Only declare if
8036 COLORING_INCREMENT != 0.
8038 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8039 (__libc_enable_asynccancel_2): Remove prototype.
8041 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8042 ctid to match kernel.
8044 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8046 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8047 libc_multiple_threads.
8048 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8049 __libc_multiple_threads to...
8050 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
8052 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8054 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8055 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8057 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8058 (__pthread_once_internal): Define.
8060 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8061 macros instead of .symver directly.
8062 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8063 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8065 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8066 * sysdeps/x86_64/tcb-offsets.sym: New file.
8067 * sysdeps/x86_64/Makefile: New file.
8069 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8070 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8071 to access own pthread_t in TCB.
8072 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8074 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8076 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8078 2003-03-12 Roland McGrath <roland@redhat.com>
8080 * pthread-errnos.sym: New file.
8081 * Makefile (gen-as-const-headers): New variable, list that file.
8082 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8083 header <pthread-errnos.h> instead of defining errno values here.
8084 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8085 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8086 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8087 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8088 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8093 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8094 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8095 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8096 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8097 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8098 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8099 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8100 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8101 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8102 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8103 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8104 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8105 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8106 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8107 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8108 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8109 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8110 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8111 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8112 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8113 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8114 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8115 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8116 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8117 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8118 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8120 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8121 CLONE_CHILD_SETTID worked.
8123 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8125 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8127 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8130 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8131 (pthread_cond_t): Add padding.
8133 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8134 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8135 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8138 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8139 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8140 (__pthread_rwlock_timedrdlock): Likewise.
8141 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8142 (__pthread_rwlock_wrlock): Likewise.
8143 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8144 (__pthread_rwlock_rdlock): Likewise.
8146 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8148 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8149 result of lock re-get if it fails.
8151 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8153 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8154 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8155 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8156 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8157 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8158 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8159 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8160 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8161 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8162 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8164 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8165 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8167 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8168 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8169 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8170 (create_thread): Likewise.
8171 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8172 * init.c (__pthread_initialize_minimal_internal): Initialize
8173 __libc_multiple_threads_ptr if necessary.
8174 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8175 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8176 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8177 __libc_multiple_threads.
8178 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8181 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8182 (THREAD_SETMEM_NC): Likewise.
8184 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8185 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8186 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8187 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8189 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8190 Eliminate one entire instruction.
8192 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8193 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8194 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8195 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8196 instead of __pthread_enable_asynccancel.
8197 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8198 (__pthread_cond_wait): Likewise.
8199 * sysdeps/pthread/pthread_cond_timedwait.c
8200 (__pthread_cond_timedwait): Likewise.
8201 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8203 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8204 (__condvar_cleanup): Wake up all waiters in case we got signaled
8205 after being woken up but before disabling asynchronous
8207 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8208 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8209 (__condvar_cleanup): Likewise.
8211 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8212 Make it an error if architecture has no #if case. Add x86-64.
8214 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8215 pt-initfini.s generation.
8217 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8218 (TLS_INIT_TP): Fix typo.
8220 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8222 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8223 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8225 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8226 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8227 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8228 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8229 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8230 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8231 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8232 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8234 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8236 * sysdeps/pthread/pthread_cond_timedwait.c
8237 (__pthread_cond_timedwait): Return the result of the final
8238 locking. If it succeeds, the regular function return value.
8240 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8241 Return result of the final locking.
8242 * version.c (__nptl_main): Work around problems with the strange
8243 INTERNAL_SYSCALL macro on ppc32.
8244 * init.c (__pthread_initialize_minimal_internal): Unblock
8245 SIGCANCEL in case the parent blocked it.
8246 Reported by Paul Mackerras <paulus@samba.org>.
8248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8249 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8250 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8252 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8254 * sysdeps/pthread/pthread_cond_timedwait.c
8255 (__pthread_cond_timedwait): Unlock and fail if
8256 __pthread_mutex_unlock_internal failed.
8258 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8259 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8261 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8262 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8263 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8264 ALLOCATE_STACK): New macros.
8265 (TLS_TPADJ): New macro.
8266 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8267 (allocate_stack): Handle TLS_DTV_AT_TP and
8268 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8269 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8271 * init.c [__ia64__] (__NR_set_tid_address): Define.
8273 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8274 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8275 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8276 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8277 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8278 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8279 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8280 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8281 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8282 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8283 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8284 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8285 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8286 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8287 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8288 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8289 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8290 * sysdeps/ia64/bits/atomic.h: New file.
8291 * sysdeps/ia64/Makefile: New file.
8292 * sysdeps/ia64/pthread_spin_init.c: New file.
8293 * sysdeps/ia64/pthread_spin_lock.c: New file.
8294 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8295 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8296 * sysdeps/ia64/pthreaddef.h: New file.
8297 * sysdeps/ia64/tcb-offsets.sym: New file.
8298 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8299 * sysdeps/ia64/tls.h: New file.
8301 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8302 to syscall instead of no arguments.
8304 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8306 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8307 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8308 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8309 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8311 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8314 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8316 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8317 lowlevelbarrier.sym.
8318 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8319 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8320 Include lowlevelbarrier.h and don't define offsets locally.
8321 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8323 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8324 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8325 (__lll_mutex_timedlock_wait): Likewise.
8326 (lll_mutex_lock): Adjust asm for that.
8327 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8328 (lll_lock): Adjust asm for operand order change.
8329 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8330 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8332 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8333 Reverse order of parameters.
8334 (__lll_timedwait_tid): Remove regparms attribute.
8335 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8336 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8338 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8339 (__lll_timedwait_tid): Remove one unnecessary instruction.
8341 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8342 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8343 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8346 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8347 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8349 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8352 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8353 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8355 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8356 define LOCK here (if UP is not defined). The actual code is in
8359 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8360 LOCK is already defined. Don't define lll_unlock_wake_cb and
8361 __lll_timedwait_tid for libc.so.
8362 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8363 define LOCK here (if UP is not defined). The actual code is in
8366 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8367 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8368 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8369 instead of lowlevelsem.h.
8370 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8371 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8372 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8374 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8376 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8377 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8378 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8380 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8382 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8385 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8387 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8388 of __libc_locking_needed.
8389 (lll_trylock): Initialize %eax to zero.
8391 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8392 pthread_cond_t definition.
8394 2003-03-10 Roland McGrath <roland@redhat.com>
8396 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8397 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8398 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8399 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8400 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8402 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8403 Instead of setting PD->multiple_threads, set globals
8404 __pthread_multiple_threads and __libc_multiple_threads.
8405 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8406 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8407 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8409 * descr.h (struct pthread): Conditionalize first member on
8410 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8411 containing an anonymous tcbhead_t. Move `list' member out.
8412 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8413 * allocatestack.c: Remove use of `header.data.' prefix.
8414 * pthread_create.c: Likewise.
8415 * init.c (__pthread_initialize_minimal_internal): Likewise.
8416 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8417 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8418 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8419 * sysdeps/x86_64/tls.h: Likewise.
8420 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8421 (SINGLE_THREAD_P): Likewise.
8422 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8423 (SINGLE_THREAD_P): Likewise.
8424 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8425 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8427 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8429 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8431 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8432 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8434 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8435 leftovers from the ia32 code.
8437 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8439 (clear_once_control): Don't load %esi.
8441 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8444 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8446 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8447 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8449 * Makefile (tests): Add tst-cond10.
8450 * tst-cond10.c: New file.
8452 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8454 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8455 * tst-signal3.c (do_test): Likewise.
8456 * tst-sem5.c (do_test): Likewise.
8457 * tst-kill6.c (do_test): Likewise.
8458 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8460 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8462 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8463 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8464 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8465 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8466 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8467 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8468 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8470 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8472 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8473 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8475 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8476 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8477 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8478 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8479 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8481 * allocatestack.c (allocate_stack): If mprotect() fails free the
8484 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8486 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8488 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8489 lll_wake_tid. This was used only to work around kernel limits in
8491 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8492 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8493 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8494 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8496 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8497 (__pthread_initialize_minimal_internal): Change initialization of
8498 __static_tls_align_m1 appropriately.
8499 * pthreadP.h (__static_tls_align_m1): Renamed from
8501 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8502 instead of __static_tls_align-1.
8504 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8506 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8508 * pthread_create.c: Define __pthread_keys using nocommon
8509 attribute, not by placing it explicitly in bss.
8510 Remove DEFINE_DEALLOC definition. Not needed anymore.
8512 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8513 Use it in mmap call to allocate stacks.
8515 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8517 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8518 result of the thread function.
8520 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8522 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8523 version is just fine.
8525 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8526 (__pthread_child_handler): Renamed from pthread_child_handler,
8527 exported, and marked hidden. Change all users.
8528 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8529 free __pthread_child_handler from child list.
8531 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8533 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8535 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8536 Fix handling of cancellation and failing pthread_mutex_unlock call.
8537 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8538 (__pthread_cond_wait): Likewise.
8540 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8541 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8542 lll_futex_timed_wait call.
8543 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8544 (pthread_rwlock_timedwrlock): Likewise.
8546 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8547 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8548 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8550 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8551 check of lll_futex_wake return value.
8553 2003-03-03 Roland McGrath <roland@redhat.com>
8555 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8557 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8558 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8559 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8561 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8563 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8564 error for CPU clocks.
8566 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8567 _POSIX_MONOTONIC_CLOCK.
8568 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8570 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8573 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8575 * descr.h (struct pthread): Move cleanup field to the front.
8577 2003-03-01 Roland McGrath <roland@redhat.com>
8579 * sem_open.c (sem_open): Braino fix.
8581 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8583 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8584 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8585 __pthread_cleanup_pop functionality.
8586 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8588 * descr.h (struct pthread): Move tid field to the front now that
8591 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8592 (__lll_mutex_timedlock_wait): Remove.
8593 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8594 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8595 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8596 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8597 (lll_unlock_wake_cb): Don't save and restore %esi.
8598 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8600 (__lll_timedwait_tid): Add alignment.
8601 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8602 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8604 (__lll_timedwait_tid): Removed.
8605 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8606 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8607 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8608 (pthread_barrier_wait): Don't save, load, and restore %esi for
8610 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8611 (__pthread_cond_signal): Don't save, load, and restore %esi.
8612 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8613 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8614 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8615 Don't save, load, and restore %esi.
8617 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8619 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8620 Release lock before waking up the waiters.
8622 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8624 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8625 (reader_thread): Likewise.
8627 * sysdeps/pthread/pthread_rwlock_unlock.c
8628 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8629 to wake up readers if there are none.
8631 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8632 Release internal lock before wake threads.
8634 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8636 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8637 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8639 * tst-rwlock9.c: Likewise.
8640 * tst-rwlock10.c: New file.
8641 * tst-rwlock11.c: New file.
8643 * Makefile (tests): Add tst-dlsym1.
8644 * tst-dlsym1.c: New file.
8646 * init.c (__pthread_initialize_minimal_internal): Set
8647 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8648 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8650 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8652 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8654 * tst-cond2.c: Fix sychronization with child.
8656 * tst-rwlock8.c (reader_thread): Remove unused variable.
8658 * Makefile: Add rules to build and run tst-tls3.
8659 * tst-tls3.c: New file.
8660 * tst-tls3mod.c: New file.
8662 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8663 * tst-rwlock8.c: New file.
8664 * tst-rwlock9.c: New file.
8665 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8666 complete broken rwlock implementation.
8667 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8669 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8671 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8672 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8673 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8674 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8675 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8676 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8677 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8679 2003-02-23 Roland McGrath <roland@redhat.com>
8681 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8683 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8685 * Makefile (tests): Add tst-context1.
8686 * tst-context1.c: New file.
8688 * Makefile (tests): Add tst-tls1 and tst-tls2.
8689 * tst-tls1.c: New file.
8690 * tst-tls2.c: New file.
8692 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8695 * pthread_create.c (start_thread): Set EXITING_BIT early.
8697 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8698 (THREAD_GETMEM_NC): Likewise.
8700 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8702 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8703 off 3 more bytes by using offset-less instructions when possible.
8705 * Makefile: Add dependency for $(objpfx)version.d.
8707 * eintr.c (eintr_source): Add unnecessary return but the compiler
8710 * tst-kill3.c: Include <unistd.h>.
8712 2003-02-21 Roland McGrath <roland@redhat.com>
8714 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8716 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8718 * Makefile (tests): Add tst-eintr1.
8719 (distribute): Add eintr.c.
8720 * tst-eintr1.c: New file.
8721 * eintr.c: New file.
8723 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8725 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8726 Disallow sending SIGCANCEL.
8728 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8729 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8730 * tst-kill1.c: New file.
8731 * tst-kill2.c: New file.
8732 * tst-kill3.c: New file.
8733 * tst-kill5.c: New file.
8734 * tst-kill6.c: New file.
8735 * tst-basic7.c: Renamed to...
8736 * tst-kill4.c: ...this.
8738 2003-02-21 Roland McGrath <roland@redhat.com>
8740 * Makefile (install-lib-ldscripts): New variable.
8742 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8744 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8745 * pthread_cancel.c: Use INVALID_TD_P.
8746 * pthread_detach.c: Likewise.
8747 * pthread_getschedparam.c: Likewise.
8748 * pthread_setschedparam.c: Likewise.
8749 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8750 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8751 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8752 * pthread_timedjoin.c: Likewise.
8754 * tst-basic7.c: Include <signal.h>.
8756 * pthread_join.c (pthread_join): Limited checking for invalid
8758 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8760 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8762 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8763 beginning of the loop. Clear the entire first block of TSD.
8764 * Makefile (tests): Add tst-key4.
8765 * tst-key4.c: New file.
8767 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8769 * Makefile (tests): Add tst-basic7.
8770 * tst-basic7.c: New file.
8772 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8773 Add some more __builtin_expect.
8775 * pthreadP.h: Define dummy version of DEBUGGING_P.
8777 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8779 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8780 _POSIX_THREAD_PRIORITY_SCHEDULING.
8781 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8782 _XOPEN_REALTIME_THREADS.
8783 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8785 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8786 kernel returns EINVAL for PID <= 0, work around it.
8788 * Makefile (tests): Add tst-signal5.
8789 * tst-signal5.c: New file.
8791 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8794 * tst-cancel1.c (tf): Block all signals.
8796 * Makefile (tests): Add tst-basic6.
8797 * tst-basic6.c: New file.
8799 * tst-basic1.c: Add test for process ID.
8801 * Makefile (tests): Add tst-cancel10.
8802 * tst-cancel10.c: New file.
8804 * Makefile (tests): Add tst-signal4.
8805 * tst-signal4.c: New file.
8807 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8808 __sigismember instead of sigismember. Add __builtin_expect.
8810 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8812 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8813 pthread_setcancelstate, and pthread_rwlock_setpshared.
8815 * tst-cancel7.c (do_test): Make sure the pid file exists before
8816 canceling the thread.
8818 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8819 pthread_rwlock_timedrdlock tests.
8820 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8821 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8822 Check for invalid tv_nsec field.
8823 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8826 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8827 recursive mutex of overflow.
8829 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8831 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8832 going into an endless loop.
8833 * Makefile (tests): Add tst-cancel9.
8834 * tst-cancel9.c: New file.
8836 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8838 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8840 * tst-mutex5.c (do_test): Add more timedlock tests.
8842 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8843 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8845 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8846 use INLINE_SYSCALL. Error number is returned, not -1.
8848 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8849 and __deallocate_stack with internal_function.
8850 * pthread_create.c: Adjust definitions appropriately.
8851 * allocatestack.c: Likewise.
8853 * pthread_join.c: Add one more __builtin_expect.
8854 * pthread_timedjoin.c: Likewise.
8856 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8857 not data of sequence number does not match.
8858 Add one __builtin_expect.
8860 * Makefile (tests): Add tst-clock1.
8861 * tst-clock1.c: New file.
8863 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8865 * Makefile (tests): Add tst-basic5.
8866 * tst-basic5.c: New file.
8868 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8870 * Makefile (tests): Add tst-basic4.
8871 * tst-basic4.c: New file.
8873 * pthreadP.h: Add declaraction for __nptl_nthreads.
8874 * pthread_create.c: Define __nptl_nthreads
8875 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8876 after thread is done. If then zero, call exit(0).
8877 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8878 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8879 * init.c (pthread_functions): Initialize ptr_nthreads.
8880 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8881 (__reclaim_stacks): Decrement __nptl_nthreads.
8882 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8884 * Makefile (tests): Add tst-basic3.
8885 * tst-basic3.c: New file.
8887 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8888 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8889 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8890 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8891 if asynchronous canceling is enabled.
8892 * pthread_join.c (pthread_join): When recognizing circular joins,
8893 take into account the other thread might be already canceled.
8894 * Makefile (tests): Add tst-join5.
8895 * tst-join5.c: New file.
8897 * Makefile (tests): Add tst-join4.
8898 * tst-join4.c: New file.
8900 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8902 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8904 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8906 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8907 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8908 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8910 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8912 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8913 error if lll_futex_wake failed.
8915 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8917 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8918 handling of cancellation and failung pthread_mutex_unlock call.
8919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8920 * Makefile (tests): Add tst-cond8 and tst-cond9.
8921 * tst-cond8.c: New file.
8922 * tst-cond9.c: New file.
8924 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8926 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8927 non-standard initializers with __USE_GNU.
8929 * Makefile (tests): Add tst-cleanup3.
8930 * tst-cleanup3.c: New file.
8932 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8934 * Makefile (tests): Add tst-attr1 and tst-attr2.
8935 * tst-attr1.c: New file.
8936 * tst-attr2.c: New file.
8938 * Makefile: Add rules to build and run tst-atfork2 test.
8939 * tst-atfork2.c: New file.
8940 * tst-atfork2mod.c: New file.
8942 * sysdeps/unix/sysv/linux/unregister-atfork.c
8943 (__unregister_atfork): Free the memory allocated for the handlers
8944 after removing them from the lists.
8946 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8949 * tst-atfork1.c (do_test): Wait for the child we forked.
8950 Report error in child.
8952 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8954 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8956 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8958 * Makefile (tests): Add tst-cancel8.
8959 * tst-cancel8.c: New file.
8961 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8962 clearing of control variable.
8963 * Makefile (tests): Add tst-once3 and tst-once4.
8964 * tst-once3.c: New file.
8965 * tst-once4.c: New file.
8967 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8969 * sysdeps/sh/Makefile: New file.
8970 * sysdeps/sh/bits/atomic.h: New file.
8971 * sysdeps/sh/pthread_spin_init.c: New file.
8972 * sysdeps/sh/pthread_spin_lock.c: New file.
8973 * sysdeps/sh/pthread_spin_trylock.S: New file.
8974 * sysdeps/sh/pthread_spin_unlock.S: New file.
8975 * sysdeps/sh/pthreaddef.h: New file.
8976 * sysdeps/sh/tcb-offsets.sym: New file.
8977 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8978 * sysdeps/sh/tls.h: New file.
8979 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8980 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8981 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8982 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8983 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8984 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8985 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8986 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8987 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8988 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8989 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8990 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8991 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8992 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8993 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8994 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8995 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8996 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8997 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8998 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8999 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9000 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9001 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9002 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9003 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9004 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9005 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9006 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9007 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9008 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9010 2003-02-08 Ulrich Drepper <drepper@redhat.com>
9012 * tst-cond2.c: Rearrange code to not rely on behavior undefined
9015 * tst-basic2.c (do_test): Lock mutex before creating the thread.
9017 2003-02-07 Ulrich Drepper <drepper@redhat.com>
9019 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9020 (TLS_GET_FS): New #define.
9021 (TLS_SET_FS): New #define.
9022 Correct value of __NR_set_thread_area.
9024 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9026 2003-02-06 Ulrich Drepper <drepper@redhat.com>
9028 * Makefile (tests): Add tst-popen1.
9029 * tst-popen1.c: New file.
9031 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9032 but inactive generalization.
9033 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9035 Minor optimization, remove one instruction.
9036 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9038 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
9040 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9042 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
9044 * init.c (__NR_set_tid_address): Add #ifdef for s390.
9045 * sysdeps/pthread/pthread_barrier_wait.c: New file.
9046 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9047 * sysdeps/pthread/pthread_cond_signal.c: New file.
9048 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9049 * sysdeps/pthread/pthread_cond_wait.c: New file.
9050 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9051 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9052 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9053 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9054 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9055 * sysdeps/s390/Makefile: New file.
9056 * sysdeps/s390/bits/atomic.h: New file.
9057 * sysdeps/s390/pthread_spin_init.c: New file.
9058 * sysdeps/s390/pthread_spin_lock.c: New file.
9059 * sysdeps/s390/pthread_spin_trylock.c: New file.
9060 * sysdeps/s390/pthread_spin_unlock.c: New file.
9061 * sysdeps/s390/pthreaddef.h: New file.
9062 * sysdeps/s390/tcb-offsets.sym: New file.
9063 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9064 * sysdeps/s390/tls.h: New file.
9065 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9066 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9067 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9068 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9069 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9070 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9071 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9072 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9073 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9074 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9075 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9076 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9077 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9078 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9079 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9080 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9081 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9082 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9083 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9084 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9085 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9086 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9087 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9089 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9091 * atomic.h: Add a couple more default implementations.
9092 (atomic_compare_and_exchange_acq): Use
9093 __arch_compare_and_exchange_32_acq in return value definition. It
9095 (atomic_bit_set): Renamed from atomic_set_bit.
9096 Add missing atomic_ prefixes.
9098 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9099 thread library is available, use correct value to mark initialized
9102 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9104 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9105 __sysconf to determine pagesize.
9107 * pthread_create.c: Include <atomic.h>.
9108 * allocatestack.c (allocate_stack): Implement coloring of the
9109 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9110 size minus one. Adjust users.
9111 * sysdeps/i386/i686/Makefile: New file.
9113 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9115 * allocatestack.c: Improve comment throughout the file.
9117 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9118 (__lll_lock_wait): Add branch prediction.
9119 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9120 (__lll_lock_wait): Likewise.
9121 (lll_unlock_wake_cb): Removed.
9123 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9125 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9126 _POSIX_THREAD_PRIORITY_SCHEDULING.
9128 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9130 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9131 Fix return type of ptr___pthread_getspecific.
9133 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9135 * Makefile (tests): Add tst-umask1.
9136 (tst-umask1-ARGS): Define.
9137 * tst-umask1.c: New file.
9139 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9141 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9142 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9143 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9144 pthread_rwlock_unlock.
9145 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9146 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9147 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9148 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9149 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9151 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9152 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9154 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9155 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9156 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9158 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9159 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9161 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9162 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9163 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9165 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9166 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9168 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9170 * Makefile (libpthread-routines): Remove lowlevelcond and
9171 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9172 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9173 and pthread_cond_broadcast.
9174 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9175 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9176 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9177 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9178 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9179 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9180 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9181 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9182 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9183 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9184 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9185 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9186 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9187 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9188 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9189 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9190 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9191 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9192 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9193 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9194 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9195 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9196 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9197 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9198 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9199 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9200 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9201 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9202 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9203 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9204 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9206 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9207 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9208 of the code is moved to ...
9209 * sysdeps/pthread/createthread.c: ...here. New file.
9211 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9213 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9214 (__new_sem_post): Clear %eax before returning.
9215 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9217 * Makefile (tests): Add tst-cleanup2.
9218 * tst-cleanup2.c: New file.
9220 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9221 Interpret first parameter correctly.
9223 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9225 * Makefile (headers): Add bits/semaphore.h.
9227 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9229 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9232 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9234 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9235 must be used and mapping failed.
9236 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9238 * Makefile (CFLAGS-pthread_self.os): Define this, not
9239 CFLAGS-pthread_self.c.
9241 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9243 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9246 * Makefile (libpthread-routines): Add version. Add rules to build
9247 version.os and banner.h.
9248 * version.c: New file.
9250 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9252 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9253 the alias unconditional.
9254 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9256 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9258 * Makefile (CFLAGS-pthread_self.c): New definition.
9260 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9262 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9263 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9264 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9265 * init.c (__pthread_initialize_minimal_internal): Likewise.
9267 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9269 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9271 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9272 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9273 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9274 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9275 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9276 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9278 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9280 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9281 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9282 * tst-cancel-wrappers.sh: Remove all exceptions.
9284 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9286 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9287 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9289 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9290 Use __libc_pthread_functions array if SHARED.
9292 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9293 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9295 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9296 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9297 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9298 __libc_ptf_call instead of __libc_maybe_call.
9300 (__libc_cleanup_region_start): Wrap function name with PTF call.
9301 (__libc_cleanup_region_end): Likewise.
9302 (__libc_cleanup_end): Likewise.
9304 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9305 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9306 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9307 * pthreadP.h: Add prototypes.
9309 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9310 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9311 __pthread_rwlock_unlock aliases.
9312 * pthreadP.h: Add prototypes for new aliases.
9314 * pthreadP.h (struct pthead_functions): Moved to...
9315 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9316 * init.c (pthread_functions): Add initializers for new elements.
9318 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9319 __pthread_cleanup_pop_restore aliases.
9320 * pthreadP.h: Add prototypes.
9322 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9323 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9324 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9325 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9326 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9327 * pthreadP.h: Adjust prototypes and callers.
9329 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9331 * Makefile (tests): Add tst-cancel7.
9332 (tst-cancel7-ARGS): New variable.
9333 * tst-cancel7.c: New file.
9335 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9336 around gcc defficiencies.
9337 * old_pthread_cond_signal.c: Likewise.
9338 * old_pthread_cond_timedwait.c: Likewise.
9339 * old_pthread_cond_wait.c: Likewise.
9341 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9343 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9345 * Makefile (tests): Add tst-cond7.
9346 * tst-cond7.c: New file.
9348 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9349 (condvar_cleanup): Get condvar address from the right place.
9351 * atomic.h: Correct definitions of atomic_full_barrier,
9352 atomic_read_barrier, atomic_write_barrier.
9354 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9356 * old_pthread_cond_signal.c: Likewise.
9357 * old_pthread_cond_timedwait.c: Likewise.
9358 * old_pthread_cond_wait.c: Likewise.
9360 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9362 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9364 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9366 * pthreadP.h (pthread_cond_2_0_t): New type.
9367 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9368 Use new type for the 2.0 condvar function prototypes.
9369 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9370 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9372 * old_pthread_cond_destroy.c: Likewise.
9373 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9374 * old_pthread_cond_signal.c: Likewise.
9375 * old_pthread_cond_timedwait.c: Likewise.
9376 * old_pthread_cond_wait.c: Likewise.
9378 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9379 (__pthread_cond_wait): Don't save cancellation mode and seq value
9382 * herrno.c (__h_errno_location): Don't define as weak.
9384 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9386 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9387 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9388 and pthread_cond_wait.
9389 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9391 (__pthread_cond_broadcast_2_0): ... this.
9392 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9394 (__pthread_cond_destroy_2_0): ... this.
9395 * old_pthread_cond_init.c (__old_pthread_cond_init):
9397 (__pthread_cond_init_2_0): ... this.
9398 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9400 (__pthread_cond_signal_2_0): ... this.
9401 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9403 (__pthread_cond_wait_2_0): ... this.
9404 * pthread_cond_destroy.c: Include shlib-compat.h.
9405 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9406 * pthread_cond_init.c: Include shlib-compat.h.
9407 (pthread_cond_init): Change strong_alias into versioned_symbol.
9408 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9409 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9411 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9412 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9413 __pthread_cond_wait_2_0): New prototypes.
9414 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9415 __old_pthread_cond_init, __old_pthread_cond_signal,
9416 __old_pthread_cond_wait): Removed.
9417 * init.c: Include shlib-compat.h.
9418 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9419 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9420 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9421 ptr___pthread_cond_*_2_0 fields.
9422 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9423 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9425 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9426 LIBC_SIGACTION was not yet defined.
9427 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9428 [!defined LIBC_SIGACTION] (__sigaction): New function and
9430 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9431 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9433 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9435 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9437 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9439 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9440 New, larger type definition.
9441 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9443 * Versions [libpthread]: Add definitions for new pthread_cond_*
9444 interfaces for version GLIBC_2.3.2.
9445 * pthread_cond_init.c: Update initialization for new type definition.
9446 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9447 pthread_cond_timedwait, pthread_cond_signal, and
9448 pthread_cond_broadcast. Add old_pthread_cond_init,
9449 old_pthread_cond_destroy, old_pthread_cond_wait,
9450 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9451 old_pthread_cond_broadcast.
9452 * old_pthread_cond_broadcast.c: New file.
9453 * old_pthread_cond_destroy.c: New file.
9454 * old_pthread_cond_init.c: New file.
9455 * old_pthread_cond_signal.c: New file.
9456 * old_pthread_cond_timedwait.c: New file.
9457 * old_pthread_cond_wait.c: New file.
9458 * pthreadP.h: Add prototypes for the compatibility interfaces.
9460 * pthread_cond_destroy.c: Don't include <errno.h>.
9462 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9464 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9465 unnecessary zero offset when addressing MUTEX.
9467 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9469 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9471 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9472 for __register_atfork.
9474 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9476 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9477 instead of ASSEMBLER test macro.
9479 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9480 __libc_current_sigrtmax): Add libc_hidden_def.
9482 * sysdeps/pthread/list.h: Remove assert.h include.
9484 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9486 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9487 __pthread_initialize_minimal_internal not
9488 __pthread_initialize_minimal.
9490 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9492 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9493 __pthread_initialize_minimal as hidden.
9495 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9498 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9500 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9501 $(common-objpfx)format.lds, include that into the output script.
9503 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9505 2002-12-28 Andreas Jaeger <aj@suse.de>
9507 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9508 nsec resolution changes.
9509 (xstat64_conv): Likewise.
9510 (xstat32_conv): Likewise.
9511 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9513 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9514 structs stat and stat64.
9515 * time/time.h (__timespec_defined): Define for __USE_MISC.
9516 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9518 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9520 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9522 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9523 (pthread_exit): Use strong_alias to avoid warnings.
9524 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9525 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9526 ptr___pthread_attr_init_2_*.
9527 * init.c (pthread_functions): Adjust.
9529 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9531 * forward.c: Make all functions available by default again. It
9532 caused too much trouble.
9534 * pt-siglongjmp.c: Removed.
9536 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9538 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9539 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9540 * sysdeps/i386/Makefile: New file.
9541 * sysdeps/i386/tcb-offsets.sym: New file.
9542 * sysdeps/pthread/tcb-offsets.h: New file.
9543 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9544 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9546 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9547 __register_atfork...
9548 (GLIBC_2.3.2): ...here.
9550 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9552 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9553 pthread_attr_setstackaddr with __attribute_deprecated__.
9555 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9557 * pt-system.c (system): Remove cancellation handling.
9558 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9559 cancellation routines.
9561 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9563 * descr.h: Include <dl-sysdep.h>.
9564 (struct pthread): Move header.data.list to the back of the struct.
9565 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9566 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9567 (SYSINFO_OFFSEET): Likewise.
9569 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9571 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9573 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9574 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9575 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9576 (USE_DL_SYSINFO): Undef.
9578 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9580 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9581 $(common-objpfx)libc.so.
9582 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9583 it is bigger than pipe buffer size even on arches with bigger
9585 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9587 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9589 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9590 correct errno access for case that USE___THREAD is not defined.
9592 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9594 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9595 Patch by Marijn Ros <marijn@mad.scientist.com>.
9597 2002-12-22 Roland McGrath <roland@redhat.com>
9599 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9601 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9603 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9605 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9607 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9608 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9609 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9611 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9613 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9614 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9615 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9616 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9617 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9618 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9619 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9620 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9622 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9624 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9626 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9628 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9630 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9631 that sysinfo is properly initialized.
9632 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9633 to 1 only for ld.so.
9635 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9636 RTLD_CORRECT_DYNAMIC_WEAK.
9638 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9640 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9641 Use return 0 as 6th argument to FORWARD4.
9642 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9644 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9646 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9647 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9648 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9649 (INIT_SYSINFO): New #define.
9650 (TLS_TP_INIT): Use INIT_SYSINFO.
9651 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9652 At test to make sure SYSINFO_OFFSET value is correct.
9653 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9655 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9657 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9658 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9659 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9660 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9661 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9662 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9663 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9665 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9667 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9668 macro instead of using int $0x80 directly.
9670 * sysdeps/pthread/bits/stdio-lock.h: New file.
9671 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9672 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9673 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9674 * Makefile (routines): Add libc-lowlevelmutex.
9676 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9677 __i686.get_pc_thunk.dx.
9679 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9681 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9682 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9683 ($(objpfx)tst-cancel-wrappers.out): New rule.
9684 * tst-cancel-wrappers.sh: New test.
9685 * tst-locale1.c: Include signal.h.
9686 (uselocale): Test static linking of __libc_current_sigrt*.
9688 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9690 * Makefile (tests): Add tst-cancel6.
9691 * tst-cancel6.c: New file
9693 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9695 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9696 Define meaningfully for assembler as well.
9697 * pthreadP.h (struct pthread_functions): Remove
9698 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9699 and ptr_pthread_attr_init_2_1 fields.
9700 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9701 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9702 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9703 (FORWARD3): Define using FORWARD4.
9704 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9706 * pt-system.c: Remove duplicate stdlib.h include.
9708 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9710 * sem_init.c: Define sem_init@GLIBC_2.0.
9711 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9712 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9714 * flockfile.c: Moved to...
9715 * sysdeps/pthread/flockfile.c: ...here. New file.
9716 * funlockfile.c: Moved to...
9717 * sysdeps/pthread/funlockfile.c: ...here. New file.
9718 * ftrylockfile.c: Moved to...
9719 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9721 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9723 * libc-cancellation.c: Guard both function with
9724 #if !defined NOT_IN_libc.
9725 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9726 automatically provided pthread wrappers.
9727 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9728 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9730 * pt-open.c: Removed.
9731 * pt-fcntl.c: Removed.
9732 * pt-fsync.c: Removed.
9733 * pt-lseek.c: Removed.
9734 * pt-msgrcv.c: Removed.
9735 * pt-msgsnd.c: Removed.
9736 * pt-msync.c: Removed.
9737 * pt-nanosleep.c: Removed.
9738 * pt-open64.c: Removed.
9739 * pt-pause.c: Removed.
9740 * pt-pread.c: Removed.
9741 * pt-pread64.c: Removed.
9742 * pt-pwrite.c: Removed.
9743 * pt-pwrite64.c: Removed.
9744 * pt-read.c: Removed.
9745 * pt-recv.c: Removed.
9746 * pt-recvfrom.c: Removed.
9747 * pt-recvmsg.c: Removed.
9748 * pt-send.c: Removed.
9749 * pt-sendto.c: Removed.
9750 * pt-sigtimedwait.c: Removed.
9751 * pt-sigwait.c: Removed.
9752 * pt-wait.c: Removed.
9753 * pt-waitpid.c: Removed.
9754 * pt-write.c: Removed.
9755 * pt-accept.c: Removed.
9756 * pt-close.c: Removed.
9757 * pt-connect.c: Removed.
9758 * pt-lseek64.c: Removed.
9759 * pt-sendmsg.c: Removed.
9760 * pt-tcdrain.c: Removed.
9762 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9764 * init.c (__pthread_initialize_minimal_internal): Renamed from
9765 __pthread_initialize_minimal. Make old name an alias. This
9766 converts a normal relocation into a relative relocation.
9768 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9770 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9771 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9772 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9773 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9774 pt-sigwaitinfo, pt-waitid, and pt-writev.
9775 * pt-creat.c: Removed.
9776 * pt-poll.c: Removed.
9777 * pt-pselect.c: Removed.
9778 * pt-readv.c: Removed.
9779 * pt-select.c: Removed.
9780 * pt-sigpause.c: Removed.
9781 * pt-sigsuspend.c: Removed.
9782 * pt-sigwaitinfo.c: Removed.
9783 * pt-waitid.c: Removed.
9784 * pt-writev.c: Removed.
9786 * init.c (pthread_functions): New variable.
9787 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9788 (or NULL) to __libc_pthread_init.
9789 * forward.c: Rewrite to use __libc:pthread_functions array to get
9791 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9793 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9794 Take new parameter. Copy content of variable pointed to by it
9795 to __libc_pthread_init.
9797 * pthreadP.h (struct pthread_functions): New type.
9798 (__libc_pthread_init): Declare.
9800 * pthread_attr_destroy.c: Add namespace protected alias.
9801 * pthread_attr_getdetachstate.c: Likewise.
9802 * pthread_attr_getinheritsched.c: Likewise.
9803 * pthread_attr_getschedparam.c: Likewise.
9804 * pthread_attr_getschedpolicy.c: Likewise.
9805 * pthread_attr_getscope.c: Likewise.
9806 * pthread_attr_setdetachstate.c: Likewise.
9807 * pthread_attr_setinheritsched.c: Likewise.
9808 * pthread_attr_setschedparam.c: Likewise.
9809 * pthread_attr_setschedpolicy.c: Likewise.
9810 * pthread_attr_setscope.c: Likewise.
9811 * pthread_cond_broadcast.c: Likewise.
9812 * pthread_cond_destroy.c: Likewise.
9813 * pthread_cond_init.c: Likewise.
9814 * pthread_cond_signal.c: Likewise.
9815 * pthread_cond_wait.c: Likewise.
9816 * pthread_condattr_destroy.c: Likewise.
9817 * pthread_condattr_init.c: Likewise.
9818 * pthread_equal.c: Likewise.
9819 * pthread_exit.c: Likewise.
9820 * pthread_getschedparam.c: Likewise.
9821 * pthread_self.c: Likewise.
9822 * pthread_setcancelstate.c: Likewise.
9823 * pthread_setschedparam.c: Likewise.
9824 * pthread_mutex_destroy.c: Likewise.
9825 * pthread_mutex_init.c: Likewise.
9826 * pthreadP.h: Add prototypes for the aliases.
9828 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9829 multiple_threads member in correct TCB to 1.
9831 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9832 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9833 member of thread decriptor, otherwise return unconditionally 1.
9835 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9837 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9838 regular Linux version. Remove file.
9839 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9840 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9841 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9842 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9843 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9844 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9845 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9846 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9847 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9848 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9849 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9850 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9851 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9852 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9853 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9854 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9855 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9856 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9857 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9858 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9859 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9860 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9861 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9862 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9863 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9864 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9865 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9866 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9867 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9868 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9870 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9872 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9873 * sysdeps/unix/sysv/linux/open.c: Removed.
9874 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9875 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9876 * sysdeps/unix/sysv/linux/msync.c: Removed.
9877 * sysdeps/unix/sysv/linux/read.c: Removed.
9878 * sysdeps/unix/sysv/linux/close.c: Removed.
9879 * sysdeps/unix/sysv/linux/creat.c: Removed.
9880 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9881 * sysdeps/unix/sysv/linux/pause.c: Removed.
9882 * sysdeps/unix/sysv/linux/select.c: Removed.
9883 * sysdeps/unix/sysv/linux/write.c: Removed.
9885 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9887 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9888 element in TCB to see whether locking is needed.
9890 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9891 MULTIPLE_THREADS_OFFSET value is correct.
9893 * sysdeps/unix/sysv/linux/close.c: New file.
9894 * sysdeps/unix/sysv/linux/connect.S: New file.
9895 * sysdeps/unix/sysv/linux/creat.c: New file.
9896 * sysdeps/unix/sysv/linux/fsync.c: New file.
9897 * sysdeps/unix/sysv/linux/llseek.c: New file.
9898 * sysdeps/unix/sysv/linux/lseek.c: New file.
9899 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9900 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9901 * sysdeps/unix/sysv/linux/msync.c: New file.
9902 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9903 * sysdeps/unix/sysv/linux/open.c: New file.
9904 * sysdeps/unix/sysv/linux/open64.c: New file.
9905 * sysdeps/unix/sysv/linux/pause.c: New file.
9906 * sysdeps/unix/sysv/linux/poll.c: New file.
9907 * sysdeps/unix/sysv/linux/pread.c: New file.
9908 * sysdeps/unix/sysv/linux/pread64.c: New file.
9909 * sysdeps/unix/sysv/linux/pselect.c: New file.
9910 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9911 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9912 * sysdeps/unix/sysv/linux/readv.c: New file.
9913 * sysdeps/unix/sysv/linux/recv.S: New file.
9914 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9915 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9916 * sysdeps/unix/sysv/linux/select.c: New file.
9917 * sysdeps/unix/sysv/linux/send.S: New file.
9918 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9919 * sysdeps/unix/sysv/linux/sendto.S: New file.
9920 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9921 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9922 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9923 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9924 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9925 * sysdeps/unix/sysv/linux/system.c: New file.
9926 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9927 * sysdeps/unix/sysv/linux/wait.c: New file.
9928 * sysdeps/unix/sysv/linux/waitid.c: New file.
9929 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9930 * sysdeps/unix/sysv/linux/writev.c: New file.
9931 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9933 * pt-readv.c: Fix comment.
9935 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9937 * tst-cleanup1.c: Include stdlib.h.
9939 * tst-cancel5.c: New test.
9940 * Makefile (tests): Add tst-cancel5.
9941 (tst-cancel5): Link against libc.so libpthread.so in that order.
9943 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9945 * forward.c (test_loaded): Prevent recursive calls.
9947 * Makefile (routines): Add libc-cancellation.
9948 * libc-cancellation.c: New file.
9949 * descr.h (struct pthread): Add multiple_threads field.
9950 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9951 new thread descriptor to 1.
9952 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9953 Initialize multiple_thread field after successful thread creation.
9954 * cancellation.c (__do_cancel): Move to pthreadP.h.
9955 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9956 (__pthread_disable_asynccancel): Add internal_function attribute.
9957 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9958 * pthread_setcancelstate.c: Likewise.
9959 * pthread_setcanceltype.c: Likewise.
9960 * pthread_exit.c: Likewise.
9961 * pthreadP.h (CANCELLATION_P): Likewise.
9962 (__do_cancel): Define as static inline.
9963 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9964 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9966 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9967 fields. Define MULTIPLE_THREADS_OFFSET.
9968 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9970 * sysdeps/unix/sysv/linux/accept.S: New file.
9971 * sysdeps/unix/sysv/linux/read.c: New file.
9972 * sysdeps/unix/sysv/linux/write.c: New file.
9973 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9974 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9975 initialization of __libc_locking_needed.
9976 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9977 __libc_locking_needed, use multiple_threads field in TCB.
9978 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9980 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9982 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9984 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9986 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9987 access to __libc_locking_needed for PIC.
9989 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9991 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9992 declare for libc.so.
9993 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9995 (__libc_lock_lock): Put into statement expression.
9996 (__libc_lock_unlock): Remove trailing semicolon.
9997 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9999 2002-12-12 Roland McGrath <roland@redhat.com>
10001 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10002 "m" constraint to refer to __libc_locking_needed. Declare it here.
10004 2002-12-12 Ulrich Drepper <drepper@redhat.com>
10006 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10007 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10008 Initialize __libc_locking_needed.
10009 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10010 instead of __register_pthread_fork_handler.
10011 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10012 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10013 fork-gen with libc_pthread_init.
10014 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10015 of __register_pthread_fork_handler.
10016 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10017 of __register_pthread_fork_handler.
10018 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10019 __libc_locking_needed to determine whether lock prefix can be avoided.
10020 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10022 2002-12-11 Ulrich Drepper <drepper@redhat.com>
10024 * Makefile (tests): Add tst-cleanup1.
10025 * tst-cleanup1.c: New file.
10026 * cancellation.c (__cleanup_thread): Removed.
10027 (__do_cancel): Remove call to __cleanup_thread.
10028 * pthreadP.h: Remove __cleanup_thread prorotype.
10030 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10031 Remember function and argument even if cancellation handler
10032 function is not available.
10033 (__libc_cleanup_region_end): Execute registered function directly if
10034 pthread functions are not available.
10035 (__libc_cleanup_end): Likewise.
10037 * init.c (__pthread_initialize_minimal): Fix initialization in
10038 static lib by preventing gcc from being too clever.
10040 2002-12-10 Ulrich Drepper <drepper@redhat.com>
10042 * init.c (__pthread_initialize_minimal): Remove unneccesary
10045 * Makefile (tests): We can run tst-locale2 now.
10047 2002-12-09 Ulrich Drepper <drepper@redhat.com>
10049 * Versions: Remove duplicated sigwait entry.
10051 2002-12-08 Ulrich Drepper <drepper@redhat.com>
10053 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10056 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10058 * pthreadP.h: Declare __pthread_enable_asynccancel and
10059 __pthread_disable_asynccancel.
10060 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10061 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10062 * cancellation.c (__pthread_enable_asynccancel): New function.
10063 (__pthread_disable_asynccancel): New function.
10064 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10065 * pt-close.c: Likewise.
10066 * pt-connect.c: Likewise.
10067 * pt-creat.c: Likewise.
10068 * pt-fcntl.c: Likewise.
10069 * pt-fsync.c: Likewise.
10070 * pt-lseek.c: Likewise.
10071 * pt-lseek64.c: Likewise.
10072 * pt-msgrcv.c: Likewise.
10073 * pt-msgsnd.c: Likewise.
10074 * pt-msync.c: Likewise.
10075 * pt-nanosleep.c: Likewise.
10076 * pt-open.c: Likewise.
10077 * pt-open64.c: Likewise.
10078 * pt-pause.c: Likewise.
10079 * pt-poll.c: Likewise.
10080 * pt-pread.c: Likewise.
10081 * pt-pread64.c: Likewise.
10082 * pt-pselect.c: Likewise.
10083 * pt-pwrite.c: Likewise.
10084 * pt-pwrite64.c: Likewise.
10085 * pt-read.c: Likewise.
10086 * pt-readv.c: Likewise.
10087 * pt-recv.c: Likewise.
10088 * pt-recvfrom.c: Likewise.
10089 * pt-recvmsg.c: Likewise.
10090 * pt-select.c: Likewise.
10091 * pt-send.c: Likewise.
10092 * pt-sendmsg.c: Likewise.
10093 * pt-sendto.c: Likewise.
10094 * pt-sigpause.c: Likewise.
10095 * pt-sigsuspend.c: Likewise.
10096 * pt-sigtimedwait.c: Likewise.
10097 * pt-sigwait.c: Likewise.
10098 * pt-sigwaitinfo.c: Likewise.
10099 * pt-system.c: Likewise.
10100 * pt-tcdrain.c: Likewise.
10101 * pt-wait.c: Likewise.
10102 * pt-waitid.c: Likewise.
10103 * pt-waitpid.c: Likewise.
10104 * pt-write.c: Likewise.
10105 * pt-writev.c: Likewise.
10106 * pthread_join.c: Likewise.
10107 * pthread_timedjoin.c: Likewise.
10109 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10110 (__xpg_sigpause): New function.
10111 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10113 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10115 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10117 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10118 _GI_pthread_cleanup_pop to pthreadP.h.
10120 * ftrylockfile.c: Use _IO_lock_trylock instead of
10121 pthread_mutex_trylock.
10123 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10124 (CANCEL_RESET): Likewise.
10125 (__pthread_setcanceltype_): Declare.
10126 (__pthread_mutex_lock_internal): Declare.
10127 (__pthread_mutex_unlock_internal): Declare.
10128 (__pthread_once_internal): Declare.
10129 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10130 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10132 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10133 and pthread_mutex_unlock.
10134 * pthread_cond_wait.c: Likewise.
10135 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10136 * pthread_mutex_unlock.c: Likewise.
10138 * pthread_setcanceltype.c: Add additional alias
10139 __pthread_setcanceltype.
10141 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10142 * sem_open.c (sem_open): Likewise.
10143 Use __libc_open, __libc_write, and __libc_close instead of
10144 open, write, and close respectively.
10146 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10147 Rewrite as statement expression since it must return a value.
10149 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10150 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10153 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10154 alias __pthread_once_internal.
10156 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10158 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10160 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10161 * tst-stdio1.c: New file.
10162 * tst-stdio2.c: New file.
10164 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10166 * Makefile (tests): Comment out tst-locale2 for now.
10167 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10169 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10171 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10172 Use _IO_lock_init instead of explicit assignment.
10174 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10175 Define __libc_lock_* and __libc_lock_recursive macros with
10176 lowlevellock macros, not pthread mutexes.
10178 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10179 of pthread_mutex_lock.
10180 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10181 instead of pthread_mutex_unlock.
10183 2002-12-06 Roland McGrath <roland@redhat.com>
10185 * allocatestack.c (__stack_user): Use uninitialized defn.
10186 * init.c (__pthread_initialize_minimal): Initialize it here.
10188 2002-12-05 Roland McGrath <roland@redhat.com>
10190 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10192 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10194 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10195 missing & here too.
10197 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10199 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10201 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10202 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10203 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10204 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10205 for __libc_lock_* macros.
10206 * Makefile (routines): Add libc-lowlevellock.
10208 2002-10-09 Roland McGrath <roland@redhat.com>
10210 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10211 Under [__PIC__], call the function via the pointer fetched for
10212 comparison rather than a call by name that uses the PLT.
10213 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10214 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10215 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10216 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10217 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10219 2002-12-04 Roland McGrath <roland@redhat.com>
10221 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10223 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10224 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10226 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10228 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10230 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10231 a completely opaque, non-integer type.
10232 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10234 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10236 * sysdeps/i386/tls.h: Include stdlib.h.
10237 * sysdeps/x86_64/tls.h: Likewise.
10239 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10241 * Makefile (tests): Add tst-locale2.
10242 (tests-static): Likewise.
10243 * tst-locale2.c: New file.
10245 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10246 volatile and add memory clobbers to lock operations.
10248 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10250 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10251 * sysdeps/i386/i486/bits/atomic.h: New file.
10252 * sysdeps/i386/i586/bits/atomic.h: New file.
10253 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10254 include i486 version.
10255 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10256 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10257 Patch by Marijn Ros <marijn@mad.scientist.com>.
10259 * allocatestack.c (get_cached_stack): Don't crash if we first
10260 found a stack with a larger size then needed.
10261 Reported by Hui Huang <hui.huang@sun.com>.
10263 * Makefile (tests): Add tst-sysconf.
10264 * tst-sysconf.c: New file.
10266 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10267 PTHREAD_THREADS_MAX.
10269 2002-12-02 Roland McGrath <roland@redhat.com>
10271 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10272 Declare using hidden_proto instead of attribute_hidden, so there are
10273 non-.hidden static symbols for gdb to find.
10274 (__pthread_keys): Likewise.
10275 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10276 * allocatestack.c (__stack_user): Likewise.
10277 * pthread_create.c (__pthread_keys): Likewise.
10278 (__nptl_threads_events, __nptl_last_event): Make these static instead
10280 * pthread_key_create.c (__pthread_pthread_keys_max,
10281 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10283 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10285 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10287 * tst-locale1.c: New file.
10289 * pthread_cond_timedwait.c: Include <stdlib.h>.
10291 * Makefile (tests): Add tst-fork2 and tst-fork3.
10292 * tst-fork2.c: New file.
10293 * tst-fork3.c: New file.
10295 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10297 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10299 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10300 require it to 200112L.
10302 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10303 instruction only if HAVE_CMOV is defined.
10304 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10306 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10308 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10310 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10312 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10314 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10316 * sysdeps/x86_64/bits/atomic.h: New file.
10318 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10321 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10322 possible since gettid cannot fail.
10324 * sysdeps/x86_64/pthreaddef.h: New file.
10326 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10328 * sysdeps/x86_64/pthread_spin_init.c: New file.
10329 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10330 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10331 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10333 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10334 Add missing lock prefix. Minute optimization.
10336 * tst-spin2.c (main): Also check successful trylock call.
10338 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10339 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10341 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10342 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10344 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10345 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10346 value in case of an error. Add support for INTERNAL_SYSCALL.
10348 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10349 value in case of an error.
10351 * sysdeps/x86_64/tls.h: New file.
10353 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10355 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10356 takes the array member name and the index as parameters.
10357 (THREAD_SETMEM_NC): Likewise.
10358 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10359 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10362 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10363 to decide which code to use.
10364 (THREAD_SETMEM_NC): Likewise.
10366 * allocatestack.c (queue_stack): Don't remove stack from list here.
10367 Do it in the caller. Correct condition to prematurely terminate
10368 loop to free stacks.
10369 (__deallocate_stack): Remove stack from list here.
10371 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10373 * Makefile (tests): Add tst-stack1.
10374 * tst-stack1.c: New file.
10376 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10379 * pthread_attr_getstack.c: Return bottom of the thread area.
10381 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10383 * Makefile (libpthread-routines): Add pt-allocrtsig and
10384 pthread_kill_other_threads.
10385 * pt-allocrtsig.c: New file.
10386 * pthread_kill_other_threads.c: New file.
10387 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10388 all three functions.
10389 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10391 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10392 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10393 and __libc_allocate_rtsig_private.
10394 * Versions (libpthread): Export pthread_kill_other_threads_np,
10395 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10397 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10399 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10400 the end of the stack. Adjust computations.
10401 When mprotect call fails dequeue stack and free it.
10402 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10404 * pthread_getattr_np.c: Likewise.
10406 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10409 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10411 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10412 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10414 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10416 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10417 * pthread_setspecific.c: Likewise.
10419 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10421 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10422 definitions. Get them from the official place.
10423 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10425 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10426 Use new CLONE_ flags in clone() calls.
10428 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10429 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10431 * Versions: Add pthread_* functions for libc.
10432 * forward.c: New file.
10434 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10436 * herrno.c: New file.
10439 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10440 sem_trywait, and sem_timedwait. Add herrno and res.
10441 * sem_init.c: Don't initialize lock and waiters members.
10442 * sem_open.c: Likewise.
10443 * sem_post.c: Removed.
10444 * sem_wait.c: Removed.
10445 * sem_trywait.c: Removed.
10446 * sem_timedwait.c: Removed.
10447 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10448 Includes full implementations of sem_post, sem_wait, sem_trywait,
10450 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10451 for new implementation.
10452 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10453 and waiters fields.
10455 * tst-sem3.c: Improve error message.
10456 * tst-signal3.c: Likewise.
10458 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10459 to tell the kernel about the termination futex and to initialize tid
10460 member. Don't initialize main_thread.
10461 * descr.h (struct pthread): Remove main_thread member.
10462 * cancelllation.c (__do_cancel): Remove code handling main thread.
10463 The main thread is not special anymore.
10465 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10466 size of the stacks to stack_cache_actsize.
10468 * pt-readv.c: Add missing "defined".
10469 * pt-sigwait.c: Likewise.
10470 * pt-writev.c: Likewise.
10472 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10474 * Versions: Export __connect from libpthread.
10475 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10477 * Makefile (libpthread-routines): Add pt-raise.
10478 * sysdeps/unix/sysv/linux/raise.c: New file.
10479 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10480 * sysdeps/generic/pt-raise.c: New file.
10482 * pthread_cond_init.c: Initialize all data elements of the condvar
10483 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10485 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10486 * pthread_create.c: Likewise.
10488 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10489 * tst-key1.c: New file.
10490 * tst-key2.c: New file.
10491 * tst-key3.c: New file.
10493 * Versions: Export pthread_detach for version GLIBC_2.0.
10494 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10496 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10498 * pthread_key_create.c: Terminate search after an unused key was found.
10499 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10501 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10502 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10504 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10506 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10507 dynamic lookup for errno in PIC.
10509 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10510 release the stack lock as soon as possible.
10511 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10512 the static TLS block.
10513 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10515 * cancellation.c: Renamed from cancelation.c.
10516 * Makefile: Adjust accordingly.
10517 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10518 * cleanup_defer.c: Use CANCELLATION_P.
10519 * pthread_testcancel.c: Likewise.
10520 * descr.h: Fix spelling in comments.
10521 * init.c: Likewise.
10522 * pthread_getattr_np.c: Likewise.
10523 * pthread_getschedparam.c: Likewise.
10524 * pthread_setschedparam.c: Likewise.
10525 * Versions: Likewise.
10527 * pt-pselect.c: New file.
10528 * Makefile (libpthread-routines): Add pt-pselect.
10529 * Versions: Add pselect.
10531 * tst-cancel4.c: New file.
10532 * Makefile (tests): Add tst-cancel4.
10534 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10536 * pthread_mutex_lock.c: Always record lock ownership.
10537 * pthread_mutex_timedlock.c: Likewise.
10538 * pthread_mutex_trylock.c: Likewise.
10540 * pt-readv.c: New file.
10541 * pt-writev.c: New file.
10542 * pt-creat.c: New file.
10543 * pt-msgrcv.c: New file.
10544 * pt-msgsnd.c: New file.
10545 * pt-poll.c: New file.
10546 * pt-select.c: New file.
10547 * pt-sigpause.c: New file.
10548 * pt-sigsuspend.c: New file.
10549 * pt-sigwait.c: New file.
10550 * pt-sigwaitinfo.c: New file.
10551 * pt-waitid.c: New file.
10552 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10553 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10554 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10555 * Versions: Add all the new functions.
10557 * tst-exit1.c: New file.
10558 * Makefile (tests): Add tst-exit1.
10560 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10562 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10564 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10566 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10567 call. pthread_join is an official cancellation point.
10568 * pthread_timedjoin.c: Likewise.
10570 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10571 and the condvar's mutex are retrieved.
10572 * pthread_cond_timedwait.c: Likewise.
10573 Reported by dice@saros.East.Sun.COM.
10575 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10577 * pthreadP.h: Cut out all type definitions and move them...
10578 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10579 * pthreadP.h: Include <internaltypes.h>.
10581 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10582 performance tweaks.
10584 * sem_trywait.c: Shuffle #includes around to get right order.
10585 * sem_timedwait.c: Likewise.
10586 * sem_post.c: Likewise.
10587 * sem_wait.c: Likewise.
10589 * nptl 0.3 released.
10591 * Makefile (tests): Add tst-signal3.
10592 * tst-signal3.c: New file.
10594 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10596 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10597 the asms modify the sem object.
10598 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10600 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10601 the actual members.
10602 * pthreadP.h (struct sem): New type. Actual semaphore type.
10603 * semaphoreP.h: Include pthreadP.h.
10604 * sem_getvalue.c: Adjust to sem_t change.
10605 * sem_init.c: Likewise.
10606 * sem_open.c: Likewise.
10607 * sem_post.c: Likewise.
10608 * sem_timedwait.c: Likewise.
10609 * sem_trywait.c: Likewise.
10610 * sem_wait.c: Likewise.
10612 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10614 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10615 * tst-basic2.c: New file.
10616 * tst-exec1.c: New file.
10617 * tst-exec2.c: New file.
10618 * tst-exec3.c: New file.
10620 * tst-fork1.c: Remove extra */.
10622 * nptl 0.2 released. The API for IA-32 is complete.