1 2008-11-25 Roland McGrath <roland@redhat.com>
3 * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
4 Subdirectories moved to ports repository as
5 sysdeps/.../nptl subdirectories.
7 2008-11-12 Jakub Jelinek <jakub@redhat.com>
10 * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
12 * pthread_cond_init.c (__pthread_cond_init): Fix
13 cond->__data.__nwaiters initialization.
14 * Makefile (tests): Add tst-cond23.
15 * tst-cond23.c: New test.
17 2008-11-07 Jakub Jelinek <jakub@redhat.com>
19 * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
21 (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
24 2008-11-01 Ulrich Drepper <drepper@redhat.com>
27 * pthread_mutex_lock.c: Add support for private PI mutexes.
28 * pthread_mutex_timedlock.c: Likewise.
29 * pthread_mutex_trylock.c: Likewise.
30 * pthread_mutex_unlock.c: Likewise.
31 Patch mostly by Ben Jackson <ben@ben.com>.
33 2008-10-31 Ulrich Drepper <drepper@redhat.com>
36 * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
37 Increase stack size for helper thread.
39 2008-10-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
41 * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
42 assembly with a clobber list for access registers a0 and a1.
44 2008-09-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
46 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
47 to force runp->refcntr to be read from memory.
49 2008-09-08 Richard Guenther <rguenther@suse.de>
51 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
52 lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
53 lll_timedlock, lll_robust_timedlock, lll_unlock,
54 lll_robust_unlock): Promote private to int.
56 2008-08-15 Ulrich Drepper <drepper@redhat.com>
58 * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
59 ARCH_RETRY_MMAP definitions.
60 * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
61 Define MAP_STACK when not defined.
62 (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS. Remove
63 handling of ARCH_RETRY_MMAP.
65 2008-07-30 Ulrich Drepper <drepper@redhat.com>
67 * tst-align2.c (f): Print message that f is reached.
69 2008-04-28 Hiroki Kaminaga <kaminaga@sm.sony.co.jp>
72 * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
73 definition with #ifndef __ASSUME_PRIVATE_FUTEX.
75 2008-07-25 Ulrich Drepper <drepper@redhat.com>
77 * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
78 SOCK_CLOEXEC if possible.
80 2008-05-29 Ulrich Drepper <drepper@redhat.com>
82 * Makefile (tests): Add tst-rwlock2a.
83 * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
84 * tst-rwlock2a.c: New file.
86 2008-06-12 Ulrich Drepper <drepper@redhat.com>
88 * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
90 2008-05-17 Samuel Thibault <samuel.thibault@ens-lyon.org>
92 * sysdeps/pthread/pthread.h: Fix typo in comment.
94 2008-05-28 Ulrich Drepper <drepper@redhat.com>
96 * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
97 of CPU set to the kernel.
99 2008-05-23 Paul Pluzhnikov <ppluzhnikov@google.com>
101 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
103 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
104 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
105 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
106 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
107 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
108 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
110 2008-05-22 Paul Pluzhnikov <ppluzhnikov@google.com>
112 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
114 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
116 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
118 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
121 2008-05-26 Ulrich Drepper <drepper@redhat.com>
123 * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
125 2008-05-20 Jakub Jelinek <jakub@redhat.com>
127 David S. Miller <davem@davemloft.net>
129 * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
131 2008-05-10 Ulrich Drepper <drepper@redhat.com>
133 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
135 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
137 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
139 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
141 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
143 Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
145 2008-04-14 David S. Miller <davem@davemloft.net>
147 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
148 (__old_sem_wait): Fix argument to lll_futex_wait().
150 2007-11-26 Daniel Jacobowitz <dan@codesourcery.com>
152 * pthread_create.c: Require pthread_mutex_trylock and
153 pthread_key_delete for libgcc.
155 2008-04-08 Jakub Jelinek <jakub@redhat.com>
158 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
159 (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
160 Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
162 2008-03-27 Ulrich Drepper <drepper@redhat.com>
164 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
165 <linux/limits.h> has defined it.
166 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
167 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
168 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
169 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
171 2008-03-18 Jakub Jelinek <jakub@redhat.com>
173 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
175 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
176 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
178 2008-03-14 Ulrich Drepper <drepper@redhat.com>
180 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
181 HAVE_DL_DISCOVER_OSVERSION.
182 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
183 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
185 2008-03-07 Ulrich Drepper <drepper@redhat.com>
188 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
189 _POSIX_CHOWN_RESTRICTED value to zero.
191 2008-01-31 Roland McGrath <roland@redhat.com>
193 * Makefile (omit-deps): Variable removed.
195 2008-01-30 Ulrich Drepper <drepper@redhat.com>
197 * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
198 unnecessary addr32 prefix.
200 2008-01-29 Roland McGrath <roland@redhat.com>
202 * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
204 2008-01-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
206 * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
208 2008-01-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
210 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
212 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
213 (__lll_lock_wait_private): Fix typo.
214 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
215 (pthread_barrier_wait): Likewise. Adjust XADD use.
216 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
218 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
219 (pthread_rwlock_timedrdlock): Return correct return value.
220 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
221 (pthread_rwlock_timedwrlock): Likewise.
223 2008-01-15 Ulrich Drepper <drepper@redhat.com>
225 * tst-eintr2.c (do_test): make sure that if mutex_lock in main
226 thread returns the program exits with an error code.
228 2008-01-10 Ulrich Drepper <drepper@redhat.com>
230 * pthread-errnos.sym: Add EOVERFLOW.
231 * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
232 * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
233 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
234 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
236 2007-12-14 Ulrich Drepper <drepper@redhat.com>
238 * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
239 parameter. Passed it as permission to mmap.
240 * allocatestack.c (allocate_stack): Pass prot as second parameter
243 2007-12-12 Ulrich Drepper <drepper@redhat.com>
245 * tst-basic7.c: Allocate memory for the stack.
248 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
249 (__pthread_cond_timedwait): Don't use VDSO.
250 Patch by Michal Januszewski.
252 2007-12-07 Ulrich Drepper <drepper@redhat.com>
255 * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
256 Allow label before pthread_cleanup_pop.
257 (pthread_cleanup_pop_restore_np): Likewise.
259 2007-12-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
261 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
262 Store 2 before returning ETIMEDOUT.
264 2007-11-23 Ulrich Drepper <drepper@redhat.com>
266 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
267 Store 2 before returning ETIMEDOUT.
268 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
269 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
270 (__lll_lock_wait_private): Optimize.
271 (__lll_lock_wait): Likewise.
273 2007-11-20 Jakub Jelinek <jakub@redhat.com>
275 * sysdeps/pthread/pthread.h (pthread_cleanup_push,
276 pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
277 g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
279 2007-11-08 Ulrich Drepper <drepper@redhat.com>
282 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
283 If we time out, try one last time to lock the futex to avoid
284 losing a wakeup signal.
285 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
286 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
289 * sysdeps/pthread/createthread.c (do_clone): Translate clone error
292 2007-11-07 Ulrich Drepper <drepper@redhat.com>
295 * allocatestack.c (allocate_stack): Change ENOMEM error in case
296 mmap failed to EAGAIN.
297 * Makefile (tests): Add tst-basic7.
298 * tst-basic7.c: New file.
300 2007-11-05 Ulrich Drepper <drepper@redhat.com>
302 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
305 2007-11-03 Mike Frysinger <vapier@gentoo.org>
307 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
308 missing line continuations.
309 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
310 LOAD_FUTEX_WAKE): Likewise. Also add missing 3rd parameter.
312 2007-10-28 Ulrich Drepper <drepper@redhat.com>
315 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
316 __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
317 (struct timer): Add next element.
318 * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
319 enqueue timer structure into __active_timer_sigev_thread list.
320 * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
321 remove timer struct from __active_timer_sigev_thread.
322 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
323 Before using timer structure make sure it is still on the
324 __active_timer_sigev_thread list. Keep lock until done.
325 Define __active_timer_sigev_thread and
326 __active_timer_sigev_thread_lock.
328 2007-10-27 Ulrich Drepper <drepper@redhat.com>
330 * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
331 Redefine thread_atfork for use of ATFORK_MEM.
332 * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
333 * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
335 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
336 Use atomic operation when removing first element of list.
338 2007-10-17 Jakub Jelinek <jakub@redhat.com>
340 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
341 routine instead of an alias to __new_sem_post.
343 2007-10-15 Jakub Jelinek <jakub@redhat.com>
345 * init.c (__pthread_initialize_minimal): Initialize word to appease
348 2007-10-10 Jakub Jelinek <jakub@redhat.com>
350 * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
351 libc.so just clear NAME.
352 (__libc_rwlock_fini): Nop inside of libc.so.
353 * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
356 2007-09-02 Ulrich Drepper <drepper@redhat.com>
358 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
359 (__pthread_cond_wait): Fix unlocking of internal lock after mutex
361 Patch by Luca Barbieri <luca.barbieri@gmail.com>.
363 2007-08-21 Ulrich Drepper <drepper@redhat.com>
366 * allocatestack.c (__reclaim_stacks): Clear the TSD in the
367 reclaimed stack if necessary.
368 * Makefile (tests): Add tst-tsd6.
369 * tst-tsd6.c: New file.
371 2007-08-21 Jakub Jelinek <jakub@redhat.com>
373 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
374 Add private argument.
376 2007-08-20 Ulrich Drepper <drepper@redhat.com>
378 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
379 (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
381 2007-08-16 Jakub Jelinek <jakub@redhat.com>
383 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
384 (__lll_robust_timedlock): Pass private as last argument to
385 __lll_robust_timedlock_wait.
386 (__lll_unlock): Fix a pasto.
388 2007-08-15 Jakub Jelinek <jakub@redhat.com>
390 * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
391 sparc_old_sem): New structs.
392 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
393 (__sem_wait_cleanup): New function.
394 (__new_sem_wait): Use sparc_new_sem structure. Bump and afterwards
395 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
396 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
398 (__old_sem_wait): New function.
399 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
400 nptl/sysdeps/unix/sysv/linux/sparc version.
401 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
403 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
404 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
405 (__new_sem_trywait): Use sparc_old_sem structure.
406 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
407 (sem_timedwait): Use sparc_new_sem structure. Bump and afterwards
408 decrease nwaiters. Register __sem_wait_cleanup as cleanup handler.
409 Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
410 lll_futex_timed_wait.
411 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
412 Use sparc_new_sem structure. Only wake if nwaiters > 0. Pass
413 isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
415 (__old_sem_post): New function.
416 * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
417 * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
418 * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
419 * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
420 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
421 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
423 2007-08-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
425 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
426 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
427 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
428 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
429 * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
430 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
431 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
433 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
434 kernel-features.h and tcb-offsets.h.
435 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
436 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
438 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
440 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
441 to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
443 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
444 __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
446 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
447 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
448 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
449 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
451 2007-08-14 Jakub Jelinek <jakub@redhat.com>
453 * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
454 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
455 (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
456 lll_futex_timed_wait.
458 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
459 __lll_robust_unlock): Rewrite as macros instead of inline functions.
460 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
461 __lll_robust_unlock, __lll_wait_tid): Likewise.
463 2007-08-13 Jakub Jelinek <jakub@redhat.com>
465 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
467 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
468 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
469 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
470 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
472 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
473 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
476 (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
477 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
478 process private. Switch DW_CFA_advance_loc1 and some
479 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
480 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
481 (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
482 lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
483 process private. Switch DW_CFA_advance_loc{1,2} and some
484 DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
485 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
486 #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
487 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
489 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
490 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
491 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
493 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
494 (__pthread_cond_broadcast): Compare %r8 instead of
495 dep_mutex-cond_*(%rdi) with $-1.
496 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
497 (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
500 2007-08-13 Ulrich Drepper <drepper@redhat.com>
502 * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
504 2007-08-13 Jakub Jelinek <jakub@redhat.com>
506 * allocatestack.c: Include kernel-features.h.
507 * pthread_create.c: Likewise.
508 * pthread_mutex_init.c: Likewise.
510 * pthread_cond_timedwait.c: Likewise.
511 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
512 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
513 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
514 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
515 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
516 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
517 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
519 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
521 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
522 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
523 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
524 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
526 2007-08-12 Jakub Jelinek <jakub@redhat.com>
528 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
529 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
530 byte elements. One of them is the new __shared element.
531 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
532 adjust names of other padding elements.
533 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
534 [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
535 byte elements. One of them is the new __shared element.
536 [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
537 adjust names of other padding elements.
538 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
539 Renamed __pad1 element to __shared, adjust names of other padding
541 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
542 (pthread_rwlock_t): Likewise.
543 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
546 2007-08-09 Anton Blanchard <anton@samba.org>
548 * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
550 2007-08-12 Ulrich Drepper <drepper@redhat.com>
552 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
554 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
556 2007-08-11 Ulrich Drepper <drepper@redhat.com>
558 * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
559 * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
560 dealing with robust mutexes.
561 * pthread_mutex_timedlock.c: Likewise.
562 * pthread_mutex_trylock.c: Likewise.
563 * pthread_mutex_unlock.c: Likewise.
564 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
566 2007-08-06 Jakub Jelinek <jakub@redhat.com>
568 * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
569 (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
570 (PTHREAD_MUTEX_PSHARED): Define.
571 * pthread_mutex_init.c (__pthread_mutex_init): Set
572 PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
574 * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
575 instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
576 as second argument to lll_lock.
577 (LLL_MUTEX_TRYLOCK): Take mutex as argument
578 instead of its __data.__lock field.
579 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
580 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
582 (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
583 LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
584 instead of mutex->__data.__kind directly, pass
585 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
586 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
587 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
588 directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
589 (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
590 to lll_timedlock, lll_robust_timedlock, lll_unlock and
591 lll_futex_timed_wait. Use PTHREAD_MUTEX_TYPE (mutex) instead
592 of mutex->__data.__kind directly.
593 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
594 PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
595 lll_robust_timedlock, lll_unlock and lll_futex_timed_wait. Use
596 PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
597 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
598 PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
600 * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
601 PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
602 Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
604 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
605 Take mutex as argument instead of its __data.__lock field, pass
606 PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
607 (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
609 (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
610 __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
611 to lll_robust_cond_lock.
612 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
613 variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
614 lll_futex_wake. Don't use lll_futex_requeue if dependent mutex
615 has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
616 * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
617 variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
619 * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
620 variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
622 * pthread_cond_timedwait.c (__pthread_cond_wait): Add
623 pshared variable, pass it to lll_lock, lll_unlock,
624 lll_futex_timedwait and lll_futex_wake.
625 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
626 pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
628 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
629 lll_futex_wake_unlock): Add private argument, use __lll_private_flag
631 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
632 lll_futex_wake_unlock): Likewise.
633 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
635 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
636 lll_futex_wake_unlock): Likewise.
637 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
639 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
640 lll_futex_wake_unlock): Likewise.
641 (lll_futex_wake): Fix a typo.
642 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
643 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
644 (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
645 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
646 Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
647 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
648 (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
649 FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
650 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
651 (__pthread_cond_timedwait): Likewise.
652 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
653 (__condvar_cleanup, __pthread_cond_wait): Likewise.
655 2007-08-05 Jakub Jelinek <jakub@redhat.com>
657 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
658 Don't use CGOTSETUP and CGOTRESTORE macros.
659 (CGOTSETUP, CGOTRESTORE): Remove.
660 <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
663 2007-08-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
665 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
666 definitions for private futexes.
667 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
668 kernel-features.h and lowlevellock.h. Use private futexes if
670 (__lll_lock_wait_private, __lll_unlock_wake_private): New.
671 (__lll_mutex_lock_wait): Rename to
672 (__lll_lock_wait): ... this. Don't compile in for libc.so.
673 (__lll_mutex_timedlock_wait): Rename to ...
674 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday.
675 Don't compile in for libc.so.
676 (__lll_mutex_unlock_wake): Rename to ...
677 (__lll_unlock_wake): ... this. Don't compile in for libc.so.
678 (__lll_timedwait_tid): Use __NR_gettimeofday.
679 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
680 the header from assembler. Renamed all lll_mutex_* resp.
681 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
682 Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
683 (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
685 (__lll_lock_wait_private): Add prototype.
686 (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
687 __lll_robust_timedlock_wait, __lll_unlock_wake_private,
688 __lll_unlock_wake): Likewise.
689 (lll_lock): Add private argument. Call __lll_lock_wait_private
690 if private is constant LLL_PRIVATE.
691 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
692 lll_timedlock, lll_robust_timedlock): Add private argument.
693 (lll_unlock): Add private argument. Call __lll_unlock_wake_private
694 if private is constant LLL_PRIVATE.
695 (lll_robust_unlock, lll_robust_dead): Add private argument.
696 (lll_lock_t): Remove.
697 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
698 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
699 lll_cond_wake, lll_cond_broadcast): Remove.
700 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
701 kernel-features.h and lowlevellock.h.
702 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
703 (LOAD_FUTEX_WAIT): Define.
704 (__lll_robust_mutex_lock_wait): Rename to ...
705 (__lll_robust_lock_wait): ... this. Add private argument.
706 Use LOAD_FUTEX_WAIT macro.
707 (__lll_robust_mutex_timedlock_wait): Rename to ...
708 (__lll_robust_timedlock_wait): ... this. Add private argument.
709 Use __NR_gettimeofday. Use LOAD_FUTEX_WAIT macro.
710 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
712 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
713 (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
714 __lll_mutex_{lock,unlock}_*.
715 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
716 lowlevellock.h and pthread-errnos.h.
717 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
718 FUTEX_CMP_REQUEUE, EINVAL): Remove.
719 (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
720 __lll_mutex_{lock,unlock}_*.
721 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
722 lowlevellock.h and pthread-errnos.h.
723 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
724 (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
725 __lll_mutex_{lock,unlock}_*.
726 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
728 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
729 (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
730 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
731 (__condvar_tw_cleanup): Likewise.
732 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
734 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
735 (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
736 __lll_mutex_{lock,unlock}_*.
737 ( __condvar_w_cleanup): Likewise.
738 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
739 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
740 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
742 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
743 (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
744 __lll_mutex_{lock,unlock}_*.
745 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
747 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
748 FUTEX_PRIVATE_FLAG): Remove.
749 (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
750 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
751 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
753 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
754 FUTEX_PRIVATE_FLAG): Remove.
755 (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
756 __lll_mutex_{lock,unlock}_*. Use __NR_gettimeofday.
757 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
759 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
760 (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
761 __lll_mutex_{lock,unlock}_*.
762 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
764 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
765 (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
766 __lll_mutex_{lock,unlock}_*.
767 * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
768 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
769 (__new_sem_post): Use standard initial exec code sequences.
770 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
772 (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
773 FUTEX_PRIVATE_FLAG): Remove.
774 (sem_timedwait): Use __NR_gettimeofday. Use standard initial
776 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
777 (__new_sem_trywait): Use standard initial exec code sequences.
778 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
779 (__new_sem_wait): Use standard initial exec code sequences.
781 2007-07-31 Anton Blanchard <anton@samba.org>
783 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
784 Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
787 2007-07-31 Jakub Jelinek <jakub@redhat.com>
789 * allocatestack.c (stack_cache_lock): Change type to int.
790 (get_cached_stack, allocate_stack, __deallocate_stack,
791 __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
792 __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
793 as second argument to lll_lock and lll_unlock macros on
795 * pthread_create.c (__find_in_stack_list): Likewise.
796 (start_thread): Similarly with pd->lock. Use lll_robust_dead
797 macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
799 * descr.h (struct pthread): Change lock and setxid_futex field
801 * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
802 LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
803 * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
804 * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
806 * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
807 * pthread_cond_init.c (__pthread_cond_init): Likewise.
808 * pthreadP.h (__attr_list_lock): Change type to int.
809 * pthread_attr_init.c (__attr_list_lock): Likewise.
810 * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
811 ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
813 * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
814 also for lll_futex_{wake,wait}.
815 * pthread_barrier_init.c (pthread_barrier_init): Make iattr
817 * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
818 LLL_SHARED as second argument to lll_{,un}lock.
819 * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
820 * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
821 * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
822 * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
824 * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
825 as second argument to lll_{,un}lock macros on pd->lock.
826 * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
827 * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
828 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
829 * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
831 * sysdeps/pthread/createthread.c (do_clone, create_thread):
833 * pthread_once.c (once_lock): Change type to int.
834 (__pthread_once): Pass LLL_PRIVATE as second argument to
835 lll_{,un}lock macros on once_lock.
836 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
837 lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
838 rwlock->__data.__shared as second argument to them and similarly
840 * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
842 * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
844 * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
845 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
846 * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
847 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
848 * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
849 to lll_{,un}lock macros on __sem_mappings_lock.
850 * sem_open.c (check_add_mapping): Likewise.
851 (__sem_mappings_lock): Change type to int.
852 * semaphoreP.h (__sem_mappings_lock): Likewise.
853 * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
854 LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
855 instead of lll_*mutex_*, pass LLL_SHARED as last
857 (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
858 pass LLL_SHARED as last argument.
859 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
860 LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
861 lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
862 pass LLL_SHARED as last argument.
863 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
864 lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
865 LLL_SHARED as last argument.
866 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
867 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
869 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
870 __libc_lock_lock_recursive, __libc_lock_unlock,
871 __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
872 argument to lll_{,un}lock.
873 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
874 _IO_lock_unlock): Likewise.
875 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
877 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
878 Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
880 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
882 (__fork_lock): Change type to int.
883 * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
884 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
885 isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
887 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
888 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
889 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
891 (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
892 pass it through to lll_futex_*wait, only compile in when
894 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
895 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
896 argument and pass it through to lll_futex_*wait.
897 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
898 lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
899 lll_robust_*. Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
900 inline functions to __lll_* resp. __lll_robust_*.
901 (LLL_MUTEX_LOCK_INITIALIZER): Remove.
902 (lll_mutex_dead): Add private argument.
903 (__lll_lock_wait_private): New prototype.
904 (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
905 __lll_robust_lock_timedwait): Add private argument to prototypes.
906 (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
907 call __lll_lock_wait_private, otherwise pass private to
909 (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
910 __lll_robust_timedlock): Add private argument, pass it to
911 __lll_*wait functions.
912 (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
913 call __lll_unlock_wake_private, otherwise pass private to
915 (__lll_robust_unlock): Add private argument, pass it to
916 __lll_robust_unlock_wake.
917 (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
918 lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
919 argument, pass it through to __lll_* inline function.
920 (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
921 (lll_lock_t): Remove.
922 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
923 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
924 lll_cond_wake, lll_cond_broadcast): Remove.
925 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
926 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
927 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
928 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
929 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
930 the header from assembler. Renamed all lll_mutex_* resp.
931 lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
932 (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
933 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
934 (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
935 LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
936 (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
937 __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
939 (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
940 (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
941 rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
942 (lll_trylock): Likewise, use __lll_trylock_asm, pass
943 MULTIPLE_THREADS_OFFSET as another asm operand.
944 (lll_lock): Add private argument, use __lll_lock_asm_start, pass
945 MULTIPLE_THREADS_OFFSET as last asm operand, call
946 __lll_lock_wait_private if private is constant LLL_PRIVATE,
947 otherwise pass private as another argument to __lll_lock_wait.
948 (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
949 lll_timedlock, lll_robust_timedlock): Add private argument, pass
950 private as another argument to __lll_*lock_wait call.
951 (lll_unlock): Add private argument, use __lll_unlock_asm, pass
952 MULTIPLE_THREADS_OFFSET as another asm operand, call
953 __lll_unlock_wake_private if private is constant LLL_PRIVATE,
954 otherwise pass private as another argument to __lll_unlock_wake.
955 (lll_robust_unlock): Add private argument, pass private as another
956 argument to __lll_unlock_wake.
957 (lll_robust_dead): Add private argument, use __lll_private_flag
959 (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
960 LLL_MUTEX_LOCK_INITIALIZER.
961 (lll_lock_t): Remove.
962 (LLL_LOCK_INITIALIZER_WAITERS): Define.
963 (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
964 __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
965 lll_cond_wake, lll_cond_broadcast): Remove.
966 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
967 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
968 2007-05-2{3,9} changes.
969 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
970 kernel-features.h and lowlevellock.h.
971 (LOAD_PRIVATE_FUTEX_WAIT): Define.
972 (LOAD_FUTEX_WAIT): Rewritten.
973 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
975 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
976 (__lll_mutex_lock_wait): Rename to ...
977 (__lll_lock_wait): ... this. Take futex addr from %edx instead of
978 %ecx, %ecx is now private argument. Don't compile in for libc.so.
979 (__lll_mutex_timedlock_wait): Rename to ...
980 (__lll_timedlock_wait): ... this. Use __NR_gettimeofday. %esi
981 contains private argument. Don't compile in for libc.so.
982 (__lll_mutex_unlock_wake): Rename to ...
983 (__lll_unlock_wake): ... this. %ecx contains private argument.
984 Don't compile in for libc.so.
985 (__lll_timedwait_tid): Use __NR_gettimeofday.
986 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
987 kernel-features.h and lowlevellock.h.
988 (LOAD_FUTEX_WAIT): Define.
989 (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
991 (__lll_robust_mutex_lock_wait): Rename to ...
992 (__lll_robust_lock_wait): ... this. Futex addr is now in %edx
993 argument, %ecx argument contains private. Use LOAD_FUTEX_WAIT
995 (__lll_robust_mutex_timedlock_wait): Rename to ...
996 (__lll_robust_timedlock_wait): ... this. Use __NR_gettimeofday.
997 %esi argument contains private, use LOAD_FUTEX_WAIT macro.
998 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1000 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1001 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1002 PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1003 __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1004 to __lll_lock_wait in %edx.
1005 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1006 Include lowlevellock.h and pthread-errnos.h.
1007 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1008 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1009 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1010 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1011 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1013 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1014 Include lowlevellock.h and pthread-errnos.h.
1015 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1016 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1017 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1018 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1019 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1021 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1022 Include lowlevellock.h.
1023 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1025 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1026 cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1027 pass LLL_SHARED in %ecx to both __lll_lock_wait and
1028 __lll_unlock_wake. Use __NR_gettimeofday.
1029 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1030 Include lowlevellock.h.
1031 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1032 (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1033 to __lll_*, pass cond_lock address in %edx rather than %ecx to
1034 __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1035 and __lll_unlock_wake.
1036 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1037 Include lowlevellock.h.
1038 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1039 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1040 MUTEX(%ebx) address in %edx rather than %ecx to
1041 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1042 and __lll_unlock_wake. Move return value from %ecx to %edx
1044 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1045 Include lowlevellock.h.
1046 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1048 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1049 MUTEX(%ebp) address in %edx rather than %ecx to
1050 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1051 and __lll_unlock_wake. Move return value from %ecx to %edx
1052 register. Use __NR_gettimeofday.
1053 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1054 Include lowlevellock.h.
1055 (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1057 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1058 MUTEX(%ebp) address in %edx rather than %ecx to
1059 __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1060 and __lll_unlock_wake. Move return value from %ecx to %edx
1061 register. Use __NR_gettimeofday.
1062 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1063 Include lowlevellock.h.
1064 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1065 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1066 MUTEX(%edi) address in %edx rather than %ecx to
1067 __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1068 and __lll_unlock_wake.
1069 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1070 Include lowlevellock.h.
1071 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1072 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1073 MUTEX(%ebx) address in %edx rather than %ecx to
1074 __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1075 and __lll_unlock_wake. Move return value from %ecx to %edx
1077 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1079 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1081 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1082 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1083 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1085 (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1086 (sem_timedwait): Use __NR_gettimeofday.
1087 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1089 (LOCK): Don't define.
1090 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1092 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1093 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1095 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1096 2007-05-2{3,9} changes.
1097 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1098 kernel-features.h and lowlevellock.h.
1099 (LOAD_PRIVATE_FUTEX_WAIT): Define.
1100 (LOAD_FUTEX_WAIT): Rewritten.
1101 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1102 (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1103 (__lll_mutex_lock_wait): Rename to ...
1104 (__lll_lock_wait): ... this. %esi is now private argument.
1105 Don't compile in for libc.so.
1106 (__lll_mutex_timedlock_wait): Rename to ...
1107 (__lll_timedlock_wait): ... this. %esi contains private argument.
1108 Don't compile in for libc.so.
1109 (__lll_mutex_unlock_wake): Rename to ...
1110 (__lll_unlock_wake): ... this. %esi contains private argument.
1111 Don't compile in for libc.so.
1112 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1113 kernel-features.h and lowlevellock.h.
1114 (LOAD_FUTEX_WAIT): Define.
1115 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1116 (__lll_robust_mutex_lock_wait): Rename to ...
1117 (__lll_robust_lock_wait): ... this. %esi argument contains private.
1118 Use LOAD_FUTEX_WAIT macro.
1119 (__lll_robust_mutex_timedlock_wait): Rename to ...
1120 (__lll_robust_timedlock_wait): ... this. %esi argument contains
1121 private, use LOAD_FUTEX_WAIT macro.
1122 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1124 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1125 (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1126 PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1127 __lll_lock_wait and __lll_unlock_wake.
1128 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1129 Include lowlevellock.h and pthread-errnos.h.
1130 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1131 FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1132 (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1133 pass LLL_SHARED in %esi to both __lll_lock_wait and
1135 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1136 Include lowlevellock.h and pthread-errnos.h.
1137 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1138 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1139 (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1140 pass LLL_SHARED in %esi to both __lll_lock_wait and
1142 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1143 Include lowlevellock.h.
1144 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1145 (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1146 pass LLL_SHARED in %esi to both __lll_lock_wait and
1148 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1149 Include lowlevellock.h.
1150 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1151 (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1152 to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1153 and __lll_unlock_wake.
1154 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1155 Include lowlevellock.h.
1156 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1158 (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1159 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1160 and __lll_unlock_wake.
1161 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1162 Include lowlevellock.h.
1163 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1165 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1166 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1167 and __lll_unlock_wake.
1168 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1169 Include lowlevellock.h.
1170 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1172 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1173 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1174 and __lll_unlock_wake.
1175 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1176 Include lowlevellock.h.
1177 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1179 (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1180 pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1181 and __lll_unlock_wake.
1182 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1183 Include lowlevellock.h.
1184 (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1186 (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1187 pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1188 and __lll_unlock_wake.
1189 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1191 (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1193 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1194 (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1195 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1197 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1198 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1200 (LOCK): Don't define.
1201 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1203 (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1204 * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1205 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1206 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1207 * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1208 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1209 (__lll_lock_wait_private): New function.
1210 (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1211 it to lll_futex_*wait. Don't compile in for libc.so.
1212 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1214 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1215 (struct sparc_pthread_barrier): Remove.
1216 (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1217 struct sparc_pthread_barrier. Pass
1218 ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1219 and lll_futex_wait macros.
1220 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1222 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1223 Include sparc pthread_barrier_wait.c instead of generic one.
1225 2007-07-30 Jakub Jelinek <jakub@redhat.com>
1227 * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1229 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1230 (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1232 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1233 (pthread_rwlock_timedwrlock): Likewise.
1234 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1235 (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1237 2007-07-31 Jakub Jelinek <jakub@redhat.com>
1239 * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1241 2007-07-26 Jakub Jelinek <jakub@redhat.com>
1243 * tst-locale2.c (useless): Add return statement.
1245 2007-07-24 Jakub Jelinek <jakub@redhat.com>
1247 * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1248 lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1249 * pthread_create.c (start_thread): Likewise.
1250 * init.c (sighandler_setxid): Likewise.
1251 * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1252 * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1253 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1254 * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1255 * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1256 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1257 * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1258 * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1259 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1261 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1263 * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1265 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1266 __rtld_notify): Likewise.
1267 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1268 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1269 __pthread_once): Likewise.
1270 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1271 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1272 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1273 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1274 (lll_futex_wait): Add private argument, define as wrapper around
1275 lll_futex_timed_wait.
1276 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1277 use __lll_private_flag macro.
1278 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1279 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1280 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1281 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1282 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1283 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1284 (lll_futex_wait): Add private argument, define as wrapper around
1285 lll_futex_timed_wait.
1286 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1287 use __lll_private_flag macro.
1288 (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1289 __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1290 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1292 (lll_futex_timed_wait, lll_futex_wake): Use it.
1293 (lll_private_futex_wait, lll_private_futex_timed_wait,
1294 lll_private_futex_wake): Removed.
1295 * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1296 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1297 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1298 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1299 (lll_futex_wait): Add private argument, define as wrapper around
1300 lll_futex_timed_wait.
1301 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1302 use __lll_private_flag macro.
1303 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1304 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1306 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1307 (lll_private_futex_wait, lll_private_futex_timed_wait,
1308 lll_private_futex_wake): Removed.
1309 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1310 Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1311 (lll_private_futex_wait, lll_private_futex_timed_wait,
1312 lll_private_futex_wake): Removed.
1313 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1314 __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1315 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1316 LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1317 (lll_futex_wait): Add private argument, define as wrapper around
1318 lll_futex_timed_wait.
1319 (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1320 use __lll_private_flag macro.
1321 (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1322 lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1324 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1326 (lll_futex_timed_wait, lll_futex_wake): Use it.
1327 (lll_private_futex_wait, lll_private_futex_timed_wait,
1328 lll_private_futex_wake): Removed.
1330 2007-07-27 Jakub Jelinek <jakub@redhat.com>
1332 * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1333 of the structure for sparc32.
1335 2007-07-26 Aurelien Jarno <aurelien@aurel32.net>
1337 * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1339 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1341 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1342 code used when private futexes are assumed.
1343 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1346 2007-07-23 Jakub Jelinek <jakub@redhat.com>
1348 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1349 (__lll_private_flag): Define.
1350 (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1351 (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1353 (lll_private_futex_wait, lll_private_futex_timedwait,
1354 lll_private_futex_wake): Define as wrapper around non-_private
1356 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1357 (__lll_private_flag): Define.
1358 (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1359 (lll_private_futex_wait, lll_private_futex_timedwait,
1360 lll_private_futex_wake): Define as wrapper around non-_private
1363 2007-07-10 Steven Munroe <sjmunroe@us.ibm.com>
1365 * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1366 parameter to lll_futex_wait call.
1367 * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1369 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1370 Replace lll_futex_wait with lll_private_futex_wait.
1371 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1372 Add LLL_SHARED parameter to lll_futex_wake().
1374 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1375 LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1376 lll_private_futex_wake.
1377 (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1378 bit from private parm before syscall.
1379 (lll_futex_timed_wait): Likewise.
1380 (lll_futex_wake): Likewise.
1381 (lll_futex_wake_unlock): Likewise.
1382 (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1383 (lll_robust_mutex_unlock): Likewise.
1384 (lll_mutex_unlock_force): Likewise.
1385 (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1387 2007-07-23 Ulrich Drepper <drepper@redhat.com>
1389 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1390 compilation when unconditionally using private futexes.
1391 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1392 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1394 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1395 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1397 2007-07-17 Jakub Jelinek <jakub@redhat.com>
1399 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1402 2007-07-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1404 * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1407 2007-05-16 Roland McGrath <roland@redhat.com>
1409 * init.c (__nptl_initial_report_events): New variable.
1410 (__pthread_initialize_minimal_internal): Initialize pd->report_events
1413 2007-06-22 Jakub Jelinek <jakub@redhat.com>
1415 * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1416 cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1418 2007-06-19 Ulrich Drepper <drepper@redhat.com>
1420 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1423 2007-06-18 Ulrich Drepper <drepper@redhat.com>
1425 * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1426 * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1427 * pthread_mutex_timedlock.c: Likewise.
1428 * pthread_mutex_trylock.c: Likewise.
1429 * pthread_mutex_unlock.c: Likewise.
1431 2007-06-17 Andreas Schwab <schwab@suse.de>
1433 * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1436 2007-06-17 Ulrich Drepper <drepper@redhat.com>
1438 * allocatestack.c (allocate_stack): Make code compile if
1439 __ASSUME_PRIVATE_FUTEX is set.
1441 2007-06-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1443 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1444 (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1446 (__pthread_rwlock_wrlock): Likewise.
1447 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1448 (pthread_rwlock_timedrdlock): Likewise.
1449 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1450 (pthread_rwlock_timedwrlock): Likewise.
1451 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1452 (__pthread_rwlock_unlock): Likewise.
1454 2007-06-10 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1456 * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1457 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1458 Split __flags into __flags, __shared, __pad1 and __pad2.
1459 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1460 futexes if they are available.
1461 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1462 in libc-lowlevellock.S allow using private futexes.
1463 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1464 FUTEX_PRIVATE_FLAG. Add additional parameter to lll_futex_wait,
1465 lll_futex_timed_wait and lll_futex_wake. Change lll_futex_wait
1466 to call lll_futex_timed_wait. Add lll_private_futex_wait,
1467 lll_private_futex_timed_wait and lll_private_futex_wake.
1468 (lll_robust_mutex_unlock): Fix typo.
1469 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1470 field in futex command setup.
1471 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1472 COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1473 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1474 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1475 if they are available. Remove clear_once_control.
1476 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1477 futexes if they are available.
1478 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1479 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1480 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1481 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1482 * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1483 Wake only when there are waiters.
1484 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1485 support. Indicate that there are waiters. Remove unnecessary
1486 extra cancellation test.
1487 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise. Removed
1488 left-over duplication of __sem_wait_cleanup.
1490 2007-06-07 Ulrich Drepper <drepper@redhat.com>
1492 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1493 parameter to lll_futex_wait, lll_futex_timed_wait, and
1494 lll_futex_wake. Change lll_futex_wait to call lll_futex_timed_wait.
1495 Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1496 lll_private_futex_wake.
1497 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1498 * allocatestack.c: Adjust use of lll_futex_* macros.
1500 * lowlevellock.h: Likewise.
1501 * pthread_barrier_wait.c: Likewise.
1502 * pthread_cond_broadcast.c: Likewise.
1503 * pthread_cond_destroy.c: Likewise.
1504 * pthread_cond_signal.c: Likewise.
1505 * pthread_cond_timedwait.c: Likewise.
1506 * pthread_cond_wait.c: Likewise.
1507 * pthread_create.c: Likewise.
1508 * pthread_mutex_lock.c: Likewise.
1509 * pthread_mutex_setprioceiling.c: Likewise.
1510 * pthread_mutex_timedlock.c: Likewise.
1511 * pthread_mutex_unlock.c: Likewise.
1512 * pthread_rwlock_timedrdlock.c: Likewise.
1513 * pthread_rwlock_timedwrlock.c: Likewise.
1514 * pthread_rwlock_unlock.c: Likewise.
1515 * sysdeps/alpha/tls.h: Likewise.
1516 * sysdeps/i386/tls.h: Likewise.
1517 * sysdeps/ia64/tls.h: Likewise.
1518 * sysdeps/powerpc/tls.h: Likewise.
1519 * sysdeps/pthread/aio_misc.h: Likewise.
1520 * sysdeps/pthread/gai_misc.h: Likewise.
1521 * sysdeps/s390/tls.h: Likewise.
1522 * sysdeps/sh/tls.h: Likewise.
1523 * sysdeps/sparc/tls.h: Likewise.
1524 * sysdeps/unix/sysv/linux/fork.c: Likewise.
1525 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1526 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1527 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1528 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1529 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1530 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1531 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1532 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1533 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1535 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1536 * sysdeps/x86_64/tls.h: Likewise.
1538 2007-05-29 Ulrich Drepper <drepper@redhat.com>
1540 * pthread_getattr_np.c: No need to install a cancellation handler,
1541 this is no cancellation point.
1542 * pthread_getschedparam.c: Likewise.
1543 * pthread_setschedparam.c: Likewise.
1544 * pthread_setschedprio.c: Likewise.
1545 * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1547 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1548 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1549 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1550 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1551 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1552 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1553 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1554 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1555 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1556 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1557 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1558 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1560 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1561 whether there are more than one thread makes no sense here since
1562 we only call the slow path if the locks are taken.
1563 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1565 * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1566 COND_NWAITERS_SHIFT.
1567 * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1569 * pthread_cond_init.c: Likewise.
1570 * pthread_cond_timedwait.c: Likewise.
1571 * pthread_cond_wait.c: Likewise.
1572 * pthread_condattr_getclock.c: Likewise.
1573 * pthread_condattr_setclock.c: Likewise.
1574 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1575 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1576 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1577 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1578 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1580 2007-05-28 Jakub Jelinek <jakub@redhat.com>
1582 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1585 * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1587 (THREAD_GSCOPE_GET_FLAG): Remove.
1588 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1589 * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1591 * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1592 (THREAD_GSCOPE_GET_FLAG): Remove.
1593 (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1594 instead of THREAD_GSCOPE_GET_FLAG.
1595 (THREAD_GSCOPE_SET_FLAG): Likewise. Add atomic_write_barrier after
1597 * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1598 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1599 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1600 THREAD_GSCOPE_WAIT): Define.
1601 * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1602 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1603 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1604 THREAD_GSCOPE_WAIT): Define.
1605 * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1606 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1607 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1608 THREAD_GSCOPE_WAIT): Define.
1609 * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1610 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1611 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1612 THREAD_GSCOPE_WAIT): Define.
1614 2007-05-24 Richard Henderson <rth@redhat.com>
1616 * descr.h (struct pthread): Add header.gscope_flag.
1617 * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1618 THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1619 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1620 THREAD_GSCOPE_WAIT): Define.
1622 2007-05-27 Ulrich Drepper <drepper@redhat.com>
1624 * init.c: Make it compile with older kernel headers.
1626 * tst-initializers1.c: Show through exit code which test failed.
1628 * pthread_rwlock_init.c: Also initialize __shared field.
1629 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1630 element in rwlock structure into four byte elements. One of them is
1631 the new __shared element.
1632 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1634 [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1635 __shared, adjust names of other padding elements.
1636 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1637 * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1638 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1639 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1641 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1642 futex to use private operations if possible.
1643 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1645 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1647 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1648 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1649 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1650 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1652 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1654 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1655 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1657 2007-05-26 Ulrich Drepper <drepper@redhat.com>
1659 * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1660 * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1661 * pthread_rwlock_timedrdlock.c: Likewise.
1662 * pthread_rwlock_tryrdlock.c: Likewise.
1664 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1667 * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1668 * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1669 duplication of __sem_wait_cleanup.
1671 * allocatestack.c: Revert last change.
1673 * sysdeps/i386/tls.h: Likewise.
1674 * sysdeps/x86_64/tls.h: Likewise.
1675 * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1677 * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1679 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1681 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1682 * pthread_barrier_init.c: Set private flag if pshared and private
1683 futexes are supported.
1684 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1685 private field in futex command setup.
1686 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1688 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1690 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1692 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1693 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1694 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1695 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1696 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1698 * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1699 * sem_init.c (__new_sem_init): Rewrite to initialize all three
1700 fields in the structure.
1701 (__old_sem_init): New function.
1702 * sem_open.c: Initialize all fields of the structure.
1703 * sem_getvalue.c: Adjust for renamed element.
1704 * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1705 (gen-as-const-headers): Add structsem.sym.
1706 * sysdeps/unix/sysv/linux/structsem.sym: New file.
1707 * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1708 struct new_sem. Add struct old_sem.
1709 * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1710 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1711 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1712 * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1713 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1714 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1715 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1716 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1717 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1718 * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1719 * tst-sem10.c: New file.
1720 * tst-sem11.c: New file.
1721 * tst-sem12.c: New file.
1722 * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1725 2007-05-25 Ulrich Drepper <drepper@redhat.com>
1726 Jakub Jelinek <jakub@redhat.com>
1728 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1729 Move __pthread_enable_asynccancel right before futex syscall.
1730 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1733 2007-05-24 Jakub Jelinek <jakub@redhat.com>
1735 * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1736 THREAD_COPY_PRIVATE_FUTEX): Define.
1737 * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1738 THREAD_COPY_PRIVATE_FUTEX): Define.
1739 * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1740 * init.c (__pthread_initialize_minimal_internal): Use
1741 THREAD_SET_PRIVATE_FUTEX.
1743 * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1744 (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1745 THREAD_GSCOPE_FLAG_WAIT): Define.
1746 (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1747 THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1748 * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1750 (THREAD_GSCOPE_GET_FLAG): Define.
1751 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1752 * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1753 instead of ->header.gscope_flag directly.
1755 2007-05-23 Ulrich Drepper <drepper@redhat.com>
1757 * init.c (__pthread_initialize_minimal_internal): Check whether
1758 private futexes are available.
1759 * allocatestack.c (allocate_stack): Copy private_futex field from
1760 current thread into the new stack.
1761 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1762 futexes if they are available.
1763 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1764 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1765 in libc-lowlevellock.S allow using private futexes.
1766 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1767 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1769 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1770 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1771 if they are available.
1772 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1773 * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1774 * sysdeps/i386/tcb-offsets.sym: Likewise.
1775 * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1776 * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1778 2007-05-21 Ulrich Drepper <drepper@redhat.com>
1780 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1781 Remove ptr_wait_lookup_done again.
1782 * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1783 (__pthread_initialize_minimal_internal): Initialize
1784 _dl_wait_lookup_done pointer in _rtld_global directly.
1785 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1786 Remove code to code _dl_wait_lookup_done.
1787 * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1790 2007-05-21 Jakub Jelinek <jakub@redhat.com>
1792 * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1793 pthread_mutex_init failed with ENOTSUP.
1795 2007-05-19 Ulrich Drepper <drepper@redhat.com>
1797 * allocatestack.c (__wait_lookup_done): New function.
1798 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1799 Add ptr_wait_lookup_done.
1800 * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1801 * pthreadP.h: Declare __wait_lookup_done.
1802 * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1803 Define macros to implement reference handling of global scope.
1804 * sysdeps/x86_64/tls.h: Likewise.
1805 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1806 Initialize GL(dl_wait_lookup_done).
1808 2007-05-17 Ulrich Drepper <drepper@redhat.com>
1811 * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1813 * pthread_mutex_timedlock.c: Likewise.
1814 * pthread_mutex_trylock.c: Likewise.
1815 Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1817 * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1818 * tst-robust9.c: New file.
1819 * tst-robustpi9.c: New file.
1821 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1822 unnecessary extra cancellation test.
1824 2007-05-14 Ulrich Drepper <drepper@redhat.com>
1826 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1827 extra cancellation test.
1828 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1830 2007-05-10 Ulrich Drepper <drepper@redhat.com>
1832 * descr.h (struct pthread): Rearrange members to fill hole in
1835 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1836 (__pthread_setaffinity_new): If syscall was successful and
1837 RESET_VGETCPU_CACHE is defined, use it before returning.
1838 * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1840 2007-05-10 Jakub Jelinek <jakub@redhat.com>
1843 * tst-align2.c: Include stackinfo.h.
1844 * tst-getpid1.c: Likewise.
1846 2007-05-02 Carlos O'Donell <carlos@systemhalted.org>
1849 * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1850 * tst-getpid1.c (do_test): Likewise.
1853 * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1854 (allocate_stack): Likewise.
1856 2007-05-07 Ulrich Drepper <drepper@redhat.com>
1858 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1859 (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1860 (__lll_robust_timedlock_wait): Likewise.
1861 Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1863 2007-05-06 Mike Frysinger <vapier@gentoo.org>
1866 * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1867 * tst-cancel4.c (tf_fdatasync): New test.
1869 2007-04-27 Ulrich Drepper <drepper@redhat.com>
1872 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1873 check mutexes like normal mutexes.
1876 * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1877 Initialize the whole sigevent structure to appease valgrind.
1879 2007-04-25 Ulrich Drepper <drepper@redhat.com>
1881 * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1882 * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1884 2007-04-06 Ulrich Drepper <drepper@redhat.com>
1886 * tst-locale1.c: Avoid warnings.
1887 * tst-locale2.c: Likewise.
1889 2007-03-19 Steven Munroe <sjmunroe@us.ibm.com>
1891 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1892 (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1894 2007-03-16 Jakub Jelinek <jakub@redhat.com>
1896 * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1897 __extern_always_inline where appropriate.
1898 * sysdeps/pthread/pthread.h: Likewise.
1900 2007-03-13 Richard Henderson <rth@redhat.com>
1902 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1903 separate cfi regions for the two subsections.
1905 2007-02-25 Ulrich Drepper <drepper@redhat.com>
1907 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1908 new thread, don't just decrement it.
1909 Patch by Suzuki K P <suzuki@in.ibm.com>.
1911 2007-02-21 Ulrich Drepper <drepper@redhat.com>
1913 * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1914 PTHFCT_CALL definition.
1916 2007-02-18 Ulrich Drepper <drepper@redhat.com>
1918 * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1919 available, don't use it.
1921 2007-02-09 Jakub Jelinek <jakub@redhat.com>
1923 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1924 (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1925 call into the kernel to delay.
1927 2007-01-18 Ulrich Drepper <drepper@redhat.com>
1929 * tst-initializers1.c: We want to test the initializers as seen
1930 outside of libc, so undefined _LIBC.
1932 * pthread_join.c (cleanup): Avoid warning.
1934 2007-01-17 Ulrich Drepper <drepper@redhat.com>
1936 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1937 (__lll_timedwait_tid): Add unwind info.
1939 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1940 function table, mangle the pointers.
1941 * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1942 * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1943 * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1944 demangle pointers before use.
1945 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1947 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1948 * sysdeps/pthread/setxid.h: Likewise.
1950 2007-01-12 Ulrich Drepper <drepper@redhat.com>
1952 * tst-rwlock7.c: Show some more information in case of correct
1955 2007-01-11 Ulrich Drepper <drepper@redhat.com>
1957 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1958 (lll_futex_timed_wait): Undo part of last change, don't negate
1961 2007-01-10 Ulrich Drepper <drepper@redhat.com>
1963 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups. Define
1964 FUTEX_CMP_REQUEUE and lll_futex_requeue.
1966 2006-12-28 David S. Miller <davem@davemloft.net>
1968 * shlib-versions: Fix sparc64 linux target specification.
1970 2007-01-10 Jakub Jelinek <jakub@redhat.com>
1972 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1973 Adjust include path for pthread_barrier_wait.c move.
1975 2006-12-21 Jakub Jelinek <jakub@redhat.com>
1977 * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1978 tid isn't reread from pd->tid in between ESRCH test and the syscall.
1980 2006-12-06 Jakub Jelinek <jakub@redhat.com>
1982 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1983 6 argument cancellable syscalls.
1984 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1985 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1986 6 argument cancellable syscalls.
1987 (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1989 2006-12-09 Ulrich Drepper <drepper@redhat.com>
1991 * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1992 (__rtld_mrlock_initialize): Add missing closing parenthesis.
1994 2006-10-30 Jakub Jelinek <jakub@redhat.com>
1996 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1997 __sync_lock_release instead of __sync_lock_release_si.
1999 2006-10-29 Jakub Jelinek <jakub@redhat.com>
2001 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2003 (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2004 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2005 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2006 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2007 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2008 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2009 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2010 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2011 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2012 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2013 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2015 2006-10-27 Ulrich Drepper <drepper@redhat.com>
2017 * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2018 * pthread_barrier_wait.c: ...here.
2019 * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2020 * pthread_cond_broadcast.c: ...here.
2021 * sysdeps/pthread/pthread_cond_signal.c: Move to...
2022 * pthread_cond_signal.c: ...here.
2023 * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2024 * pthread_cond_timedwait.c: ...here.
2025 * sysdeps/pthread/pthread_cond_wait.c: Move to...
2026 * pthread_cond_wait.c: ...here.
2027 * sysdeps/pthread/pthread_once.c: Move to...
2028 * pthread_once.c: ...here.
2029 * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2030 * pthread_rwlock_rdlock.c: ...here.
2031 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2032 * pthread_rwlock_timedrdlock.c: ...here.
2033 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2034 * pthread_rwlock_timedwrlock.c: ...here.
2035 * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2036 * pthread_rwlock_unlock.c: ...here.
2037 * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2038 * pthread_rwlock_wrlock.c: ...here.
2039 * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2040 * pthread_spin_destroy.c: ...here.
2041 * sysdeps/pthread/pthread_spin_init.c: Move to...
2042 * pthread_spin_init.c: ...here.
2043 * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2044 * pthread_spin_unlock.c: ...here.
2045 * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2046 * pthread_getcpuclockid.c: ...here.
2048 * init.c: USE_TLS support is now always enabled.
2049 * tst-tls5.h: Likewise.
2050 * sysdeps/alpha/tls.h: Likewise.
2051 * sysdeps/i386/tls.h: Likewise.
2052 * sysdeps/ia64/tls.h: Likewise.
2053 * sysdeps/powerpc/tls.h: Likewise.
2054 * sysdeps/s390/tls.h: Likewise.
2055 * sysdeps/sh/tls.h: Likewise.
2056 * sysdeps/sparc/tls.h: Likewise.
2057 * sysdeps/x86_64/tls.h: Likewise.
2059 2006-10-27 Jakub Jelinek <jakub@redhat.com>
2061 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2062 __rtld_mrlock_change): Update oldval if atomic compare and exchange
2065 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2066 Define to THREAD_SELF->header.multiple_threads.
2067 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2069 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2071 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2072 (SINGLE_THREAD_P): Likewise.
2073 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2074 (SINGLE_THREAD_P): Likewise.
2075 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2076 (SINGLE_THREAD_P): Likewise.
2077 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2078 (SINGLE_THREAD_P): Likewise.
2079 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2081 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2082 (SINGLE_THREAD_P): Likewise.
2083 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2084 (SINGLE_THREAD_P): Likewise.
2085 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2088 2006-10-26 Jakub Jelinek <jakub@redhat.com>
2090 * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2091 by default rather than 2_3_3.
2093 2006-10-17 Jakub Jelinek <jakub@redhat.com>
2095 * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2096 __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2097 atomic_* instead of catomic_* macros.
2099 2006-10-12 Ulrich Drepper <drepper@redhat.com>
2102 * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2103 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2104 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2105 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2106 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2107 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2108 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2109 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2110 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2111 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2112 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2113 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2114 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2116 2006-10-11 Ulrich Drepper <drepper@redhat.com>
2118 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2119 cancelable syscalls with six parameters.
2121 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2122 operations instead of atomic_*.
2124 2006-10-09 Ulrich Drepper <drepper@redhat.com>
2126 * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2128 2006-10-07 Ulrich Drepper <drepper@redhat.com>
2130 * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2131 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2132 * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2134 * pthread_attr_setstack.c: Allow overwriting the version number of the
2136 * pthread_attr_setstacksize.c: Likewise.
2137 (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2139 * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2140 pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2142 2006-09-24 Ulrich Drepper <drepper@redhat.com>
2145 * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2146 Patch by Petr Baudis.
2148 2006-09-18 Jakub Jelinek <jakub@redhat.com>
2150 * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2152 * tst-cancel2.c (tf): Loop as long as something was written.
2154 2006-09-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2156 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2157 mutexes wake all mutexes.
2158 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2159 WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2160 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2162 2006-09-12 Ulrich Drepper <drepper@redhat.com>
2164 * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2165 to guarantee the thread is always canceled.
2167 2006-09-08 Jakub Jelinek <jakub@redhat.com>
2169 * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2171 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2172 increase FUTEX if increasing WAKEUP_SEQ. Fix comment typo.
2173 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2174 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2175 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2177 2006-09-08 Ulrich Drepper <drepper@redhat.com>
2180 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2181 increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2182 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2183 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2184 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2185 * Makefile (tests): Add tst-cond22.
2186 * tst-cond22.c: New file.
2188 2006-09-05 Ulrich Drepper <drepper@redhat.com>
2191 * descr.h (struct pthread): Add parent_cancelhandling.
2192 * sysdeps/pthread/createthread.c (create_thread): Pass parent
2193 cancelhandling value to child.
2194 * pthread_create.c (start_thread): If parent thread was canceled
2195 reset the SIGCANCEL mask.
2196 * Makefile (tests): Add tst-cancel25.
2197 * tst-cancel25.c: New file.
2199 2006-09-05 Jakub Jelinek <jakub@redhat.com>
2200 Ulrich Drepper <drepper@redhat.com>
2202 * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2203 counterp if it is already zero.
2204 * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2206 2006-03-04 Jakub Jelinek <jakub@redhat.com>
2207 Roland McGrath <roland@redhat.com>
2209 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2210 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2211 LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2212 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2213 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2214 lll_robust_mutex_timedlock, lll_mutex_unlock,
2215 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2216 Add _L_*_ symbols around the subsection.
2217 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2218 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2220 2006-03-03 Jakub Jelinek <jakub@redhat.com>
2221 Roland McGrath <roland@redhat.com>
2223 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2224 (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2225 LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2226 (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2227 lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2228 lll_robust_mutex_timedlock, lll_mutex_unlock,
2229 lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2230 Add _L_*_ symbols around the subsection.
2231 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2232 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2234 2006-08-31 Ulrich Drepper <drepper@redhat.com>
2236 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2237 change because it can disturb too much existing code. If real hard
2238 reader preference is needed we'll introduce another type.
2239 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2240 (pthread_rwlock_timedwrlock): Likewise.
2241 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2244 2006-08-30 Ulrich Drepper <drepper@redhat.com>
2246 * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2248 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2249 (pthread_rwlock_timedwrlock): Likewise.
2250 * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2253 2006-08-25 Jakub Jelinek <jakub@redhat.com>
2255 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2256 Only define ifdef SHARED.
2258 2006-08-23 Ulrich Drepper <drepper@redhat.com>
2260 * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2261 (free_stacks): ...here.
2262 (__free_stack_cache): New function.
2263 * pthreadP.h: Declare __free_stack_cache.
2264 * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2266 * init.c (pthread_functions): Initialize ptr_freeres.
2267 * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2268 New freeres function.
2270 2006-07-30 Joseph S. Myers <joseph@codesourcery.com>
2273 * Makefile (extra-objs): Add modules to extra-test-objs instead.
2275 2006-08-20 Ulrich Drepper <drepper@redhat.com>
2277 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2278 _XOPEN_REALTIME_THREADS.
2280 2006-08-15 Jakub Jelinek <jakub@redhat.com>
2282 * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2283 HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2284 HAVE_CLOCK_GETTIME_VSYSCALL.
2285 (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2287 2006-08-14 Jakub Jelinek <jakub@redhat.com>
2289 * sysdeps/unix/sysv/linux/bits/posix_opt.h
2290 (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2291 * descr.h (struct priority_protection_data): New type.
2292 (struct pthread): Add tpp field.
2293 * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2294 PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2295 PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2296 * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2298 * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2299 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2300 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2301 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2303 * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2305 * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2306 * pthread_mutexattr_getprioceiling.c
2307 (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2308 in the SCHED_FIFO priority range.
2309 * pthread_mutexattr_setprioceiling.c
2310 (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2311 * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2312 if mutex is not TPP. Ceiling is now in __data.__lock.
2313 * pthread_mutex_setprioceiling.c: Include stdbool.h.
2314 (pthread_mutex_setprioceiling): Fix prioceiling validation. Ceiling
2315 is now in __data.__lock. Add locking.
2316 * pthread_create.c (__free_tcb): Free pd->tpp structure.
2317 * Makefile (libpthread-routines): Add tpp.
2318 (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2319 * tst-tpp.h: New file.
2320 * tst-mutexpp1.c: New file.
2321 * tst-mutexpp6.c: New file.
2322 * tst-mutexpp10.c: New file.
2323 * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2324 * tst-mutex6.c (TEST_FUNCTION): Likewise.
2326 2006-08-12 Ulrich Drepper <drepper@redhat.com>
2329 * pthread_join.c (pthread_join): Account for self being canceled
2330 when checking for deadlocks.
2331 * tst-join5.c: Cleanups. Allow to be used in tst-join6.
2332 (tf1): Don't print anything after pthread_join returns, this would be
2333 another cancellation point.
2335 * tst-join6.c: New file.
2336 * Makefile (tests): Add tst-join6.
2338 2006-08-03 Ulrich Drepper <drepper@redhat.com>
2341 * pthread_setspecific.c (__pthread_setspecific): Check
2342 out-of-range index before checking for unused key.
2344 * sysdeps/pthread/gai_misc.h: New file.
2346 2006-08-01 Ulrich Drepper <drepper@redhat.com>
2348 * sysdeps/unix/sysv/linux/i386/smp.h: New file. Old Linux-specific
2349 file. Don't use sysctl.
2350 * sysdeps/unix/sysv/linux/smp.h: Always assume SMP. Archs can
2351 overwrite the file if this is likely not true.
2353 2006-07-31 Daniel Jacobowitz <dan@codesourcery.com>
2355 * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2356 * Makefile (tests): Add tst-getpid3.
2357 * tst-getpid3.c: New file.
2359 2006-07-30 Roland McGrath <roland@redhat.com>
2361 * Makefile (libpthread-routines): Add ptw-sigsuspend.
2363 * sysdeps/unix/sysv/linux/i386/not-cancel.h
2364 (pause_not_cancel): New macro.
2365 (nanosleep_not_cancel): New macro.
2366 (sigsuspend_not_cancel): New macro.
2367 * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2368 nanosleep_not_cancel macro from <not-cancel.h>.
2369 * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2370 macro from <not-cancel.h>.
2372 2006-07-28 Ulrich Drepper <drepper@redhat.com>
2373 Jakub Jelinek <jakub@redhat.com>
2375 * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2376 notification of PI mutex. Add ENQUEUE_MUTEX_PI.
2377 * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2378 * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2379 * pthread_mutex_init.c: Add support for priority inheritance mutex.
2380 * pthread_mutex_lock.c: Likewise.
2381 * pthread_mutex_timedlock.c: Likewise.
2382 * pthread_mutex_trylock.c: Likewise.
2383 * pthread_mutex_unlock.c: Likewise.
2384 * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2386 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2387 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2388 * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2389 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2390 pthread-pi-defines.sym.
2391 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2392 FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2393 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2394 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2395 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2396 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2397 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2398 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2399 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2400 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2401 _POSIX_THREAD_PRIO_INHERIT to 200112L.
2402 * tst-mutex1.c: Adjust to allow use in PI mutex test.
2403 * tst-mutex2.c: Likewise.
2404 * tst-mutex3.c: Likewise.
2405 * tst-mutex4.c: Likewise.
2406 * tst-mutex5.c: Likewise.
2407 * tst-mutex6.c: Likewise.
2408 * tst-mutex7.c: Likewise.
2409 * tst-mutex7a.c: Likewise.
2410 * tst-mutex8.c: Likewise.
2411 * tst-mutex9.c: Likewise.
2412 * tst-robust1.c: Likewise.
2413 * tst-robust7.c: Likewise.
2414 * tst-robust8.c: Likewise.
2415 * tst-mutexpi1.c: New file.
2416 * tst-mutexpi2.c: New file.
2417 * tst-mutexpi3.c: New file.
2418 * tst-mutexpi4.c: New file.
2419 * tst-mutexpi5.c: New file.
2420 * tst-mutexpi6.c: New file.
2421 * tst-mutexpi7.c: New file.
2422 * tst-mutexpi7a.c: New file.
2423 * tst-mutexpi8.c: New file.
2424 * tst-mutexpi9.c: New file.
2425 * tst-robust1.c: New file.
2426 * tst-robust2.c: New file.
2427 * tst-robust3.c: New file.
2428 * tst-robust4.c: New file.
2429 * tst-robust5.c: New file.
2430 * tst-robust6.c: New file.
2431 * tst-robust7.c: New file.
2432 * tst-robust8.c: New file.
2433 * Makefile (tests): Add the new tests.
2435 * pthread_create.c (start_thread): Add some casts to avoid warnings.
2436 * pthread_mutex_destroy.c: Remove unneeded label.
2438 2006-07-01 Ulrich Drepper <drepper@redhat.com>
2440 * pthread_mutex_init.c (__pthread_mutex_init): Move some
2441 computations to compile time.
2443 2006-06-04 Ulrich Drepper <drepper@redhat.com>
2445 * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2447 2006-05-15 Ulrich Drepper <drepper@redhat.com>
2449 * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2451 2006-05-11 Ulrich Drepper <drepper@redhat.com>
2453 * pthread_key_create.c (__pthread_key_create): Do away with
2454 __pthread_keys_lock.
2456 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2457 (__kernel_cpumask_size): Mark as hidden.
2458 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2460 * sem_open.c (__sem_mappings_lock): Mark as hidden.
2461 * semaphoreP.h (__sem_mappings_lock): Likewise.
2463 2006-05-10 Ulrich Drepper <drepper@redhat.com>
2465 * pthread_atfork.c: Mark __dso_handle as hidden.
2467 2006-05-09 Ulrich Drepper <drepper@redhat.com>
2470 * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2471 the reload problem. Change the one path in pthread_cancel_init
2472 which causes the problem. Force gcc to reload. Simplify callers.
2473 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2474 (_Unwind_GetBSP): Undo last patch.
2476 2006-05-07 Ulrich Drepper <drepper@redhat.com>
2478 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2479 function pointer is reloaded after pthread_cancel_init calls.
2482 * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2483 pointers are reloaded after pthread_cancel_init calls.
2485 2006-05-01 Ulrich Drepper <drepper@redhat.com>
2487 * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2490 2006-04-27 Ulrich Drepper <drepper@redhat.com>
2492 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2493 Allocate new object which is passed to timer_sigev_thread so that
2494 the timer can be deleted before the new thread is scheduled.
2496 2006-04-26 Roland McGrath <roland@redhat.com>
2498 * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2500 2006-04-08 Ulrich Drepper <drepper@redhat.com>
2502 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2503 suffix for conditional jumps.
2504 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2505 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2506 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2507 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2508 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2509 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2511 * init.c (sigcancel_handler): Compare with correct PID even if the
2512 thread is in the middle of a fork call.
2513 (sighandler_setxid): Likewise.
2514 Reported by Suzuki K P <suzuki@in.ibm.com> .
2516 2006-04-07 Jakub Jelinek <jakub@redhat.com>
2518 * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2520 2006-04-06 Ulrich Drepper <drepper@redhat.com>
2522 * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2523 fails [Coverity CID 105].
2525 2006-04-05 Ulrich Drepper <drepper@redhat.com>
2527 * sysdeps/pthread/pthread.h: Add nonnull attributes.
2529 2006-04-03 Steven Munroe <sjmunroe@us.ibm.com>
2532 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2533 Define __lll_rel_instr using lwsync.
2535 2006-03-27 Ulrich Drepper <drepper@redhat.com>
2537 * allocatestack.c (allocate_stack): Always initialize robust_head.
2538 * descr.h: Define struct robust_list_head.
2539 (struct pthread): Use robust_list_head in robust mutex list definition.
2540 Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2541 * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2542 (__pthread_initialize_minimal_internal): Register robust_list with
2544 * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2545 Declare __set_robust_list_avail.
2546 * pthread_create.c (start_thread): Register robust_list of new thread.
2547 [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2549 * pthread_mutex_destroy.c: For robust mutexes don't look at the
2550 number of users, it's unreliable.
2551 * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2552 set_robust_list syscall is available.
2553 * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2554 * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2555 Set robust_head.list_op_pending before trying to lock a robust mutex.
2556 * pthread_mutex_timedlock.c: Likewise.
2557 * pthread_mutex_trylock.c: Likewise.
2558 * pthread_mutex_unlock.c: Likewise for unlocking.
2559 * Makefile (tests): Add tst-robust8.
2560 * tst-robust8.c: New file.
2562 2006-03-08 Andreas Schwab <schwab@suse.de>
2564 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2565 (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2567 2006-03-05 Roland McGrath <roland@redhat.com>
2569 * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2570 and $config_os doesn't match *linux*.
2572 2006-03-05 David S. Miller <davem@sunset.davemloft.net>
2574 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2575 Use __syscall_error.
2576 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2577 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2578 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2579 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2580 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2581 * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2583 2006-03-02 Ulrich Drepper <drepper@redhat.com>
2585 * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2587 2006-03-01 Ulrich Drepper <drepper@redhat.com>
2589 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2590 (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2592 (__lll_robust_timedlock_wait): Likewise.
2593 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2594 (__lll_robust_lock_wait): Likewise.
2595 (__lll_robust_timedlock_wait): Likewise.
2596 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2597 (__lll_robust_lock_wait): Likewise.
2598 (__lll_robust_timedlock_wait): Likewise.
2600 2006-03-01 Jakub Jelinek <jakub@redhat.com>
2602 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2603 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2604 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2605 lll_robust_mutex_unlock): Define.
2606 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2608 2006-02-28 H.J. Lu <hongjiu.lu@intel.com>
2610 * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2611 instead of <clone.S>.
2613 2006-02-27 Jakub Jelinek <jakub@redhat.com>
2615 * Makefile (libpthread-routines): Add
2616 pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2617 and pthread_mutex_[sg]etprioceiling.
2618 * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2619 pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2620 pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2621 pthread_mutex_setprioceiling.
2622 * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2623 PTHREAD_PRIO_PROTECT): New enum values.
2624 (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2625 pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2626 pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2628 * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2629 PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2630 (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2632 (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2633 PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2634 PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2635 (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2636 and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2637 * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2638 return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2640 * pthread_mutex_getprioceiling.c: New file.
2641 * pthread_mutex_setprioceiling.c: New file.
2642 * pthread_mutexattr_getprioceiling.c: New file.
2643 * pthread_mutexattr_setprioceiling.c: New file.
2644 * pthread_mutexattr_getprotocol.c: New file.
2645 * pthread_mutexattr_setprotocol.c: New file.
2647 2006-02-27 Daniel Jacobowitz <dan@codesourcery.com>
2649 * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2651 2006-02-27 Roland McGrath <roland@redhat.com>
2653 * sysdeps/pthread/Subdirs: List nptl here too.
2654 * configure (libc_add_on_canonical): New variable.
2656 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2658 * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2659 self to get main source tree's file.
2660 * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2661 * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2662 * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2663 * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2664 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2665 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2666 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2667 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2668 * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2669 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2670 * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2671 * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2672 * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2674 * Makefile: Use $(sysdirs) in vpath directive.
2676 * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2677 (CPPFLAGS-timer_routines.c): Likewise.
2679 * Makeconfig (includes): Variable removed.
2681 2006-02-26 Roland McGrath <roland@redhat.com>
2683 * sysdeps/generic/pt-raise.c: Moved to ...
2684 * pt-raise.c: ... here.
2685 * sysdeps/generic/lowlevellock.h: Moved to ...
2686 * lowlevellock.h: ... here.
2688 2006-02-23 Roland McGrath <roland@redhat.com>
2690 * descr.h (struct pthread): Add final member `end_padding'.
2691 (PTHREAD_STRUCT_END_PADDING): Use it.
2693 2006-02-20 Roland McGrath <roland@redhat.com>
2695 * sysdeps/mips: Directory removed, saved in ports repository.
2696 * sysdeps/unix/sysv/linux/mips: Likewise.
2698 2006-02-18 Ulrich Drepper <drepper@redhat.com>
2700 * tst-robust1.c: Add second mutex to check that the mutex list is
2703 2006-02-17 Jakub Jelinek <jakub@redhat.com>
2705 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2706 lll_robust_mutex_trylock, lll_robust_mutex_lock,
2707 lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2708 lll_robust_mutex_unlock): New macros.
2709 (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2710 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2711 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2712 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2713 * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2715 2006-02-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2717 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2719 * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2721 2006-02-17 Ulrich Drepper <drepper@redhat.com>
2723 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2724 (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2725 * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2726 (lll_robust_mutex_unlock): Likewise.
2728 2006-02-13 Jakub Jelinek <jakub@redhat.com>
2730 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2731 Set robust_list.__next rather than robust_list.
2732 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2733 (__pthread_list_t): New typedef.
2734 (pthread_mutex_t): Replace __next and __prev fields with __list.
2735 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2736 (__pthread_list_t): New typedef.
2737 (pthread_mutex_t): Replace __next and __prev fields with __list.
2738 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2739 (__pthread_list_t, __pthread_slist_t): New typedefs.
2740 (pthread_mutex_t): Replace __next and __prev fields with __list.
2741 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2742 (__pthread_list_t, __pthread_slist_t): New typedefs.
2743 (pthread_mutex_t): Replace __next and __prev fields with __list.
2744 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2745 (__pthread_list_t, __pthread_slist_t): New typedefs.
2746 (pthread_mutex_t): Replace __next and __prev fields with __list.
2747 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2748 (__pthread_slist_t): New typedef.
2749 (pthread_mutex_t): Replace __next field with __list.
2751 2006-02-15 Ulrich Drepper <drepper@redhat.com>
2753 * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2754 PTHREAD_MUTEX_OWNERDEAD.
2755 (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2756 Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2757 * Makefile (libpthread-routines): Add lowlevelrobustlock.
2758 * pthread_create.c (start_thread): Very much simplify robust_list loop.
2759 * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2760 to PTHREAD_MUTEX_INCONSISTENT.
2761 * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2762 * pthread_mutex_lock.c: Reimplement robust mutex handling.
2763 * pthread_mutex_trylock.c: Likewise.
2764 * pthread_mutex_timedlock.c: Likewise.
2765 * pthread_mutex_unlock.c: Likewise.
2766 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2767 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2768 lowlevelrobustlock.sym.
2769 * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2770 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2772 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2773 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2774 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2775 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2776 * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2778 2006-02-12 Ulrich Drepper <drepper@redhat.com>
2780 * allocatestack.c (allocate_stack): Initialize robust_list.
2781 * init.c (__pthread_initialize_minimal_internal): Likewise.
2782 * descr.h (struct xid_command): Pretty printing.
2783 (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2784 robust_list. Adjust macros.
2785 * pthread_create.c (start_thread): Adjust robust_list handling.
2786 * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2787 but the owner for all robust mutex types.
2788 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2789 __pthread_list_t and __pthread_slist_t. Use them in pthread_mutex_t.
2790 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2791 * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2793 * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2794 openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2796 2006-02-08 Jakub Jelinek <jakub@redhat.com>
2798 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2799 lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2801 2006-01-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2803 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2805 (lll_futex_timed_wait): Define.
2807 2006-01-19 Ulrich Drepper <drepper@redhat.com>
2809 * tst-cancel4.c: Test ppoll.
2811 2006-01-18 Andreas Jaeger <aj@suse.de>
2814 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2815 (pthread_mutex_t): Follow changes for other archs. Based on patch
2816 by Jim Gifford <patches@jg555.com>.
2818 2006-01-13 Richard Henderson <rth@redhat.com>
2820 * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2822 2006-01-10 Roland McGrath <roland@redhat.com>
2824 * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2825 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2826 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2827 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2828 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2829 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2830 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2831 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2832 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2833 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2835 2006-01-09 Roland McGrath <roland@redhat.com>
2837 * tst-initializers1-c89.c: New file.
2838 * tst-initializers1-c99.c: New file.
2839 * tst-initializers1-gnu89.c: New file.
2840 * tst-initializers1-gnu99.c: New file.
2841 * Makefile (tests): Add them.
2842 (CFLAGS-tst-initializers1-c89.c): New variable.
2843 (CFLAGS-tst-initializers1-c99.c): New variable.
2844 (CFLAGS-tst-initializers1-gnu89.c): New variable.
2845 (CFLAGS-tst-initializers1-gnu99.c): New variable.
2847 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2848 Use __extension__ on anonymous union definition.
2849 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2850 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2851 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2852 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2853 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2855 2006-01-08 Jakub Jelinek <jakub@redhat.com>
2857 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2858 Don't give the union a name because it changes the mangled name.
2859 Instead name the struct for __data.
2860 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2862 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2865 2006-01-09 Jakub Jelinek <jakub@redhat.com>
2867 * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2868 stack bias to mc_ftp field.
2870 2006-01-07 Ulrich Drepper <drepper@redhat.com>
2872 * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2873 being too clever and reloading the futex value where it shouldn't.
2875 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2877 * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2880 2006-01-06 Jakub Jelinek <jakub@redhat.com>
2882 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2885 2006-01-06 Ulrich Drepper <drepper@redhat.com>
2887 * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2888 * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2889 rename in tcbhead_t.
2891 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2892 Don't give the union a name because it changes the mangled name.
2893 Instead name the struct for __data.
2894 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2895 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2896 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2897 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2898 * pthread_create.c (start_thread): Adjust robust mutex free loop.
2899 * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2901 2006-01-05 Ulrich Drepper <drepper@redhat.com>
2903 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2905 (lll_futex_timed_wait): Define.
2906 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2907 * sysdeps/pthread/aio_misc.h: New file.
2909 2006-01-03 Joseph S. Myers <joseph@codesourcery.com>
2911 * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2913 2006-01-03 Steven Munroe <sjmunroe@us.ibm.com>
2915 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2916 (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2917 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2919 2006-01-04 Ulrich Drepper <drepper@redhat.com>
2921 * tst-cancel24.cc: Use C headers instead of C++ headers.
2923 2006-01-03 Jakub Jelinek <jakub@redhat.com>
2925 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2926 sparc-linux configured glibc.
2927 (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2928 (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2929 __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2930 atomic_compare_and_exchange_val_24_acq instead of
2931 atomic_compare_and_exchange_val_acq.
2932 (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2933 instead of atomic_exchange_rel.
2934 * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2935 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2937 * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2939 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2940 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2941 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2942 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2943 * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2944 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2946 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2948 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2949 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2950 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2952 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2954 * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2956 2006-01-03 Ulrich Drepper <drepper@redhat.com>
2958 * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2961 2006-01-02 Jakub Jelinek <jakub@redhat.com>
2963 * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2964 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2965 THREAD_COPY_POINTER_GUARD): Define.
2966 * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2967 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2969 2006-01-01 Ulrich Drepper <drepper@redhat.com>
2971 * version.c: Update copyright year.
2973 2005-12-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2975 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2976 .eh_frame section, use cfi_* directives.
2977 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2979 2005-12-30 Ulrich Drepper <drepper@redhat.com>
2981 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2984 2005-12-29 Ulrich Drepper <drepper@redhat.com>
2986 * sysdeps/pthread/sigaction.c: Removed.
2987 * sigaction.c: New file.
2988 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2990 2005-12-28 Ulrich Drepper <drepper@redhat.com>
2992 * Makefile (tests): Add tst-signal7.
2993 * tst-signal7.c: New file.
2995 2005-12-27 Roland McGrath <roland@redhat.com>
2997 * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2998 (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2999 * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3000 * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3001 * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3002 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3003 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3004 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3005 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3006 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3007 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3009 2005-12-27 Jakub Jelinek <jakub@redhat.com>
3011 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3012 and __prev field to pthread_mutex_t.
3013 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3014 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3015 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3016 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3017 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3020 2005-12-26 Ulrich Drepper <drepper@redhat.com>
3022 * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3023 PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3024 PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3025 PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3026 PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3027 and PTHREAD_MUTEXATTR_FLAG_BITS.
3028 * descr.h (struct pthread): Add robust_list field and define
3029 ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3030 * pthread_mutexattr_getrobust.c: New file.
3031 * pthread_mutexattr_setrobust.c: New file.
3032 * pthread_mutex_consistent.c: New file.
3033 * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3034 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3035 Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3036 Adjust pthread_mutex_t initializers.
3037 * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3038 field to pthread_mutex_t.
3039 * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3040 and __prev field to pthread_mutex_t.
3041 * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3042 pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3043 * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3044 and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3045 * pthread_mutexattr_gettype.c: Likewise.
3046 * pthread_mutexattr_setpshared.c: Likewise.
3047 * pthread_mutexattr_settype.c: Likewise.
3048 * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3049 Initialize mutex kind according to robust flag.
3050 * pthread_mutex_lock.c: Implement local robust mutex.
3051 * pthread_mutex_timedlock.c: Likewise.
3052 * pthread_mutex_trylock.c: Likewise.
3053 * pthread_mutex_unlock.c: Likewise.
3054 * pthread_create.c (start_thread): Mark robust mutexes which remained
3056 * tst-robust1.c: New file.
3057 * tst-robust2.c: New file.
3058 * tst-robust3.c: New file.
3059 * tst-robust4.c: New file.
3060 * tst-robust5.c: New file.
3061 * tst-robust6.c: New file.
3062 * tst-robust7.c: New file.
3063 * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3064 pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3065 (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3066 tst-robust5, tst-robust6, and tst-robust7.
3068 * tst-typesizes.c: New file.
3069 * Makefile (tests): Add tst-typesizes.
3071 * tst-once3.c: More debug output.
3073 2005-12-24 Ulrich Drepper <drepper@redhat.com>
3075 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3076 missing after last change.
3078 * version.c: Update copyright year.
3080 2005-12-23 Ulrich Drepper <drepper@redhat.com>
3082 * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3083 * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3084 * pthread_mutex_trylock.c: Likewise.
3085 * pthread_mutex_timedlock.c: Likewise.
3086 * pthread_mutex_unlock.c: Likewise.
3088 2005-12-22 Roland McGrath <roland@redhat.com>
3090 * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3091 so that #include_next's search location is not reset to the -I..
3092 directory where <nptl/...> can be found.
3094 2005-12-22 Ulrich Drepper <drepper@redhat.com>
3097 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3098 Fix unwind info. Remove useless branch prediction prefix.
3099 * tst-cancel24.cc: New file.
3100 * Makefile: Add rules to build and run tst-cancel24.
3102 2005-12-21 Roland McGrath <roland@redhat.com>
3104 * libc-cancellation.c: Use <> rather than "" #includes.
3105 * pt-cleanup.c: Likewise.
3106 * pthread_create.c: Likewise.
3107 * pthread_join.c: Likewise.
3108 * pthread_timedjoin.c: Likewise.
3109 * pthread_tryjoin.c: Likewise.
3110 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3111 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3112 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3113 * unwind.c: Likewise.
3115 2005-12-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3117 * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3118 * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3119 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3120 THREAD_COPY_POINTER_GUARD): Define.
3122 2005-12-19 Jakub Jelinek <jakub@redhat.com>
3124 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3126 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3127 THREAD_COPY_POINTER_GUARD): Define.
3128 * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3129 * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3130 (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3131 THREAD_COPY_POINTER_GUARD): Define.
3132 * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3133 * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3134 THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3135 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3136 Use PTR_DEMANGLE for B0 if defined.
3138 2005-12-17 Ulrich Drepper <drepper@redhat.com>
3140 * pthread_create.c (__pthread_create_2_1): Use
3141 THREAD_COPY_POINTER_GUARD if available.
3142 * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3143 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3144 * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3145 Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3146 * sysdeps/x86_64/tls.h: Likewise.
3148 2005-12-15 Roland McGrath <roland@redhat.com>
3150 * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3152 2005-12-13 Ulrich Drepper <drepper@redhat.com>
3154 * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3156 * errno-loc.c: New file.
3158 2005-12-12 Roland McGrath <roland@redhat.com>
3160 * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3161 adjustments before choosing stack size. Update minimum stack size
3162 calculation to match allocate_stack change.
3164 2005-12-12 Ulrich Drepper <drepper@redhat.com>
3166 * allocatestack.c (allocate_stack): Don't demand that there is an
3167 additional full page available on the stack beside guard, TLS, the
3170 2005-11-24 Ulrich Drepper <drepper@redhat.com>
3172 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3173 (__cleanup_fct_attribute): Use __regparm__ not regparm.
3175 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3176 compiling 32-bit code we must define __cleanup_fct_attribute.
3178 005-11-24 Jakub Jelinek <jakub@redhat.com>
3181 * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3182 __attribute__ instead of __attribute.
3183 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3184 (__cleanup_fct_attribute): Likewise.
3186 2005-11-17 Jakub Jelinek <jakub@redhat.com>
3188 * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3189 a write barrier before writing libgcc_s_getcfa.
3191 2005-11-06 Ulrich Drepper <drepper@redhat.com>
3193 * sysdeps/unix/sysv/linux/configure: Removed.
3195 2005-11-05 Ulrich Drepper <drepper@redhat.com>
3197 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3198 optional init_array/fini_array support.
3200 2005-10-24 Roland McGrath <roland@redhat.com>
3202 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3203 versioned_symbol use.
3205 2005-10-16 Roland McGrath <roland@redhat.com>
3207 * init.c (__pthread_initialize_minimal_internal): Even when using a
3208 compile-time default stack size, apply the minimum that allocate_stack
3209 will require, and round up to page size.
3211 2005-10-10 Daniel Jacobowitz <dan@codesourcery.com>
3213 * Makefile ($(test-modules)): Remove static pattern rule.
3215 2005-10-14 Jakub Jelinek <jakub@redhat.com>
3216 Ulrich Drepper <drepper@redhat.com>
3218 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3219 alignment in callback function.
3220 * Makefile: Add rules to build and run tst-align3.
3221 * tst-align3.c: New file.
3223 2005-10-03 Jakub Jelinek <jakub@redhat.com>
3225 * allocatestack.c (setxid_signal_thread): Add
3226 INTERNAL_SYSCALL_DECL (err).
3228 2005-10-02 Jakub Jelinek <jakub@redhat.com>
3230 * allocatestack.c (setxid_signal_thread): Need to use
3231 atomic_compare_and_exchange_bool_acq.
3233 2005-10-01 Ulrich Drepper <drepper@redhat.com>
3234 Jakub Jelinek <jakub@redhat.com>
3236 * descr.h: Define SETXID_BIT and SETXID_BITMASK. Adjust
3238 (struct pthread): Move specific_used field to avoid padding.
3239 Add setxid_futex field.
3240 * init.c (sighandler_setxid): Reset setxid flag and release the
3242 * allocatestack.c (setxid_signal_thread): New function. Broken
3243 out of the bodies of the two loops in __nptl_setxid. For undetached
3244 threads check whether they are exiting and if yes, don't send a signal.
3245 (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3246 * pthread_create.c (start_thread): For undetached threads, check
3247 whether setxid bit is set. If yes, wait until signal has been
3250 * allocatestack.c (STACK_VARIABLES): Initialize them.
3251 * pthread_create.c (__pthread_create_2_1): Initialize pd.
3253 2004-09-02 Jakub Jelinek <jakub@redhat.com>
3255 * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3256 waiters, awake all waiters on the associated mutex.
3258 2005-09-22 Roland McGrath <roland@redhat.com>
3260 * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3261 ../sysdeps/x86_64/hp-timing.h).
3263 2005-08-29 Jakub Jelinek <jakub@redhat.com>
3265 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3266 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3267 (lll_futex_wake_unlock): Define.
3268 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3269 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3270 (lll_futex_wake_unlock): Define.
3271 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3272 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3273 (lll_futex_wake_unlock): Define.
3274 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3275 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3276 (lll_futex_wake_unlock): Define.
3277 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3278 FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3279 (lll_futex_wake_unlock): Define.
3280 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3281 lll_futex_wake_unlock.
3282 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3283 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3284 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3285 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3286 (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3287 (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3289 2005-09-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3291 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3292 Fix typo in register name.
3294 2005-08-23 Ulrich Drepper <drepper@redhat.com>
3296 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3297 Use __sigfillset. Document that sigfillset does the right thing wrt
3300 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3303 * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3304 PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3305 PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3306 PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3307 PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3308 PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3310 * Makefile (tests): Add tst-initializers1.
3311 (CFLAGS-tst-initializers1.c): Set.
3312 * tst-initializers1.c: New test.
3314 2005-07-11 Jakub Jelinek <jakub@redhat.com>
3316 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3317 Make sure __flags are located at offset 48 from the start of the
3320 2005-07-02 Roland McGrath <roland@redhat.com>
3322 * Makeconfig: Comment fix.
3324 2005-07-05 Jakub Jelinek <jakub@redhat.com>
3326 * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3327 * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3328 is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3329 (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3330 TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3331 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3332 * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3333 Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3334 * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3335 assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3337 2005-06-25 Jakub Jelinek <jakub@redhat.com>
3339 * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3340 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3341 * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3343 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3344 * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3345 field. Put in sysinfo field unconditionally.
3346 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3347 * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3348 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3349 * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3351 (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3352 * pthread_create.c (__pthread_create_2_1): Use
3353 THREAD_COPY_STACK_GUARD macro.
3354 * Makefile: Add rules to build and run tst-stackguard1{,-static}
3356 * tst-stackguard1.c: New file.
3357 * tst-stackguard1-static.c: New file.
3359 2005-06-14 Alan Modra <amodra@bigpond.net.au>
3361 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3362 Invoke CGOTSETUP and CGOTRESTORE.
3363 (CGOTSETUP, CGOTRESTORE): Define.
3365 2005-05-29 Richard Henderson <rth@redhat.com>
3367 * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3368 (tf_write, tf_writev): Use it.
3369 (do_test): Use socketpair instead of pipe. Set SO_SNDBUF to
3372 2005-05-23 Jakub Jelinek <jakub@redhat.com>
3374 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3375 [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3376 __librt_*_asynccancel@local.
3378 2005-05-17 Alan Modra <amodra@bigpond.net.au>
3380 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3381 all occurrences of JUMPTARGET. Instead append @local to labels.
3383 2005-05-20 Jakub Jelinek <jakub@redhat.com>
3385 * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3386 size/alignment of struct pthread rather than tcbhead_t.
3387 * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3389 * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3391 * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3394 2005-05-19 Richard Henderson <rth@redhat.com>
3396 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3397 __sync_val_compare_and_swap, not explicit _si variant.
3398 * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3400 2005-05-03 Ulrich Drepper <drepper@redhat.com>
3403 * sysdeps/pthread/pthread.h: Avoid empty initializers.
3405 2005-05-03 Jakub Jelinek <jakub@redhat.com>
3407 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3408 .eh_frame section, use cfi_* directives.
3410 2005-04-27 Jakub Jelinek <jakub@redhat.com>
3412 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3415 2005-04-27 Ulrich Drepper <drepper@redhat.com>
3418 * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3421 2005-04-27 Roland McGrath <roland@redhat.com>
3423 * Makefile (tests): Remove tst-clock2.
3425 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3426 CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3427 translating to the kernel clockid_t for our own process/thread clock.
3429 * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3431 2005-04-15 Jakub Jelinek <jakub@redhat.com>
3433 * old_pthread_cond_init.c: Include <errno.h>.
3434 (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3435 process shared or uses clock other than CLOCK_REALTIME.
3436 * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3438 2005-04-13 David S. Miller <davem@davemloft.net>
3440 * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3441 * sysdeps/sparc/sparc64/clone.S: New file.
3443 2005-04-05 Jakub Jelinek <jakub@redhat.com>
3446 * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3447 __inline instead of inline.
3448 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3450 2005-03-31 Jakub Jelinek <jakub@redhat.com>
3452 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3453 functionally equivalent, but shorter instructions.
3454 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3455 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3456 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3458 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3459 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3460 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3461 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3463 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3464 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3466 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3467 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3468 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3469 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3470 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3472 2005-03-28 Daniel Jacobowitz <dan@codesourcery.com>
3474 * sysdeps/mips/Makefile: New file.
3475 * sysdeps/mips/nptl-sysdep.S: New file.
3476 * sysdeps/mips/tcb-offsets.sym: New file.
3477 * sysdeps/mips/pthread_spin_lock.S: New file.
3478 * sysdeps/mips/pthread_spin_trylock.S: New file.
3479 * sysdeps/mips/pthreaddef.h: New file.
3480 * sysdeps/mips/tls.h: New file.
3481 * sysdeps/mips/jmpbuf-unwind.h: New file.
3482 * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3483 * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3484 * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3485 * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3486 * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3487 * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3488 * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3489 * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3490 * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3491 * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3493 2005-03-23 Ulrich Drepper <drepper@redhat.com>
3496 * pthread_create.c (__pthread_create_2_1): Rename syscall error
3499 2005-03-10 Jakub Jelinek <jakub@redhat.com>
3501 * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3503 2005-02-25 Roland McGrath <roland@redhat.com>
3505 * alloca_cutoff.c: Correct license text.
3506 * tst-unload.c: Likewise.
3507 * sysdeps/pthread/allocalim.h: Likewise.
3508 * sysdeps/pthread/pt-initfini.c: Likewise.
3509 * sysdeps/pthread/bits/libc-lock.h: Likewise.
3510 * sysdeps/pthread/bits/sigthread.h: Likewise.
3511 * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3512 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3514 2005-02-16 Roland McGrath <roland@redhat.com>
3516 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3517 Use unsigned int * for ptr_nthreads.
3519 2005-02-14 Alan Modra <amodra@bigpond.net.au>
3522 * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3525 2005-02-07 Richard Henderson <rth@redhat.com>
3528 * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3531 2004-11-03 Marcus Brinkmann <marcus@gnu.org>
3533 * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3534 order of arguments in invocation of atomic_add_zero.
3536 2005-01-26 Jakub Jelinek <jakub@redhat.com>
3539 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3540 Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3541 at least gotntpoff relocation and addition.
3542 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3544 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3546 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3549 2005-01-06 Ulrich Drepper <drepper@redhat.com>
3551 * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3552 entry for static tls deallocation fix.
3553 * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3554 also contains information whether the memory pointed to is static
3556 * sysdeps/i386/tls.h: Likewise.
3557 * sysdeps/ia64/tls.h: Likewise.
3558 * sysdeps/powerpc/tls.h: Likewise.
3559 * sysdeps/s390/tls.h: Likewise.
3560 * sysdeps/sh/tls.h: Likewise.
3561 * sysdeps/sparc/tls.h: Likewise.
3562 * sysdeps/x86_64/tls.h: Likewise.
3564 2004-12-27 Ulrich Drepper <drepper@redhat.com>
3566 * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3568 2004-12-21 Jakub Jelinek <jakub@redhat.com>
3570 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3572 * Makefile (tests): Add tst-align2.
3573 * tst-align2.c: New test.
3574 * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3575 -mpreferred-stack-boundary=4.
3577 2004-12-18 Roland McGrath <roland@redhat.com>
3579 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3580 New file removed withdrawn for the moment.
3582 2004-12-17 Richard Henderson <rth@redhat.com>
3584 * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3585 * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3587 2004-12-16 Ulrich Drepper <drepper@redhat.com>
3589 * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3590 Increased PTHREAD_STACK_MIN.
3592 * tst-context1.c (stacks): Use bigger stack size.
3594 2004-12-16 Jakub Jelinek <jakub@redhat.com>
3596 * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3597 * sysdeps/sparc/tcb-offsets.sym: Add TID.
3599 2004-12-15 Jakub Jelinek <jakub@redhat.com>
3601 * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3602 * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3603 * sysdeps/s390/tcb-offsets.sym (TID): Add.
3605 2004-12-15 Ulrich Drepper <drepper@redhat.com>
3607 * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3609 2004-12-14 Ulrich Drepper <drepper@redhat.com>
3611 * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3612 * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3614 * tst-getpid1.c: If child crashes, report this first. Print which
3617 2004-12-09 Ulrich Drepper <drepper@redhat.com>
3619 * init.c (__pthread_initialize_minimal_internal): Also unblock
3622 2004-12-01 Jakub Jelinek <jakub@redhat.com>
3624 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3625 _POSIX_THREAD_CPUTIME): Define to 0.
3626 * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3627 handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3628 * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3629 __timer_signal_thread_tclk): Remove.
3630 (init_module): Remove their initialization.
3631 (thread_cleanup): Remove their cleanup assertions.
3632 * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3633 __timer_signal_thread_tclk): Remove.
3634 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3635 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3636 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3638 2004-12-07 Jakub Jelinek <jakub@redhat.com>
3640 * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3641 * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3643 * Makefile (tests): Add tst-getpid2.
3644 * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3645 (do_test): Use it. Use __clone2 instead of clone on ia64.
3646 * tst-getpid2.c: New test.
3648 2004-12-07 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3650 * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3652 2004-12-04 Ulrich Drepper <drepper@redhat.com>
3654 * Makefile (tests): Add tst-getpid1.
3655 * tst-getpid1.c: New file.
3656 * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3657 * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3659 2004-12-02 Roland McGrath <roland@redhat.com>
3661 * Makefile (libpthread-nonshared): Variable removed.
3662 ($(objpfx)libpthread_nonshared.a): Target removed.
3663 ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3664 These are now handled by generic magic from
3665 libpthread-static-only-routines being set.
3667 2004-11-27 Ulrich Drepper <drepper@redhat.com>
3669 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3670 _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3671 _POSIX_THREAD_PRIO_PROTECT): Define.
3672 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3673 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3674 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3676 2004-11-26 Jakub Jelinek <jakub@redhat.com>
3678 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3679 _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3680 _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3681 _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3682 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3683 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3684 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3686 2004-11-24 Ulrich Drepper <drepper@redhat.com>
3688 * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3690 * Makefile (libpthread-routines): Add pthread_setschedprio.
3691 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3692 * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3693 * pthread_setschedprio.c: New file.
3695 2004-11-20 Jakub Jelinek <jakub@redhat.com>
3697 * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3698 * pthread_cancel.c (pthread_create): Likewise.
3700 * Makefile (libpthread-routines): Add vars.
3701 * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3702 * init.c (__default_stacksize, __is_smp): Remove.
3704 * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3705 and define a wrapper macro.
3706 (PTHREAD_STATIC_FN_REQUIRE): Define.
3707 * allocatestack.c (__find_thread_by_id): Undefine.
3708 * pthread_create (__pthread_keys): Remove.
3709 (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3710 pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3711 PTHREAD_STATIC_FN_REQUIRE.
3713 2004-11-18 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3715 * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3716 parameter to REGISTER macro.
3718 2004-11-17 Roland McGrath <roland@redhat.com>
3720 * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3721 Make sure SIGCANCEL is blocked as well.
3723 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3725 * sysdeps/pthread/setxid.h: New file.
3726 * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3727 (struct xid_command): Add forward decl.
3728 (struct pthread_functions): Change return type of __nptl_setxid hook
3730 * pthreadP.h (__nptl_setxid): Change return type to int.
3731 * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3732 calling thread, return its return value and set errno on failure.
3733 * descr.h (struct xid_command): Change id type to long array.
3735 * Makefile: Add rules to build and test tst-setuid1 and
3737 * tst-setuid1.c: New test.
3738 * tst-setuid1-static.c: New test.
3740 2004-11-10 Jakub Jelinek <jakub@redhat.com>
3742 * Makefile (tests): Add tst-exit3.
3743 * tst-exit3.c: New test.
3745 2004-11-09 Ulrich Drepper <drepper@redhat.com>
3747 * Makefile (tests): Add tst-exit2.
3748 * tst-exit2.c: New file.
3750 2004-11-09 Roland McGrath <roland@redhat.com>
3753 * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3754 here, before calling clone.
3755 * pthread_create.c (start_thread): Don't do it here.
3757 2004-11-02 Jakub Jelinek <jakub@redhat.com>
3759 * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3761 2004-10-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3763 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3764 Set ETIMEDOUT to errno when time is up. Tweak to avoid
3767 2004-10-28 Jakub Jelinek <jakub@redhat.com>
3769 * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3770 if sched_priority is not between minprio and maxprio.
3772 2004-10-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3774 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3775 (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3777 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3778 (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3780 2004-10-24 Ulrich Drepper <drepper@redhat.com>
3782 * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3783 not-cancelable I/O functions.
3785 2004-10-21 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3787 * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3788 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3789 make sure 2 is stored in the futex and we looked at the old value.
3790 Fix a few other problems to return the correct value.
3792 2004-10-14 Richard Henderson <rth@redhat.com>
3794 * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3797 2004-10-06 Jakub Jelinek <jakub@redhat.com>
3799 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3800 of pthread-functions.h and pthreaddef.h.
3801 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3803 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3804 Change __data.__nwaiters from int to unsigned int.
3806 * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3807 sysconf (_SC_THREAD_CPUTIME) returns negative value.
3809 * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3812 * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3813 (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3815 2004-10-06 Ulrich Drepper <drepper@redhat.com>
3817 * tst-cancel4.c (tf_msgrcv): Check for failure in msgget. If the
3818 test fails, remove message queue.
3819 (tf_msgsnd): Likewise.
3821 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3823 * tst-clock1.c: Change #ifdef to #if defined.
3824 * tst-clock2.c: Likewise.
3825 * tst-cond11.c: Likewise.
3827 * sysdeps/pthread/timer_create.c (timer_create): Use
3828 defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3829 defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3832 2004-10-05 Jakub Jelinek <jakub@redhat.com>
3834 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3835 _POSIX_THREAD_CPUTIME): Define to 0.
3837 2004-10-04 Ulrich Drepper <drepper@redhat.com>
3839 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3840 and _POSIX_THREAD_CPUTIME to zero.
3841 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3842 * tst-barrier2.c: Fix testing for POSIX feature.
3843 * tst-clock1.c: Likewise.
3844 * tst-clock2.c: Likewise.
3845 * tst-cond11.c: Likewise.
3846 * tst-cond4.c: Likewise.
3847 * tst-cond6.c: Likewise.
3848 * tst-flock2.c: Likewise.
3849 * tst-mutex4.c: Likewise.
3850 * tst-mutex9.c: Likewise.
3851 * tst-rwlock12.c: Likewise.
3852 * tst-rwlock4.c: Likewise.
3853 * tst-signal1.c: Likewise.
3854 * tst-spin2.c: Likewise.
3855 * sysdeps/pthread/posix-timer.h: Likewise.
3856 * sysdeps/pthread/timer_create.c: Likewise.
3857 * sysdeps/pthread/timer_routines.c: Likewise.
3859 2004-10-01 Ulrich Drepper <drepper@redhat.com>
3861 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3862 (__lll_mutex_timedlock_wait): Address futex correctly.
3864 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3865 (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3866 make sure 2 is stored in the futex and we looked at the old value.
3867 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3868 (__lll_mutex_timedlock_wait): Likewise. Fix a few other problems
3869 which might very well made the code not working at all before.
3872 2004-09-28 Ulrich Drepper <drepper@redhat.com>
3874 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3875 allow SIGSETXID to be sent.
3876 * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3877 for SIGSETXID to be defined.
3878 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3879 SIGSETXID cannot be blocked.
3881 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3882 Add __extension__ to long long types.
3883 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3884 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3885 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3886 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3887 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3888 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3889 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3891 2004-09-25 Ulrich Drepper <drepper@redhat.com>
3893 * descr.h (struct pthread): Add stopped_start field.
3894 * sysdeps/pthread/createthread.c (create_thread): Set
3895 start_stopped flag in descriptor for new thread appropriately.
3896 * pthread_create.c (start_thread): Only take lock to be stopped on
3897 startup if stopped_start flag says so.
3899 2004-09-24 Ulrich Drepper <drepper@redhat.com>
3901 * pthread_create.c (__pthread_create_2_1): Remember whether thread
3902 is created detached and if yes, do not try to free the stack in case
3903 the thread creation failed.
3904 * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3905 call fails. Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3906 case there has been no error. [BZ #405]
3908 * pthread_create.c (start_thread): Don't wait for scheduler data
3909 etc to be set at the beginning of the function. The cancellation
3910 infrastructure must have been set up. And enable async
3911 cancellation before potentially going to sleep. [BZ #401]
3913 2004-09-20 Ulrich Drepper <drepper@redhat.com>
3915 * Versions: Remove exports for pthread_set*id_np functions.
3916 * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3918 * Makefile: Don't build pthread_set*id code for now.
3920 2004-09-19 Ulrich Drepper <drepper@redhat.com>
3922 * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3924 * allocatestack.c (__nptl_setxid): New function.
3925 * descr.h (struct xid_command): Define type.
3926 * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3927 (sighandler_setxid): New function.
3928 (__pthread_initialize_minimal): Register sighandler_setxid for
3930 * pt-allocrtsig.c: Update comment.
3931 * pthreadP.h: Define SIGSETXID. Declare __xidcmd variable.
3932 Declare __nptl_setxid.
3933 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3934 * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3935 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3936 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3937 and pthread_setresuid_np.
3938 * pthread_setgid_np.c: New file.
3939 * pthread_setuid_np.c: New file.
3940 * pthread_setegid_np.c: New file.
3941 * pthread_seteuid_np.c: New file.
3942 * pthread_setregid_np.c: New file.
3943 * pthread_setreuid_np.c: New file.
3944 * pthread_setresgid_np.c: New file.
3945 * pthread_setresuid_np.c: New file.
3946 * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3947 pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3948 pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3949 and pthread_setresuid_np.
3950 * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3951 pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3952 pthread_setregid, and pthread_setresgid.
3954 2004-09-18 Ulrich Drepper <drepper@redhat.com>
3956 * allocatestack.c (allocate_stack): Return EAGAIN instead of
3957 ENOMEM when out of memory.
3959 2004-09-10 Roland McGrath <roland@redhat.com>
3962 * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3963 code, since we don't try to use the broken CLONE_STOPPED any more.
3964 * pthread_create.c (start_thread): Likewise.
3966 2004-09-15 Richard Henderson <rth@redhat.com>
3968 * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3970 2004-09-01 David Mosberger <davidm@hpl.hp.com>
3972 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3973 (__libc_unwind_longjmp): Delete macro and declare as function.
3974 * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3975 __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3977 * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3978 * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3979 * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3981 2004-09-12 Ulrich Drepper <drepper@redhat.com>
3983 * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3985 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3986 types also for __USE_XOPEN2K.
3987 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3988 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3989 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3990 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3991 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3992 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3993 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3996 2004-09-08 Ulrich Drepper <drepper@redhat.com>
3998 * sysdeps/pthread/pthread.h
3999 (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4000 (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4001 (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4002 (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4005 2004-09-07 Ulrich Drepper <drepper@redhat.com>
4007 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4008 PSEUDO to be used with . prefix.
4010 * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4011 Use atomic_increment instead of atomic_exchange_and_add.
4012 * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4014 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4016 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4019 * allocatestack.c (allocate_stack): Use atomic_increment_val
4020 instead of atomic_exchange_and_add.
4021 * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4022 * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4024 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4027 * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4028 the initialization function might throw.
4030 2005-09-05 Richard Henderson <rth@redhat.com>
4032 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4033 Move definition inside libpthread, libc, librt check. Provide
4034 definition for rtld.
4036 2004-09-02 Ulrich Drepper <drepper@redhat.com>
4038 * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4039 * sysdeps/i386/jmpbuf-unwind.h: Likewise
4040 * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4041 * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4042 * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4043 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4044 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4045 * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4048 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4049 Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4050 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4052 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4053 Decrement __nwaiters. If pthread_cond_destroy has been called and
4054 this is the last waiter, signal pthread_cond_destroy caller and
4055 avoid using the pthread_cond_t structure after unlock.
4056 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4057 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4058 Read clock type from the least significant bits of __nwaiters instead
4060 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4061 * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4063 2004-08-31 Jakub Jelinek <jakub@redhat.com>
4066 * Makefile (tests): Add tst-cond20 and tst-cond21.
4067 * tst-cond20.c: New test.
4068 * tst-cond21.c: New test.
4069 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4070 (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4072 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4074 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4075 (pthread_cond_t): Likewise.
4076 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4078 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4080 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4082 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4083 (cond_nwaiters): New.
4085 * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4086 if there are waiters not signalled yet.
4087 Wait until all already signalled waiters wake up.
4088 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4089 __nwaiters. If pthread_cond_destroy has been called and this is the
4090 last waiter, signal pthread_cond_destroy caller and avoid using
4091 the pthread_cond_t structure after unlock.
4092 (__pthread_cond_wait): Increment __nwaiters in the beginning,
4093 decrement it when leaving. If pthread_cond_destroy has been called
4094 and this is the last waiter, signal pthread_cond_destroy caller.
4095 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4096 Likewise. Read clock type from the least significant bits of
4097 __nwaiters instead of __clock.
4098 * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4099 whether clock ID can be encoded in COND_CLOCK_BITS bits.
4100 * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4101 clock type just from the last COND_CLOCK_BITS bits of value.
4102 * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4103 instead of __clock, just from second bit of condattr's value.
4105 2004-08-30 Jakub Jelinek <jakub@redhat.com>
4107 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4108 bits/wordsize.h. Make the header match i386 header when __WORDSIZE
4110 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4112 2004-08-15 Roland McGrath <roland@frob.com>
4114 * pthread_atfork.c: Update copyright terms including special exception
4115 for these trivial files, which are statically linked into executables
4116 that use dynamic linking for the significant library code.
4118 2004-08-09 Jakub Jelinek <jakub@redhat.com>
4120 * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4121 pthread_rwlock_rdlock.
4122 * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4123 Decrease __nr_readers_queued after reacquiring lock.
4124 * sysdeps/pthread/pthread_rwlock_timedrdlock
4125 (pthread_rwlock_timedrdlock): Likewise.
4126 Reported by Bob Cook <bobcook47@hotmail.com>.
4128 2004-08-11 Jakub Jelinek <jakub@redhat.com>
4130 * tst-rwlock14.c (tf): Read main thread handle from *ARG
4131 before pthread_barrier_wait.
4133 2004-08-07 Ulrich Drepper <drepper@redhat.com>
4135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4136 Remove unnecessary exception handling data.
4138 2004-07-23 Jakub Jelinek <jakub@redhat.com>
4141 * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4142 instead of clockid_t.
4144 2004-07-21 Roland McGrath <roland@redhat.com>
4146 * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4148 2004-07-19 Roland McGrath <roland@redhat.com>
4150 * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4152 2004-07-02 Roland McGrath <roland@redhat.com>
4154 * configure: Don't exit.
4156 2004-07-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4158 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4159 (__pthread_cond_timedwait): Check for invalid nanosecond in
4162 2004-07-07 Ulrich Drepper <drepper@redhat.com>
4164 * Makefile: Add rules to build and run tst-fini1.
4165 * tst-fini1.c: New file.
4166 * tst-fini1mod.c: New file.
4168 2004-07-05 Ulrich Drepper <drepper@redhat.com>
4170 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4171 if no cancellation support is needed.
4172 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4173 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4174 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4175 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4176 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4177 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4178 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4179 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4180 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4182 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4183 only if not already defined.
4185 2004-07-05 Jakub Jelinek <jakub@redhat.com>
4187 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4188 constraint "m" instead of "0" for futex.
4190 * shlib-versions: Add powerpc64-.*-linux.*.
4192 2004-07-04 Jakub Jelinek <jakub@redhat.com>
4194 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4195 (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4197 * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4198 1 billion and 64-bit tv_nsec which is valid when truncated to 32
4201 2004-06-29 Roland McGrath <roland@redhat.com>
4203 * Banner: NPTL no longer has its own version number.
4204 * Makefile (nptl-version): Variable removed.
4205 * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4206 using $(version), the glibc version number.
4208 2004-06-29 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4210 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4211 Fix branch offset for a PLT entry.
4212 * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4214 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4216 * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4218 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4221 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4223 * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4226 2004-06-28 Jakub Jelinek <jakub@redhat.com>
4228 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4229 (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4231 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4232 (pthread_rwlock_timedrdlock): Likewise.
4234 2004-06-22 Jakub Jelinek <jakub@redhat.com>
4236 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4237 Set __r7 to val, not mutex.
4239 2004-06-27 Ulrich Drepper <drepper@redhat.com>
4241 * Makefile: Add rules to build tst-rwlock14.
4242 * tst-rwlock14.c: New file.
4244 2004-06-24 Boris Hu <boris.hu@intel.com>
4246 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4248 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4250 2004-06-19 Andreas Jaeger <aj@suse.de>
4252 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4253 assembler in last patch.
4255 2004-06-17 Ulrich Drepper <drepper@redhat.com>
4257 * sysdeps/pthread/pthread_cond_timedwait.c
4258 (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4259 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4260 (__pthread_cond_timedwait): Check for invalid nanosecond in
4262 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4263 * tst-cond19.c: New file.
4264 * Makefile: Add rules to build and run tst-cond19.
4266 2004-06-15 Steven Munroe <sjmunroe@us.ibm.com>
4268 * tst-context1.c (GUARD_PATTERN): Defined.
4269 (tst_context_t): Define struct containing ucontext_t & guard words.
4270 (ctx): Declare as an array of tst_context_t.
4271 (fct): Verify uc_link & guard words are still valid.
4272 (tf): Initialize guard words in ctx. Adjust ctx refs for new struct.
4274 2004-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4276 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4277 Add __data.__futex field, reshuffle __data.__clock.
4278 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4279 (__pthread_cond_signal): Increment __futex at the same time as
4280 __wakeup_seq or __total_seq. Pass address of __futex instead of
4281 address of low 32-bits of __wakeup_seq to futex syscall.
4282 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4283 (__pthread_cond_wait): Likewise. Pass __futex value from before
4284 releasing internal lock to FUTEX_WAIT.
4285 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4286 (__pthread_cond_timedwait): Likewise.
4287 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4288 (FUTEX_CMP_REQUEUE): Define.
4289 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4290 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4291 Pass __futex value from before the unlock and __futex address instead
4292 of address of low 32-bits of __wakeup_seq to futex syscall.
4293 Fallback to FUTEX_WAKE all on any errors.
4295 2004-06-08 Jakub Jelinek <jakub@redhat.com>
4297 * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4299 * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4300 * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4301 * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4302 * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4303 Likewise. Reported by Bob Cook <bobcook47@hotmail.com>.
4305 2004-06-11 Martin Schwidefsky <schwidefsky@de.ibm.com>
4307 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4308 Add memory clobber to inline assembly.
4309 (__lll_mutex_trylock): Likewise.
4310 (__lll_mutex_cond_trylock): Likewise.
4312 2004-06-07 Martin Schwidefsky <schwidefsky@de.ibm.com>
4314 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4315 Pass val argument as 6th system call argument in %r7.
4317 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4319 * Makefile (tests): Add tst-cond16.
4320 * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4321 * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4322 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4323 Add __data.__futex field, reshuffle __data.__clock.
4324 * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4325 (__pthread_cond_signal): Increment __futex at the same time as
4326 __wakeup_seq or __total_seq. Pass address of __futex instead of
4327 address of low 32-bits of __wakeup_seq to futex syscall.
4328 * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4329 (__pthread_cond_wait): Likewise. Pass __futex value from before
4330 releasing internal lock to FUTEX_WAIT.
4331 * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4332 (__pthread_cond_timedwait): Likewise.
4333 * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4334 (FUTEX_CMP_REQUEUE): Define.
4335 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4336 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4337 Pass __futex value from before the unlock and __futex address instead
4338 of address of low 32-bits of __wakeup_seq to futex syscall.
4339 Fallback to FUTEX_WAKE all on any errors.
4340 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4342 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4343 internally. Return non-zero if error, zero if success.
4344 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4345 Add __data.__futex field, reshuffle __data.__clock.
4346 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4348 (lll_futex_requeue): Add val argument, return 1 unconditionally
4350 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4351 Add __data.__futex field, reshuffle __data.__clock.
4352 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4354 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4355 internally. Return non-zero if error, zero if success.
4356 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4357 (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4358 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4360 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4361 internally. Return non-zero if error, zero if success.
4362 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4363 Add __data.__futex field, reshuffle __data.__clock.
4364 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4366 (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4367 internally. Return non-zero if error, zero if success.
4368 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4369 Add __data.__futex field, reshuffle __data.__clock.
4370 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4371 Add __data.__futex field, reshuffle __data.__clock.
4372 * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4373 Increment __futex at the same time as __wakeup_seq or __total_seq.
4374 Pass address of __futex instead of address of low 32-bits of
4375 __wakeup_seq to futex syscall.
4376 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4377 Pass __futex value from before releasing internal lock
4379 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4380 Likewise. Avoid unnecessary shadowing of variables.
4381 * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4382 Set __futex to 2 * __total_seq. Pass __futex value from before the
4383 unlock and __futex address instead of address of low 32-bits of
4384 __wakeup_seq to futex_requeue macro, adjust for new return value
4386 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4387 (__pthread_cond_signal): Increment __futex at the same time as
4388 __wakeup_seq or __total_seq. Pass address of __futex instead of
4389 address of low 32-bits of __wakeup_seq to futex syscall.
4390 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4391 (__pthread_cond_wait): Likewise. Pass __futex value from before
4392 releasing internal lock to FUTEX_WAIT.
4393 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4394 (__pthread_cond_timedwait): Likewise.
4395 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4396 (FUTEX_CMP_REQUEUE): Define.
4397 (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4398 Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4399 Pass __futex value from before the unlock and __futex address instead
4400 of address of low 32-bits of __wakeup_seq to futex syscall.
4401 Fallback to FUTEX_WAKE all on any errors.
4403 2004-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4405 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4406 Add nop to align the end of critical section.
4407 (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4409 2004-06-01 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4411 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4412 Add __broadcast_seq field.
4413 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4414 all waiters as woken with woken_seq and bump broadcast counter.
4415 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4416 __broadcast_seq. Increment __woken_seq correctly when cleanuped.
4417 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4418 Comment typo fixes. Avoid returning -ETIMEDOUT.
4420 2004-06-01 Ulrich Drepper <drepper@redhat.com>
4422 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4423 (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4424 Reported by Kaz Kojima.
4426 2004-05-25 Jakub Jelinek <jakub@redhat.com>
4428 * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4430 2004-05-21 Jakub Jelinek <jakub@redhat.com>
4432 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4433 __broadcast_seq with bc_seq after acquiring internal lock instead of
4436 2004-05-18 Jakub Jelinek <jakub@redhat.com>
4438 * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4440 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4441 (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4442 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4443 (pthread_cond_t): Add __data.__broadcast_seq field.
4444 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4445 (FRAME_SIZE): Define.
4446 (__pthread_cond_timedwait): Use it. Store/check broadcast_seq.
4448 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4450 (__pthread_cond_wait): Use it. Store/check broadcast_seq. Comment
4452 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4453 (__pthread_cond_broadcast): Increment broadcast_seq. Comment typo
4456 2004-05-18 Ulrich Drepper <drepper@redhat.com>
4458 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4459 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4460 Add __broadcast_seq field.
4461 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4462 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4463 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4464 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4465 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4466 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4467 all waiters as woken with woken_seq and bump broadcast counter.
4468 * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4470 __broadcast_seq field.
4471 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4472 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4473 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4474 * pthread_cond_init.c: Initialize __broadcast_seq field.
4475 * Makefile (tests): Add tst-cond17 and tst-cond18.
4476 Add .NOTPARALLEL goal.
4477 * tst-cond16.c: New file. From Jakub.
4478 * tst-cond17.c: New file. From Jakub.
4479 * tst-cond18.c: New file. From Jakub.
4481 2004-05-16 Ulrich Drepper <drepper@redhat.com>
4483 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4487 Parametrize frame size. Correct some unwind info.
4488 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4490 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4492 * tst-stack3.c: Note testing functionality beyond POSIX.
4494 2004-05-04 Jakub Jelinek <jakub@redhat.com>
4496 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4497 Change conditional from ifdef to if.
4499 2004-04-23 Jakub Jelinek <jakub@redhat.com>
4501 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4502 SYSDEP_CANCEL_ERROR): Define.
4505 2004-05-01 Jakub Jelinek <jakub@redhat.com>
4507 * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4509 2004-04-20 Jakub Jelinek <jakub@redhat.com>
4511 * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4513 2004-04-19 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4515 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4516 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4517 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4518 info. Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4520 2004-04-19 Ulrich Drepper <drepper@redhat.com>
4522 * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4523 thread has all signals blocked.
4525 2004-04-18 Andreas Jaeger <aj@suse.de>
4527 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4528 (SEM_VALUE_MAX): Add missing brace.
4530 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4532 * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4534 (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4535 * sysdeps/pthread/tst-mqueue8x.c: New test.
4536 * tst-cancel4.c: Update comment about message queues.
4538 * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4539 return it_value { 0, 0 }.
4540 * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4542 * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4543 assertion for SIGEV_NONE.
4544 (thread_attr_compare): Compare all attributes, not just a partial
4547 2004-04-17 Jakub Jelinek <jakub@redhat.com>
4549 * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4551 2004-04-17 Ulrich Drepper <drepper@redhat.com>
4553 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4554 Just use a plain number.
4555 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4556 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4557 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4558 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4559 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4560 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4561 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4563 2004-04-16 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4565 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4567 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4569 2004-04-15 Jakub Jelinek <jakub@redhat.com>
4571 * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4572 (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4573 of calling sigwaitinfo.
4575 2004-04-16 Ulrich Drepper <drepper@redhat.com>
4577 * allocatestack.c (allocate_stack): Set reported_guardsize
4579 * pthread_getattr_np.c (pthread_getattr_np): Use
4580 reported_guardsize instead of guardsize.
4581 * descr.h (struct pthread): Add reported_guardsize field.
4583 2004-04-13 Jakub Jelinek <jakub@redhat.com>
4585 * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4587 2004-04-12 Ulrich Drepper <drepper@redhat.com>
4589 * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4591 2004-04-08 Jakub Jelinek <jakub@redhat.com>
4593 * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4594 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4595 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4596 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4597 * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4599 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4600 (_POSIX_MESSAGE_PASSING): Define.
4601 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4602 (_POSIX_MESSAGE_PASSING): Define.
4603 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4604 (_POSIX_MESSAGE_PASSING): Define.
4606 2004-04-04 Ulrich Drepper <drepper@redhat.com>
4608 * tst-context1.c (fct): Check whether correct stack is used.
4610 2004-04-03 Ulrich Drepper <drepper@redhat.com>
4612 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4613 matching constraints for asm mem parameters.
4615 * tst-clock2.c (tf): Don't define unless needed.
4617 2004-03-30 H.J. Lu <hongjiu.lu@intel.com>
4619 * Makefile (link-libc-static): Use $(static-gnulib) instead of
4622 2004-03-30 Ulrich Drepper <drepper@redhat.com>
4624 * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4625 * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4626 * pthreadP.h: Declare __nptl_deallocate_tsd.
4627 * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4630 * Makefile (tests): Add tst-tsd5.
4631 * tst-tsd5.c: New file.
4633 2004-03-29 Ulrich Drepper <drepper@redhat.com>
4635 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4636 (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4637 is SHLIB_COMPAT check.
4638 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4639 (__pthread_attr_getaffinity_old): Likewise.
4640 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4641 (__pthread_getaffinity_old): Likewise.
4642 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4643 (__pthread_setaffinity_old): Likewise.
4645 2004-03-26 Ulrich Drepper <drepper@redhat.com>
4647 * allocatestack.c (_make_stacks_executable): Call
4648 _dl_make_stack_executable first.
4650 2004-03-24 Roland McGrath <roland@redhat.com>
4652 * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4653 constraint instead of "0".
4655 2004-03-24 Ulrich Drepper <drepper@redhat.com>
4657 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4658 (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4660 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4661 code to avoid warning.
4663 2004-03-24 Andreas Jaeger <aj@suse.de>
4665 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4666 (__pthread_attr_setaffinity_old): Remove const.
4668 2004-03-23 Ulrich Drepper <drepper@redhat.com>
4670 * sysdeps/unix/sysv/linux/smp.h: New file.
4671 * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4672 * init.c: Define __is_smp.
4673 (__pthread_initialize_minimal_internal): Call is_smp_system to
4674 initialize __is_smp.
4675 * pthreadP.h: Declare __is_smp.
4676 Define MAX_ADAPTIVE_COUNT is necessary.
4677 * pthread_mutex_init.c: Add comment regarding __spins field.
4678 * pthread_mutex_lock.c: Implement adaptive mutex type.
4679 * pthread_mutex_timedlock.c: Likewise.
4680 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4681 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4683 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4684 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4685 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4686 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4687 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4688 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4689 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4690 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4691 lll_mutex_cond_trylock.
4692 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4693 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4694 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4695 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4696 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4697 Define BUSY_WAIT_NOP.
4698 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4699 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4701 * tst-mutex5.c: Add support for testing adaptive mutexes.
4702 * tst-mutex7.c: Likewise.
4703 * tst-mutex5a.c: New file.
4704 * tst-mutex7a.c: New file.
4705 * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4707 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4708 (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4709 vgettimeofday call might destroy the content.
4711 * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4714 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4715 No need to restrict type of ret. Make it int. Add comment.
4717 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4718 Remove unnecessary setne instruction.
4720 2004-03-22 Jakub Jelinek <jakub@redhat.com>
4722 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4723 (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4724 * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4725 If realloc fails, break out of the loop.
4727 2004-03-20 Andreas Jaeger <aj@suse.de>
4729 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4730 (__pthread_setaffinity_old): Fix interface.
4731 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4732 (__pthread_getaffinity_old): Likewise.
4734 * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4735 (__pthread_setaffinity_new): Remove duplicate declaration.
4737 2004-03-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4739 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4740 the return value to a safe register.
4741 (CDISABLE): Set the function argument correctly.
4743 2004-03-17 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4745 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4746 * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4747 Rewrite so that only one locked memory operation per round is needed.
4748 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4749 (pthread_barrier_wait): After wakeup, release lock only when the
4750 last thread stopped using the barrier object.
4751 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4752 (__pthread_cond_wait): Don't store mutex address if the current
4753 value is ~0l. Add correct cleanup support and unwind info.
4754 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4755 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4756 (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4757 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4758 * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4759 Add correct cleanup support and unwind info.
4760 * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4761 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4762 information for syscall wrappers.
4764 2004-03-18 Ulrich Drepper <drepper@redhat.com>
4766 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4767 cpusetsize field, remove next.
4768 * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4769 parameter for size of the CPU set.
4770 (pthread_setaffinity_np): Likewise.
4771 (pthread_attr_getaffinity_np): Likewise.
4772 (pthread_attr_setaffinity_np): Likewise.
4773 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4774 interface change, keep compatibility code.
4775 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4776 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4777 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4778 * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np. Declare
4779 __pthread_getaffinity_np.
4780 * Versions: Add version for changed interfaces.
4781 * tst-attr3.c: Adjust test for interface change.
4782 * pthread_getattr_np.c: Query the kernel about the affinity mask with
4783 increasing buffer sizes.
4784 * pthread_attr_destroy.c: Remove unused list handling.
4785 * pthread_attr_init.c: Likewise.
4787 2004-03-17 Roland McGrath <roland@redhat.com>
4789 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4790 first argument to clock_getres so we ever enable kernel timers.
4792 2004-03-15 Ulrich Weigand <uweigand@de.ibm.com>
4794 * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4796 2004-03-12 Richard Henderson <rth@redhat.com>
4798 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4799 oldvalue from CENABLE to CDISABLE.
4801 2004-03-12 Ulrich Drepper <drepper@redhat.com>
4803 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4804 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4805 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4806 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4808 2004-03-11 Richard Henderson <rth@redhat.com>
4810 * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4811 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4812 * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4814 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4816 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4817 instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4818 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4820 2004-03-11 Jakub Jelinek <jakub@redhat.com>
4822 * forward.c (__pthread_cond_broadcast_2_0,
4823 __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4824 __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4825 __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4827 2004-03-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4829 * sysdeps/sh/tcb-offsets.sym: Add PID.
4830 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4831 * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4833 2004-03-10 Ulrich Drepper <drepper@redhat.com>
4835 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4836 include <sysdep-cancel.h>, vfork is no cancellation point.
4837 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4838 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4839 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4841 2004-03-10 Jakub Jelinek <jakub@redhat.com>
4843 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4845 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4846 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4848 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4850 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4851 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4852 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4853 * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4854 of DO_CALL_VIA_BREAK. Work around a gas problem.
4856 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4857 * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4858 * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4859 * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4860 * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4861 * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4863 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4864 a local register for saving old PID. Negate PID in parent upon exit.
4866 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4868 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4869 before syscall, set to the old value in the parent afterwards.
4870 * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4871 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4873 (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4874 before syscall, set to the old value in the parent afterwards.
4875 * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4876 * sysdeps/s390/tcb-offsets.sym: Add PID.
4878 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4879 * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4880 * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4881 * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4882 * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4883 * sysdeps/sparc/tcb-offsets.sym: Add PID.
4885 2004-03-10 Andreas Schwab <schwab@suse.de>
4887 * sysdeps/ia64/tcb-offsets.sym: Add PID.
4888 * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4889 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4891 2004-03-09 Jakub Jelinek <jakub@redhat.com>
4893 * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4894 * tst-cancel21.c (do_one_test): Likewise.
4895 Reported by Gordon Jin <gordon.jin@intel.com>.
4897 2004-02-09 Jakub Jelinek <jakub@redhat.com>
4899 * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4900 if non-zero and set to INT_MIN if zero.
4901 * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4902 * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4903 (SAVE_PID, RESTORE_PID): Define.
4905 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4906 Use relative path to avoid including NPTL i386/vfork.S.
4907 (SAVE_PID, RESTORE_PID): Define.
4908 * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4909 (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4910 * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4912 (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4913 * tst-vfork1.c: New test.
4914 * tst-vfork2.c: New test.
4915 * tst-vfork1x.c: New test.
4916 * tst-vfork2x.c: New test.
4918 2004-03-08 Ulrich Drepper <drepper@redhat.com>
4920 * sysdeps/i386/tcb-offsets.sym: Add PID.
4921 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4922 * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4923 * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4925 2004-03-08 Steven Munroe <sjmunroe@us.ibm.com>
4927 * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4929 2004-03-08 H.J. Lu <hongjiu.lu@intel.com>
4931 * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4934 2004-03-07 Ulrich Drepper <drepper@redhat.com>
4936 * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4939 * tst-once4.c: Remove unnecessary macro definition.
4941 * tst-mutex7.c (do_test): Limit thread stack size.
4942 * tst-once2.c (do_test): Likewise.
4943 * tst-tls3.c (do_test): Likewise.
4944 * tst-tls1.c (do_test): Likewise.
4945 * tst-signal3.c (do_test): Likewise.
4946 * tst-kill6.c (do_test): Likewise.
4947 * tst-key4.c (do_test): Likewise.
4948 * tst-join4.c (do_test): Likewise.
4949 * tst-fork1.c (do_test): Likewise.
4950 * tst-context1.c (do_test): Likewise.
4951 * tst-cond2.c (do_test): Likewise.
4952 * tst-cond10.c (do_test): Likewise.
4953 * tst-clock2.c (do_test): Likewise.
4954 * tst-cancel10.c (do_test): Likewise.
4955 * tst-basic2.c (do_test): Likewise.
4956 * tst-barrier4.c (do_test): Likewise.
4958 2004-03-05 Ulrich Drepper <drepper@redhat.com>
4960 * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4962 2004-03-01 Ulrich Drepper <drepper@redhat.com>
4964 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4965 (__pthread_cond_timedwait): Optimize wakeup test.
4966 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4967 (__pthread_cond_wait): Likewise.
4968 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4969 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4972 2004-02-29 Ulrich Drepper <drepper@redhat.com>
4974 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4975 (__lll_mutex_lock_wait): Optimize a bit more. Just one copy of
4976 the atomic instruction needed.
4977 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4978 (__lll_mutex_lock_wait): Likewise.
4980 2004-02-28 Ulrich Drepper <drepper@redhat.com>
4982 * Makefile (tests): Add tst-cond14 and tst-cond15.
4983 * tst-cond14.c: New file.
4984 * tst-cond15.c: New file.
4986 2004-02-27 Ulrich Drepper <drepper@redhat.com>
4988 * sysdeps/pthread/createthread.c (create_thread): Remove use of
4989 CLONE_STOPPED. We cannot use SIGCONT which means CLONE_STOPPED
4990 needs to be implemented differently to be useful.
4992 2004-02-26 Ulrich Drepper <drepper@redhat.com>
4994 * pthread_attr_setschedparam.c: Don't test priority against limits
4995 here. Set ATTR_FLAG_SCHED_SET flag.
4996 * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4997 * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4998 from parent thread to child. If attribute is used and scheduling
4999 parameters are not inherited, copy parameters from attribute or
5000 compute them. Check priority value.
5001 * pthread_getschedparam.c: If the parameters aren't known yet get
5002 them from the kernel.
5003 * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5004 ATTR_FLAG_POLICY_SET flag for thread.
5005 * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5006 and ATTR_FLAG_POLICY_SET.
5008 * sysdeps/pthread/createthread.c: Use tgkill if possible.
5010 * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5011 fail if stack address hasn't been set. Just return 0.
5013 2004-02-25 Ulrich Drepper <drepper@redhat.com>
5015 * Makefile (tests-nolibpthread): Add tst-unload. Don't link with
5016 libpthread for the files in this list.
5017 (CFLAGS-tst-unload): Removed.
5018 * tst-unload.c (do_test): Don't use complete path for
5021 * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5024 2004-02-22 Ulrich Drepper <drepper@redhat.com>
5026 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5027 (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5028 operation per round is needed.
5029 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5030 (__lll_mutex_lock_wait): Likewise.
5032 2004-02-20 Ulrich Drepper <drepper@redhat.com>
5034 * tst-cancel9.c (cleanup): Don't print to stderr.
5036 2004-02-20 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5038 * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5040 2004-02-20 Jakub Jelinek <jakub@redhat.com>
5042 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5043 (__syscall_error_handler2): Call CDISABLE.
5044 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5045 (__syscall_error_handler2): Call CDISABLE.
5047 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5048 Release lock before the loop, don't reacquire it.
5050 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5052 2004-02-19 Andreas Schwab <schwab@suse.de>
5054 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5057 2004-02-18 Ulrich Drepper <drepper@redhat.com>
5059 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5060 (pthread_barrier_wait): After wakeup, release lock only when the
5061 last thread stopped using the barrier object.
5062 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5063 (pthread_barrier_wait): Likewise.
5064 * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5066 * Makefile (tests): Add tst-barrier4.
5067 * tst-barrier4.c: New file.
5069 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5070 (__pthread_cond_timedwait): Perform timeout test while holding
5071 internal lock to prevent wakeup race.
5072 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5073 * sysdeps/pthread/pthread_cond_timedwait.c
5074 (__pthread_cond_timedwait): Likewise.
5075 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5076 (__pthread_cond_timedwait): Likewise.
5078 2004-02-18 Jakub Jelinek <jakub@redhat.com>
5080 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5081 (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5082 * Makefile (tests): Add tst-rwlock13.
5083 * tst-rwlock13.c: New test.
5085 2004-02-16 Ulrich Drepper <drepper@redhat.com>
5087 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5088 (__condvar_tw_cleanup): Little optimization.
5089 Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5091 2004-02-16 Steven Munroe <sjmunroe@us.ibm.com>
5093 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5094 libpthread as "lib" parameter to SHLIB_COMPAT.
5095 (__novmx_siglongjmp): Fix typo in function name.
5096 (__novmx_longjmp): Fix typo in function name.
5098 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5100 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5103 * sysdeps/generic/pt-longjmp.c: Moved to...
5104 * sysdeps/pthread/pt-longjmp.c: ...here. New file.
5106 2004-01-29 Steven Munroe <sjmunroe@us.ibm.com>
5108 * Makefile (libpthread-routines): Add pt-cleanup.
5109 * pt-longjmp.c: Removed.
5110 * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5111 * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5112 * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5113 Version longjmp, siglongjmp for GLIBC_2.3.4.
5114 * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5116 2004-02-13 Ulrich Drepper <drepper@redhat.com>
5118 * sysdeps/pthread/pthread_cond_timedwait.c
5119 (__pthread_cond_timedwait): Optimize. Drop internal lock earlier.
5120 Reuse code. Add __builtin_expects.
5122 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5123 (__pthread_cond_timedwait): Get internal lock in case timeout has
5124 passed before the futex syscall.
5125 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5127 2004-01-20 Ulrich Drepper <drepper@redhat.com>
5129 * allocatestack.c: Pretty printing.
5131 * sysdeps/pthread/createthread.c (create_thread): Don't add
5132 CLONE_DETACHED bit if it is not necessary.
5134 2004-01-16 Ulrich Drepper <drepper@redhat.com>
5136 * pthread_getattr_np.c: Include ldsodefs.h.
5138 2004-01-16 Richard Henderson <rth@redhat.com>
5140 * allocatestack.c: Don't declare __libc_stack_end.
5141 * init.c (__pthread_initialize_minimal_internal): Likewise.
5142 * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5144 2004-01-15 Richard Henderson <rth@redhat.com>
5146 * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5147 (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5148 TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5149 GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5150 (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5151 (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5152 (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5153 * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5155 2004-01-14 Ulrich Drepper <drepper@redhat.com>
5157 * init.c (pthread_functions): Make array const.
5159 2004-01-13 Ulrich Drepper <drepper@redhat.com>
5161 * allocatestack.c (__make_stacks_executable): Change interface.
5162 Check parameters. Pass parameter on to libc counterpart.
5163 * pthreadP.h: Change declaration.
5165 2004-01-13 Richard Henderson <rth@redhat.com>
5167 * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5169 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5172 * sysdeps/alpha/Makefile: New file.
5173 * sysdeps/alpha/tcb-offsets.sym: New file.
5174 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5175 Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5177 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5180 2004-01-08 Jakub Jelinek <jakub@redhat.com>
5182 * Makefile (tests): Add tst-backtrace1.
5183 * tst-backtrace1.c: New test.
5185 2003-12-11 Ulrich Weigand <uweigand@de.ibm.com>
5187 * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5188 register as second parameter to the REGISTER macro.
5189 * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5190 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5191 * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5192 * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5193 * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5194 of thread register as second parameter to REGISTER macro in 64 case.
5196 2004-01-03 Ulrich Drepper <drepper@redhat.com>
5198 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5199 (CFLAGS-getpid.o): Defined.
5200 (CFLAGS-getpid.os): Defined.
5202 2003-12-31 Ulrich Drepper <drepper@redhat.com>
5204 * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5205 returned for main thread does not overlap with any other VMA.
5206 Patch by Jakub Jelinek.
5208 2003-12-29 Jakub Jelinek <jakub@redhat.com>
5210 * tst-raise1.c: Include stdio.h.
5212 2003-12-23 Jakub Jelinek <jakub@redhat.com>
5214 * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5215 setting with __ASSUME_TGKILL || defined __NR_tgkill.
5216 If pid is 0, set it to selftid.
5217 * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5218 Don't set self->pid but self->tid. If self->pid == 0 and self->tid
5219 != 0, return self->tid without doing a syscall.
5220 * descr.h (struct pthread): Move pid field after tid.
5222 * Makefile (tests): Add tst-raise1.
5223 * tst-raise1.c: New file.
5225 2003-12-23 Roland McGrath <roland@redhat.com>
5227 * tst-oddstacklimit.c: New file.
5228 * Makefile (tests): Add it.
5229 (tst-oddstacklimit-ENV): New variable.
5231 * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5232 value up to page size for __default_stacksize.
5234 2003-12-21 Ulrich Drepper <drepper@redhat.com>
5236 * Makefile (tests): Add tst-eintr5.
5237 * tst-eintr5.c: New file.
5239 * eintr.c (eintr_source): Prevent sending signal to self.
5241 * tst-eintr2.c (tf1): Improve error message.
5243 2003-12-20 Ulrich Drepper <drepper@redhat.com>
5245 * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5246 * sysdeps/unix/sysv/linux/getpid.c: New file.
5247 * pthread_cancel.c: Add comment explaining use of PID field.
5248 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5249 * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5250 * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5251 temporarily to signal the field must not be relied on and updated
5253 * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5254 temporarily negative.
5255 * sysdeps/unix/sysv/linux/raise.c: Likewise.
5257 2003-12-19 Ulrich Drepper <drepper@redhat.com>
5259 * eintr.c (setup_eintr): Add new parameter. Pass to thread function.
5260 (eintr_source): If ARG != NULL, use pthread_kill.
5261 * tst-eintr1.c: Adjust for this change.
5262 * tst-eintr2.c: Likewise.
5263 * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5264 * tst-eintr3.c: New file.
5265 * tst-eintr4.c: New file.
5267 2003-12-19 Jakub Jelinek <jakub@redhat.com>
5269 * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5270 if CANCELSTATE_BITMASK is set.
5271 * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5274 * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5275 (tests-reverse): Add tst-cancel23.
5276 * tst-cancel22.c: New test.
5277 * tst-cancel23.c: New test.
5279 2003-12-18 Ulrich Drepper <drepper@redhat.com>
5281 * tst-eintr1.c: Better error messages.
5283 * Makefile (tests): Add tst-eintr2.
5284 * tst-eintr2.c: New file.
5286 2003-12-18 Jakub Jelinek <jakub@redhat.com>
5288 * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5289 (CFLAGS-tst-cancelx21.c): Set.
5290 * tst-cancel21.c: New test.
5291 * tst-cancelx21.c: New test.
5293 * unwind.c (FRAME_LEFT): Add adj argument. Subtract it from each
5295 (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5296 _JMPBUF_CFA_UNWINDS. Adjust FRAME_LEFT invocations.
5297 * pt-longjmp.c: Include jmpbuf-unwind.h.
5298 (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5299 _JMPBUF_UNWINDS. Adjust compared pointers.
5300 * init.c (__pthread_initialize_minimal_internal): Initialize
5301 pd->stackblock_size.
5302 * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5303 * sysdeps/alpha/jmpbuf-unwind.h: New file.
5304 * sysdeps/i386/jmpbuf-unwind.h: New file.
5305 * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5306 * sysdeps/s390/jmpbuf-unwind.h: New file.
5307 * sysdeps/sh/jmpbuf-unwind.h: New file.
5308 * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5309 * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5310 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5311 (_JMPBUF_CFA_UNWINDS): Remove.
5312 (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5314 2003-12-12 Jakub Jelinek <jakub@redhat.com>
5316 * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5317 (CFLAGS-tst-cancelx20.c): Set.
5318 * tst-cancel20.c: New test.
5319 * tst-cancelx20.c: New test.
5321 2003-12-17 Ulrich Drepper <drepper@redhat.com>
5323 * init.c (__pthread_initialize_minimal_internal): Don't treat
5324 architectures with separate register stack special here when
5325 computing default stack size.
5327 2003-12-17 Roland McGrath <roland@redhat.com>
5329 * Makefile (tst-cancelx7-ARGS): New variable.
5330 Reportd by Greg Schafer <gschafer@zip.com.au>.
5332 2003-12-17 Jakub Jelinek <jakub@redhat.com>
5334 * Makefile (tests): Add tst-stack3. Depend on $(objpfx)tst-stack3-mem.
5335 (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5336 (tst-stack3-ENV): Set.
5337 ($(objpfx)tst-stack3-mem): New.
5338 * tst-stack3.c: New test.
5340 2003-12-10 David Mosberger <davidm@hpl.hp.com>
5342 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5343 Add unwind directives. Drop unused .regstk directive.
5344 (_fini_EPILOG_BEGINS): Add unwind directives.
5346 2003-12-11 Ulrich Drepper <drepper@redhat.com>
5348 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5349 Assume parameter is a pointer.
5350 (lll_futex_wake): Likewise.
5351 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5353 (lll_futex_wake): Likewise.
5354 Reported by Boris Hu.
5355 * sysdeps/unix/sysv/linux/unregister-atfork.c
5356 (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5358 * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5360 2003-12-10 Ulrich Drepper <drepper@redhat.com>
5362 * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5363 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5364 __rtld_lock_initialize for ld.so lock.
5365 Patch in part by Adam Li <adam.li@intel.com>.
5367 2003-12-02 David Mosberger <davidm@hpl.hp.com>
5369 * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5370 in $(gnulib). Also, remove stale comment.
5372 2003-11-12 David Mosberger <davidm@hpl.hp.com>
5374 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5375 advantage of new syscall stub and optimize accordingly.
5377 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5378 from SYS_futex, to match expectations of
5379 sysdep.h:DO_INLINE_SYSCALL.
5380 (lll_futex_clobbers): Remove.
5381 (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5382 (lll_futex_wake): Likewise.
5383 (lll_futex_requeue): Likewise.
5384 (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5385 file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5387 (__lll_mutex_lock): Likewise.
5388 (__lll_mutex_cond_lock): Likewise.
5389 (__lll_mutex_timed_lock): Likewise.
5390 (__lll_mutex_unlock): Likewise.
5391 (__lll_mutex_unlock_force): Likewise.
5393 * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5394 comes before the include of <sysdep.h>.
5395 (THREAD_SELF_SYSINFO): New macro.
5396 (THREAD_SYSINFO): Likewise.
5397 (INIT_SYSINFO): New macro.
5398 (TLS_INIT_TP): Call INIT_SYSINFO.
5400 * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5402 * sysdeps/pthread/createthread.c (create_thread): Use
5403 THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5404 * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5405 THREAD_SELF_SYSINFO instead of open code.
5406 * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5407 (THREAD_SYSINFO): Likewise.
5409 * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5411 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5413 2003-12-06 Ulrich Drepper <drepper@redhat.com>
5415 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5416 instead of .init. Patch by David Mosberger.
5418 2003-11-30 Thorsten Kukuk <kukuk@suse.de>
5420 * sysdeps/pthread/configure.in: Remove broken declaration in C
5421 cleanup handling check.
5423 2003-11-30 Andreas Jaeger <aj@suse.de>
5425 * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5426 * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5429 2003-11-27 Jakub Jelinek <jakub@redhat.com>
5431 * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5432 * pthread_attr_destroy.c: Include shlib-compat.h.
5433 (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5434 is set in iattr->flags.
5435 * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5437 2003-11-21 Jakub Jelinek <jakub@redhat.com>
5439 * Makefile (distribute): Add tst-cleanup4aux.c.
5441 * tst-cond12.c (prepare): Add prototype. Move after test-skeleton.c
5444 2003-11-21 Ulrich Drepper <drepper@redhat.com>
5446 * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5447 pthread_cond_signal.
5449 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5450 store mutex address if the current value is ~0l.
5451 * sysdeps/pthread/pthread_cond_timedwait.c
5452 (__pthread_cond_timedwait): Likewise.
5453 * sysdeps/pthread/pthread_cond_broadcast.c
5454 (__pthread_cond_broadcast): Don't use requeue for pshared
5457 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5458 (__pthread_cond_wait): Don't store mutex address if the current
5460 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5461 (__pthread_cond_timedwait): Likewise.
5462 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5463 (__pthread_cond_broadcast): Don't use requeue for pshared
5466 * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5467 element with ~0l for pshared condvars, with NULL otherwise.
5469 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5470 (__pthread_cond_wait): Don't store mutex address if the current
5472 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5473 (__pthread_cond_timedwait): Likewise.
5474 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5475 (__pthread_cond_broadcast): Don't use requeue for pshared
5478 * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5479 * tst-cond12.c: New file.
5480 * tst-cond13.c: New file.
5482 2003-11-17 Ulrich Drepper <drepper@redhat.com>
5484 * sysdeps/pthread/configure.in: Make missing forced unwind support
5487 2003-11-11 Ulrich Drepper <drepper@redhat.com>
5489 * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5491 2003-11-06 Ulrich Drepper <drepper@redhat.com>
5493 * Makefile: Add magic to clean up correctly.
5495 2003-11-05 Jakub Jelinek <jakub@redhat.com>
5497 * unwind.c (FRAME_LEFT): Define.
5498 (unwind_stop): Handle old style cleanups here.
5499 (__pthread_unwind): Handle old style cleanups only if
5500 !HAVE_FORCED_UNWIND.
5501 * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5502 (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5503 ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5504 ($(objpfx)tst-cleanupx4): Likewise.
5505 * tst-cleanup4.c: New test.
5506 * tst-cleanup4aux.c: New.
5507 * tst-cleanupx4.c: New test.
5509 2003-11-04 Ulrich Drepper <drepper@redhat.com>
5511 * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5512 lll_mutex_*lock macros to skip atomic operations on some archs.
5514 2003-11-03 Ulrich Drepper <drepper@redhat.com>
5516 * sysdeps/pthread/tst-timer.c (main): Initialize
5517 sigev2.sigev_value as well.
5519 2003-10-15 Roland McGrath <roland@redhat.com>
5521 * sysdeps/pthread/configure.in: Barf if visibility attribute support
5523 * sysdeps/pthread/configure: Regenerated.
5525 2003-10-09 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5527 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5528 locking macros. No distinction between normal and mutex locking
5530 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5531 Merge bits from lowlevelmutex.S we still need.
5532 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5533 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5534 * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5535 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5536 new mutex implementation.
5537 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5538 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5539 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5540 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5541 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5542 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5543 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5544 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5545 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5546 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5547 symbol for entry point to avoid cancellation.
5549 2003-10-07 Jakub Jelinek <jakub@redhat.com>
5551 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5553 (SAVE_OLDTYPE_0): Fix a typo.
5555 2003-10-03 Ulrich Drepper <drepper@redhat.com>
5557 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5558 Check __sigsetjmp return value. Reported by Daniel Jacobowitz.
5560 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5562 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5565 2003-10-02 Jakub Jelinek <jakub@redhat.com>
5567 * Makefile (tests): Add tst-cancel19.
5568 * tst-cancel19.c: New test.
5570 2003-10-02 Ulrich Drepper <drepper@redhat.com>
5572 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5573 restoring of the old cancellation type.
5575 2003-09-30 Jakub Jelinek <jakub@redhat.com>
5577 * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5579 2003-09-27 Wolfram Gloger <wg@malloc.de>
5581 * sysdeps/pthread/malloc-machine.h: New file
5583 2003-09-24 Roland McGrath <roland@redhat.com>
5585 * allocatestack.c (__make_stacks_executable): Don't ignore return
5586 value from _dl_make_stack_executable.
5588 2003-09-24 Ulrich Drepper <drepper@redhat.com>
5590 * allocatestack.c (__make_stacks_executable): Also change
5591 permission of the currently unused stacks.
5593 * allocatestack.c (change_stack_perm): Split out from
5594 __make_stacks_executable.
5595 (allocate_stack): If the required permission changed between the time
5596 we started preparing the stack and queueing it, change the permission.
5597 (__make_stacks_executable): Call change_stack_perm.
5599 * Makefile: Build tst-execstack-mod locally.
5600 * tst-execstack-mod.c: New file.
5602 2003-09-23 Jakub Jelinek <jakub@redhat.com>
5604 * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5606 2003-09-23 Roland McGrath <roland@redhat.com>
5608 * tst-execstack.c: New file.
5609 * Makefile (tests): Add it.
5610 ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5611 (LDFLAGS-tst-execstack): New variable.
5613 * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5614 whether to use PROT_EXEC for stack mmap.
5615 (__make_stacks_executable): New function.
5616 * pthreadP.h: Declare it.
5617 * init.c (__pthread_initialize_minimal_internal): Set
5618 GL(dl_make_stack_executable_hook) to that.
5620 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5622 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5623 recommendation from AMD re avoidance of lock prefix.
5625 2003-09-22 Jakub Jelinek <jakub@redhat.com>
5627 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5628 lll_futex_timed_wait instead of lll_futex_wait.
5629 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5630 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5631 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5632 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5633 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5634 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5635 * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5636 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5637 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5638 Completely revamp the locking macros. No distinction between
5639 normal and mutex locking anymore.
5640 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5641 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5642 __lll_lock_timedwait): Fix prototypes.
5643 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5644 __lll_lock_timedwait): Likewise.
5645 (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5646 macros, add __builtin_expect.
5647 (lll_mutex_timedlock): Likewise. Fix return value.
5648 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5649 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5650 * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5651 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5652 * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5653 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5654 * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5655 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5657 2003-09-22 Ulrich Drepper <drepper@redhat.com>
5659 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5660 (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5661 operation if possible.
5663 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5664 like jumping over the lock prefix.
5666 2003-09-21 Ulrich Drepper <drepper@redhat.com>
5668 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5669 locking macros. No distinction between normal and mutex locking
5671 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5672 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5673 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5674 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5675 locking. Merge bits from lowlevelmutex.S we still need.
5676 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5677 * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5678 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5679 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5680 * Makefile (routines): Remove libc-lowlevelmutex.
5681 (libpthread-rountines): Remove lowlevelmutex.
5682 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5683 for new mutex implementation.
5684 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5685 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5686 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5687 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5688 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5690 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5692 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5693 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5694 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5695 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5696 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5697 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5698 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5699 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5701 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5703 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5704 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5705 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5707 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5708 * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5710 2003-09-20 Ulrich Drepper <drepper@redhat.com>
5712 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5713 in parameters of asm with output parameters.
5715 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5716 type of DECR parameter to int.
5717 * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5719 2003-09-18 Jakub Jelinek <jakub@redhat.com>
5721 * tst-attr3.c (tf, do_test): Print stack start/end/size and
5722 guardsize for each thread.
5724 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5726 * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5727 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5728 (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5730 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5731 (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5733 * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5734 * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5735 * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5736 (pthread_getaffinity_np): Add hidden_def.
5738 * Makefile (tests): Add tst-attr3.
5739 * tst-attr3.c: New test.
5741 * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5743 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5745 * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5746 CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5748 2003-09-17 Jakub Jelinek <jakub@redhat.com>
5750 * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5751 * tst-align.c: Include tst-stack-align.h.
5752 (tf, do_test): Use TEST_STACK_ALIGN macro.
5754 2003-09-17 Ulrich Drepper <drepper@redhat.com>
5756 * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5759 2003-09-16 Ulrich Drepper <drepper@redhat.com>
5761 * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5762 stack-related values for the initial thread.
5764 2003-09-15 Jakub Jelinek <jakub@redhat.com>
5766 * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5768 2003-09-11 Ulrich Drepper <drepper@redhat.com>
5770 * pthread_mutex_lock.c: Minor code rearrangements.
5772 2003-09-05 Roland McGrath <roland@redhat.com>
5774 * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5775 Instead, include ../nptl_db/db_info.c to do its magic.
5776 * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5777 (__pthread_pthread_key_2ndlevel_size): Likewise.
5778 * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5779 * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5780 * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5781 * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5782 * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5783 * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5784 * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5785 * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5786 * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5787 * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5788 * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5789 * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5790 * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5791 * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5792 * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5793 * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5794 * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5796 2003-09-08 Ulrich Drepper <drepper@redhat.com>
5798 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5799 of pthread_t to be compatible with LT.
5800 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5801 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5802 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5803 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5804 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5805 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5806 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5808 2003-09-04 Ulrich Drepper <drepper@redhat.com>
5810 * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5812 2003-09-04 Jakub Jelinek <jakub@redhat.com>
5814 * unwind-forcedunwind.c: Move to...
5815 * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5816 (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5817 * sysdeps/pthread/jmpbuf-unwind.h: New file.
5818 * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5819 * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5820 * unwind.c: Include jmpbuf-unwind.h.
5821 (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5823 2003-09-02 Jakub Jelinek <jakub@redhat.com>
5825 * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5826 * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5827 pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5828 * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5829 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5830 * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5831 * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5832 * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5833 (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5834 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5835 * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5837 (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5838 as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5839 * Makefile (tests): Add tst-stack2.
5840 * tst-stack2.c: New test.
5841 * tst-stack1.c: Include limits.h and sys/param.h.
5842 (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5844 * pthread_condattr_setpshared.c: Include errno.h.
5845 (pthread_condattr_setpshared): Return EINVAL if pshared
5846 is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5848 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5849 defined symbol for entry point to avoid cancellation.
5850 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5852 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5854 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5856 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5858 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5860 * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5861 __close_nocancel, __read_nocancel, __write_nocancel,
5862 __waitpid_nocancel): Add attribute_hidden. If not in libc.so,
5863 libpthread.so or librt.so, define to corresponding function
5864 without _nocancel suffix.
5865 * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5866 * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5867 * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5869 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5871 2003-09-02 Ulrich Drepper <drepper@redhat.com>
5873 * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5874 * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5876 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5877 in subsections has a symbol associated with it.
5879 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5880 defined symbol for entry point to avoid cancellation.
5881 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5883 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5885 * Makefile (tests): Add tst-tls5.
5886 (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5887 ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5888 ($(objpfx)tst-tls5): New.
5889 ($(objpfx)tst-tls6.out): Likewise.
5890 (tests): Depend on $(objpfx)tst-tls6.out.
5891 * tst-tls3.c: Include stdint.h and pthreaddef.h.
5892 (do_test): Check pthread_self () return value alignment.
5893 * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5894 (tf): Check pthread_self () return value alignment.
5895 * tst-tls5.c: New test.
5897 * tst-tls5mod.c: New.
5898 * tst-tls5moda.c: New.
5899 * tst-tls5modb.c: New.
5900 * tst-tls5modc.c: New.
5901 * tst-tls5modd.c: New.
5902 * tst-tls5mode.c: New.
5903 * tst-tls5modf.c: New.
5904 * tst-tls6.sh: New test.
5906 * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5907 ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5908 * init.c (pthread_functions): Initialize them.
5909 * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5910 pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5911 * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5912 pthread_cond_timedwait@@GLIBC_2.3.2.
5914 2003-09-01 Jakub Jelinek <jakub@redhat.com>
5916 * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5917 * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5918 * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5919 * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5920 * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5921 * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5923 * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5925 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5926 _POSIX_THREAD_PRIORITY_SCHEDULING.
5927 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5929 2003-08-31 Ulrich Drepper <drepper@redhat.com>
5931 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5932 nested function, use static inline function from libio.h.
5933 Code by Richard Henderson.
5935 * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5938 2003-08-30 Jakub Jelinek <jakub@redhat.com>
5940 * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5941 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5942 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5943 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5944 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5945 * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5946 * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5947 * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5948 * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5949 * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5950 * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5951 * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5952 * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5953 * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5954 * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5955 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5956 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5957 * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5958 * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5959 * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5960 * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5961 * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5962 * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5963 * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5964 * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5965 * sysdeps/sparc/tls.h: New file.
5966 * sysdeps/sparc/tcb-offsets.sym: New file.
5967 * sysdeps/sparc/Makefile: New file.
5968 * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5969 * init.c [__sparc__] (__NR_set_tid_address): Define.
5971 2003-08-29 Jakub Jelinek <jakub@redhat.com>
5973 * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5974 _IO_release_lock): Define.
5976 2003-08-29 Jakub Jelinek <jakuB@redhat.com>
5978 * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5979 sigemptyset before sigaddset. Reported by jreiser@BitWagon.com.
5981 2003-08-27 Ulrich Drepper <drepper@redhat.com>
5983 * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5984 (__pthread_cleanup_class): Add missing return types of member
5987 2003-08-26 Steven Munroe <sjmunroe@us.ibm.com>
5989 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5990 (lll_mutex_unlock_force): Add memory barrier between store and futex
5993 2003-08-25 Ulrich Drepper <drepper@redhat.com>
5995 * tst-cancel4.c (do_test): Also unlink tempfname and remove
5996 tempmsg in first loop.
5998 2003-08-18 Ulrich Drepper <drepper@redhat.com>
6000 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6001 _POSIX_THREAD_PRIORITY_SCHEDULING.
6002 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6004 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6006 * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6007 (__rtld_lock_default_lock_recursive,
6008 __rtld_lock_default_unlock_recursive): Define.
6009 [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6010 __rtld_lock_unlock_recursive): Define using
6011 GL(_dl_rtld_*lock_recursive).
6012 * init.c (__pthread_initialize_minimal_internal): Initialize
6013 _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6014 Lock GL(_dl_load_lock) the same number of times as
6015 GL(_dl_load_lock) using non-mt implementation was nested.
6017 * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6018 * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6020 2003-08-06 Jakub Jelinek <jakub@redhat.com>
6022 * tst-cancel17.c (do_test): Make len2 maximum of page size and
6025 2003-08-07 Jakub Jelinek <jakub@redhat.com>
6027 * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6029 2003-08-03 Jakub Jelinek <jakub@redhat.com>
6031 * sysdeps/pthread/createthread.c (do_clone): Move error handling
6032 to first syscall error check. Move syscall error check for tkill
6033 into __ASSUME_CLONE_STOPPED #ifdef.
6035 2003-08-02 Ulrich Drepper <drepper@redhat.com>
6037 * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6038 is not defined, do explicit synchronization.
6039 (create_thread): Do not lock pd->lock here. If __ASSUME_CLONE_STOPPED
6040 is not defined also unlock pd->lock for non-debugging case in case
6042 * pthread_create.c (start_thread): Always get and release pd->lock
6043 if __ASSUME_CLONE_STOPPED is not defined.
6044 (start_thread_debug): Removed. Adjust users.
6045 * allocatestack.c (allocate_stack): Always initialize lock if
6046 __ASSUME_CLONE_STOPPED is not defined.
6047 * Makefile (tests): Add tst-sched1.
6048 * tst-sched1.c: New file.
6050 * sysdeps/pthread/createthread.c (do_clone): Only use
6051 sched_setschduler and pass correct parameters.
6053 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6055 * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6056 pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6057 PTHREAD_STACK_MIN in comments.
6059 2003-07-31 Jakub Jelinek <jakub@redhat.com>
6061 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6062 Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6064 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6065 * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6066 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6067 (__pthread_cleanup_upto): Fix prototype.
6068 (_longjmp_unwind): Adjust caller.
6069 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6070 Change second argument to const struct pointer.
6071 * tst-sem8.c (main): Remove unused s2 and s3 variables.
6072 * tst-sem9.c (main): Likewise.
6073 * unwind.c: Include string.h for strlen prototype.
6075 2003-07-31 Ulrich Drepper <drepper@redhat.com>
6077 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6078 (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6079 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6081 Patch by Nicholas Miell <nmiell@attbi.com>.
6083 2003-07-30 Jakub Jelinek <jakub@redhat.com>
6085 * init.c (__pthread_initialize_minimal_internal): Initialize
6086 GL(dl_init_static_tls).
6087 * pthreadP.h (__pthread_init_static_tls): New prototype.
6088 * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6090 * Makefile (tests): Add tst-tls4.
6091 (modules-names): Add tst-tls4moda and tst-tls4modb.
6092 ($(objpfx)tst-tls4): Link against libdl and libpthread.
6093 ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6095 * tst-tls4.c: New file.
6096 * tst-tls4moda.c: New file.
6097 * tst-tls4modb.c: New file.
6099 2003-06-19 Daniel Jacobowitz <drow@mvista.com>
6101 * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6102 before __timer_dealloc.
6103 * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6104 Don't call list_unlink.
6106 2003-07-29 Roland McGrath <roland@redhat.com>
6108 * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6110 2003-07-25 Jakub Jelinek <jakub@redhat.com>
6112 * tst-cancel17.c (do_test): Check if aio_cancel failed.
6113 Don't reuse struct aiocb A if it failed.
6114 Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6115 not just one byte, as that does not block.
6117 2003-07-22 Jakub Jelinek <jakub@redhat.com>
6119 * sysdeps/pthread/unwind-resume.c: New file.
6120 * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6121 unwind-resume in csu subdir.
6122 (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6124 (librt-sysdep_routines, librt-shared-only-routines): Add
6126 * sysdeps/pthread/rt-unwind-resume.c: New file.
6127 * unwind-forcedunwind.c: New file.
6128 * Makefile (libpthread-routines): Add unwind-forcedunwind.
6129 (libpthread-shared-only-routines): Likewise.
6130 (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6131 * pthreadP.h (pthread_cancel_init): New prototype.
6132 * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6134 * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6135 attr argument const struct pthread_attr *.
6137 * res.c (__res_state): Return __resp.
6138 * descr.h: Include resolv.h.
6139 (struct pthread): Add res field.
6140 * pthread_create.c: Include resolv.h.
6141 (start_thread): Initialize __resp.
6142 * Makefile (tests): Add tst-_res1.
6143 (module-names): Add tst-_res1mod1, tst-_res1mod2.
6144 ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6145 ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6147 * tst-_res1.c: New file.
6148 * tst-_res1mod1.c: New file.
6149 * tst-_res1mod2.c: New file.
6151 2003-07-21 Ulrich Drepper <drepper@redhat.com>
6153 * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6155 * Makefile: Define various *-no-z-defs variables for test DSOs
6156 which has undefined symbols.
6158 2003-07-21 Steven Munroe <sjmunroe@us.ibm.com>
6160 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6161 Retry if the stwcx fails to store once_control.
6163 2003-07-20 Ulrich Drepper <drepper@redhat.com>
6165 * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6166 pthread_attr_setaffinity.
6167 * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6168 * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6169 * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6170 * pthread_attr_destroy.c: Free cpuset element if allocated.
6171 * pthread_create.c: Pass iattr as additional parameter to
6173 * sysdeps/pthread/createthread.c: If attribute is provided and
6174 a new thread is created with affinity set or scheduling parameters,
6175 start thread with CLONE_STOPPED.
6176 * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6177 pthread_attr_setaffinity.
6178 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6181 2003-07-15 Ulrich Drepper <drepper@redhat.com>
6183 * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6185 2003-07-14 Ulrich Drepper <drepper@redhat.com>
6187 * sysdeps/pthread/configure.in: Require CFI directives also for
6190 2003-07-15 Jakub Jelinek <jakub@redhat.com>
6192 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6195 2003-07-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6197 * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6199 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6200 registers as variables. Call __pthread_mutex_unlock_usercnt.
6201 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6202 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6203 not self pointer in __writer. Compare with TID to determine
6205 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6206 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6208 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6210 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6211 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6212 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6213 macros also when compiling librt.
6215 2003-07-11 Jakub Jelinek <jakub@redhat.com>
6217 * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6218 -fasynchronous-unwind-tables.
6219 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6220 (PSEUDO): Add cfi directives.
6221 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6223 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6226 2003-07-08 Jakub Jelinek <jakub@redhat.com>
6228 * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6229 __pthread_unregister_cancel): Add prototypes and hidden_proto.
6230 * unwind.c (__pthread_unwind_next): Add hidden_def.
6231 * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6233 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6234 Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6235 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6237 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6238 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6240 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6241 HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6242 __pthread_unregister_cancel and __pthread_unwind_next.
6244 2003-07-04 Jakub Jelinek <jakub@redhat.com>
6246 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6247 different symbol for the cancellation syscall wrapper and
6248 non-cancellation syscall wrapper.
6249 (PSEUDO_END): Define.
6251 2003-07-05 Richard Henderson <rth@redhat.com>
6253 * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6254 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6255 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6256 return actual return value from the syscall, not 0.
6258 2003-07-07 Ulrich Drepper <drepper@redhat.com>
6260 * descr.h (struct pthread): Add pid field.
6261 * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6262 (__reclaim_stacks): Likewise.
6263 * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6264 also check for PID of the signal source.
6265 (__pthread_initialize_minimal_internal): Also initialize pid field
6266 of initial thread's descriptor.
6267 * pthread_cancel.c: Use tgkill instead of tkill if possible.
6268 * sysdeps/unix/sysv/linux/fork.c: Likewise.
6269 * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6270 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6271 * sysdeps/unix/sysv/linux/raise.c: Likewise.
6273 2003-07-05 Ulrich Drepper <drepper@redhat.com>
6275 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6276 Fix use of parameter.
6277 (__libc_cleanup_pop): Likewise.
6279 2003-07-04 Ulrich Drepper <drepper@redhat.com>
6281 * init.c (sigcancel_handler): Change parameters to match handler
6282 for SA_SIGACTION. Check signal number and code to recognize
6283 invalid invocations.
6285 2003-07-03 Roland McGrath <roland@redhat.com>
6287 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6288 Apply sizeof (struct pthread) bias to r13 value.
6290 2003-07-03 Ulrich Drepper <drepper@redhat.com>
6292 * sysdeps/pthread/configure.in: Require CFI directives.
6294 * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6296 * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6297 libpthread compilation.
6298 * unwind.c (__pthread_unwind): Add hidden_def.
6299 * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6301 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6303 * libc-cancellation.c (__libc_cleanup_routine): Define.
6304 * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6305 (__pthread_cleanup_pop): Define.
6307 2003-07-01 Richard Henderson <rth@redhat.com>
6309 * sysdeps/alpha/elf/pt-initfini.c: New file.
6310 * sysdeps/alpha/pthread_spin_lock.S: New file.
6311 * sysdeps/alpha/pthread_spin_trylock.S: New file.
6312 * sysdeps/alpha/pthreaddef.h: New file.
6313 * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6314 * sysdeps/alpha/tls.h: New file.
6315 * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6316 * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6317 * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6318 * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6319 * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6320 * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6321 * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6322 * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6323 * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6324 * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6326 2003-07-01 Ulrich Drepper <drepper@redhat.com>
6328 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6329 cleanup support and unwind info.
6331 2003-06-30 Ulrich Drepper <drepper@redhat.com>
6333 * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6334 Use correct cleanup handler registration. Add unwind info.
6335 * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6336 * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6337 * tst-once3.c: Add cleanup handler and check it is called.
6338 * tst-once4.c: Likewise.
6339 * tst-oncex3.c: New file.
6340 * tst-oncex4.c: New file.
6341 * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6343 2003-06-29 Ulrich Drepper <drepper@redhat.com>
6345 * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6347 2003-06-27 Ulrich Drepper <drepper@redhat.com>
6349 * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6350 (tf_msgsnd): Likewise.
6352 * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6353 premature returns a bit more.
6355 2003-06-26 Ulrich Drepper <drepper@redhat.com>
6357 * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6358 definition to the front.
6360 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6361 the cleanup functions to make the names unique. Fix dwarf opcode
6363 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6364 functions to make the names unique. Fix CFA offset for two blocks.
6366 2003-06-25 Ulrich Drepper <drepper@redhat.com>
6368 * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6369 missing closing braces.
6370 Patch by Christophe Saout <christophe@saout.de>.
6372 2003-06-24 Roland McGrath <roland@redhat.com>
6374 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6376 2003-06-24 Ulrich Drepper <drepper@redhat.com>
6378 * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6379 * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6381 * pthreadP.h: Declare __find_thread_by_id.
6382 * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6383 * pthread_clock_gettime.c: Allow using other thread's clock.
6384 * pthread_clock_settime.c: Likewise.
6385 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6386 * Makefile: Add rules to build and run tst-clock2.
6387 * tst-clock2.c: New file.
6389 2003-06-23 Ulrich Drepper <drepper@redhat.com>
6391 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6392 to use exception-based cleanup handler.
6393 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6395 * tst-cond8.c (ch): Announce that we are done.
6397 * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6399 * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6400 Also test aio_suspend with timeout value.
6402 2003-06-22 Ulrich Drepper <drepper@redhat.com>
6404 * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6405 * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6408 * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6409 (__pthread_mutex_lock_internal): Likewise.
6410 (__pthread_mutex_unlock_internal): Likewise.
6411 (__pthread_mutex_unlock_usercnt): Declare.
6412 * pthread_mutex_destroy.c: Always fail if used in any way.
6413 * pthread_mutex_init.c: Update comment.
6414 * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6415 * pthread_mutex_timedlock.c: Adjust __nusers.
6416 * pthread_mutex_trylock.c: Adjust __nusers.
6417 * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6418 and public interfaces are wrapper with pass additional parameter.
6419 __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6421 * tst-mutex8.c: New file.
6422 * Makefile (tests): Add tst-mutex8.
6423 * sysdeps/pthread/pthread_cond_timedwait.c: Call
6424 __pthread_mutex_unlock_usercnt.
6425 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6426 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6427 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6428 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6429 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6430 * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6431 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6433 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6434 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6435 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6436 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6437 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6439 * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6440 * pthread_mutex_timedlock.c: Likewise.
6441 * pthread_mutex_trylock.c: Adjust __nusers.
6442 * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6443 * tst-mutex9.c: New file.
6444 * Makefile (tests): Add tst-mutex9.
6445 * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6446 * sysdeps/ia64/tls.h: Likewise.
6447 * sysdeps/powerpc/tls.h: Likewise.
6448 * sysdeps/s390/tls.h: Likewise.
6449 * sysdeps/sh/tls.h: Likewise.
6450 * sysdeps/x86_64/tls.h: Likewise.
6451 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6452 Change type of __owner.
6453 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6454 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6455 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6456 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6457 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6459 2003-06-19 Jakub Jelinek <jakub@redhat.com>
6461 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6462 * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6464 * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6465 * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here. Pass nr + 1
6466 instead of nr to lll_futex_wake. Only set errno and return -1
6469 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6470 lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6471 return actual return value from the syscall, not 0.
6473 2003-06-18 Ulrich Drepper <drepper@redhat.com>
6475 * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6476 find a random value.
6477 (tf_msgrcv): Likewise. Also don't report msgrcv returns if
6480 * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6481 compat_timer_settime.
6482 * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6483 compat_timer_gettime.
6484 * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6485 compat_timer_getoverrun.
6486 * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6487 compat_timer_delete.
6489 * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6490 error-checking mutex detect busy mutexes.
6492 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6494 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6495 Add ax to clobber list.
6496 (lll_mutex_cond_lock): Likewise.
6497 (lll_mutex_unlock): Likewise.
6498 (lll_lock): Likewise.
6499 (lll_unlock): Likewise.
6501 * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6502 * tst-cancel18.c: New file.
6503 * tst-cancelx18.c: New file.
6505 * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6508 * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6509 * tst-cancel17.c: New file.
6510 * tst-cancelx17.c: New file.
6512 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6513 * sysdeps/unix/sysv/linux/sigwait.c: New file.
6514 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6516 * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6518 2003-06-16 Jakub Jelinek <jakub@redhat.com>
6520 * sysdeps/pthread/createthread.c (create_thread): Set
6521 header.multiple_threads unconditionally.
6522 * allocatestack.c (allocate_stack): Likewise.
6523 * descr.h (struct pthread): Add header.multiple_threads
6525 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6526 Define for librt. #error if neither libpthread, libc nor librt.
6527 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6529 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6530 CDISABLE): Likewise.
6531 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6532 CDISABLE): Likewise.
6533 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6534 CDISABLE): Likewise.
6535 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6536 CDISABLE): Likewise. Access header.multiple_threads outside of
6537 libc and libpthread.
6538 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6540 * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6541 * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6543 2003-06-17 Ulrich Drepper <drepper@redhat.com>
6545 * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6546 Also test early cancellation before the thread reaches the cancellation
6549 * Makefile: Compile forward.c with exceptions.
6551 * sysdeps/unix/sysv/linux/sleep.c: New file.
6553 2003-06-16 Ulrich Drepper <drepper@redhat.com>
6555 * Makefile: Add CFLAGS definition to compile function wrappers
6556 duplicated from libc with exceptions.
6557 * tst-cancel4.c: Also check cancellation handlers.
6559 * Makefile: Add rules to build and run tst-cancel16 and
6560 tst-cancelx16. Add missing CFLAGS definitions.
6561 * tst-cancel16.c: New file.
6562 * tst-cancelx16.c: New file.
6564 2003-06-15 Ulrich Drepper <drepper@redhat.com>
6566 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6567 (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6568 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6569 (DL_SYSINFO_IMPLEMENTATION): Likewise.
6571 * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6572 (LIBC_CANCEL_RESET): Likewise.
6573 Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6574 * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6576 (CFLAGS-libcrt-cancellation.c): Define.
6577 * sysdeps/pthread/librt-cancellation.c: New file.
6578 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6579 macros also when compiling librt.
6580 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6581 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6582 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6583 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6584 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6585 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6586 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6588 * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6589 compat_timer_create.
6591 2003-06-14 Ulrich Drepper <drepper@redhat.com>
6593 * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6595 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6597 * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6598 Add libc_hidden_def.
6600 2003-06-13 Roland McGrath <roland@redhat.com>
6602 * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6603 constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6605 2003-06-11 Ulrich Drepper <drepper@redhat.com>
6607 * allocatestack.c (queue_stack): Always inline.
6608 * ptreadhP.h (__do_cancel): Likewise.
6610 2003-06-10 Jakub Jelinek <jakub@redhat.com>
6612 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6615 2003-06-10 Ulrich Drepper <drepper@redhat.com>
6617 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6618 (__pthread_cond_signal): Remove incorrect second addition for
6621 2003-06-09 Ulrich Drepper <drepper@redhat.com>
6623 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6624 (__pthread_cond_signal): Use correct futex pointer in
6625 __lll_mutex_lock_wait call.
6627 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6628 (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6630 2003-06-08 Ulrich Drepper <drepper@redhat.com>
6632 * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6634 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6637 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6638 hand-written CFI generation code. Since ENTRY/END also initiated
6639 CFI frames this caused two CFI sets to be generated.
6641 2003-06-07 Ulrich Drepper <drepper@redhat.com>
6643 * cleanup_routine.c: New file.
6644 * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6645 * sysdeps/pthread/pthread.h: Add support for fully exception-based
6647 * Makefile (libpthread-routines): Add cleanup_routine.
6648 Add more CFLAGS variables to compile with exceptions. Add comments
6649 why which file needs unwind tables.
6650 (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6652 * tst-cancelx1.c: New file.
6653 * tst-cancelx2.c: New file.
6654 * tst-cancelx3.c: New file.
6655 * tst-cancelx4.c: New file.
6656 * tst-cancelx5.c: New file.
6657 * tst-cancelx6.c: New file.
6658 * tst-cancelx7.c: New file.
6659 * tst-cancelx8.c: New file.
6660 * tst-cancelx9.c: New file.
6661 * tst-cancelx10.c: New file.
6662 * tst-cancelx11.c: New file.
6663 * tst-cancelx12.c: New file.
6664 * tst-cancelx13.c: New file.
6665 * tst-cancelx14.c: New file.
6666 * tst-cancelx15.c: New file.
6667 * tst-cleanupx0.c: New file.
6668 * tst-cleanupx0.expect: New file.
6669 * tst-cleanupx1.c: New file.
6670 * tst-cleanupx2.c: New file.
6671 * tst-cleanupx3.c: New file.
6673 * tst-cleanup0.c: Make standard compliant.
6674 * tst-cleanup1.c: Likewise.
6676 * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6677 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6678 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6679 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6680 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6681 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6682 * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6684 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6685 * tst-cancel12.c: New file.
6686 * tst-cancel13.c: New file.
6687 * tst-cancel14.c: New file.
6688 * tst-cancel15.c: New file.
6689 * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6692 * tst-cancel1.c: Add some comments.
6694 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6697 2003-06-06 Ulrich Drepper <drepper@redhat.com>
6699 * Makefile (CFLAGS-pthread_cancel.c): Define.
6701 2003-06-05 Ulrich Drepper <drepper@redhat.com>
6703 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6704 Change type of __writer element to int.
6705 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6706 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6707 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6708 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6709 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6710 * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6711 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6712 * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6713 Compare with TID to determine deadlocks.
6714 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6715 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6716 * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6717 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6718 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6719 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6721 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6723 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6724 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6725 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6727 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6729 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6730 * Makefile (tests): Add tst-rwlock12.
6731 * tst-rwlock12.c: New file.
6733 2003-06-05 Jakub Jelinek <jakub@redhat.com>
6735 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6736 __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6737 Remove bogus hidden_proto.
6738 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6740 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6741 lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6742 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6743 ___lll_mutex_timedlock): Likewise.
6745 2003-06-04 Ulrich Drepper <drepper@redhat.com>
6747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6748 (__pthread_cond_signal): Add some code to eventually handle
6751 2003-06-01 Ulrich Drepper <drepper@redhat.com>
6753 * Makefile (tests): Add tst-exec4.
6754 (tst-exec4-ARGS): Define.
6755 * tst-exec4.c: New file.
6757 2003-05-31 Ulrich Drepper <drepper@redhat.com>
6759 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6760 Also fail if tv_nsec < 0.
6761 (__lll_timedwait_tid): Likewise.
6762 * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6763 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6765 * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6767 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6769 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6771 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6773 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6776 * Makefile (tests): Add tst-sem8 and tst-sem9.
6777 * tst-sem8.c: New file.
6778 * tst-sem9.c: New file.
6779 * sem_open.c: Fix creation of in_use record if the file exists but
6782 * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6785 * sysdeps/pthread/timer_create.c (timer_create): In case
6786 evp==NULL, assign timer ID to sival_ptr.
6788 * descr.h (struct pthread_unwind_buf): Change type of prev element to
6789 struct pthread_unwind_buf *.
6790 (struct pthread): Likewise for cleanup_jmp_buf element.
6792 * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6793 * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6794 * unwind.c (__pthread_unwind_next): Likewise.
6796 2003-05-30 Ulrich Drepper <drepper@redhat.com>
6798 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6799 (lll_futex_timed_wait): Use int for futex value parameter.
6800 (lll_futex_wake): Likewise.
6801 (lll_futex_requeue): Likewise.
6803 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6804 Replace one memory operation with one register operation.
6806 * tst-join4.c (do_test): Fix error message.
6808 * tst-rwlock6.c (do_test): Use correct format specifier.
6810 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6811 (__lll_mutex_lock_wait): Replace one memory operation with one
6813 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6814 (__lll_mutex_lock_wait): Likewise.
6816 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6817 (__lll_mutex_cond_lock): Add one to value parameter of
6818 __lll_lock_wait to reflect reality in the futex syscall.
6819 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6820 (lll_mutex_cond_lock): Likewise.
6822 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6824 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6826 (lll_mutex_cond_lock): Define.
6828 2003-05-29 Ulrich Drepper <drepper@redhat.com>
6830 * Makefile (tests): Add tst-signal6.
6831 * tst-signal6.c: New file.
6833 * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6834 (__lll_mutex_unlock_force): New function
6835 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6837 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6838 (__lll_mutex_unlock_force): New function.
6839 (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6841 * tst-rwlock7.c (do_test): Use correct format specifier.
6843 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6844 Find break parameter in correct asm argument.
6846 2003-05-27 Jakub Jelinek <jakub@redhat.com>
6848 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6850 (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6852 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6854 * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6855 lll_futex_requeue, lll_mutex_unlock_force): Define.
6857 2003-05-30 Jakub Jelinek <jakub@redhat.com>
6859 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6860 (pthread_cond_t): Add __mutex.
6861 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6862 lll_futex_requeue, lll_mutex_unlock_force): Define.
6864 2003-05-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6866 * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6867 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6869 * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6871 (lll_futex_wait, lll_futex_wake): Define.
6872 * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6873 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6874 FUTEX_REQUEUE instead of FUTEX_WAIT.
6875 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6876 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6877 mutex which was used in condvar structure. Call
6878 __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6879 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6881 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6882 include tcb-offsets.h. Read wakeup value in locked region.
6883 Use the value of gbr register as THREAD_ID.
6884 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6885 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6886 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6888 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6891 2003-05-28 Ulrich Drepper <drepper@redhat.com>
6893 * sysdeps/pthread/pthread_cond_broadcast.c
6894 (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6896 2003-05-26 Ulrich Drepper <drepper@redhat.com>
6898 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6899 typo in register name.
6900 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6901 correctly. Actually use requeue. Little optimization.
6902 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6903 mutex address early. Handle cancellation state as 32-bit value.
6904 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6905 Remove unnecessary label.
6907 2003-05-25 Ulrich Drepper <drepper@redhat.com>
6909 * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6910 instead of FUTEX_WAIT.
6911 * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6912 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6913 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6914 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6915 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6916 * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6917 used in condvar structure. Call __pthread_mutex_cond_lock instead
6918 of __pthread_mutex_lock_internal.
6919 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6920 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6921 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6922 (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6923 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6924 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6925 * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6926 Add pthread_mutex_cond_lock.
6927 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6928 * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6929 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6930 lll_mutex_cond_lock.
6931 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6932 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6933 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6935 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6936 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6938 * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6939 * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6941 * pthreadP.h: Declare __pthread_mutex_cond_lock.
6942 * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6943 Use it instead of lll_mutex_lock. If __pthread_mutex_lock is a
6944 macro don't define aliases.
6946 * cancellation.c: Remove __pthread_enable_asynccancel_2.
6947 * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6948 * sysdeps/pthread/pthread_cond_timedwait.c: Use
6949 __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6950 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6951 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6952 * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6953 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6954 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6956 2003-05-17 Ulrich Drepper <drepper@redhat.com>
6958 * sem_open.c: Fix one endless loop. Implement correct semantics
6959 wrt opening the same semaphore more then once.
6960 * sem_close.c: Adjust for sem_open change.
6961 * semaphoreP.h: Include <semaphore.h>. Define struct inuse_sem.
6962 Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6963 * Makefile (tests): Add tst-sem7.
6964 * tst-sem7.c: New file.
6966 2003-05-16 Roland McGrath <roland@redhat.com>
6968 * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6969 uninitialized variable braino.
6971 2003-05-16 Ulrich Drepper <drepper@redhat.com>
6973 * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6974 test for syscall availability.
6976 * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6977 __no_posix_timers to -1 if the syscalls don't exist.
6979 * pthread_join.c (pthread_join): Set tid field of the joined
6980 thread to -1. This isn't necessary but helps to recognize some
6981 error conditions with almost no cost.
6983 * allocatestack.c (FREE_P): Also negative values indicate an
6986 * unwind.c: Include <unistd.h>.
6988 2003-05-14 Ulrich Drepper <drepper@redhat.com>
6990 * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6992 2003-05-14 Jakub Jelinek <jakub@redhat.com>
6994 * Makefile (crti-objs, crtn-objs): New variables.
6995 (omit-deps, extra-objs): Add crtn.
6996 ($(objpfx)libpthread.so): Depend on both crti and crtn
6997 and links to them in multidir.
6998 ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7000 2003-05-12 Steven Munroe <sjmunroe@us.ibm.com>
7002 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7003 (lll_mutex_unlock): Use atomic_exchange_rel.
7005 2003-05-11 Ulrich Drepper <drepper@redhat.com>
7007 * cond-perf.c (cons): Add missing locking around setting of alldone.
7009 2003-05-10 Ulrich Drepper <drepper@redhat.com>
7011 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7013 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7015 2003-05-09 Ulrich Drepper <drepper@redhat.com>
7017 * tst-sem6.c: New file.
7018 * Makefile (tests): Add tst-sem6.
7020 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7021 Use atomic_exchange_rel instead of atomic_exchange.
7022 * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7025 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7026 code for lll_futex_wait and lll_futex_wake in static apps. Use
7027 vsyscall is possible.
7029 * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7030 * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7031 * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7032 pthread_setaffinity_np.
7033 * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7034 and pthread_setaffinity_np.
7035 * Makefile (libpthread-routines): Add pthread_getaffinity and
7036 pthread_setaffinity.
7038 * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7039 use it in case mmap to allocate the stack fails.
7040 * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7041 ARCH_MAP_FLAGS here.
7042 * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7045 2003-05-08 Ulrich Drepper <drepper@redhat.com>
7047 * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7048 handler implementation. It is now lockless in fork().
7049 * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7050 * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7051 * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>. Don't
7052 declare the __fork_*_lists.
7053 (struct fork_handler): Include pointers to all three functions.
7054 Add next, refcntr and need_signal elements.
7055 (__fork_handlers): New declaration.
7056 (__register_atfork_malloc): Remove declaration.
7057 (HAVE_register_atfork_malloc): Remove definition.
7058 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7059 __pthread_child_handler variable.
7060 (__libc_pthread_init): Use __register_atfork instead of explicitly
7062 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7064 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7066 * unwind.c (unwind_cleanup): Print error message and then abort. This
7067 function must never be reached.
7069 * cond-perf.c: New file.
7071 2003-05-05 Ulrich Drepper <drepper@redhat.com>
7073 * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7075 2003-05-04 Roland McGrath <roland@redhat.com>
7077 * Makefile ($(objpfx)../libc.so): New target.
7079 2003-05-02 Ulrich Drepper <drepper@redhat.com>
7081 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7082 (pthread_condattr_t): Size is only an int, don't use long for
7084 (pthread_mutexattr_t): Likewise.
7085 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7086 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7087 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7089 2003-05-01 Ulrich Drepper <drepper@redhat.com>
7091 * sysdeps/i386/tls.h: Define THREAD_ID.
7092 * sysdeps/ia64/tls.h: Likewise.
7093 * sysdeps/powerpc/tls.h: Likewise.
7094 * sysdeps/s390/tls.h: Likewise.
7095 * sysdeps/sh/tls.h: Likewise.
7096 * sysdeps/x86_64/tls.h: Likewise.
7097 * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7099 * pthread_mutex_timedlock.c: Likewise.
7100 * pthread_mutex_trylock.c: Likewise.
7101 * pthread_mutex_unlock.c: Likewise.
7102 * pthread_rwlock_trywrlock.c: Likewise.
7103 * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7104 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7105 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7106 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7108 * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7111 2003-04-29 Jakub Jelinek <jakub@redhat.com>
7113 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7114 (__SIZEOF_PTHREAD_COND_T): Define to 48.
7115 (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7116 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7117 Make __align long long instead of long.
7118 (pthread_rwlock_t): Formatting.
7119 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7120 (pthread_rwlock_t): Formatting.
7121 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7122 (pthread_cond_t): Make __align long long instead of long.
7123 (pthread_rwlock_t): Move __flags field to the same position as in
7126 2003-04-30 Ulrich Drepper <drepper@redhat.com>
7128 * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7129 * tst-rwlock7.c (do_test): Likewise.
7131 2003-04-26 Roland McGrath <roland@redhat.com>
7133 * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7135 2003-04-22 Jakub Jelinek <jakub@redhat.com>
7137 * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7138 sizeof (struct pthread).
7139 (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7141 * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7143 (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7145 (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7147 (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7149 (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7151 (NO_TLS_OFFSET): Define.
7152 * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7153 add TLS_TCB_SIZE unnecessarily.
7155 2003-04-22 Roland McGrath <roland@redhat.com>
7157 * Makeconfig (shared-thread-library): Reverse link order to work
7160 2003-04-22 Ulrich Drepper <drepper@redhat.com>
7162 * semaphore.h: Fix typo in comment.
7164 2003-04-21 Ulrich Drepper <drepper@redhat.com>
7166 * sysdeps/pthread/sigfillset.c: New file.
7168 * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7169 * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7170 * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7171 * sysdeps/pthread/sigaction.c: Likewise.
7172 * sysdeps/pthread/sigprocmask.c: New file.
7173 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7175 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7176 Block SIGTIMER. Also handle SI_TKILL events and terminate thread
7179 2003-04-19 Ulrich Drepper <drepper@redhat.com>
7181 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7182 (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7184 * sysdeps/unix/sysv/linux/unregister-atfork.c
7185 (__unregister_atfork): Don't free memory not allocated dynamically.
7187 * semaphore.h: Remove __THROW marker from cancellation points.
7188 * nptl/sysdeps/pthread/pthread.h: Likewise.
7190 2003-04-18 Ulrich Drepper <drepper@redhat.com>
7192 * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7193 pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7196 2003-04-16 Jakub Jelinek <jakub@redhat.com>
7198 * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7200 2003-04-15 Roland McGrath <roland@redhat.com>
7202 * forward.c (__pthread_unwind): Tweak to avoid warning.
7204 2003-04-15 Ulrich Drepper <drepper@redhat.com>
7206 * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7208 2003-04-14 Ulrich Drepper <drepper@redhat.com>
7210 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7211 overflow CFA advance instructions.
7212 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7214 2003-04-14 Jakub Jelinek <jakub@redhat.com>
7216 * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7217 * sysdeps/i386/pthread_spin_lock.c: Likewise.
7218 * sysdeps/x86_64/tls.h: Likewise. Define LOCK_PREFIX if not already
7221 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7222 DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7223 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7224 DW_CFA_advance_loc for .Laddl-.Lsubl.
7226 2003-04-13 Ulrich Drepper <drepper@redhat.com>
7228 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7229 position-independent unwind data for static libraries.
7230 Add missing unwind info. Add comments.
7232 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7233 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7234 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7235 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7237 2003-04-12 Ulrich Drepper <drepper@redhat.com>
7239 * Makefile: Make sure all cancellation points are compiled with
7240 exception and asynchronous unwind tables.
7242 * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7243 which mishandles loading of global object addresses in PIC.
7244 (THREAD_SETMEM_NC): Likewise.
7246 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7248 * pthread.h: Define new data structure for cleanup buffer. Declare
7249 new cleanup handler interfaces.
7250 * descr.h: Include <unwind.h> if necessary. Define pthread_unwind_buf.
7251 (struct pthread): Add cleanup_jmp_buf pointer. Define
7252 HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7253 * pthreadP.h: Declare __pthread_unwind. Define __do_cancel to use
7254 it. Declare old cleanup handler installation functions.
7255 * cleanup.c: Rewrite. Install handler for unwind-based cleanup
7257 * cleanup_defer.c: Likewise.
7258 * cleanup_compat.c: New file. Old cleanup code.
7259 * cleanup_def_compat.c: New file. Old cleanup code.
7260 * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7261 if own thread descriptor.
7262 * unwind.c: New file.
7263 * forward.c: Add __pthread_unwind.
7264 * init.c (pthread_functions): Add __pthread_unwind.
7265 * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7266 Add ptr___pthread_unwind.
7267 * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7268 and unwind function.
7269 * Makefile (libpthread-routines): Add cleanup_compat,
7270 cleanup_def_compat, and unwind. Define CFLAGS to enable unwind
7271 table generation if necessary.
7272 * version.c: Record whether unwind support is compiled in.
7273 * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7274 * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7276 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7277 complication to generate unwind information for syscall wrappers.
7278 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7279 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7280 __cleanup_fct_attribute.
7282 * Makefile: Add rules to build and run tst-cleanup0.
7283 * tst-cleanup0.c: New file.
7284 * tst-cleanup0.expect: New file.
7286 * pthread_create.c (deallocate_tsd): Don't take parameter. Adjust
7287 caller. Optimize to avoid often unecessary local variable.
7289 2003-04-11 Roland McGrath <roland@redhat.com>
7291 * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7292 sets variable `multidir'; include that.
7293 (generated): Add it.
7294 ($(objpfx)$(multidir)/crti.o): New target.
7295 [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7297 2003-04-11 Ulrich Drepper <drepper@redhat.com>
7299 * tst-attr2.c (do_test): Add cast to avoid warning.
7300 * tst-mutex4.c (do_test): Likewise.
7302 2003-04-10 Ulrich Drepper <drepper@redhat.com>
7304 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7307 2003-04-09 Ulrich Drepper <drepper@redhat.com>
7309 * Makefile (tests): Add tst-detach1.
7310 * tst-detach1.c: New file.
7312 2003-04-08 Ulrich Drepper <drepper@redhat.com>
7314 * sysdeps/pthread/pthread.h: Remove duplicate
7315 pthread_cleanup_{push,pop} definitions.
7317 * tst-barrier2.c: Eliminate warnings.
7318 * tst-cancel4.c: Likewise.
7319 * tst-cond4.c: Likewise.
7320 * tst-cond6.c: Likewise.
7321 * tst-detach1.c: Likewise.
7322 * tst-rwlock4.c: Likewise.
7323 * tst-rwlock6.c: Likewise.
7324 * tst-rwlock7.c: Likewise.
7325 * tst-sem3.c: Likewise.
7326 * tst-spin2.c: Likewise.
7327 * tst-umask1.c: Likewise.
7329 2003-04-07 Ulrich Drepper <drepper@redhat.com>
7331 * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7333 2003-04-06 Ulrich Drepper <drepper@redhat.com>
7335 * descr.h (struct pthread): Move cancelhandling member to the front.
7337 2003-04-05 Ulrich Drepper <drepper@redhat.com>
7339 * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7340 malloc_parent, and malloc_child statically.
7341 (__register_atfork_malloc): New function.
7342 (free_mem): Don't free any of the malloc_* variables on the list.
7343 * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7344 Define HAVE_register_atfork_malloc.
7346 2003-04-04 Ulrich Drepper <drepper@redhat.com>
7348 * sysdeps/pthread/createthread.c (create_thread): Add some more
7349 comments explaining when to set multiple_threads and when not.
7351 * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7352 THREAD_ATOMIC_BIT_SET if not already defined.
7353 * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7354 THREAD_ATOMIC_BIT_SET:
7355 * sysdeps/x86_64/tls.h: Likewise.
7356 * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7357 THREAD_ATOMIC_CMPXCHG_VAL.
7358 (_pthread_cleanup_pop_restore): Likewise.
7359 * cancellation.c (__pthread_enable_asynccancel): Likewise.
7360 (__pthread_enable_asynccancel_2): Likewise.
7361 (__pthread_disable_asynccancel): Likewise.
7362 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7363 (__libc_disable_asynccancel): Likewise.
7364 * init.c (sigcancel_handler): Likewise.
7365 * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7366 * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7368 2003-04-03 Ulrich Drepper <drepper@redhat.com>
7370 * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7371 * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7372 * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7373 * Makefile (tests): Add tst-cancel11.
7374 * tst-cancel11.c: New file.
7376 2003-04-01 Ulrich Drepper <drepper@redhat.com>
7378 * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7379 round, not the first. Use specific_used flag instead of local
7380 found_nonzero variable. Use THREAD_[SG]ETMEM where possible.
7381 (__free_tcb): Don't call deallocate_tsd here.
7382 (start_thread): Call deallocate_tsd here.
7383 * pthread_setspecific.c: Set specific_used flag really only when
7385 * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7386 * tst-tsd3.c: New file.
7387 * tst-tsd4.c: New file.
7389 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7391 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7392 Use atomic_exchange_and_add instead of __lll_add.
7393 (__lll_mutex_timedlock): Likewise.
7394 Patch by Ian Wienand.
7396 2003-03-24 Steven Munroe <sjmunroe@us.ibm.com>
7398 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7399 (SINGLE_THREAD_P): Fix typo.
7400 * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7402 2003-03-31 Ulrich Drepper <drepper@redhat.com>
7404 * Makefile (tests): Add tst-align.
7405 * tst-align.c: New file.
7406 * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7408 * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7411 * tst-tsd2.c: Add casts to avoid warnings.
7413 2003-03-30 Ulrich Drepper <drepper@redhat.com>
7415 * descr.h (struct pthread): Move most often used elements to the front.
7417 2003-03-29 Ulrich Drepper <drepper@redhat.com>
7419 * Makefile (libpthread-routines): Add pthread_atfork.
7420 (libpthread-static-only-routines): Add pthread_atfork.
7422 2003-03-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
7424 * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7426 (INSTALL_DTV): Add parens.
7427 (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7428 Use passed descr instead of THREAD_SELF.
7429 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7430 (__lll_mutex_timedlock_wait): Correct expected value after
7432 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7433 Release lock before waking up the waiters.
7434 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7435 criteria. Reorderstruct passed to cleanup handler. Fix
7436 handling of cancellation and failung pthread_mutex_unlock call.
7437 Use __pthread_enable_asynccancel_2 instead of
7438 __pthread_enable_asynccancel.
7439 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7440 Return result of lock re-get if it fails.
7441 * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7442 for __pthread_cleanup_push.
7443 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7444 completely broken rwlock implementation.
7445 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7446 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7447 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7448 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7449 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7450 * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value. Use
7451 versioned_symbol macro.
7452 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7453 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7455 2003-03-27 Ulrich Drepper <drepper@redhat.com>
7457 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7458 __timer_helper_thread. Declare __start_helper_thread, __helper_once,
7460 (struct timer): Remove th and bar field.
7461 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7462 debugging code. Create only one helper thread.
7463 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7465 * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7466 Renamed. Define statically. Use thread info from siginfo.
7467 (__helper_once): New variable.
7468 (__helper_tid): New variable.
7469 (__reset_helper_control): New function.
7470 (__start_helper_thread): New function.
7472 * pthread_create.c (start_thread): Don't use setjmp inside
7473 __builtin_expect to work around gcc bug.
7475 * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7476 timer_delete syscall fails, but not with ENOSYS, set
7479 * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7480 (timer_settime): Fix typo.
7481 * sysdeps/unix/sysv/linux/timer_getoverr.c
7482 [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7484 2003-03-27 Jakub Jelinek <jakub@redhat.com>
7486 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7487 offset of cleanupbuf.__prev.
7489 2003-03-26 Jakub Jelinek <jakub@redhat.com>
7491 * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7494 2003-03-26 Ulrich Drepper <drepper@redhat.com>
7496 * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7497 NULL provide default definition to syscall.
7499 2003-03-25 Roland McGrath <roland@redhat.com>
7501 * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7502 (timer_id2ptr): Fix typo.
7504 2003-03-25 Ulrich Drepper <drepper@redhat.com>
7506 * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7507 * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7508 * sysdeps/ia64/pthreaddef.h: Likewise.
7509 * sysdeps/powerpc/pthreaddef.h: Likewise.
7510 * sysdeps/s390/pthreaddef.h: Likewise.
7511 * sysdeps/sh/pthreaddef.h: Likewise.
7512 * sysdeps/x86_64/pthreaddef.h: Likewise.
7513 * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7514 * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7516 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7517 SIGTIMER is not unblocked.
7518 * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7520 * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7522 * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7523 pass pointer through as ID.
7524 * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7525 * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7526 * sysdeps/unix/sysv/linux/timer_create.c: New file.
7527 * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7528 * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7529 * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7530 * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7531 * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7532 * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7533 * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7534 * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7535 * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7536 * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7537 * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7538 * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7539 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7540 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7541 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7542 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7543 * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7544 * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7545 * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7546 * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7547 * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7548 * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7549 * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7550 * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7551 * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7552 * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7553 * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7554 * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7555 * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7556 * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7558 * pthreadP.h: Remove FRAME_LEFT definition.
7559 * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7560 already left frame. Programs which have this problem are not POSIX
7562 * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7564 2003-03-24 Ulrich Drepper <drepper@redhat.com>
7566 * sysdeps/pthread/tst-timer.c: Check return values of the
7569 2003-03-23 Roland McGrath <roland@redhat.com>
7571 * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7572 * tst-tls3mod.c: Likewise.
7573 * tst-tls1.c: Likewise.
7574 * tst-tls2.c: Likewise.
7576 * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7579 * tst-join5.c (tf1, tf2): Add a cast.
7581 * Makeconfig (includes): Append -I$(..)nptl to this variable.
7583 * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7584 Don't test anything.
7585 * tst-cond4.c: Likewise.
7586 * tst-cond6.c: Likewise.
7587 * tst-flock2.c: Likewise.
7588 * tst-mutex4.c: Likewise.
7589 * tst-rwlock4.c: Likewise.
7590 * tst-signal1.c: Likewise.
7591 * tst-spin2.c: Likewise.
7592 * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7594 * tst-mutex4.c: Use test-skeleton.c.
7595 * tst-spin2.c: Likewise.
7596 * tst-sysconf.c: Likewise.
7597 * tst-barrier2.c: Likewise.
7598 * tst-cond4.c: Likewise.
7599 * tst-cond6.c: Likewise.
7600 * tst-rwlock4.c: Likewise.
7601 * tst-unload.c: Likewise.
7602 * tst-flock2.c (do_test): Use return instead of exit.
7604 2003-03-22 Jakub Jelinek <jakub@redhat.com>
7606 * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7608 2003-03-21 Ulrich Drepper <drepper@redhat.com>
7610 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7611 (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7612 instead of __lll_compare_and_swap.
7613 * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7615 Removed definition if __lll_compare_and_swap.
7617 * cancellation.c: Adjust for new form of compare&exchange macros.
7618 * cleanup_defer.c: Likewise.
7620 * libc-cancellation.c: Likewise.
7621 * old_pthread_cond_broadcast.c: Likewise.
7622 * old_pthread_cond_signal.c: Likewise.
7623 * old_pthread_cond_timedwait.c: Likewise.
7624 * old_pthread_cond_wait.c: Likewise.
7625 * pthread_cancel.c: Likewise.
7626 * pthread_create.c: Likewise.
7627 * pthread_detach.c: Likewise.
7628 * pthread_join.c: Likewise.
7629 * pthread_key_delete.c: Likewise.
7630 * pthread_setcancelstate.c: Likewise.
7631 * pthread_setcanceltype.c: Likewise.
7632 * pthread_timedjoin.c: Likewise.
7633 * pthread_tryjoin.c: Likewise.
7634 * sysdeps/pthread/createthread.c: Likewise.
7636 2003-03-20 Ulrich Drepper <drepper@redhat.com>
7638 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7639 Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7640 definitions. Replace uses with calls to atomic_* functions.
7641 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7642 * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7643 __lll_test_and_set calls with atomic_exchange_and_add and
7644 atomic_exchange calls respectively.
7645 * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7646 * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7647 * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7648 * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7649 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7650 * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7651 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7653 * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7654 returns the old value.
7656 2003-03-20 Martin Schwidefsky <sky@mschwid3.boeblingen.de.ibm.com>
7658 * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7659 int for variable OLDVAL and correct inline assembler contraint.
7660 * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7661 type int for variable OLD.
7663 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7665 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7666 (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7667 instead of multiple_threads field in the TCB.
7669 2003-03-19 Ulrich Drepper <drepper@redhat.com>
7671 * sysdeps/i386/i686/bits/atomic.h: Removed.
7672 * sysdeps/i386/i586/bits/atomic.h: Removed.
7673 * sysdeps/i386/i486/bits/atomic.h: Removed. Moved to glibc.
7674 * sysdeps/x86_64/bits/atomic.h: Removed. Moved to glibc.
7675 * sysdeps/s390/bits/atomic.h: Removed. Moved to glibc.
7676 * sysdeps/sh/bits/atomic.h: Removed. Moved to glibc.
7677 * sysdeps/ia64/bits/atomic.h: Removed. Moved to glibc.
7678 * sysdeps/powerpc/bits/atomic.h: Removed. Moved to glibc.
7679 * atomic.h: Removed. Moved to glibc.
7681 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7682 support for clock selection.
7684 * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7687 2003-03-18 Roland McGrath <roland@redhat.com>
7689 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7690 Add __lll_rel_instr first. Add memory clobber.
7691 (lll_mutex_unlock): Use __lll_test_and_set.
7692 From Paul Mackerras <paulus@samba.org>.
7694 * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7696 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7697 (SINGLE_THREAD_P): Add `header.' prefix.
7698 From Paul Mackerras <paulus@samba.org>.
7700 * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7701 pthread_timedjoin_np to ...
7702 (libpthread: GLIBC_2.3.3): ... here.
7703 (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7705 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7706 Avoid shadowing VAL variable.
7708 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7711 2003-03-18 Ulrich Drepper <drepper@redhat.com>
7713 * Makefile (tests): Add tst-cond11.
7714 * tst-cond11.c: New file.
7716 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7717 struct passed to cleanup handler to eliminate one more
7719 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7721 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7722 (pthrad_cond_t): Replace __unused field with __clock.
7724 * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7725 waken all waiters in cleanup handler.
7726 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7727 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7729 * pthread_condattr_getclock.c: New file.
7730 * pthread_condattr_setclock.c: New file.
7731 * sysdeps/pthread/pthread.h: Declare these new functions.
7732 * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7733 * Makefile (libpthread-routines): Add the new functions.
7734 * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7735 Renamed field to value. Document use of the bits.
7736 * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7738 * pthread_condattr_setpshared.c: Likewise.
7739 * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7740 * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7741 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7743 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7744 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7745 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7746 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7747 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7748 Implement clock selection.
7749 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7750 * pthread-errnos.sym: Add ENOSYS.
7751 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7752 _POSIX_CLOCK_SELECTION.
7753 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7755 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7756 invalid .size directive.
7758 2003-03-17 Roland McGrath <roland@redhat.com>
7760 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7763 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7765 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7766 Use __lll_add instead of spelling it out. Use protected symbol names.
7767 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7769 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7770 Renamed from lll_compare_and_swap. Use new name where necessary.
7771 (__lll_add): Defined.
7772 (__lll_dec_if_positive): Defined.
7773 (__lll_test_and_set): Defined.
7774 * sysdeps/ia64/pthread_spin_init.c: Removed.
7775 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7776 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7777 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7778 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7779 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7780 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7781 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7782 * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7783 * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7784 __sync_lock_release_si.
7785 Patch by Jakub Jelinek.
7787 * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7788 Fix timeout handling.
7789 (__lll_timedwait_tid): Likewise.
7790 (lll_unlock_wake_cb): Wake up other waiters if necessary.
7791 Patch by Jakub Jelinek.
7793 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7795 2003-03-17 Roland McGrath <roland@redhat.com>
7797 PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7798 * sysdeps/pthread/pthread_spin_init.c: New file.
7799 * sysdeps/pthread/pthread_spin_unlock.c: New file.
7800 * sysdeps/powerpc/Makefile: New file.
7801 * sysdeps/powerpc/pthread_spin_lock.c: New file.
7802 * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7803 * sysdeps/powerpc/pthreaddef.h: New file.
7804 * sysdeps/powerpc/tcb-offsets.sym: New file.
7805 * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7806 * sysdeps/powerpc/tls.h: New file.
7807 * sysdeps/powerpc/bits/atomic.h: New file.
7808 * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7809 * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7810 * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7812 * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7813 * sysdeps/unix/sysv/linux/sem_post.c: New file.
7814 * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7815 * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7816 * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7817 * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7818 * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7819 * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7820 * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7821 * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7822 * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7823 * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7824 * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7825 * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7826 * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7828 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7830 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7831 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7832 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7833 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7834 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7836 2003-03-17 Ulrich Drepper <drepper@redhat.com>
7838 * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7839 * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7840 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7841 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7842 Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7844 2003-03-16 Roland McGrath <roland@redhat.com>
7846 * tst-fork4.c: Include <string.h>.
7847 * tst-signal2.c: Likewise.
7848 * tst-mutex5.c (do_test): exit -> return.
7849 * tst-mutex2.c: Include <stdlib.h>.
7851 2003-03-16 Ulrich Drepper <drepper@redhat.com>
7853 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7854 (__lll_mutex_timedlock_wait): Correct expected value after
7855 spurious wakeup. Otherwise we would never wait again.
7857 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7858 zone versus inline asm stupidity. Use correct instructions.
7860 * tst-rwlock6.c: Add some more status output.
7862 2003-03-15 Roland McGrath <roland@redhat.com>
7864 * sysdeps/pthread/configure.in: New file.
7865 * sysdeps/pthread/configure: New file (generated).
7867 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7869 * allocatestack.c (allocate_stack): Store the exact stack size of
7870 user allocated stacks.
7872 2003-03-15 Jakub Jelinek <jakub@redhat.com>
7874 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7875 (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7876 * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7877 * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7878 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7879 Use `header.' prefix.
7880 * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7882 2003-03-15 Ulrich Drepper <drepper@redhat.com>
7884 * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7885 __builtin_frame_address, use stack pointer.
7887 * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7888 instead of __builtin_frame_pointer.
7890 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7892 * tst-basic1.c (do_test): Add cast to avoid warning.
7893 * tst-basic2.c (do_test): Likewise.
7895 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7896 amount of stack correction.
7898 * tst-fork4.c: Use test-skeleton.c.
7900 2003-03-14 Roland McGrath <roland@redhat.com>
7902 * init.c: Fix typo "#eli" for "#else".
7904 2003-03-14 Steven Munroe <sjmunroe@us.ibm.com>
7906 * allocatestack.c (__stack_user): Use hidden_data_def.
7907 * pthread_create.c (__pthread_keys): Likewise.
7909 * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7911 2003-03-14 Roland McGrath <roland@redhat.com>
7913 * tst-fork4.c: New file.
7914 * Makefile (tests): Add it.
7916 * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7917 we always define the padding space.
7918 [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7919 stopped supporting its own extensions fully.
7920 [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7921 struct also called `header', so `header.multiple_threads' is the field
7922 name to use on all machines.
7923 * allocatestack.c (allocate_stack): Use `header.' prefix.
7924 * sysdeps/pthread/createthread.c (create_thread): Likewise.
7925 * pthread_create.c (__pthread_create_2_1): Likewise.
7926 * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7927 (THREAD_SELF): Likewise.
7928 * sysdeps/x86_64/tls.h: Likewise.
7929 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7930 (SINGLE_THREAD_P): Likewise.
7931 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7932 (SINGLE_THREAD_P): Likewise.
7933 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7934 (SINGLE_THREAD_P): Likewise.
7936 * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7939 2003-03-14 Ulrich Drepper <drepper@redhat.com>
7941 * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7942 * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7944 * pthread_create.c (start_thread): setjmp is expected to return 0.
7946 * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7947 (THREAD_GETMEM_NC): Likewise.
7949 2003-03-13 Ulrich Drepper <drepper@redhat.com>
7951 * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7952 and the size of the stack which must be allocated is a multiple,
7953 allocate one more page.
7954 * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7955 MULTI_PAGE_ALIASING.
7957 2003-03-13 Roland McGrath <roland@redhat.com>
7959 * pthread_create.c (start_thread): Set EXITING_BIT after the
7960 event-reporting (and destructors), not before.
7962 2003-03-13 Jakub Jelinek <jakub@redhat.com>
7964 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7965 lll_futex_wake): Declare register variables as long int instead of
7966 unsigned long int. Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7967 Make syscall arguments clobbered by the syscall.
7968 (lll_futex_wait): Define using lll_futex_timed_wait.
7970 * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7973 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7976 * allocatestack.c (nptl_ncreated): Only declare if
7977 COLORING_INCREMENT != 0.
7979 * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7980 (__libc_enable_asynccancel_2): Remove prototype.
7982 * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7983 ctid to match kernel.
7985 2003-03-12 Ulrich Drepper <drepper@redhat.com>
7987 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7988 libc_multiple_threads.
7989 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7990 __libc_multiple_threads to...
7991 * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here. New file.
7993 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7995 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7996 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7998 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7999 (__pthread_once_internal): Define.
8001 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8002 macros instead of .symver directly.
8003 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8004 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8006 * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8007 * sysdeps/x86_64/tcb-offsets.sym: New file.
8008 * sysdeps/x86_64/Makefile: New file.
8010 * sysdeps/i386/tcb-offsets.sym: Add SELF.
8011 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8012 to access own pthread_t in TCB.
8013 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8015 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8017 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8019 2003-03-12 Roland McGrath <roland@redhat.com>
8021 * pthread-errnos.sym: New file.
8022 * Makefile (gen-as-const-headers): New variable, list that file.
8023 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8024 header <pthread-errnos.h> instead of defining errno values here.
8025 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8026 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8027 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8028 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8029 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8031 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8033 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8034 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8035 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8036 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8037 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8038 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8039 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8040 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8041 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8042 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8043 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8044 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8045 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8046 * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8047 * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8048 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8049 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8050 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8051 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8052 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8053 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8054 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8055 * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8056 * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8057 * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8058 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8059 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8061 * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8062 CLONE_CHILD_SETTID worked.
8064 2003-03-12 Ulrich Drepper <drepper@redhat.com>
8066 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8068 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8071 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8072 (pthread_cond_t): Add padding.
8074 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8075 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8076 * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8078 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8079 (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8080 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8081 (__pthread_rwlock_timedrdlock): Likewise.
8082 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8083 (__pthread_rwlock_wrlock): Likewise.
8084 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8085 (__pthread_rwlock_rdlock): Likewise.
8087 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8089 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8090 result of lock re-get if it fails.
8092 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8094 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8095 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8096 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8097 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8098 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8099 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8100 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8101 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8102 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8103 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8105 * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8106 THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8108 * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8109 Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8110 * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8111 (create_thread): Likewise.
8112 Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8113 * init.c (__pthread_initialize_minimal_internal): Initialize
8114 __libc_multiple_threads_ptr if necessary.
8115 * pthreadP.h: Adjust prototype for __libc_pthread_init. Declare
8116 __pthread_multiple_threads and __libc_multiple_threads_ptr.
8117 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8118 __libc_multiple_threads.
8119 (__libc_pthread_init): Return pointer to __libc_pthread_init if
8122 * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8123 (THREAD_SETMEM_NC): Likewise.
8125 * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8126 * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8127 * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8128 * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8130 * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8131 Eliminate one entire instruction.
8133 * cancellation.c (__pthread_enable_asynccancel_2): New function.
8134 * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8135 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8136 (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8137 instead of __pthread_enable_asynccancel.
8138 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8139 (__pthread_cond_wait): Likewise.
8140 * sysdeps/pthread/pthread_cond_timedwait.c
8141 (__pthread_cond_timedwait): Likewise.
8142 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8144 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8145 (__condvar_cleanup): Wake up all waiters in case we got signaled
8146 after being woken up but before disabling asynchronous
8148 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8149 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8150 (__condvar_cleanup): Likewise.
8152 * init.c (__NR_set_tid_address): If already defined, don't redefine.
8153 Make it an error if architecture has no #if case. Add x86-64.
8155 * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8156 pt-initfini.s generation.
8158 * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8159 (TLS_INIT_TP): Fix typo.
8161 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8163 * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8164 3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8166 * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8167 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8168 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8169 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8170 * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8171 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8172 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8173 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8175 2003-03-11 Ulrich Drepper <drepper@redhat.com>
8177 * sysdeps/pthread/pthread_cond_timedwait.c
8178 (__pthread_cond_timedwait): Return the result of the final
8179 locking. If it succeeds, the regular function return value.
8181 * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8182 Return result of the final locking.
8183 * version.c (__nptl_main): Work around problems with the strange
8184 INTERNAL_SYSCALL macro on ppc32.
8185 * init.c (__pthread_initialize_minimal_internal): Unblock
8186 SIGCANCEL in case the parent blocked it.
8187 Reported by Paul Mackerras <paulus@samba.org>.
8189 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8190 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8191 * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8193 2003-03-11 Jakub Jelinek <jakub@redhat.com>
8195 * sysdeps/pthread/pthread_cond_timedwait.c
8196 (__pthread_cond_timedwait): Unlock and fail if
8197 __pthread_mutex_unlock_internal failed.
8199 * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8200 (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8202 * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8203 [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8204 STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8205 ALLOCATE_STACK): New macros.
8206 (TLS_TPADJ): New macro.
8207 (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8208 (allocate_stack): Handle TLS_DTV_AT_TP and
8209 NEED_SEPARATE_REGISTER_STACK. Use TLS_TPADJ.
8210 * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8212 * init.c [__ia64__] (__NR_set_tid_address): Define.
8214 * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8215 * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8216 * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8217 * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8218 * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8219 * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8220 * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8221 * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8222 * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8223 * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8224 * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8225 * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8226 * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8227 * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8228 * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8229 * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8230 * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8231 * sysdeps/ia64/bits/atomic.h: New file.
8232 * sysdeps/ia64/Makefile: New file.
8233 * sysdeps/ia64/pthread_spin_init.c: New file.
8234 * sysdeps/ia64/pthread_spin_lock.c: New file.
8235 * sysdeps/ia64/pthread_spin_trylock.c: New file.
8236 * sysdeps/ia64/pthread_spin_unlock.c: New file.
8237 * sysdeps/ia64/pthreaddef.h: New file.
8238 * sysdeps/ia64/tcb-offsets.sym: New file.
8239 * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8240 * sysdeps/ia64/tls.h: New file.
8242 * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8243 to syscall instead of no arguments.
8245 2003-03-10 Ulrich Drepper <drepper@redhat.com>
8247 * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8248 * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8249 * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8250 * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8252 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8255 * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8257 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8258 lowlevelbarrier.sym.
8259 * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8260 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8261 Include lowlevelbarrier.h and don't define offsets locally.
8262 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8264 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8265 (__lll_mutex_lock_wait): Reverse order of first two parameters.
8266 (__lll_mutex_timedlock_wait): Likewise.
8267 (lll_mutex_lock): Adjust asm for that.
8268 (lll_mutex_timedlock): Likewise. Mark cx, cc, r10 as clobbered.
8269 (lll_lock): Adjust asm for operand order change.
8270 * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8271 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8273 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8274 Reverse order of parameters.
8275 (__lll_timedwait_tid): Remove regparms attribute.
8276 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8277 * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8279 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8280 (__lll_timedwait_tid): Remove one unnecessary instruction.
8282 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8283 __lll_mutex_timedlock_wait only for NOT_IN_libc.
8284 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8287 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8288 lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8290 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8293 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8294 LOCK is already defined. Don't define __lll_mutex_timedlock_wait
8296 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8297 define LOCK here (if UP is not defined). The actual code is in
8300 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8301 LOCK is already defined. Don't define lll_unlock_wake_cb and
8302 __lll_timedwait_tid for libc.so.
8303 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8304 define LOCK here (if UP is not defined). The actual code is in
8307 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8308 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8309 * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8310 instead of lowlevelsem.h.
8311 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8312 * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8313 * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8315 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8317 * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8318 * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8319 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8321 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8323 * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8326 * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8328 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8329 of __libc_locking_needed.
8330 (lll_trylock): Initialize %eax to zero.
8332 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8333 pthread_cond_t definition.
8335 2003-03-10 Roland McGrath <roland@redhat.com>
8337 * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8338 * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8339 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8340 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8341 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8343 * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8344 Instead of setting PD->multiple_threads, set globals
8345 __pthread_multiple_threads and __libc_multiple_threads.
8346 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8347 * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8348 * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8350 * descr.h (struct pthread): Conditionalize first member on
8351 [!TLS_DTV_AT_TP]. Replace the `header' member with an anonymous union
8352 containing an anonymous tcbhead_t. Move `list' member out.
8353 [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8354 * allocatestack.c: Remove use of `header.data.' prefix.
8355 * pthread_create.c: Likewise.
8356 * init.c (__pthread_initialize_minimal_internal): Likewise.
8357 * sysdeps/pthread/createthread.c (create_thread): Likewise.
8358 * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8359 (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8360 * sysdeps/x86_64/tls.h: Likewise.
8361 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8362 (SINGLE_THREAD_P): Likewise.
8363 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8364 (SINGLE_THREAD_P): Likewise.
8365 * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8366 * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8368 2003-03-09 Ulrich Drepper <drepper@redhat.com>
8370 * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8372 * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8373 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8375 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8376 leftovers from the ia32 code.
8378 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8380 (clear_once_control): Don't load %esi.
8382 * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8385 * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8387 * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8388 * sysdeps/unix/sysv/linux/createthread.c: ...here.
8390 * Makefile (tests): Add tst-cond10.
8391 * tst-cond10.c: New file.
8393 2003-03-08 Ulrich Drepper <drepper@redhat.com>
8395 * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8396 * tst-signal3.c (do_test): Likewise.
8397 * tst-sem5.c (do_test): Likewise.
8398 * tst-kill6.c (do_test): Likewise.
8399 * tst-tls3.c (do_test): Likewise. Include <errno.h>.
8401 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8403 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8404 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8405 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8406 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8407 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8408 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8409 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8411 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8413 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8414 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8415 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8416 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8417 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8418 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8419 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8420 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8422 * allocatestack.c (allocate_stack): If mprotect() fails free the
8425 2003-03-07 Ulrich Drepper <drepper@redhat.com>
8427 * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8429 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8430 lll_wake_tid. This was used only to work around kernel limits in
8432 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8433 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8434 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8435 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8437 * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8438 (__pthread_initialize_minimal_internal): Change initialization of
8439 __static_tls_align_m1 appropriately.
8440 * pthreadP.h (__static_tls_align_m1): Renamed from
8442 * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8443 instead of __static_tls_align-1.
8445 2003-03-04 Ulrich Drepper <drepper@redhat.com>
8447 * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8449 * pthread_create.c: Define __pthread_keys using nocommon
8450 attribute, not by placing it explicitly in bss.
8451 Remove DEFINE_DEALLOC definition. Not needed anymore.
8453 * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8454 Use it in mmap call to allocate stacks.
8456 * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8458 * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8459 result of the thread function.
8461 2003-03-03 Ulrich Drepper <drepper@redhat.com>
8463 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed. The generic
8464 version is just fine.
8466 * sysdeps/unix/sysv/linux/libc_pthread_init.c
8467 (__pthread_child_handler): Renamed from pthread_child_handler,
8468 exported, and marked hidden. Change all users.
8469 * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8470 free __pthread_child_handler from child list.
8472 2003-03-03 Martin Schwidefsky <schwidefsky@de.ibm.com>
8474 * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8476 * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8477 Fix handling of cancellation and failing pthread_mutex_unlock call.
8478 * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8479 (__pthread_cond_wait): Likewise.
8481 * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8482 (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8483 lll_futex_timed_wait call.
8484 * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8485 (pthread_rwlock_timedwrlock): Likewise.
8487 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8488 Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8489 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8491 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8492 check of lll_futex_wake return value.
8494 2003-03-03 Roland McGrath <roland@redhat.com>
8496 * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8498 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8499 Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8500 * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8502 2003-03-02 Ulrich Drepper <drepper@redhat.com>
8504 * sysdeps/pthread/timer_create.c (timer_create): Return correct
8505 error for CPU clocks.
8507 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8508 _POSIX_MONOTONIC_CLOCK.
8509 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8511 * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8514 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8516 * descr.h (struct pthread): Move cleanup field to the front.
8518 2003-03-01 Roland McGrath <roland@redhat.com>
8520 * sem_open.c (sem_open): Braino fix.
8522 2003-03-01 Ulrich Drepper <drepper@redhat.com>
8524 * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8525 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8526 __pthread_cleanup_pop functionality.
8527 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8529 * descr.h (struct pthread): Move tid field to the front now that
8532 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8533 (__lll_mutex_timedlock_wait): Remove.
8534 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8535 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8536 (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8537 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8538 (lll_unlock_wake_cb): Don't save and restore %esi.
8539 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8541 (__lll_timedwait_tid): Add alignment.
8542 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8543 (__lll_unlock_wake): Add alignment. Don't save, load, and restore
8545 (__lll_timedwait_tid): Removed.
8546 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8547 (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8548 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8549 (pthread_barrier_wait): Don't save, load, and restore %esi for
8551 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8552 (__pthread_cond_signal): Don't save, load, and restore %esi.
8553 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8554 (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8555 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8556 Don't save, load, and restore %esi.
8558 2003-02-27 Ulrich Drepper <drepper@redhat.com>
8560 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8561 Release lock before waking up the waiters.
8563 * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8565 * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8566 (reader_thread): Likewise.
8568 * sysdeps/pthread/pthread_rwlock_unlock.c
8569 (__pthread_rwlock_unlock): Release internal lock early. Don't try
8570 to wake up readers if there are none.
8572 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8573 Release internal lock before wake threads.
8575 2003-02-26 Ulrich Drepper <drepper@redhat.com>
8577 * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8578 * tst-rwlock8.c: Initialize lock with INIT. Allow INIT to be
8580 * tst-rwlock9.c: Likewise.
8581 * tst-rwlock10.c: New file.
8582 * tst-rwlock11.c: New file.
8584 * Makefile (tests): Add tst-dlsym1.
8585 * tst-dlsym1.c: New file.
8587 * init.c (__pthread_initialize_minimal_internal): Set
8588 GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8589 * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8591 2003-02-24 Ulrich Drepper <drepper@redhat.com>
8593 * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8595 * tst-cond2.c: Fix sychronization with child.
8597 * tst-rwlock8.c (reader_thread): Remove unused variable.
8599 * Makefile: Add rules to build and run tst-tls3.
8600 * tst-tls3.c: New file.
8601 * tst-tls3mod.c: New file.
8603 * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8604 * tst-rwlock8.c: New file.
8605 * tst-rwlock9.c: New file.
8606 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8607 complete broken rwlock implementation.
8608 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8610 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8612 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8613 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8614 * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8615 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8616 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8617 * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8618 * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8620 2003-02-23 Roland McGrath <roland@redhat.com>
8622 * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8624 2003-02-23 Ulrich Drepper <drepper@redhat.com>
8626 * Makefile (tests): Add tst-context1.
8627 * tst-context1.c: New file.
8629 * Makefile (tests): Add tst-tls1 and tst-tls2.
8630 * tst-tls1.c: New file.
8631 * tst-tls2.c: New file.
8633 * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8636 * pthread_create.c (start_thread): Set EXITING_BIT early.
8638 * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8639 (THREAD_GETMEM_NC): Likewise.
8641 2003-02-22 Ulrich Drepper <drepper@redhat.com>
8643 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8644 off 3 more bytes by using offset-less instructions when possible.
8646 * Makefile: Add dependency for $(objpfx)version.d.
8648 * eintr.c (eintr_source): Add unnecessary return but the compiler
8651 * tst-kill3.c: Include <unistd.h>.
8653 2003-02-21 Roland McGrath <roland@redhat.com>
8655 * pthread_create.c (start_thread): Call __libc_thread_freeres.
8657 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8659 * Makefile (tests): Add tst-eintr1.
8660 (distribute): Add eintr.c.
8661 * tst-eintr1.c: New file.
8662 * eintr.c: New file.
8664 * pthread_cancel.c (pthread_cancel): Use tkill directly.
8666 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8667 Disallow sending SIGCANCEL.
8669 * Makefile (tests): Remove tst-basic7. Add tst-kill1, tst-kill2,
8670 tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8671 * tst-kill1.c: New file.
8672 * tst-kill2.c: New file.
8673 * tst-kill3.c: New file.
8674 * tst-kill5.c: New file.
8675 * tst-kill6.c: New file.
8676 * tst-basic7.c: Renamed to...
8677 * tst-kill4.c: ...this.
8679 2003-02-21 Roland McGrath <roland@redhat.com>
8681 * Makefile (install-lib-ldscripts): New variable.
8683 2003-02-21 Ulrich Drepper <drepper@redhat.com>
8685 * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8686 * pthread_cancel.c: Use INVALID_TD_P.
8687 * pthread_detach.c: Likewise.
8688 * pthread_getschedparam.c: Likewise.
8689 * pthread_setschedparam.c: Likewise.
8690 * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8691 * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8692 * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8693 * pthread_timedjoin.c: Likewise.
8695 * tst-basic7.c: Include <signal.h>.
8697 * pthread_join.c (pthread_join): Limited checking for invalid
8699 * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8701 2003-02-20 Ulrich Drepper <drepper@redhat.com>
8703 * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8704 beginning of the loop. Clear the entire first block of TSD.
8705 * Makefile (tests): Add tst-key4.
8706 * tst-key4.c: New file.
8708 2003-02-18 Ulrich Drepper <drepper@redhat.com>
8710 * Makefile (tests): Add tst-basic7.
8711 * tst-basic7.c: New file.
8713 * pthread_create.c (deallocate_tsd): Mark as internal_function.
8714 Add some more __builtin_expect.
8716 * pthreadP.h: Define dummy version of DEBUGGING_P.
8718 2003-02-17 Ulrich Drepper <drepper@redhat.com>
8720 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8721 _POSIX_THREAD_PRIORITY_SCHEDULING.
8722 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8723 _XOPEN_REALTIME_THREADS.
8724 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8726 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8727 kernel returns EINVAL for PID <= 0, work around it.
8729 * Makefile (tests): Add tst-signal5.
8730 * tst-signal5.c: New file.
8732 * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8735 * tst-cancel1.c (tf): Block all signals.
8737 * Makefile (tests): Add tst-basic6.
8738 * tst-basic6.c: New file.
8740 * tst-basic1.c: Add test for process ID.
8742 * Makefile (tests): Add tst-cancel10.
8743 * tst-cancel10.c: New file.
8745 * Makefile (tests): Add tst-signal4.
8746 * tst-signal4.c: New file.
8748 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8749 __sigismember instead of sigismember. Add __builtin_expect.
8751 2003-02-16 Ulrich Drepper <drepper@redhat.com>
8753 * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8754 pthread_setcancelstate, and pthread_rwlock_setpshared.
8756 * tst-cancel7.c (do_test): Make sure the pid file exists before
8757 canceling the thread.
8759 * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8760 pthread_rwlock_timedrdlock tests.
8761 * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8762 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8763 Check for invalid tv_nsec field.
8764 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8767 * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8768 recursive mutex of overflow.
8770 * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8772 * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8773 going into an endless loop.
8774 * Makefile (tests): Add tst-cancel9.
8775 * tst-cancel9.c: New file.
8777 * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8779 2003-02-15 Ulrich Drepper <drepper@redhat.com>
8781 * tst-mutex5.c (do_test): Add more timedlock tests.
8783 * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8784 * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8786 * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8787 use INLINE_SYSCALL. Error number is returned, not -1.
8789 * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8790 and __deallocate_stack with internal_function.
8791 * pthread_create.c: Adjust definitions appropriately.
8792 * allocatestack.c: Likewise.
8794 * pthread_join.c: Add one more __builtin_expect.
8795 * pthread_timedjoin.c: Likewise.
8797 * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8798 not data of sequence number does not match.
8799 Add one __builtin_expect.
8801 * Makefile (tests): Add tst-clock1.
8802 * tst-clock1.c: New file.
8804 * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8806 * Makefile (tests): Add tst-basic5.
8807 * tst-basic5.c: New file.
8809 2003-02-14 Ulrich Drepper <drepper@redhat.com>
8811 * Makefile (tests): Add tst-basic4.
8812 * tst-basic4.c: New file.
8814 * pthreadP.h: Add declaraction for __nptl_nthreads.
8815 * pthread_create.c: Define __nptl_nthreads
8816 (start_thread): Increment __nptl_nthreads at beginning. Decrement
8817 after thread is done. If then zero, call exit(0).
8818 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8819 Add ptr_nthreads. Define HAVE_PTR_NTHREADS.
8820 * init.c (pthread_functions): Initialize ptr_nthreads.
8821 * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8822 (__reclaim_stacks): Decrement __nptl_nthreads.
8823 * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8825 * Makefile (tests): Add tst-basic3.
8826 * tst-basic3.c: New file.
8828 * descr.h: Define CANCELING_BIT and CANCELING_BITMASK. Introduce
8829 after CANCELTYPE_BIT, move the other bits up. Update CANCEL_RESTMASK.
8830 * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8831 * pthread_cancel.c (pthread_cancel): Likewise. Also set CANCELING_BIT
8832 if asynchronous canceling is enabled.
8833 * pthread_join.c (pthread_join): When recognizing circular joins,
8834 take into account the other thread might be already canceled.
8835 * Makefile (tests): Add tst-join5.
8836 * tst-join5.c: New file.
8838 * Makefile (tests): Add tst-join4.
8839 * tst-join4.c: New file.
8841 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8843 * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8845 2003-02-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
8847 * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8848 THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8849 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8851 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8853 * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8854 error if lll_futex_wake failed.
8856 2003-02-13 Ulrich Drepper <drepper@redhat.com>
8858 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8859 handling of cancellation and failung pthread_mutex_unlock call.
8860 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8861 * Makefile (tests): Add tst-cond8 and tst-cond9.
8862 * tst-cond8.c: New file.
8863 * tst-cond9.c: New file.
8865 * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8867 * sysdeps/pthread/pthread.h: Add missing initializers. Protect
8868 non-standard initializers with __USE_GNU.
8870 * Makefile (tests): Add tst-cleanup3.
8871 * tst-cleanup3.c: New file.
8873 2003-02-12 Ulrich Drepper <drepper@redhat.com>
8875 * Makefile (tests): Add tst-attr1 and tst-attr2.
8876 * tst-attr1.c: New file.
8877 * tst-attr2.c: New file.
8879 * Makefile: Add rules to build and run tst-atfork2 test.
8880 * tst-atfork2.c: New file.
8881 * tst-atfork2mod.c: New file.
8883 * sysdeps/unix/sysv/linux/unregister-atfork.c
8884 (__unregister_atfork): Free the memory allocated for the handlers
8885 after removing them from the lists.
8887 * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8890 * tst-atfork1.c (do_test): Wait for the child we forked.
8891 Report error in child.
8893 * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8895 * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8897 2003-02-10 Ulrich Drepper <drepper@redhat.com>
8899 * Makefile (tests): Add tst-cancel8.
8900 * tst-cancel8.c: New file.
8902 * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8903 clearing of control variable.
8904 * Makefile (tests): Add tst-once3 and tst-once4.
8905 * tst-once3.c: New file.
8906 * tst-once4.c: New file.
8908 2003-02-08 kaz Kojima <kkojima@rr.iij4u.or.jp>
8910 * sysdeps/sh/Makefile: New file.
8911 * sysdeps/sh/bits/atomic.h: New file.
8912 * sysdeps/sh/pthread_spin_init.c: New file.
8913 * sysdeps/sh/pthread_spin_lock.c: New file.
8914 * sysdeps/sh/pthread_spin_trylock.S: New file.
8915 * sysdeps/sh/pthread_spin_unlock.S: New file.
8916 * sysdeps/sh/pthreaddef.h: New file.
8917 * sysdeps/sh/tcb-offsets.sym: New file.
8918 * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8919 * sysdeps/sh/tls.h: New file.
8920 * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8921 * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8922 * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8923 * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8924 * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8925 * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8926 * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8927 * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8928 * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8929 * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8930 * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8931 * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8932 * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8933 * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8934 * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8935 * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8936 * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8937 * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8938 * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8939 * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8940 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8941 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8942 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8943 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8944 * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8945 * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8946 * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8947 * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8948 * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8949 * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8951 2003-02-08 Ulrich Drepper <drepper@redhat.com>
8953 * tst-cond2.c: Rearrange code to not rely on behavior undefined
8956 * tst-basic2.c (do_test): Lock mutex before creating the thread.
8958 2003-02-07 Ulrich Drepper <drepper@redhat.com>
8960 * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8961 (TLS_GET_FS): New #define.
8962 (TLS_SET_FS): New #define.
8963 Correct value of __NR_set_thread_area.
8965 * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8967 2003-02-06 Ulrich Drepper <drepper@redhat.com>
8969 * Makefile (tests): Add tst-popen1.
8970 * tst-popen1.c: New file.
8972 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8973 but inactive generalization.
8974 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8975 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8976 Minor optimization, remove one instruction.
8977 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8979 2003-02-04 Martin Schwidefsky <schwidefsky@de.ibm.com>
8981 * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8983 2003-01-31 Martin Schwidefsky <schwidefsky@de.ibm.com>
8985 * init.c (__NR_set_tid_address): Add #ifdef for s390.
8986 * sysdeps/pthread/pthread_barrier_wait.c: New file.
8987 * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8988 * sysdeps/pthread/pthread_cond_signal.c: New file.
8989 * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8990 * sysdeps/pthread/pthread_cond_wait.c: New file.
8991 * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8992 * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8993 * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8994 * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8995 * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8996 * sysdeps/s390/Makefile: New file.
8997 * sysdeps/s390/bits/atomic.h: New file.
8998 * sysdeps/s390/pthread_spin_init.c: New file.
8999 * sysdeps/s390/pthread_spin_lock.c: New file.
9000 * sysdeps/s390/pthread_spin_trylock.c: New file.
9001 * sysdeps/s390/pthread_spin_unlock.c: New file.
9002 * sysdeps/s390/pthreaddef.h: New file.
9003 * sysdeps/s390/tcb-offsets.sym: New file.
9004 * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9005 * sysdeps/s390/tls.h: New file.
9006 * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9007 * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9008 * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9009 * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9010 * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9011 * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9012 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9013 * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9014 * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9015 * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9016 * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9017 * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9018 * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9019 * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9020 * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9021 * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9022 * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9023 * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9024 * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9025 * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9026 * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9027 * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9028 * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9030 2003-02-04 Ulrich Drepper <drepper@redhat.com>
9032 * atomic.h: Add a couple more default implementations.
9033 (atomic_compare_and_exchange_acq): Use
9034 __arch_compare_and_exchange_32_acq in return value definition. It
9036 (atomic_bit_set): Renamed from atomic_set_bit.
9037 Add missing atomic_ prefixes.
9039 * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9040 thread library is available, use correct value to mark initialized
9043 2003-02-03 Ulrich Drepper <drepper@redhat.com>
9045 * allocatestack.c (allocate_stack): Use __getpagesize instead of
9046 __sysconf to determine pagesize.
9048 * pthread_create.c: Include <atomic.h>.
9049 * allocatestack.c (allocate_stack): Implement coloring of the
9050 allocated stack memory. Rename pagesize to pagesize_m1. It's the
9051 size minus one. Adjust users.
9052 * sysdeps/i386/i686/Makefile: New file.
9054 2003-02-02 Ulrich Drepper <drepper@redhat.com>
9056 * allocatestack.c: Improve comment throughout the file.
9058 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9059 (__lll_lock_wait): Add branch prediction.
9060 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9061 (__lll_lock_wait): Likewise.
9062 (lll_unlock_wake_cb): Removed.
9064 2003-01-31 Ulrich Drepper <drepper@redhat.com>
9066 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9067 _POSIX_THREAD_PRIORITY_SCHEDULING.
9069 2003-01-30 Jakub Jelinek <jakub@redhat.com>
9071 * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9072 Fix return type of ptr___pthread_getspecific.
9074 2003-01-29 Ulrich Drepper <drepper@redhat.com>
9076 * Makefile (tests): Add tst-umask1.
9077 (tst-umask1-ARGS): Define.
9078 * tst-umask1.c: New file.
9080 2003-01-28 Ulrich Drepper <drepper@redhat.com>
9082 * Makefile (libpthread-routines): Remove lowlevelrwlock. Add
9083 pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9084 pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9085 pthread_rwlock_unlock.
9086 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9087 * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9088 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9089 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9090 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9092 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9093 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9095 * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9096 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9097 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9099 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9100 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9102 * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9103 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9104 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9106 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9107 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9109 * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9111 * Makefile (libpthread-routines): Remove lowlevelcond and
9112 lowlevelsem. Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9113 pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9114 and pthread_cond_broadcast.
9115 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9116 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9117 * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9118 * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9119 * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9120 * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9121 * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9122 * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9123 * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9124 * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9125 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9126 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9127 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9128 * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9129 * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9130 * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9131 * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9132 * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9133 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9134 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9135 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9136 * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9137 * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9138 * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9139 * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9140 * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9141 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9142 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9143 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9144 * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9145 * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9147 * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9148 PREPARE_CREATE and TLS_VALUE with x86-specific bits. All the rest
9149 of the code is moved to ...
9150 * sysdeps/pthread/createthread.c: ...here. New file.
9152 2003-01-27 Ulrich Drepper <drepper@redhat.com>
9154 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9155 (__new_sem_post): Clear %eax before returning.
9156 Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9158 * Makefile (tests): Add tst-cleanup2.
9159 * tst-cleanup2.c: New file.
9161 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9162 Interpret first parameter correctly.
9164 2003-01-17 Ulrich Drepper <drepper@redhat.com>
9166 * Makefile (headers): Add bits/semaphore.h.
9168 2003-01-16 Jakub Jelinek <jakub@redhat.com>
9170 * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9173 2003-01-14 Ulrich Drepper <drepper@redhat.com>
9175 * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9176 must be used and mapping failed.
9177 Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9179 * Makefile (CFLAGS-pthread_self.os): Define this, not
9180 CFLAGS-pthread_self.c.
9182 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9184 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9187 * Makefile (libpthread-routines): Add version. Add rules to build
9188 version.os and banner.h.
9189 * version.c: New file.
9191 2003-01-13 Jakub Jelinek <jakub@redhat.com>
9193 * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9194 the alias unconditional.
9195 * pthread_mutex_unlock.c (__pthread_mutex_unlock_internal): Likewise.
9197 2003-01-13 Ulrich Drepper <drepper@redhat.com>
9199 * Makefile (CFLAGS-pthread_self.c): New definition.
9201 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9203 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9204 INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9205 * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9206 * init.c (__pthread_initialize_minimal_internal): Likewise.
9208 2003-01-07 Jakub Jelinek <jakub@redhat.com>
9210 * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9212 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9213 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9214 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9215 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9216 (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9217 (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9219 2003-01-06 Jakub Jelinek <jakub@redhat.com>
9221 * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9222 * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9223 * tst-cancel-wrappers.sh: Remove all exceptions.
9225 2003-01-05 Ulrich Drepper <drepper@redhat.com>
9227 * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9228 features. Reported by Marijn Ros <marijn@mad.scientist.com>.
9230 * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9231 Use __libc_pthread_functions array if SHARED.
9233 * pthreadP.h: Move pthread_cond_2_0_t definition to...
9234 * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9236 * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9237 (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9238 __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9239 __libc_ptf_call instead of __libc_maybe_call.
9241 (__libc_cleanup_region_start): Wrap function name with PTF call.
9242 (__libc_cleanup_region_end): Likewise.
9243 (__libc_cleanup_end): Likewise.
9245 * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9246 * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9247 * pthread_key_create.c: Add __pthread_key_create_internal alias.
9248 * pthreadP.h: Add prototypes.
9250 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9251 __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9252 __pthread_rwlock_unlock aliases.
9253 * pthreadP.h: Add prototypes for new aliases.
9255 * pthreadP.h (struct pthead_functions): Moved to...
9256 * sysdeps/pthread/pthread-functions.h: ...here. New file.
9257 * init.c (pthread_functions): Add initializers for new elements.
9259 * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9260 __pthread_cleanup_pop_restore aliases.
9261 * pthreadP.h: Add prototypes.
9263 * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9264 and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9265 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9266 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9267 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9268 * pthreadP.h: Adjust prototypes and callers.
9270 2003-01-04 Ulrich Drepper <drepper@redhat.com>
9272 * Makefile (tests): Add tst-cancel7.
9273 (tst-cancel7-ARGS): New variable.
9274 * tst-cancel7.c: New file.
9276 * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9277 around gcc defficiencies.
9278 * old_pthread_cond_signal.c: Likewise.
9279 * old_pthread_cond_timedwait.c: Likewise.
9280 * old_pthread_cond_wait.c: Likewise.
9282 * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9284 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9286 * Makefile (tests): Add tst-cond7.
9287 * tst-cond7.c: New file.
9289 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9290 (condvar_cleanup): Get condvar address from the right place.
9292 * atomic.h: Correct definitions of atomic_full_barrier,
9293 atomic_read_barrier, atomic_write_barrier.
9295 * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9297 * old_pthread_cond_signal.c: Likewise.
9298 * old_pthread_cond_timedwait.c: Likewise.
9299 * old_pthread_cond_wait.c: Likewise.
9301 2003-01-03 Jakub Jelinek <jakub@redhat.com>
9303 * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9305 2003-01-03 Ulrich Drepper <drepper@redhat.com>
9307 * pthreadP.h (pthread_cond_2_0_t): New type.
9308 (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9309 Use new type for the 2.0 condvar function prototypes.
9310 * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9311 * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9313 * old_pthread_cond_destroy.c: Likewise.
9314 * old_pthread_cond_broadcast.c: Likewise. Lock appropriately.
9315 * old_pthread_cond_signal.c: Likewise.
9316 * old_pthread_cond_timedwait.c: Likewise.
9317 * old_pthread_cond_wait.c: Likewise.
9319 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9320 (__pthread_cond_wait): Don't save cancellation mode and seq value
9323 * herrno.c (__h_errno_location): Don't define as weak.
9325 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9327 * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9328 pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9329 and pthread_cond_wait.
9330 * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9332 (__pthread_cond_broadcast_2_0): ... this.
9333 * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9335 (__pthread_cond_destroy_2_0): ... this.
9336 * old_pthread_cond_init.c (__old_pthread_cond_init):
9338 (__pthread_cond_init_2_0): ... this.
9339 * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9341 (__pthread_cond_signal_2_0): ... this.
9342 * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9344 (__pthread_cond_wait_2_0): ... this.
9345 * pthread_cond_destroy.c: Include shlib-compat.h.
9346 (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9347 * pthread_cond_init.c: Include shlib-compat.h.
9348 (pthread_cond_init): Change strong_alias into versioned_symbol.
9349 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9350 fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9352 (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9353 __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9354 __pthread_cond_wait_2_0): New prototypes.
9355 (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9356 __old_pthread_cond_init, __old_pthread_cond_signal,
9357 __old_pthread_cond_wait): Removed.
9358 * init.c: Include shlib-compat.h.
9359 (pthread_functions): Guard ptr___pthread_attr_init_2_0
9360 initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9361 Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9362 ptr___pthread_cond_*_2_0 fields.
9363 * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9364 pthread_cond_*@GLIBC_2.0 compatibility symbols.
9366 * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9367 LIBC_SIGACTION was not yet defined.
9368 [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9369 [!defined LIBC_SIGACTION] (__sigaction): New function and
9371 [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9372 [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9374 2003-01-02 Jakub Jelinek <jakub@redhat.com>
9376 * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9378 2003-01-02 Ulrich Drepper <drepper@redhat.com>
9380 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9381 New, larger type definition.
9382 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9384 * Versions [libpthread]: Add definitions for new pthread_cond_*
9385 interfaces for version GLIBC_2.3.2.
9386 * pthread_cond_init.c: Update initialization for new type definition.
9387 * Makefile (libpthread-routines): Remove pthread_cond_wait,
9388 pthread_cond_timedwait, pthread_cond_signal, and
9389 pthread_cond_broadcast. Add old_pthread_cond_init,
9390 old_pthread_cond_destroy, old_pthread_cond_wait,
9391 old_pthread_cond_timedwait, old_pthread_cond_signal, and
9392 old_pthread_cond_broadcast.
9393 * old_pthread_cond_broadcast.c: New file.
9394 * old_pthread_cond_destroy.c: New file.
9395 * old_pthread_cond_init.c: New file.
9396 * old_pthread_cond_signal.c: New file.
9397 * old_pthread_cond_timedwait.c: New file.
9398 * old_pthread_cond_wait.c: New file.
9399 * pthreadP.h: Add prototypes for the compatibility interfaces.
9401 * pthread_cond_destroy.c: Don't include <errno.h>.
9403 2003-01-01 Ulrich Drepper <drepper@redhat.com>
9405 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9406 unnecessary zero offset when addressing MUTEX.
9408 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9410 * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9412 * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9413 for __register_atfork.
9415 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9417 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9418 instead of ASSEMBLER test macro.
9420 * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9421 __libc_current_sigrtmax): Add libc_hidden_def.
9423 * sysdeps/pthread/list.h: Remove assert.h include.
9425 2002-12-31 Ulrich Drepper <drepper@redhat.com>
9427 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9428 __pthread_initialize_minimal_internal not
9429 __pthread_initialize_minimal.
9431 2002-12-30 Ulrich Drepper <drepper@redhat.com>
9433 * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9434 __pthread_initialize_minimal as hidden.
9436 * init.c (__pthread_initialize_minimal_internal): Don't mark as
9439 2002-12-31 Jakub Jelinek <jakub@redhat.com>
9441 * Makefile ($(inst_libdir)/libpthread.so): Depend on
9442 $(common-objpfx)format.lds, include that into the output script.
9444 (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9446 2002-12-28 Andreas Jaeger <aj@suse.de>
9448 * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9449 nsec resolution changes.
9450 (xstat64_conv): Likewise.
9451 (xstat32_conv): Likewise.
9452 * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9454 * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9455 structs stat and stat64.
9456 * time/time.h (__timespec_defined): Define for __USE_MISC.
9457 * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9459 2002-12-30 Jakub Jelinek <jakub@redhat.com>
9461 * forward.c (FORWARD2): Renamed from FORWARD3. Remove unused export
9463 (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9464 (pthread_exit): Use strong_alias to avoid warnings.
9465 * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9466 and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9467 ptr___pthread_attr_init_2_*.
9468 * init.c (pthread_functions): Adjust.
9470 2002-12-29 Ulrich Drepper <drepper@redhat.com>
9472 * forward.c: Make all functions available by default again. It
9473 caused too much trouble.
9475 * pt-siglongjmp.c: Removed.
9477 2002-12-28 Jakub Jelinek <jakub@redhat.com>
9479 * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9480 (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9481 * sysdeps/i386/Makefile: New file.
9482 * sysdeps/i386/tcb-offsets.sym: New file.
9483 * sysdeps/pthread/tcb-offsets.h: New file.
9484 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9485 Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9487 * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9488 __register_atfork...
9489 (GLIBC_2.3.2): ...here.
9491 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9493 * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9494 pthread_attr_setstackaddr with __attribute_deprecated__.
9496 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9498 * pt-system.c (system): Remove cancellation handling.
9499 * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9500 cancellation routines.
9502 2002-12-28 Ulrich Drepper <drepper@redhat.com>
9504 * descr.h: Include <dl-sysdep.h>.
9505 (struct pthread): Move header.data.list to the back of the struct.
9506 * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9507 (MULTIPLE_THREADS_OFFSET): Adjust offset.
9508 (SYSINFO_OFFSEET): Likewise.
9510 2002-12-27 Jakub Jelinek <jakub@redhat.com>
9512 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9514 (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9515 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9516 DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9517 (USE_DL_SYSINFO): Undef.
9519 2002-12-22 Jakub Jelinek <jakub@redhat.com>
9521 * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9522 $(common-objpfx)libc.so.
9523 * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9524 it is bigger than pipe buffer size even on arches with bigger
9526 (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9528 2002-12-25 Ulrich Drepper <drepper@redhat.com>
9530 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9531 correct errno access for case that USE___THREAD is not defined.
9533 2002-12-24 Ulrich Drepper <drepper@redhat.com>
9535 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9536 Patch by Marijn Ros <marijn@mad.scientist.com>.
9538 2002-12-22 Roland McGrath <roland@redhat.com>
9540 * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9542 2002-12-20 Ulrich Drepper <drepper@redhat.com>
9544 * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9546 2002-12-19 Ulrich Drepper <drepper@redhat.com>
9548 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9549 NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9550 * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9552 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9554 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9555 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9556 * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9557 * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9558 * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9559 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9560 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9561 * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9563 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9565 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9567 * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9569 * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9571 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9572 that sysinfo is properly initialized.
9573 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9574 to 1 only for ld.so.
9576 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9577 RTLD_CORRECT_DYNAMIC_WEAK.
9579 2002-12-19 Jakub Jelinek <jakub@redhat.com>
9581 * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9582 Use return 0 as 6th argument to FORWARD4.
9583 * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9585 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9587 * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9588 * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9589 Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9590 (INIT_SYSINFO): New #define.
9591 (TLS_TP_INIT): Use INIT_SYSINFO.
9592 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9593 At test to make sure SYSINFO_OFFSET value is correct.
9594 * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9596 2002-12-18 Jakub Jelinek <jakub@redhat.com>
9598 * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9599 * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9600 * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9601 [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9602 __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9603 __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9604 __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9606 2002-12-18 Ulrich Drepper <drepper@redhat.com>
9608 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9609 macro instead of using int $0x80 directly.
9611 * sysdeps/pthread/bits/stdio-lock.h: New file.
9612 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9613 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9614 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9615 * Makefile (routines): Add libc-lowlevelmutex.
9617 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9618 __i686.get_pc_thunk.dx.
9620 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9622 * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9623 (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9624 ($(objpfx)tst-cancel-wrappers.out): New rule.
9625 * tst-cancel-wrappers.sh: New test.
9626 * tst-locale1.c: Include signal.h.
9627 (uselocale): Test static linking of __libc_current_sigrt*.
9629 2002-12-17 Ulrich Drepper <drepper@redhat.com>
9631 * Makefile (tests): Add tst-cancel6.
9632 * tst-cancel6.c: New file
9634 2002-12-17 Jakub Jelinek <jakub@redhat.com>
9636 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9637 Define meaningfully for assembler as well.
9638 * pthreadP.h (struct pthread_functions): Remove
9639 ptr_pthread_attr_init field. Add ptr_pthread_attr_init_2_0
9640 and ptr_pthread_attr_init_2_1 fields.
9641 * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9642 and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9643 * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9644 (FORWARD3): Define using FORWARD4.
9645 (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9647 * pt-system.c: Remove duplicate stdlib.h include.
9649 2002-12-16 Ulrich Drepper <drepper@redhat.com>
9651 * sem_init.c: Define sem_init@GLIBC_2.0.
9652 * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9653 * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9655 * flockfile.c: Moved to...
9656 * sysdeps/pthread/flockfile.c: ...here. New file.
9657 * funlockfile.c: Moved to...
9658 * sysdeps/pthread/funlockfile.c: ...here. New file.
9659 * ftrylockfile.c: Moved to...
9660 * sysdeps/pthread/ftrylockfile.c: ...here. New file.
9662 2002-12-16 Jakub Jelinek <jakub@redhat.com>
9664 * libc-cancellation.c: Guard both function with
9665 #if !defined NOT_IN_libc.
9666 * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9667 automatically provided pthread wrappers.
9668 * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9669 CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9671 * pt-open.c: Removed.
9672 * pt-fcntl.c: Removed.
9673 * pt-fsync.c: Removed.
9674 * pt-lseek.c: Removed.
9675 * pt-msgrcv.c: Removed.
9676 * pt-msgsnd.c: Removed.
9677 * pt-msync.c: Removed.
9678 * pt-nanosleep.c: Removed.
9679 * pt-open64.c: Removed.
9680 * pt-pause.c: Removed.
9681 * pt-pread.c: Removed.
9682 * pt-pread64.c: Removed.
9683 * pt-pwrite.c: Removed.
9684 * pt-pwrite64.c: Removed.
9685 * pt-read.c: Removed.
9686 * pt-recv.c: Removed.
9687 * pt-recvfrom.c: Removed.
9688 * pt-recvmsg.c: Removed.
9689 * pt-send.c: Removed.
9690 * pt-sendto.c: Removed.
9691 * pt-sigtimedwait.c: Removed.
9692 * pt-sigwait.c: Removed.
9693 * pt-wait.c: Removed.
9694 * pt-waitpid.c: Removed.
9695 * pt-write.c: Removed.
9696 * pt-accept.c: Removed.
9697 * pt-close.c: Removed.
9698 * pt-connect.c: Removed.
9699 * pt-lseek64.c: Removed.
9700 * pt-sendmsg.c: Removed.
9701 * pt-tcdrain.c: Removed.
9703 2002-12-15 Ulrich Drepper <drepper@redhat.com>
9705 * init.c (__pthread_initialize_minimal_internal): Renamed from
9706 __pthread_initialize_minimal. Make old name an alias. This
9707 converts a normal relocation into a relative relocation.
9709 * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9711 * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9712 readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9713 * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9714 pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9715 pt-sigwaitinfo, pt-waitid, and pt-writev.
9716 * pt-creat.c: Removed.
9717 * pt-poll.c: Removed.
9718 * pt-pselect.c: Removed.
9719 * pt-readv.c: Removed.
9720 * pt-select.c: Removed.
9721 * pt-sigpause.c: Removed.
9722 * pt-sigsuspend.c: Removed.
9723 * pt-sigwaitinfo.c: Removed.
9724 * pt-waitid.c: Removed.
9725 * pt-writev.c: Removed.
9727 * init.c (pthread_functions): New variable.
9728 (__pthread_initialize_minimal): Pass pointer to pthread_functions
9729 (or NULL) to __libc_pthread_init.
9730 * forward.c: Rewrite to use __libc:pthread_functions array to get
9732 * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9734 * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9735 Take new parameter. Copy content of variable pointed to by it
9736 to __libc_pthread_init.
9738 * pthreadP.h (struct pthread_functions): New type.
9739 (__libc_pthread_init): Declare.
9741 * pthread_attr_destroy.c: Add namespace protected alias.
9742 * pthread_attr_getdetachstate.c: Likewise.
9743 * pthread_attr_getinheritsched.c: Likewise.
9744 * pthread_attr_getschedparam.c: Likewise.
9745 * pthread_attr_getschedpolicy.c: Likewise.
9746 * pthread_attr_getscope.c: Likewise.
9747 * pthread_attr_setdetachstate.c: Likewise.
9748 * pthread_attr_setinheritsched.c: Likewise.
9749 * pthread_attr_setschedparam.c: Likewise.
9750 * pthread_attr_setschedpolicy.c: Likewise.
9751 * pthread_attr_setscope.c: Likewise.
9752 * pthread_cond_broadcast.c: Likewise.
9753 * pthread_cond_destroy.c: Likewise.
9754 * pthread_cond_init.c: Likewise.
9755 * pthread_cond_signal.c: Likewise.
9756 * pthread_cond_wait.c: Likewise.
9757 * pthread_condattr_destroy.c: Likewise.
9758 * pthread_condattr_init.c: Likewise.
9759 * pthread_equal.c: Likewise.
9760 * pthread_exit.c: Likewise.
9761 * pthread_getschedparam.c: Likewise.
9762 * pthread_self.c: Likewise.
9763 * pthread_setcancelstate.c: Likewise.
9764 * pthread_setschedparam.c: Likewise.
9765 * pthread_mutex_destroy.c: Likewise.
9766 * pthread_mutex_init.c: Likewise.
9767 * pthreadP.h: Add prototypes for the aliases.
9769 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9770 multiple_threads member in correct TCB to 1.
9772 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9773 SINGLE_THREAD_P. If in libc or libpthread examine multiple_thread
9774 member of thread decriptor, otherwise return unconditionally 1.
9776 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9778 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9779 regular Linux version. Remove file.
9780 * sysdeps/unix/sysv/linux/connect.S: Likewise. Remove file.
9781 * sysdeps/unix/sysv/linux/llseek.c: Likewise. Remove file.
9782 * sysdeps/unix/sysv/linux/msgrcv.c: Likewise. Remove file.
9783 * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. Remove file.
9784 * sysdeps/unix/sysv/linux/open64.c: Likewise. Remove file.
9785 * sysdeps/unix/sysv/linux/poll.c: Likewise. Remove file.
9786 * sysdeps/unix/sysv/linux/pread.c: Likewise. Remove file.
9787 * sysdeps/unix/sysv/linux/pread64.c: Likewise. Remove file.
9788 * sysdeps/unix/sysv/linux/pselect.c: Likewise. Remove file.
9789 * sysdeps/unix/sysv/linux/pwrite.c: Likewise. Remove file.
9790 * sysdeps/unix/sysv/linux/pwrite64.c: Likewise. Remove file.
9791 * sysdeps/unix/sysv/linux/readv.c: Likewise. Remove file.
9792 * sysdeps/unix/sysv/linux/recv.S: Likewise. Remove file.
9793 * sysdeps/unix/sysv/linux/recvfrom.S: Likewise. Remove file.
9794 * sysdeps/unix/sysv/linux/recvmsg.S: Likewise. Remove file.
9795 * sysdeps/unix/sysv/linux/send.S: Likewise. Remove file.
9796 * sysdeps/unix/sysv/linux/sendmsg.S: Likewise. Remove file.
9797 * sysdeps/unix/sysv/linux/sendto.S: Likewise. Remove file.
9798 * sysdeps/unix/sysv/linux/sigpause.c: Likewise. Remove file.
9799 * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. Remove file.
9800 * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise. Remove file.
9801 * sysdeps/unix/sysv/linux/sigwait.c: Likewise. Remove file.
9802 * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise. Remove file.
9803 * sysdeps/unix/sysv/linux/system.c: Likewise. Remove file.
9804 * sysdeps/unix/sysv/linux/tcdrain.c: Likewise. Remove file.
9805 * sysdeps/unix/sysv/linux/wait.c: Likewise. Remove file.
9806 * sysdeps/unix/sysv/linux/waitid.c: Likewise. Remove file.
9807 * sysdeps/unix/sysv/linux/waitpid.c: Likewise. Remove file.
9808 * sysdeps/unix/sysv/linux/writev.c: Likewise. Remove file.
9809 * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. Remove file.
9811 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9813 * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9814 * sysdeps/unix/sysv/linux/open.c: Removed.
9815 * sysdeps/unix/sysv/linux/fsync.c: Removed.
9816 * sysdeps/unix/sysv/linux/lseek.c: Removed.
9817 * sysdeps/unix/sysv/linux/msync.c: Removed.
9818 * sysdeps/unix/sysv/linux/read.c: Removed.
9819 * sysdeps/unix/sysv/linux/close.c: Removed.
9820 * sysdeps/unix/sysv/linux/creat.c: Removed.
9821 * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9822 * sysdeps/unix/sysv/linux/pause.c: Removed.
9823 * sysdeps/unix/sysv/linux/select.c: Removed.
9824 * sysdeps/unix/sysv/linux/write.c: Removed.
9826 2002-12-14 Ulrich Drepper <drepper@redhat.com>
9828 * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9829 element in TCB to see whether locking is needed.
9831 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9832 MULTIPLE_THREADS_OFFSET value is correct.
9834 * sysdeps/unix/sysv/linux/close.c: New file.
9835 * sysdeps/unix/sysv/linux/connect.S: New file.
9836 * sysdeps/unix/sysv/linux/creat.c: New file.
9837 * sysdeps/unix/sysv/linux/fsync.c: New file.
9838 * sysdeps/unix/sysv/linux/llseek.c: New file.
9839 * sysdeps/unix/sysv/linux/lseek.c: New file.
9840 * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9841 * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9842 * sysdeps/unix/sysv/linux/msync.c: New file.
9843 * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9844 * sysdeps/unix/sysv/linux/open.c: New file.
9845 * sysdeps/unix/sysv/linux/open64.c: New file.
9846 * sysdeps/unix/sysv/linux/pause.c: New file.
9847 * sysdeps/unix/sysv/linux/poll.c: New file.
9848 * sysdeps/unix/sysv/linux/pread.c: New file.
9849 * sysdeps/unix/sysv/linux/pread64.c: New file.
9850 * sysdeps/unix/sysv/linux/pselect.c: New file.
9851 * sysdeps/unix/sysv/linux/pwrite.c: New file.
9852 * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9853 * sysdeps/unix/sysv/linux/readv.c: New file.
9854 * sysdeps/unix/sysv/linux/recv.S: New file.
9855 * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9856 * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9857 * sysdeps/unix/sysv/linux/select.c: New file.
9858 * sysdeps/unix/sysv/linux/send.S: New file.
9859 * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9860 * sysdeps/unix/sysv/linux/sendto.S: New file.
9861 * sysdeps/unix/sysv/linux/sigpause.c: New file.
9862 * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9863 * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9864 * sysdeps/unix/sysv/linux/sigwait.c: New file.
9865 * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9866 * sysdeps/unix/sysv/linux/system.c: New file.
9867 * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9868 * sysdeps/unix/sysv/linux/wait.c: New file.
9869 * sysdeps/unix/sysv/linux/waitid.c: New file.
9870 * sysdeps/unix/sysv/linux/waitpid.c: New file.
9871 * sysdeps/unix/sysv/linux/writev.c: New file.
9872 * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9874 * pt-readv.c: Fix comment.
9876 2002-12-14 Jakub Jelinek <jakub@redhat.com>
9878 * tst-cleanup1.c: Include stdlib.h.
9880 * tst-cancel5.c: New test.
9881 * Makefile (tests): Add tst-cancel5.
9882 (tst-cancel5): Link against libc.so libpthread.so in that order.
9884 2002-12-13 Ulrich Drepper <drepper@redhat.com>
9886 * forward.c (test_loaded): Prevent recursive calls.
9888 * Makefile (routines): Add libc-cancellation.
9889 * libc-cancellation.c: New file.
9890 * descr.h (struct pthread): Add multiple_threads field.
9891 * allocatestack.c (allocate_stack): Initialize multiple_header field of
9892 new thread descriptor to 1.
9893 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9894 Initialize multiple_thread field after successful thread creation.
9895 * cancellation.c (__do_cancel): Move to pthreadP.h.
9896 (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9897 (__pthread_disable_asynccancel): Add internal_function attribute.
9898 * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9899 * pthread_setcancelstate.c: Likewise.
9900 * pthread_setcanceltype.c: Likewise.
9901 * pthread_exit.c: Likewise.
9902 * pthreadP.h (CANCELLATION_P): Likewise.
9903 (__do_cancel): Define as static inline.
9904 (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9905 (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9907 * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9908 fields. Define MULTIPLE_THREADS_OFFSET.
9909 * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9911 * sysdeps/unix/sysv/linux/accept.S: New file.
9912 * sysdeps/unix/sysv/linux/read.c: New file.
9913 * sysdeps/unix/sysv/linux/write.c: New file.
9914 * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9915 * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9916 initialization of __libc_locking_needed.
9917 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9918 __libc_locking_needed, use multiple_threads field in TCB.
9919 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9921 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9923 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9925 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9927 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9928 access to __libc_locking_needed for PIC.
9930 2002-12-12 Jakub Jelinek <jakub@redhat.com>
9932 * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9933 declare for libc.so.
9934 (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9936 (__libc_lock_lock): Put into statement expression.
9937 (__libc_lock_unlock): Remove trailing semicolon.
9938 * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9940 2002-12-12 Roland McGrath <roland@redhat.com>
9942 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9943 "m" constraint to refer to __libc_locking_needed. Declare it here.
9945 2002-12-12 Ulrich Drepper <drepper@redhat.com>
9947 * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9948 * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9949 Initialize __libc_locking_needed.
9950 * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9951 instead of __register_pthread_fork_handler.
9952 * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9953 * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9954 fork-gen with libc_pthread_init.
9955 * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9956 of __register_pthread_fork_handler.
9957 * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9958 of __register_pthread_fork_handler.
9959 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9960 __libc_locking_needed to determine whether lock prefix can be avoided.
9961 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9963 2002-12-11 Ulrich Drepper <drepper@redhat.com>
9965 * Makefile (tests): Add tst-cleanup1.
9966 * tst-cleanup1.c: New file.
9967 * cancellation.c (__cleanup_thread): Removed.
9968 (__do_cancel): Remove call to __cleanup_thread.
9969 * pthreadP.h: Remove __cleanup_thread prorotype.
9971 * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9972 Remember function and argument even if cancellation handler
9973 function is not available.
9974 (__libc_cleanup_region_end): Execute registered function directly if
9975 pthread functions are not available.
9976 (__libc_cleanup_end): Likewise.
9978 * init.c (__pthread_initialize_minimal): Fix initialization in
9979 static lib by preventing gcc from being too clever.
9981 2002-12-10 Ulrich Drepper <drepper@redhat.com>
9983 * init.c (__pthread_initialize_minimal): Remove unneccesary
9986 * Makefile (tests): We can run tst-locale2 now.
9988 2002-12-09 Ulrich Drepper <drepper@redhat.com>
9990 * Versions: Remove duplicated sigwait entry.
9992 2002-12-08 Ulrich Drepper <drepper@redhat.com>
9994 * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9997 * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9999 * pthreadP.h: Declare __pthread_enable_asynccancel and
10000 __pthread_disable_asynccancel.
10001 (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10002 (CANCEL_RESET): Use __pthread_disable_asynccancel.
10003 * cancellation.c (__pthread_enable_asynccancel): New function.
10004 (__pthread_disable_asynccancel): New function.
10005 * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10006 * pt-close.c: Likewise.
10007 * pt-connect.c: Likewise.
10008 * pt-creat.c: Likewise.
10009 * pt-fcntl.c: Likewise.
10010 * pt-fsync.c: Likewise.
10011 * pt-lseek.c: Likewise.
10012 * pt-lseek64.c: Likewise.
10013 * pt-msgrcv.c: Likewise.
10014 * pt-msgsnd.c: Likewise.
10015 * pt-msync.c: Likewise.
10016 * pt-nanosleep.c: Likewise.
10017 * pt-open.c: Likewise.
10018 * pt-open64.c: Likewise.
10019 * pt-pause.c: Likewise.
10020 * pt-poll.c: Likewise.
10021 * pt-pread.c: Likewise.
10022 * pt-pread64.c: Likewise.
10023 * pt-pselect.c: Likewise.
10024 * pt-pwrite.c: Likewise.
10025 * pt-pwrite64.c: Likewise.
10026 * pt-read.c: Likewise.
10027 * pt-readv.c: Likewise.
10028 * pt-recv.c: Likewise.
10029 * pt-recvfrom.c: Likewise.
10030 * pt-recvmsg.c: Likewise.
10031 * pt-select.c: Likewise.
10032 * pt-send.c: Likewise.
10033 * pt-sendmsg.c: Likewise.
10034 * pt-sendto.c: Likewise.
10035 * pt-sigpause.c: Likewise.
10036 * pt-sigsuspend.c: Likewise.
10037 * pt-sigtimedwait.c: Likewise.
10038 * pt-sigwait.c: Likewise.
10039 * pt-sigwaitinfo.c: Likewise.
10040 * pt-system.c: Likewise.
10041 * pt-tcdrain.c: Likewise.
10042 * pt-wait.c: Likewise.
10043 * pt-waitid.c: Likewise.
10044 * pt-waitpid.c: Likewise.
10045 * pt-write.c: Likewise.
10046 * pt-writev.c: Likewise.
10047 * pthread_join.c: Likewise.
10048 * pthread_timedjoin.c: Likewise.
10050 * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10051 (__xpg_sigpause): New function.
10052 * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10054 2002-12-07 Ulrich Drepper <drepper@redhat.com>
10056 * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10058 * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10059 _GI_pthread_cleanup_pop to pthreadP.h.
10061 * ftrylockfile.c: Use _IO_lock_trylock instead of
10062 pthread_mutex_trylock.
10064 * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10065 (CANCEL_RESET): Likewise.
10066 (__pthread_setcanceltype_): Declare.
10067 (__pthread_mutex_lock_internal): Declare.
10068 (__pthread_mutex_unlock_internal): Declare.
10069 (__pthread_once_internal): Declare.
10070 (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10071 (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10073 * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10074 and pthread_mutex_unlock.
10075 * pthread_cond_wait.c: Likewise.
10076 * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10077 * pthread_mutex_unlock.c: Likewise.
10079 * pthread_setcanceltype.c: Add additional alias
10080 __pthread_setcanceltype.
10082 * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10083 * sem_open.c (sem_open): Likewise.
10084 Use __libc_open, __libc_write, and __libc_close instead of
10085 open, write, and close respectively.
10087 * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10088 Rewrite as statement expression since it must return a value.
10090 * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10091 * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10094 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10095 alias __pthread_once_internal.
10097 * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10099 2002-12-06 Ulrich Drepper <drepper@redhat.com>
10101 * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10102 * tst-stdio1.c: New file.
10103 * tst-stdio2.c: New file.
10105 * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10107 * Makefile (tests): Comment out tst-locale2 for now.
10108 (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10110 * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10112 * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10113 Use _IO_lock_init instead of explicit assignment.
10115 * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10116 Define __libc_lock_* and __libc_lock_recursive macros with
10117 lowlevellock macros, not pthread mutexes.
10119 * flockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_lock instead
10120 of pthread_mutex_lock.
10121 * funlockfile.c: Include <bits/stdio-lock.h>. Use _IO_lock_unlock
10122 instead of pthread_mutex_unlock.
10124 2002-12-06 Roland McGrath <roland@redhat.com>
10126 * allocatestack.c (__stack_user): Use uninitialized defn.
10127 * init.c (__pthread_initialize_minimal): Initialize it here.
10129 2002-12-05 Roland McGrath <roland@redhat.com>
10131 * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10133 * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10135 * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10136 missing & here too.
10138 2002-12-05 Ulrich Drepper <drepper@redhat.com>
10140 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10142 * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10143 * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10144 * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10145 * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10146 for __libc_lock_* macros.
10147 * Makefile (routines): Add libc-lowlevellock.
10149 2002-10-09 Roland McGrath <roland@redhat.com>
10151 * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10152 Under [__PIC__], call the function via the pointer fetched for
10153 comparison rather than a call by name that uses the PLT.
10154 (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10155 (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10156 (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10157 (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10158 (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10160 2002-12-04 Roland McGrath <roland@redhat.com>
10162 * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10164 * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10165 * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10167 * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10169 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10171 * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10172 a completely opaque, non-integer type.
10173 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10175 2002-12-05 Jakub Jelinek <jakub@redhat.com>
10177 * sysdeps/i386/tls.h: Include stdlib.h.
10178 * sysdeps/x86_64/tls.h: Likewise.
10180 2002-12-04 Ulrich Drepper <drepper@redhat.com>
10182 * Makefile (tests): Add tst-locale2.
10183 (tests-static): Likewise.
10184 * tst-locale2.c: New file.
10186 * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10187 volatile and add memory clobbers to lock operations.
10189 2002-12-03 Ulrich Drepper <drepper@redhat.com>
10191 * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10192 * sysdeps/i386/i486/bits/atomic.h: New file.
10193 * sysdeps/i386/i586/bits/atomic.h: New file.
10194 * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10195 include i486 version.
10196 * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10197 * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10198 Patch by Marijn Ros <marijn@mad.scientist.com>.
10200 * allocatestack.c (get_cached_stack): Don't crash if we first
10201 found a stack with a larger size then needed.
10202 Reported by Hui Huang <hui.huang@sun.com>.
10204 * Makefile (tests): Add tst-sysconf.
10205 * tst-sysconf.c: New file.
10207 * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10208 PTHREAD_THREADS_MAX.
10210 2002-12-02 Roland McGrath <roland@redhat.com>
10212 * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10213 Declare using hidden_proto instead of attribute_hidden, so there are
10214 non-.hidden static symbols for gdb to find.
10215 (__pthread_keys): Likewise.
10216 * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10217 * allocatestack.c (__stack_user): Likewise.
10218 * pthread_create.c (__pthread_keys): Likewise.
10219 (__nptl_threads_events, __nptl_last_event): Make these static instead
10221 * pthread_key_create.c (__pthread_pthread_keys_max,
10222 __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10224 2002-12-02 Ulrich Drepper <drepper@redhat.com>
10226 * Makefile (tests): Add tst-locale1. If buid-static is yes link
10228 * tst-locale1.c: New file.
10230 * pthread_cond_timedwait.c: Include <stdlib.h>.
10232 * Makefile (tests): Add tst-fork2 and tst-fork3.
10233 * tst-fork2.c: New file.
10234 * tst-fork3.c: New file.
10236 2002-11-28 Ulrich Drepper <drepper@redhat.com>
10238 * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10240 * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10241 require it to 200112L.
10243 * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10244 instruction only if HAVE_CMOV is defined.
10245 * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10247 * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10249 * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10251 * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10253 * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10255 2002-11-27 Ulrich Drepper <drepper@redhat.com>
10257 * sysdeps/x86_64/bits/atomic.h: New file.
10259 * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10262 * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10263 possible since gettid cannot fail.
10265 * sysdeps/x86_64/pthreaddef.h: New file.
10267 * sysdeps/i386/pthreaddef.h (gettid): Removed.
10269 * sysdeps/x86_64/pthread_spin_init.c: New file.
10270 * sysdeps/x86_64/pthread_spin_lock.c: New file.
10271 * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10272 * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10274 * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10275 Add missing lock prefix. Minute optimization.
10277 * tst-spin2.c (main): Also check successful trylock call.
10279 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10280 syscall. Fix typo in case INTERNAL_SYSCALL is not used.
10282 * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10283 * sysdeps/pthread/pthread_spin_destroy.c: ...here. New file.
10285 * sysdeps/i386/pthread_sigmask.c: Removed. Use the generic code.
10286 * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10287 value in case of an error. Add support for INTERNAL_SYSCALL.
10289 * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10290 value in case of an error.
10292 * sysdeps/x86_64/tls.h: New file.
10294 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10296 * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface. It now
10297 takes the array member name and the index as parameters.
10298 (THREAD_SETMEM_NC): Likewise.
10299 * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10300 * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10303 * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10304 to decide which code to use.
10305 (THREAD_SETMEM_NC): Likewise.
10307 * allocatestack.c (queue_stack): Don't remove stack from list here.
10308 Do it in the caller. Correct condition to prematurely terminate
10309 loop to free stacks.
10310 (__deallocate_stack): Remove stack from list here.
10312 2002-11-26 Ulrich Drepper <drepper@redhat.com>
10314 * Makefile (tests): Add tst-stack1.
10315 * tst-stack1.c: New file.
10317 * allocatestack.c (allocate_stack): Initialize the TCB on a user
10320 * pthread_attr_getstack.c: Return bottom of the thread area.
10322 2002-11-25 Ulrich Drepper <drepper@redhat.com>
10324 * Makefile (libpthread-routines): Add pt-allocrtsig and
10325 pthread_kill_other_threads.
10326 * pt-allocrtsig.c: New file.
10327 * pthread_kill_other_threads.c: New file.
10328 * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10329 all three functions.
10330 * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10332 * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10333 __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10334 and __libc_allocate_rtsig_private.
10335 * Versions (libpthread): Export pthread_kill_other_threads_np,
10336 __libc_current_sigrtmin, and __libc_current_sigrtmax.
10338 2002-11-24 Ulrich Drepper <drepper@redhat.com>
10340 * allocatestack.c (allocate_stack): stackaddr in attribute points to
10341 the end of the stack. Adjust computations.
10342 When mprotect call fails dequeue stack and free it.
10343 * pthread_attr_setstack.c: Store top of the stack in stackaddr
10345 * pthread_getattr_np.c: Likewise.
10347 * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10350 2002-11-23 Ulrich Drepper <drepper@redhat.com>
10352 * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10353 attribute definitions. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10355 2002-11-22 Ulrich Drepper <drepper@redhat.com>
10357 * pthread_getspecific.c: Optimize access to first 2nd-level array.
10358 * pthread_setspecific.c: Likewise.
10360 2002-11-21 Ulrich Drepper <drepper@redhat.com>
10362 * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10363 definitions. Get them from the official place.
10364 * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10366 * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10367 Use new CLONE_ flags in clone() calls.
10369 * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10370 * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10372 * Versions: Add pthread_* functions for libc.
10373 * forward.c: New file.
10375 * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10377 * herrno.c: New file.
10380 * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10381 sem_trywait, and sem_timedwait. Add herrno and res.
10382 * sem_init.c: Don't initialize lock and waiters members.
10383 * sem_open.c: Likewise.
10384 * sem_post.c: Removed.
10385 * sem_wait.c: Removed.
10386 * sem_trywait.c: Removed.
10387 * sem_timedwait.c: Removed.
10388 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10389 Includes full implementations of sem_post, sem_wait, sem_trywait,
10391 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10392 for new implementation.
10393 * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10394 and waiters fields.
10396 * tst-sem3.c: Improve error message.
10397 * tst-signal3.c: Likewise.
10399 * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10400 to tell the kernel about the termination futex and to initialize tid
10401 member. Don't initialize main_thread.
10402 * descr.h (struct pthread): Remove main_thread member.
10403 * cancelllation.c (__do_cancel): Remove code handling main thread.
10404 The main thread is not special anymore.
10406 * allocatestack.c (__reclaim_stacks): Mark stacks as unused. Add
10407 size of the stacks to stack_cache_actsize.
10409 * pt-readv.c: Add missing "defined".
10410 * pt-sigwait.c: Likewise.
10411 * pt-writev.c: Likewise.
10413 2002-11-09 Ulrich Drepper <drepper@redhat.com>
10415 * Versions: Export __connect from libpthread.
10416 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10418 * Makefile (libpthread-routines): Add pt-raise.
10419 * sysdeps/unix/sysv/linux/raise.c: New file.
10420 * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10421 * sysdeps/generic/pt-raise.c: New file.
10423 * pthread_cond_init.c: Initialize all data elements of the condvar
10424 structure. Patch by Luca Barbieri <ldb@ldb.ods.org>.
10426 * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10427 * pthread_create.c: Likewise.
10429 * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10430 * tst-key1.c: New file.
10431 * tst-key2.c: New file.
10432 * tst-key3.c: New file.
10434 * Versions: Export pthread_detach for version GLIBC_2.0.
10435 Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10437 2002-11-08 Ulrich Drepper <drepper@redhat.com>
10439 * pthread_key_create.c: Terminate search after an unused key was found.
10440 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10442 * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10443 Patch by Luca Barbieri <ldb@ldb.ods.org>.
10445 2002-10-10 Ulrich Drepper <drepper@redhat.com>
10447 * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10448 dynamic lookup for errno in PIC.
10450 * allocatestack.c (get_cached_stack): Rearrange code slightly to
10451 release the stack lock as soon as possible.
10452 Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10453 the static TLS block.
10454 (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10456 * cancellation.c: Renamed from cancelation.c.
10457 * Makefile: Adjust accordingly.
10458 * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10459 * cleanup_defer.c: Use CANCELLATION_P.
10460 * pthread_testcancel.c: Likewise.
10461 * descr.h: Fix spelling in comments.
10462 * init.c: Likewise.
10463 * pthread_getattr_np.c: Likewise.
10464 * pthread_getschedparam.c: Likewise.
10465 * pthread_setschedparam.c: Likewise.
10466 * Versions: Likewise.
10468 * pt-pselect.c: New file.
10469 * Makefile (libpthread-routines): Add pt-pselect.
10470 * Versions: Add pselect.
10472 * tst-cancel4.c: New file.
10473 * Makefile (tests): Add tst-cancel4.
10475 2002-10-09 Ulrich Drepper <drepper@redhat.com>
10477 * pthread_mutex_lock.c: Always record lock ownership.
10478 * pthread_mutex_timedlock.c: Likewise.
10479 * pthread_mutex_trylock.c: Likewise.
10481 * pt-readv.c: New file.
10482 * pt-writev.c: New file.
10483 * pt-creat.c: New file.
10484 * pt-msgrcv.c: New file.
10485 * pt-msgsnd.c: New file.
10486 * pt-poll.c: New file.
10487 * pt-select.c: New file.
10488 * pt-sigpause.c: New file.
10489 * pt-sigsuspend.c: New file.
10490 * pt-sigwait.c: New file.
10491 * pt-sigwaitinfo.c: New file.
10492 * pt-waitid.c: New file.
10493 * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10494 pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10495 pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10496 * Versions: Add all the new functions.
10498 * tst-exit1.c: New file.
10499 * Makefile (tests): Add tst-exit1.
10501 * sem_timedwait.c: Minor optimization for more optimal fastpath.
10503 2002-10-08 Ulrich Drepper <drepper@redhat.com>
10505 * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10507 * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10508 call. pthread_join is an official cancellation point.
10509 * pthread_timedjoin.c: Likewise.
10511 * pthread_cond_wait.c: Revert order in which internal lock are dropped
10512 and the condvar's mutex are retrieved.
10513 * pthread_cond_timedwait.c: Likewise.
10514 Reported by dice@saros.East.Sun.COM.
10516 2002-10-07 Ulrich Drepper <drepper@redhat.com>
10518 * pthreadP.h: Cut out all type definitions and move them...
10519 * sysdeps/unix/sysv/linux/internaltypes.h: ...here. New file.
10520 * pthreadP.h: Include <internaltypes.h>.
10522 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10523 performance tweaks.
10525 * sem_trywait.c: Shuffle #includes around to get right order.
10526 * sem_timedwait.c: Likewise.
10527 * sem_post.c: Likewise.
10528 * sem_wait.c: Likewise.
10530 * nptl 0.3 released.
10532 * Makefile (tests): Add tst-signal3.
10533 * tst-signal3.c: New file.
10535 2002-10-05 Ulrich Drepper <drepper@redhat.com>
10537 * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10538 the asms modify the sem object.
10539 (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10541 * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10542 the actual members.
10543 * pthreadP.h (struct sem): New type. Actual semaphore type.
10544 * semaphoreP.h: Include pthreadP.h.
10545 * sem_getvalue.c: Adjust to sem_t change.
10546 * sem_init.c: Likewise.
10547 * sem_open.c: Likewise.
10548 * sem_post.c: Likewise.
10549 * sem_timedwait.c: Likewise.
10550 * sem_trywait.c: Likewise.
10551 * sem_wait.c: Likewise.
10553 2002-10-04 Ulrich Drepper <drepper@redhat.com>
10555 * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10556 * tst-basic2.c: New file.
10557 * tst-exec1.c: New file.
10558 * tst-exec2.c: New file.
10559 * tst-exec3.c: New file.
10561 * tst-fork1.c: Remove extra */.
10563 * nptl 0.2 released. The API for IA-32 is complete.